Javascript 使最后一行不可排序
我的angular项目中有可排序的表行,但排序行还包含查询ui代码元素,现在我不想使最后一行不可排序 HTML 以下是JSFIDLE的工作原理:Javascript 使最后一行不可排序,javascript,jquery,angularjs,jquery-ui,Javascript,Jquery,Angularjs,Jquery Ui,我的angular项目中有可排序的表行,但排序行还包含查询ui代码元素,现在我不想使最后一行不可排序 HTML 以下是JSFIDLE的工作原理: 那么,如何使最后一行不可排序?如果您需要任何其他信息,请让我知道,我会提供。提前谢谢只需将它们移动到下面的 <table style="width:auto;" class="table table-bordered"> <thead> <tr> <th>Index</th&
那么,如何使最后一行不可排序?如果您需要任何其他信息,请让我知道,我会提供。提前谢谢只需将它们移动到下面的
<table style="width:auto;" class="table table-bordered">
<thead>
<tr>
<th>Index</th>
<th>Count</th>
</tr>
</thead>
<tbody ui:sortable ng:model="list">
<tr ng:repeat="item in list" class="item" style="cursor: move;">
<td>{{$index}}</td>
<td>{{item}}</td>
</tr>
</tbody>{{list}}
<tfoot>
<tr>
<td>Non Sortable</td>
<td>Non Sortable</td>
</tr>
</tfoot>
</table>
指数
计数
{{$index}}
{{item}}
{{list}}
不可排序
不可排序
lol:D我在这里笑得屁滚尿流。我怎么没想到xD-Thx。我会尽快接受你的答复allowed@Valor_哈哈:)谢谢
var myapp = angular.module('myapp', ['ui']);
myapp.controller('controller', function ($scope) {
$scope.list = ["one", "two", "thre", "four", "five", "six"];
});
angular.bootstrap(document, ['myapp']);
<table style="width:auto;" class="table table-bordered">
<thead>
<tr>
<th>Index</th>
<th>Count</th>
</tr>
</thead>
<tbody ui:sortable ng:model="list">
<tr ng:repeat="item in list" class="item" style="cursor: move;">
<td>{{$index}}</td>
<td>{{item}}</td>
</tr>
</tbody>{{list}}
<tfoot>
<tr>
<td>Non Sortable</td>
<td>Non Sortable</td>
</tr>
</tfoot>
</table>