From cbba1d984a7ca44931c90abe48d411ab86c5ed20 Mon Sep 17 00:00:00 2001 From: xuexb Date: Mon, 8 Jan 2018 04:01:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20layui.router=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20href=20=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/laydate.html | 10 ++++++++++ test/layui.js | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) 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' }); }); });