This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

修复:rule指令检测;优化marked主题的表格样式

old
宇天 2018-08-02 01:30:31 +08:00
parent 35d4b39c7a
commit 2edf946c2d
6 changed files with 74 additions and 34 deletions

View File

@ -40,7 +40,7 @@ a:focus,input,textarea,button:focus,input:focus,textarea:focus {outline:none;}
::-moz-focus-inner { ::-moz-focus-inner {
border:none;outline:none; 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;} code,pre,samp {font-family:Menlo,Monaco,Consolas,"Courier New",monospace;}
[anot],[\:repeat],[\:if] {visibility:hidden;} [anot],[\:repeat],[\:if] {visibility:hidden;}

View File

@ -4424,6 +4424,9 @@ const _Anot = (function() {
if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) {
return return
} }
if (elem.msBinded) {
return
}
if (this.target) { if (this.target) {
this.target.result[elem.expr] = { key: elem.expr } this.target.result[elem.expr] = { key: elem.expr }
} }
@ -4485,27 +4488,34 @@ const _Anot = (function() {
} }
if (code === 0 && opt.eq) { if (code === 0 && opt.eq) {
var eqEl = document.querySelector('#' + opt.eq) var eqVal = parseVmValue(_this.vmodels[0], opt.eq)
txt = val !== eqEl.value ? 10031 : 0 code = val !== eqVal ? 10031 : 0
} }
target.result[elem.expr].code = code 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) { for (var k in target.result) {
if (!target.result[k].passed) { if (!target.result[k].passed) {
done = true passed = false
target.event(target.result[k]) target.event(target.result[k])
break break
} }
} }
if (!done) { if (passed) {
target.event(true) target.event(true)
} }
} }
Anot(elem).bind('blur', checked) Anot(elem).bind('blur', checked)
this.rollback = function() {
Anot(elem).unbind('blur', checked)
}
elem.msBinded = true
checked() checked()
} }
}) })

View File

@ -4439,6 +4439,9 @@
if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) {
return return
} }
if (elem.msBinded) {
return
}
if (this.target) { if (this.target) {
this.target.result[elem.expr] = { key: elem.expr } this.target.result[elem.expr] = { key: elem.expr }
} }
@ -4500,27 +4503,34 @@
} }
if (code === 0 && opt.eq) { if (code === 0 && opt.eq) {
var eqEl = document.querySelector('#' + opt.eq) var eqVal = parseVmValue(_this.vmodels[0], opt.eq)
txt = val !== eqEl.value ? 10031 : 0 code = val !== eqVal ? 10031 : 0
} }
target.result[elem.expr].code = code 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) { for (var k in target.result) {
if (!target.result[k].passed) { if (!target.result[k].passed) {
done = true passed = false
target.event(target.result[k]) target.event(target.result[k])
break break
} }
} }
if (!done) { if (passed) {
target.event(true) target.event(true)
} }
} }
Anot(elem).bind('blur', checked) Anot(elem).bind('blur', checked)
this.rollback = function() {
Anot(elem).unbind('blur', checked)
}
elem.msBinded = true
checked() checked()
} }
}) })

View File

@ -4424,6 +4424,9 @@ const _Anot = (function() {
if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) {
return return
} }
if (elem.msBinded) {
return
}
if (this.target) { if (this.target) {
this.target.result[elem.expr] = { key: elem.expr } this.target.result[elem.expr] = { key: elem.expr }
} }
@ -4485,27 +4488,34 @@ const _Anot = (function() {
} }
if (code === 0 && opt.eq) { if (code === 0 && opt.eq) {
var eqEl = document.querySelector('#' + opt.eq) var eqVal = parseVmValue(_this.vmodels[0], opt.eq)
txt = val !== eqEl.value ? 10031 : 0 code = val !== eqVal ? 10031 : 0
} }
target.result[elem.expr].code = code 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) { for (var k in target.result) {
if (!target.result[k].passed) { if (!target.result[k].passed) {
done = true passed = false
target.event(target.result[k]) target.event(target.result[k])
break break
} }
} }
if (!done) { if (passed) {
target.event(true) target.event(true)
} }
} }
Anot(elem).bind('blur', checked) Anot(elem).bind('blur', checked)
this.rollback = function() {
Anot(elem).unbind('blur', checked)
}
elem.msBinded = true
checked() checked()
} }
}) })

View File

@ -4439,6 +4439,9 @@
if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) { if (!['INPUT', 'TEXTAREA'].includes(elem.nodeName)) {
return return
} }
if (elem.msBinded) {
return
}
if (this.target) { if (this.target) {
this.target.result[elem.expr] = { key: elem.expr } this.target.result[elem.expr] = { key: elem.expr }
} }
@ -4500,27 +4503,34 @@
} }
if (code === 0 && opt.eq) { if (code === 0 && opt.eq) {
var eqEl = document.querySelector('#' + opt.eq) var eqVal = parseVmValue(_this.vmodels[0], opt.eq)
txt = val !== eqEl.value ? 10031 : 0 code = val !== eqVal ? 10031 : 0
} }
target.result[elem.expr].code = code 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) { for (var k in target.result) {
if (!target.result[k].passed) { if (!target.result[k].passed) {
done = true passed = false
target.event(target.result[k]) target.event(target.result[k])
break break
} }
} }
if (!done) { if (passed) {
target.event(true) target.event(true)
} }
} }
Anot(elem).bind('blur', checked) Anot(elem).bind('blur', checked)
this.rollback = function() {
Anot(elem).unbind('blur', checked)
}
elem.msBinded = true
checked() checked()
} }
}) })

View File

@ -54,13 +54,13 @@
.md-task__text {color:nth($cgr, 1);text-decoration:line-through;} .md-task__text {color:nth($cgr, 1);text-decoration:line-through;}
} }
} }
table {width:100%; table {width:100%;line-height:25px;
thead tr {height:45px;line-height:45px;background:nth($cp, 1)} thead tr {height:45px;background:nth($cp, 1)}
thead th {padding:0 8px;border:0;} thead th {padding:10px 8px;border:0;}
tbody tr {height:43px;line-height:42px;@include ts(all, .3s); tbody tr {height:auto;@include ts(all, .3s);
&:hover {background:#ecf6fd} &: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;} hr {margin:30px 0;border-bottom:0;}