This commit is contained in:
sentsin
2017-09-01 07:52:28 +08:00
parent 50a68bf875
commit b644b76ce3
33 changed files with 103 additions and 75 deletions

View File

@@ -134,8 +134,9 @@ layui.use('laydate', function(){
elem: '#test2'
,format: 'y年MM月dd日'
//,value: new Date(2017,7,20)
,min: '2016-9-20'
,max: '2018-9-20'
//,min: '2016-10-14'
//,max: -1
,value: '1989年10月14日'
,ready: function(date){
console.log(date);
}
@@ -210,9 +211,10 @@ layui.use('laydate', function(){
//自定义重要日
var ins555 = laydate.render({
elem: '#test555'
,calendar: true //是否开启公历重要节日
//,calendar: true //是否开启公历重要节日
,mark: { //标记重要日子
'0-8-15': '纪念' //0代表每年
,'0-0-15': '中旬'
,'2017-8-20': '发布'
,'2017-8-31': '月底'
}

View File

@@ -104,6 +104,7 @@ layui.use(['laypage', 'layer'], function(){
laypage.render({
elem: 'demo7'
,count: 100
//,groups: 0
,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
,jump: function(obj){
console.log(obj)

View File

@@ -77,6 +77,7 @@ body{padding: 20px;}
<table class="layui-table" lay-data="{width:723, height:235, url:'json/table/demo2.json', page: true, limit: 6}">
<thead>
<tr>
<th lay-data="{checkbox:true, fixed:'left'}" rowspan="2"></th>
<th lay-data="{field:'username', width:80}" rowspan="2">联系人</th>
<th lay-data="{field:'amount', width:120}" rowspan="2">金额</th>
<th lay-data="{align:'center'}" colspan="3">地址</th>
@@ -85,6 +86,7 @@ body{padding: 20px;}
<th lay-data="{field:'province', width:80}"></th>
<th lay-data="{field:'city', width:120}"></th>
<th lay-data="{field:'county', width:300}">详细</th>
<th lay-data="{fixed: 'right', width: 120, align: 'center'}" rowspan="2">操作</th>
</tr>
</thead>
</table>
@@ -297,11 +299,16 @@ layui.use('table', function(){
//监听排序
table.on('sort(test)', function(obj){
console.log(this, obj)
console.log(this, obj.field, obj.type)
return;
return
table.reload('test', {
height: 300
initSort: obj
,where: { //重新请求服务端
key: obj.field //排序字段
,order: obj.type //排序方式
}
//,height: 300
});
});

View File

@@ -119,6 +119,7 @@ layui.use('upload', function(){
elem: '#test2'
,url: ''
,multiple: true
,size: 1024
,before: function(obj){
//预读本地文件示例不支持ie8
obj.preview(function(index, file, result){