diff --git a/src/css/reset-basic.scss b/src/css/reset-basic.scss index 2762641..ff920c2 100644 --- a/src/css/reset-basic.scss +++ b/src/css/reset-basic.scss @@ -40,7 +40,7 @@ a:focus,input,textarea,button:focus,input:focus,textarea:focus {outline:none;} ::-moz-focus-inner { border:none;outline:none; } -body {font-family:"Avenir Next", Helvetica, Arial,"WenQuanYi Micro Hei","PingFang SC","Hiragino Sans GB","Segoe UI", "Microsoft Yahei", sans-serif;-webkit-font-smoothing: antialiased;text-size-adjust: 100%;-webkit-tap-highlight-color: transparent;} +body {font-family:Helvetica, Arial,"WenQuanYi Micro Hei","PingFang SC","Hiragino Sans GB","Segoe UI", "Microsoft Yahei", sans-serif;-webkit-font-smoothing: antialiased;text-size-adjust: 100%;-webkit-tap-highlight-color: transparent;} code,pre,samp {font-family:Menlo,Monaco,Consolas,"Courier New",monospace;} [anot],[\:repeat],[\:if] {visibility:hidden;} diff --git a/src/js/anot-touch.js b/src/js/anot-touch.js index 1734808..cdee266 100644 --- a/src/js/anot-touch.js +++ b/src/js/anot-touch.js @@ -4424,6 +4424,9 @@ const _Anot = (function() { if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { return } + if (elem.msBinded) { + return + } if (this.target) { this.target.result[elem.expr] = { key: elem.expr } } @@ -4485,27 +4488,34 @@ const _Anot = (function() { } if (code === 0 && opt.eq) { - var eqEl = document.querySelector('#' + opt.eq) - txt = val !== eqEl.value ? 10031 : 0 + var eqVal = parseVmValue(_this.vmodels[0], opt.eq) + code = val !== eqVal ? 10031 : 0 } target.result[elem.expr].code = code - target.result[elem.expr].passed = opt.require ? code === 0 : true + target.result[elem.expr].passed = opt.require + ? code === 0 + : val + ? code === 0 + : true - var done + var passed = true for (var k in target.result) { if (!target.result[k].passed) { - done = true + passed = false target.event(target.result[k]) break } } - if (!done) { + if (passed) { target.event(true) } } - Anot(elem).bind('blur', checked) + this.rollback = function() { + Anot(elem).unbind('blur', checked) + } + elem.msBinded = true checked() } }) diff --git a/src/js/anot-touch.shim.js b/src/js/anot-touch.shim.js index 182932a..517e9ec 100644 --- a/src/js/anot-touch.shim.js +++ b/src/js/anot-touch.shim.js @@ -4439,6 +4439,9 @@ if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { return } + if (elem.msBinded) { + return + } if (this.target) { this.target.result[elem.expr] = { key: elem.expr } } @@ -4500,27 +4503,34 @@ } if (code === 0 && opt.eq) { - var eqEl = document.querySelector('#' + opt.eq) - txt = val !== eqEl.value ? 10031 : 0 + var eqVal = parseVmValue(_this.vmodels[0], opt.eq) + code = val !== eqVal ? 10031 : 0 } target.result[elem.expr].code = code - target.result[elem.expr].passed = opt.require ? code === 0 : true + target.result[elem.expr].passed = opt.require + ? code === 0 + : val + ? code === 0 + : true - var done + var passed = true for (var k in target.result) { if (!target.result[k].passed) { - done = true + passed = false target.event(target.result[k]) break } } - if (!done) { + if (passed) { target.event(true) } } - Anot(elem).bind('blur', checked) + this.rollback = function() { + Anot(elem).unbind('blur', checked) + } + elem.msBinded = true checked() } }) diff --git a/src/js/anot.js b/src/js/anot.js index 4922d77..e13dba0 100644 --- a/src/js/anot.js +++ b/src/js/anot.js @@ -4424,6 +4424,9 @@ const _Anot = (function() { if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { return } + if (elem.msBinded) { + return + } if (this.target) { this.target.result[elem.expr] = { key: elem.expr } } @@ -4485,27 +4488,34 @@ const _Anot = (function() { } if (code === 0 && opt.eq) { - var eqEl = document.querySelector('#' + opt.eq) - txt = val !== eqEl.value ? 10031 : 0 + var eqVal = parseVmValue(_this.vmodels[0], opt.eq) + code = val !== eqVal ? 10031 : 0 } target.result[elem.expr].code = code - target.result[elem.expr].passed = opt.require ? code === 0 : true + target.result[elem.expr].passed = opt.require + ? code === 0 + : val + ? code === 0 + : true - var done + var passed = true for (var k in target.result) { if (!target.result[k].passed) { - done = true + passed = false target.event(target.result[k]) break } } - if (!done) { + if (passed) { target.event(true) } } - Anot(elem).bind('blur', checked) + this.rollback = function() { + Anot(elem).unbind('blur', checked) + } + elem.msBinded = true checked() } }) diff --git a/src/js/anot.shim.js b/src/js/anot.shim.js index 7159016..6bbe7c8 100644 --- a/src/js/anot.shim.js +++ b/src/js/anot.shim.js @@ -4439,6 +4439,9 @@ if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { return } + if (elem.msBinded) { + return + } if (this.target) { this.target.result[elem.expr] = { key: elem.expr } } @@ -4500,27 +4503,34 @@ } if (code === 0 && opt.eq) { - var eqEl = document.querySelector('#' + opt.eq) - txt = val !== eqEl.value ? 10031 : 0 + var eqVal = parseVmValue(_this.vmodels[0], opt.eq) + code = val !== eqVal ? 10031 : 0 } target.result[elem.expr].code = code - target.result[elem.expr].passed = opt.require ? code === 0 : true + target.result[elem.expr].passed = opt.require + ? code === 0 + : val + ? code === 0 + : true - var done + var passed = true for (var k in target.result) { if (!target.result[k].passed) { - done = true + passed = false target.event(target.result[k]) break } } - if (!done) { + if (passed) { target.event(true) } } - Anot(elem).bind('blur', checked) + this.rollback = function() { + Anot(elem).unbind('blur', checked) + } + elem.msBinded = true checked() } }) diff --git a/src/js/marked/theme.scss b/src/js/marked/theme.scss index d0c4214..53f8419 100644 --- a/src/js/marked/theme.scss +++ b/src/js/marked/theme.scss @@ -54,13 +54,13 @@ .md-task__text {color:nth($cgr, 1);text-decoration:line-through;} } } - table {width:100%; - thead tr {height:45px;line-height:45px;background:nth($cp, 1)} - thead th {padding:0 8px;border:0;} - tbody tr {height:43px;line-height:42px;@include ts(all, .3s); + table {width:100%;line-height:25px; + thead tr {height:45px;background:nth($cp, 1)} + thead th {padding:10px 8px;border:0;} + tbody tr {height:auto;@include ts(all, .3s); &:hover {background:#ecf6fd} } - tbody td {padding:0 8px;border-bottom:1px solid nth($cp, 2)} + tbody td {padding:9px 8px;border-bottom:1px solid nth($cp, 2)} } hr {margin:30px 0;border-bottom:0;}