diff --git a/bower.json b/bower.json index cd1473d..b1cfd00 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "layui", "main": "src/layui.js", - "version": "2.2.6", + "version": "2.3.0-rc1", "homepage": "https://github.com/sentsin/layui", "authors": [ "sentsin " diff --git a/examples/form.html b/examples/form.html index 19ed5fb..c639c28 100644 --- a/examples/form.html +++ b/examples/form.html @@ -18,48 +18,6 @@ body{padding: 10px;} -
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - - -
-
- - -
-
-
-
@@ -142,14 +100,14 @@ body{padding: 10px;}
- - - - - - - + + + + + +
@@ -173,13 +131,14 @@ body{padding: 10px;}
- +
+
@@ -232,20 +191,20 @@ layui.use('form', function(){ } ,pass: [/(.+){6,12}$/, '密码必须6到12位'] }); - - form.val('first',{ - 'xxx': '猪猪猪' - ,'title': '测试' - ,'phone': 18829264233 - ,'email': 2321582517 + + //初始赋值 + form.val('first', { + 'title': '测试' + ,'phone': 11111111111 + ,'email': 'xu@sentsin.com' ,'password': 123123 ,'quiz': 2 ,'interest': 3 ,'like[write]': true - ,'open': false + //,'open': false ,'sex': '男' - ,'desc': '一二三四一二三四' - }) + ,'desc': 'form 是我们非常看重的一块' + }); //事件监听 @@ -278,6 +237,7 @@ layui.use('form', function(){ //监听提交 form.on('submit(*)', function(data){ console.log(data) + alert(JSON.stringify(data.field)); return false; }); diff --git a/examples/rate.html b/examples/rate.html index 3867905..f2424ad 100644 --- a/examples/rate.html +++ b/examples/rate.html @@ -104,13 +104,13 @@ layui.use(['rate'], function(){ ,half: true ,theme: '#FF5722' }) - + + //只读 rate.render({ elem: '#test4' - ,length: 8 - ,value: 4.8 - ,reader: true - ,theme: '#01AAED' + ,value: 3.5 + ,half: true + ,readonly: true }) }); diff --git a/package.json b/package.json index fd81d10..3185a3a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "layui-src", "realname": "layui", - "version": "2.2.6", + "version": "2.3.0-rc1", "independents": { "layim": "3.7.6" }, diff --git a/src/css/layui.css b/src/css/layui.css index 4674483..e2a1af5 100644 --- a/src/css/layui.css +++ b/src/css/layui.css @@ -46,11 +46,11 @@ a cite{font-style: normal; *cursor:pointer;} /** 图标字体 **/ @font-face {font-family: 'layui-icon'; - src: url('../font/iconfont.eot?v=230'); - src: url('../font/iconfont.eot?v=230#iefix') format('embedded-opentype'), - url('../font/iconfont.svg?v=230#iconfont') format('svg'), - url('../font/iconfont.woff?v=230') format('woff'), - url('../font/iconfont.ttf?v=230') format('truetype'); + src: url('../font/iconfont.eot?v=230-rc1'); + src: url('../font/iconfont.eot?v=230-rc1#iefix') format('embedded-opentype'), + url('../font/iconfont.svg?v=230-rc1#iconfont') format('svg'), + url('../font/iconfont.woff?v=230-rc1') format('woff'), + url('../font/iconfont.ttf?v=230-rc1') format('truetype'); } .layui-icon{ @@ -100,7 +100,7 @@ a cite{font-style: normal; *cursor:pointer;} .layui-icon-file:before{content:"\e621"} .layui-icon-layouts:before{content:"\e632"} .layui-icon-rate-half:before{content:"\e6c9"} -.layui-icon-layim-add:before{content:"\e608"} +.layui-icon-add-circle-fine:before{content:"\e608"} .layui-icon-prev-circle:before{content:"\e633"} .layui-icon-read:before{content:"\e705"} .layui-icon-404:before{content:"\e61c"} @@ -141,7 +141,6 @@ a cite{font-style: normal; *cursor:pointer;} .layui-icon-align-center:before{content:"\e647"} .layui-icon-align-right:before{content:"\e648"} .layui-icon-align-left:before{content:"\e649"} -.layui-icon-refresh-2:before{content:"\1002"} .layui-icon-loading-1:before{content:"\e63e"} .layui-icon-return:before{content:"\e65c"} .layui-icon-fonts-strong:before{content:"\e62b"} @@ -204,11 +203,11 @@ a cite{font-style: normal; *cursor:pointer;} .layui-icon-star-fill:before{content:"\e658"} .layui-icon-rate:before{content:"\e67b"} .layui-icon-template-1:before{content:"\e656"} -.layui-icon-loading-2:before{content:"\e66d"} .layui-icon-vercode:before{content:"\e679"} .layui-icon-cellphone:before{content:"\e678"} + /* 基本布局 */ .layui-main{position: relative; width: 1140px; margin: 0 auto;} .layui-header{position: relative; z-index: 1000; height: 60px;} @@ -609,13 +608,13 @@ hr, .layui-timeline-item:before{background-color: #e6e6e6;} .layui-select-disabled .layui-disabled{border-color: #eee !important;} .layui-select-disabled .layui-edge{border-top-color: #d2d2d2} -/* 复选框 */.layui-form-checkbox{position: relative; display: inline-block; vertical-align: middle; height: 30px; line-height: 28px; margin-right: 10px; padding-right: 30px; border: 1px solid #d2d2d2; background-color: #fff; cursor: pointer; font-size: 0; border-radius: 2px; -webkit-transition: .1s linear; transition: .1s linear; box-sizing: border-box;} -.layui-form-checkbox:hover{border: 1px solid #c2c2c2;} +/* 复选框 */.layui-form-checkbox{position: relative; display: inline-block; vertical-align: middle; height: 30px; line-height: 30px; margin-right: 10px; padding-right: 30px; background-color: #fff; cursor: pointer; font-size: 0; -webkit-transition: .1s linear; transition: .1s linear; box-sizing: border-box;} +.layui-form-checkbox:hover{} .layui-form-checkbox *{display: inline-block; vertical-align: middle;} -.layui-form-checkbox span{padding: 0 10px; height: 100%; font-size: 14px; background-color: #d2d2d2; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} +.layui-form-checkbox span{padding: 0 10px; height: 100%; font-size: 14px; border-radius: 2px 0 0 2px; background-color: #d2d2d2; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} .layui-form-checkbox:hover span{background-color: #c2c2c2;} -.layui-form-checkbox i{position: absolute; right: 0; width: 30px; color: #fff; font-size: 20px; text-align: center;} -.layui-form-checkbox:hover i{color: #c2c2c2;} +.layui-form-checkbox i{position: absolute; right: 0; top: 0; width: 30px; height: 28px; border: 1px solid #d2d2d2; border-left: none; border-radius: 0 2px 2px 0; color: #fff; font-size: 20px; text-align: center;} +.layui-form-checkbox:hover i{border-color: #c2c2c2; color: #c2c2c2;} .layui-form-checked, .layui-form-checked:hover{border-color: #5FB878;} .layui-form-checked span, .layui-form-checked:hover span{background-color: #5FB878;} .layui-form-checked i, .layui-form-checked:hover i{color: #5FB878;} @@ -630,15 +629,16 @@ hr, .layui-timeline-item:before{background-color: #e6e6e6;} .layui-checkbox-disbaled[lay-skin="primary"]:hover i{border-color: #d2d2d2;} .layui-form-item .layui-form-checkbox[lay-skin="primary"]{margin-top: 10px;} -/* 复选框-开关风格 */.layui-form-switch{position: relative; display: inline-block; vertical-align: middle; height: 22px; line-height: 22px; width: 42px; padding: 0 5px; margin-top: 8px; border: 1px solid #d2d2d2; border-radius: 20px; cursor: pointer; background-color: #fff; -webkit-transition: .1s linear; transition: .1s linear;} +/* 复选框-开关风格 */.layui-form-switch{position: relative; display: inline-block; vertical-align: middle; height: 22px; line-height: 22px; min-width: 35px; padding: 0 5px; margin-top: 8px; border: 1px solid #d2d2d2; border-radius: 20px; cursor: pointer; background-color: #fff; -webkit-transition: .1s linear; transition: .1s linear;} .layui-form-switch i{position: absolute; left: 5px; top: 3px; width: 16px; height: 16px; border-radius: 20px; background-color: #d2d2d2; -webkit-transition: .1s linear; transition: .1s linear;} -.layui-form-switch em{position: absolute; right: 5px; top: 0; width: 25px; padding: 0!important; text-align: center!important; color: #999!important; font-style: normal!important; font-size: 12px;} +.layui-form-switch em{position: relative; top: 0; width: 25px; margin-left: 21px; padding: 0!important; text-align: center!important; color: #999!important; font-style: normal!important; font-size: 12px;} .layui-form-onswitch{border-color: #5FB878; background-color: #5FB878;} -.layui-form-onswitch i{left: 32px; background-color: #fff;} -.layui-form-onswitch em{left: 5px; right: auto; color: #fff!important;} +.layui-form-onswitch i{left: 100%; margin-left: -21px; background-color: #fff;} +.layui-form-onswitch em{margin-left: 5px; margin-right: 21px; color: #fff!important;} .layui-checkbox-disbaled{border-color: #e2e2e2 !important;} .layui-checkbox-disbaled span{background-color: #e2e2e2 !important;} +.layui-checkbox-disbaled i{border-color: #e2e2e2 !important;} .layui-checkbox-disbaled:hover i{color: #fff !important;} /* 单选框 */ @@ -882,15 +882,14 @@ body .layui-table-tips .layui-layer-content{background: none; padding: 0; box-sh .layui-upload-wrap{position: relative; display: inline-block; vertical-align: middle;} .layui-upload-wrap .layui-upload-file{display: block!important; position: absolute; left: 0; top: 0; z-index: 10; font-size: 100px; width: 100%; height: 100%; opacity: .01; filter: Alpha(opacity=1); cursor: pointer;} -/** 评分组件 **/ -.layui-icon-rate, -.layui-icon-rate-solid, -.layui-icon-rate-half{ font-size: 20px; color: #FFB800;} +/** 评分组件 By star1029 **/ .layui-rate, .layui-rate *{display: inline-block; vertical-align: middle;} .layui-rate{list-style: none; padding: 10px 5px 10px 0; font-size: 0;} -.layui-rate li i{margin-right: 5px; transition: all .3s; -webkit-transition: all .3s;} +.layui-rate li i.layui-icon{ font-size: 20px; color: #FFB800;} +.layui-rate li i.layui-icon{margin-right: 5px; transition: all .3s; -webkit-transition: all .3s;} .layui-rate li i:hover{cursor: pointer; transform: scale(1.12); -webkit-transform: scale(1.12);} +.layui-rate[readonly] li i:hover{cursor: default; transform: scale(1);} /** 代码修饰器 **/ .layui-code{position: relative; margin: 10px 0; padding: 15px; line-height: 20px; border: 1px solid #ddd; border-left-width: 6px; background-color: #F2F2F2; color: #333; font-family: Courier New; font-size: 12px;} diff --git a/src/font/iconfont.eot b/src/font/iconfont.eot index d16be99..961c051 100644 Binary files a/src/font/iconfont.eot and b/src/font/iconfont.eot differ diff --git a/src/font/iconfont.svg b/src/font/iconfont.svg index 04a9436..401e773 100644 --- a/src/font/iconfont.svg +++ b/src/font/iconfont.svg @@ -141,7 +141,7 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- - + @@ -264,9 +264,6 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- - - - @@ -453,9 +450,6 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- - - - diff --git a/src/font/iconfont.ttf b/src/font/iconfont.ttf index 09dd1b1..46a1267 100644 Binary files a/src/font/iconfont.ttf and b/src/font/iconfont.ttf differ diff --git a/src/font/iconfont.woff b/src/font/iconfont.woff index b89a9e5..0cb6d7e 100644 Binary files a/src/font/iconfont.woff and b/src/font/iconfont.woff differ diff --git a/src/lay/modules/form.js b/src/lay/modules/form.js index 01b2e6b..72f0a27 100644 --- a/src/lay/modules/form.js +++ b/src/lay/modules/form.js @@ -14,7 +14,8 @@ layui.define('layer', function(exports){ ,hint = layui.hint() ,device = layui.device() - ,MOD_NAME = 'form', ELEM = '.layui-form', THIS = 'layui-this', SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled' + ,MOD_NAME = 'form', ELEM = '.layui-form', THIS = 'layui-this' + ,SHOW = 'layui-show', HIDE = 'layui-hide', DISABLED = 'layui-disabled' ,Form = function(){ this.config = { @@ -68,7 +69,7 @@ layui.define('layer', function(exports){ Form.prototype.on = function(events, callback){ return layui.onevent.call(this, MOD_NAME, events, callback); }; - + //初始赋值 Form.prototype.val = function(filter, object){ var that = this @@ -76,14 +77,25 @@ layui.define('layer', function(exports){ formElem.each(function(index, item){ var itemFrom = $(this); layui.each(object, function(key, value){ - var itemElem = itemFrom.find('[name="'+ key +'"]'); - itemElem.val(value); + var itemElem = itemFrom.find('[name="'+ key +'"]') + ,type; + + //如果对应的表单不存在,则不执行 if(!itemElem[0]) return; - - //如果有 checked 的内置属性,就改变 checked 属性的值 - if('checked' in itemElem[0]){ + type = itemElem[0].type; + + //如果为复选框 + if(type === 'checkbox'){ itemElem[0].checked = value; - } + } else if(type === 'radio') { //如果为单选框 + itemElem.each(function(){ + if(this.value === value ){ + this.checked = true + } + }); + } else { //其它类型的表单 + itemElem.val(value); + } }); }); form.render(null, filter); @@ -101,8 +113,10 @@ layui.define('layer', function(exports){ select: function(){ var TIPS = '请选择', CLASS = 'layui-form-select', TITLE = 'layui-select-title' ,NONE = 'layui-select-none', initValue = '', thatInput + ,selects = elemForm.find('select') - ,selects = elemForm.find('select'), hide = function(e, clear){ + //隐藏 select + ,hide = function(e, clear){ if(!$(e.target).parent().hasClass(TITLE) || clear){ $('.'+CLASS).removeClass(CLASS+'ed ' + CLASS+'up'); thatInput && initValue && thatInput.val(initValue); @@ -110,31 +124,38 @@ layui.define('layer', function(exports){ thatInput = null; } + //各种事件 ,events = function(reElem, disabled, isSearch){ var select = $(this) ,title = reElem.find('.' + TITLE) ,input = title.find('input') ,dl = reElem.find('dl') ,dds = dl.children('dd') - ,index = Number(select.val()? select.val(): -1) + 1 ; + ,index = this.selectedIndex //当前选中的索引 + ,nearElem; //select 组件当前选中的附近元素,用于辅助快捷键功能 if(disabled) return; //展开下拉 var showDown = function(){ - var top = reElem.offset().top + reElem.outerHeight() + 5 - win.scrollTop() + var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop() ,dlHeight = dl.outerHeight(); + + index = select[0].selectedIndex; //获取最新的 selectedIndex reElem.addClass(CLASS+'ed'); dds.removeClass(HIDE); - //确保没有选择的时候第一个也会有样式 - dl.children('dd:eq('+index+')').addClass(THIS); + + //初始选中样式 + dds.eq(index).addClass(THIS).siblings().removeClass(THIS); + //上下定位识别 - if(top + dlHeight > win.height() && top >= dlHeight){ + if(top + dlHeight > $win.height() && top >= dlHeight){ reElem.addClass(CLASS + 'up'); } }, hideDown = function(choose){ reElem.removeClass(CLASS+'ed ' + CLASS+'up'); input.blur(); + nearElem = null; if(choose) return; @@ -162,64 +183,68 @@ layui.define('layer', function(exports){ input.focus(); }); - //键盘事件 - input.on('keyup', function(e){ + //select 中 input 键盘事件 + input.on('keyup', function(e){ //键盘松开 var keyCode = e.keyCode; - //Tab键 + + //Tab键展开 if(keyCode === 9){ showDown(); } - }).on('keydown', function(e){ + }).on('keydown', function(e){ //键盘按下 var keyCode = e.keyCode; - //Tab键 + + //Tab键隐藏 if(keyCode === 9){ hideDown(); - } - //up 键 - if(keyCode === 38){ - e.preventDefault(); - index--; - // 如果是不可点击状态,则跳过 - if(dl.children('dd:eq('+index+')').hasClass(DISABLED)) index--; - if(index < 0) index = 0; - - dl.children('dd:eq('+index+')').addClass(THIS).siblings().removeClass(THIS); } - //down 键 - if(keyCode === 40){ + + //标注 dd 的选中状态 + var setThisDd = function(prevNext, thisElem){ + var nearDd, cacheNearElem; e.preventDefault(); - index++; - if(dl.children('dd:eq('+index+')').hasClass(DISABLED)) index++; - if(index > dds.length - 1) index = dds.length - 1; + + //得到当前队列元素 + thisElem = function(){ + if(thisElem && thisElem[0]){ + return thisElem; + } + if(nearElem && nearElem[0]){ + return nearElem; + } + return dds.eq(index); + }(); + + cacheNearElem = thisElem[prevNext](); //当前元素的附近元素 + nearDd = thisElem[prevNext]('dd'); //当前元素的 dd 元素 + + //如果附近的元素不存在,则停止执行 + if(!cacheNearElem[0]) return; + + //记录附近的元素,让其成为下一个当前元素 + nearElem = thisElem[prevNext](); - dl.children('dd:eq('+index+')').addClass(THIS).siblings().removeClass(THIS); - } - //回车键 + //如果附近不是 dd ,或者附近的 dd 元素是禁用状态,则进入递归查找 + if(!nearDd[0] || nearDd.hasClass(DISABLED)){ + return setThisDd(prevNext, nearElem); + } + + //标注样式 + nearDd.addClass(THIS).siblings().removeClass(THIS); + }; + + + if(keyCode === 38) setThisDd('prev'); //Up 键 + if(keyCode === 40) setThisDd('next'); //Down 键 + + //Enter 键 if(keyCode === 13){ e.preventDefault(); - var othis = dl.children('dd:eq('+index+')') - ,value = othis.attr('lay-value') - ,filter = select.attr('lay-filter'); //获取过滤器 - - if(index === 0){ - input.val(''); - } else { - input.val(othis.text()); - } - - select.val(value).removeClass('layui-form-danger') - layui.event.call(this, MOD_NAME, 'select('+ filter +')', { - elem: select[0] - ,value: value - ,othis: reElem - }); - - hideDown(true); - + dl.children('dd.'+THIS).trigger('click'); } }); - //检测值是否不属于select项 + //检测值是否不属于 select 项 var notOption = function(value, callback, origin){ var num = 0; layui.each(dds, function(){ @@ -259,8 +284,9 @@ layui.define('layer', function(exports){ if(isSearch){ input.on('keyup', search).on('blur', function(e){ - thatInput = input; - initValue = dl.find('.' + THIS).html(); + var selectedIndex = select[0].selectedIndex; + thatInput = input; //当前的 select 中的 input 元素 + initValue = $(select[0].options[selectedIndex]).html(); //重新获得初始选中值 setTimeout(function(){ notOption(input.val(), function(none){ initValue || input.val(''); //none && !initValue @@ -273,15 +299,14 @@ layui.define('layer', function(exports){ dds.on('click', function(){ var othis = $(this), value = othis.attr('lay-value'); var filter = select.attr('lay-filter'); //获取过滤器 + if(othis.hasClass(DISABLED)) return false; if(othis.hasClass('layui-select-tips')){ input.val(''); - index = 0; } else { input.val(othis.text()); othis.addClass(THIS); - index = Number(value) + 1; } othis.siblings().removeClass(THIS); @@ -300,8 +325,7 @@ layui.define('layer', function(exports){ return false; }); - //关闭下拉 - $(document).off('click', hide).on('click', hide); + $(document).off('click', hide).on('click', hide); //点击其它元素关闭 select } selects.each(function(index, select){ @@ -320,10 +344,18 @@ layui.define('layer', function(exports){ ) : TIPS; //替代元素 - var reElem = $(['
' - ,'
' + var reElem = $(['
' + ,'
' + ,('') //禁用状态 ,'
' - ,'
'+ function(options){ + ,'
' + ,function(options){ var arr = []; layui.each(options, function(index, item){ if(index === 0 && !item.value){ @@ -380,19 +412,34 @@ layui.define('layer', function(exports){ checks.each(function(index, check){ var othis = $(this), skin = othis.attr('lay-skin') - ,text = (othis.attr('lay-text')||'').split('|'), disabled = this.disabled; + ,text = (othis.attr('lay-text') || '').split('|'), disabled = this.disabled; if(skin === 'switch') skin = '_'+skin; var RE_CLASS = CLASS[skin] || CLASS.checkbox; if(typeof othis.attr('lay-ignore') === 'string') return othis.show(); //替代元素 - var hasRender = othis.next('.' + RE_CLASS[0]); - var reElem = $(['
' - ,{ - _switch: ''+ ((check.checked ? text[0] : text[1])||'') +'' - }[skin] || ((check.title.replace(/\s/g, '') ? (''+ check.title +'') : '') +''+ (skin ? '' : '') +'') + var hasRender = othis.next('.' + RE_CLASS[0]) + ,reElem = $(['
' + ,function(){ //不同风格的内容 + var title = check.title.replace(/\s/g, '') + ,type = { + //复选框 + checkbox: [ + (title ? (''+ check.title +'') : '') + ,'' + ].join('') + + //开关 + ,_switch: ''+ ((check.checked ? text[0] : text[1]) || '') +'' + }; + return type[skin] || type['checkbox']; + }() ,'
'].join('')); hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender @@ -441,7 +488,9 @@ layui.define('layer', function(exports){ hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender //替代元素 - var reElem = $(['
' + var reElem = $(['
' //禁用状态 ,''+ ICON[radio.checked ? 0 : 1] +'' ,'
'+ function(){ var title = radio.title || ''; @@ -550,12 +599,12 @@ layui.define('layer', function(exports){ //自动完成渲染 var form = new Form() - ,dom = $(document), win = $(window); + ,$dom = $(document), $win = $(window); form.render(); //表单reset重置渲染 - dom.on('reset', ELEM, function(){ + $dom.on('reset', ELEM, function(){ var filter = $(this).attr('lay-filter'); setTimeout(function(){ form.render(null, filter); @@ -563,7 +612,7 @@ layui.define('layer', function(exports){ }); //表单提交事件 - dom.on('submit', ELEM, submit) + $dom.on('submit', ELEM, submit) .on('click', '*[lay-submit]', submit); exports(MOD_NAME, form); diff --git a/src/lay/modules/laypage.js b/src/lay/modules/laypage.js index d6e92f0..e29d0bf 100644 --- a/src/lay/modules/laypage.js +++ b/src/lay/modules/laypage.js @@ -162,7 +162,7 @@ layui.define(function(exports){ return options.join('') +''; }() - //刷新 + //刷新当前页 ,refresh: ['' ,'' ,''].join('') diff --git a/src/lay/modules/rate.js b/src/lay/modules/rate.js index 898a18b..b18cb1b 100644 --- a/src/lay/modules/rate.js +++ b/src/lay/modules/rate.js @@ -1,7 +1,7 @@ /** @Title: layui.rate 评分评星 - @Author: star + @Author: star1029 @License:MIT */ @@ -58,7 +58,7 @@ layui.define('jquery',function(exports){ Class.prototype.config = { length: 5 //初始长度 ,text: false //是否显示评分等级 - ,reader: false //是否只读 + ,readonly: false //是否只读 ,half: false //是否可以半星 ,value: 0 //星星选中个数 ,theme: '' @@ -80,7 +80,7 @@ layui.define('jquery',function(exports){ } //组件模板 - var temp = '
    '; + var temp = '
      '; for(var i = 1;i <= options.length;i++){ var item = '