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

优化基础表单元素UI样式;优化:duplex指令;优化marked主题样式

old
宇天 2018-07-31 01:39:52 +08:00
parent 0c840dbd72
commit 17db4c8042
6 changed files with 19 additions and 35 deletions

View File

@ -89,7 +89,7 @@
.do-ui-radio, .do-ui-radio,
.do-ui-checkbox {display:inline-block;position:relative;width:auto;height:auto;padding:0 5px 0 35px;line-height:35px;color:nth($cd, 1);font-size:14px; .do-ui-checkbox {display:inline-block;position:relative;width:auto;height:auto;padding:0 5px 0 35px;line-height:35px;color:nth($cd, 1);font-size:14px;
>input {position:absolute;left:7px;top:7px;width:21px;height:21px;border-radius:50%;border:1px solid nth($cp, 3);appearance:none; >input {position:absolute;left:7px;top:7px;width:21px;height:21px;border-radius:50%;border:1px solid nth($cp, 3);background:#fff;appearance:none;
&:checked {box-shadow:0 0 5px nth($cb, 1);} &:checked {box-shadow:0 0 5px nth($cb, 1);}
&:checked::after {display:block;width:13px;height:13px;margin:3px;border-radius:50%;background:nth($cgr, 1);content:""} &:checked::after {display:block;width:13px;height:13px;margin:3px;border-radius:50%;background:nth($cgr, 1);content:""}

View File

@ -4554,7 +4554,7 @@ const _Anot = (function() {
? 'checkbox' ? 'checkbox'
: elem.type === 'radio' : elem.type === 'radio'
? 'radio' ? 'radio'
: /^change/.test(elem.getAttribute('data-duplex-event')) : /^change/.test(elem.getAttribute('data-event'))
? 'change' ? 'change'
: 'input' : 'input'
} }
@ -4570,7 +4570,7 @@ const _Anot = (function() {
} }
}) })
function callback(value) { function callback(value) {
binding.changed.call(this, value, binding) binding.changed.call(this, value)
} }
var composing = false var composing = false
function compositionStart() { function compositionStart() {
@ -4685,10 +4685,6 @@ const _Anot = (function() {
binding = this, binding = this,
curValue curValue
if (!this.init) { if (!this.init) {
for (var i in Anot.vmodels) {
var v = Anot.vmodels[i]
v.$fire('anot-duplex-init', binding)
}
var cpipe = binding.pipe || (binding.pipe = pipe) var cpipe = binding.pipe || (binding.pipe = pipe)
cpipe(null, binding, 'init') cpipe(null, binding, 'init')
this.init = 1 this.init = 1
@ -4766,8 +4762,8 @@ const _Anot = (function() {
}, },
number: { number: {
get: function(val, binding) { get: function(val, binding) {
var number = val - 0 var number = +val
if (-val === -number) { if (+val === number) {
return number return number
} }
return 0 return 0

View File

@ -4569,7 +4569,7 @@
? 'checkbox' ? 'checkbox'
: elem.type === 'radio' : elem.type === 'radio'
? 'radio' ? 'radio'
: /^change/.test(elem.getAttribute('data-duplex-event')) : /^change/.test(elem.getAttribute('data-event'))
? 'change' ? 'change'
: 'input' : 'input'
} }
@ -4585,7 +4585,7 @@
} }
}) })
function callback(value) { function callback(value) {
binding.changed.call(this, value, binding) binding.changed.call(this, value)
} }
var composing = false var composing = false
function compositionStart() { function compositionStart() {
@ -4700,10 +4700,6 @@
binding = this, binding = this,
curValue curValue
if (!this.init) { if (!this.init) {
for (var i in Anot.vmodels) {
var v = Anot.vmodels[i]
v.$fire('anot-duplex-init', binding)
}
var cpipe = binding.pipe || (binding.pipe = pipe) var cpipe = binding.pipe || (binding.pipe = pipe)
cpipe(null, binding, 'init') cpipe(null, binding, 'init')
this.init = 1 this.init = 1
@ -4781,8 +4777,8 @@
}, },
number: { number: {
get: function(val, binding) { get: function(val, binding) {
var number = val - 0 var number = +val
if (-val === -number) { if (+val === number) {
return number return number
} }
return 0 return 0

View File

@ -4554,7 +4554,7 @@ const _Anot = (function() {
? 'checkbox' ? 'checkbox'
: elem.type === 'radio' : elem.type === 'radio'
? 'radio' ? 'radio'
: /^change/.test(elem.getAttribute('data-duplex-event')) : /^change/.test(elem.getAttribute('data-event'))
? 'change' ? 'change'
: 'input' : 'input'
} }
@ -4570,7 +4570,7 @@ const _Anot = (function() {
} }
}) })
function callback(value) { function callback(value) {
binding.changed.call(this, value, binding) binding.changed.call(this, value)
} }
var composing = false var composing = false
function compositionStart() { function compositionStart() {
@ -4685,10 +4685,6 @@ const _Anot = (function() {
binding = this, binding = this,
curValue curValue
if (!this.init) { if (!this.init) {
for (var i in Anot.vmodels) {
var v = Anot.vmodels[i]
v.$fire('anot-duplex-init', binding)
}
var cpipe = binding.pipe || (binding.pipe = pipe) var cpipe = binding.pipe || (binding.pipe = pipe)
cpipe(null, binding, 'init') cpipe(null, binding, 'init')
this.init = 1 this.init = 1
@ -4766,8 +4762,8 @@ const _Anot = (function() {
}, },
number: { number: {
get: function(val, binding) { get: function(val, binding) {
var number = val - 0 var number = +val
if (-val === -number) { if (+val === number) {
return number return number
} }
return 0 return 0

View File

@ -4569,7 +4569,7 @@
? 'checkbox' ? 'checkbox'
: elem.type === 'radio' : elem.type === 'radio'
? 'radio' ? 'radio'
: /^change/.test(elem.getAttribute('data-duplex-event')) : /^change/.test(elem.getAttribute('data-event'))
? 'change' ? 'change'
: 'input' : 'input'
} }
@ -4585,7 +4585,7 @@
} }
}) })
function callback(value) { function callback(value) {
binding.changed.call(this, value, binding) binding.changed.call(this, value)
} }
var composing = false var composing = false
function compositionStart() { function compositionStart() {
@ -4700,10 +4700,6 @@
binding = this, binding = this,
curValue curValue
if (!this.init) { if (!this.init) {
for (var i in Anot.vmodels) {
var v = Anot.vmodels[i]
v.$fire('anot-duplex-init', binding)
}
var cpipe = binding.pipe || (binding.pipe = pipe) var cpipe = binding.pipe || (binding.pipe = pipe)
cpipe(null, binding, 'init') cpipe(null, binding, 'init')
this.init = 1 this.init = 1
@ -4781,8 +4777,8 @@
}, },
number: { number: {
get: function(val, binding) { get: function(val, binding) {
var number = val - 0 var number = +val
if (-val === -number) { if (+val === number) {
return number return number
} }
return 0 return 0

View File

@ -38,10 +38,10 @@
} }
} }
/* 提醒文本 */ /* 提醒文本 */
.md-warn,.md-mark {display:inline-block;position:relative;padding:3px 8px 3px 35px;border:1px solid nth($co, 2);border-radius:5px;background:#fffbed;color:nth($co, 3);word-break: break-all; .md-warn,.md-mark {display:inline-block;position:relative;min-height:35px;margin:3px 0;padding:3px 8px 3px 35px;line-height:27px;border:1px solid nth($co, 2);border-radius:5px;background:#fffbed;color:nth($co, 3);word-break: break-all;
p {margin:0!important;} p {margin:0!important;}
i {position:absolute;left:8px;top:7px;line-height:1;font-size:20px;color:nth($cr, 2);} i {position:absolute;left:8px;top:6px;line-height:1;font-size:20px;color:nth($cr, 2);}
} }
.md-mark {border-color:nth($ct, 1);color:nth($ct, 3);background:#edfbf8; .md-mark {border-color:nth($ct, 1);color:nth($ct, 3);background:#edfbf8;
i {color:nth($ct, 3);} i {color:nth($ct, 3);}