diff --git a/examples/laydate.html b/examples/laydate.html index 84fc0633..2acd3c85 100644 --- a/examples/laydate.html +++ b/examples/laydate.html @@ -23,6 +23,8 @@ body{padding: 50px 100px;} +
111
+



日期选择器: @@ -316,6 +318,14 @@ layui.use('laydate', function(){ console.log(value) } }); + + laydate.render({ + elem: '#test-div', + min: '2017-7-7', + max: '2017-7-8', + value: '2017-7-8' + }); + }); diff --git a/test/layui.js b/test/layui.js index d0b0214b..d5dc5fe9 100644 --- a/test/layui.js +++ b/test/layui.js @@ -55,6 +55,7 @@ describe('layui', function () { it('router querystring', function () { expect(layui.router('#/a=1/b=2/c=')).to.deep.equal($.extend({}, defaultData, { + href: 'a=1/b=2/c=', search: { a: '1', b: '2', @@ -75,7 +76,8 @@ describe('layui', function () { it('router hash', function () { expect(layui.router('#/name#layui')).to.deep.equal($.extend({}, defaultData, { hash: '#layui', - path: ['name'] + path: ['name'], + href: 'name#layui' })); expect(layui.router('#/name#layui').hash).to.equal('#layui'); expect(layui.router('#/name#layui=1').hash).to.equal('#layui=1'); @@ -90,7 +92,8 @@ describe('layui', function () { search: { c: '2' }, - hash: '#hash' + hash: '#hash', + href: 'a/b/c=2#hash' }); }); });