fix: 修复 layui.router 返回 href 属性
This commit is contained in:
parent
974bc86d9c
commit
cbba1d984a
@ -23,6 +23,8 @@ body{padding: 50px 100px;}
|
||||
<input type="text" class="layui-input" id="test1">
|
||||
</div>
|
||||
|
||||
<div id="test-div">111</div>
|
||||
|
||||
<br><br><hr><br>
|
||||
|
||||
日期选择器:
|
||||
@ -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'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -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'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user