table的合计行现在可以指定保留的小数点位了。如果不指定的话就是默认的2位,可以通过参数 totalRowDecimalScale 来指定。
This commit is contained in:
@@ -177,7 +177,7 @@ body{padding: 20px; /*overflow-y: scroll;*/}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="../src/layui.js" src="//layui.hcwl520.com.cn/layui-v2.4.5/layui.js" charset="utf-8"></script>
|
||||
<script src="../src/layui.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use('table', function(){
|
||||
var table = layui.table;
|
||||
@@ -397,7 +397,8 @@ layui.use('table', function(){
|
||||
,{field: 'sign', title: '签名', width: 150}
|
||||
,{field: 'sex', title: '性别', width: 80}
|
||||
,{field: 'city', title: '城市', width: 100}
|
||||
,{field: 'experience', title: '积分', width: 80, sort: true}
|
||||
// ,{field: 'experience', title: '积分', width: 80, sort: true}
|
||||
,{field: 'experience', title: '积分', width: 80, sort: true, totalRow: true, totalRowDecimalScale: 20}
|
||||
]]
|
||||
,data: [{
|
||||
"id": "10001"
|
||||
@@ -497,6 +498,7 @@ layui.use('table', function(){
|
||||
,page: true //是否显示分页
|
||||
,limits: [3,5,10]
|
||||
,limit: 3 //每页默认显示的数量
|
||||
,totalRow: true
|
||||
//,loading: false //请求数据时,是否显示loading
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user