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

优化icon属性设置

old
宇天 2019-09-04 18:58:48 +08:00
parent 045bc6c6be
commit d80b077197
3 changed files with 5 additions and 14 deletions

View File

@ -268,7 +268,6 @@ export default class Select {
this.__OUTER__ = this.root.children[1]
this.__PREPEND__ = this.__OUTER__.children[0]
this.__INPUT__ = this.__OUTER__.children[1]
this.__ICO__ = this.__OUTER__.children[2]
this.__APPEND__ = this.__OUTER__.children[3]
this.__OPTG__ = this.__OUTER__.children[4]
}

View File

@ -121,21 +121,13 @@ export default class Icon {
}
}
get is() {
return this.props.is
}
set is(val) {
this.props.is = val
this.setAttribute('is', val)
this.drawPath()
}
watch() {
switch (name) {
case 'is':
this.is = val
if (!val) {
if (val) {
this.props.is = val
this.drawPath()
} else {
this.removeAttribute('is')
}
break

View File

@ -339,7 +339,7 @@ class Layer {
case 'frame':
if (val === 'notify') {
var _ico = document.createElement('wc-icon')
_ico.is = 'close'
_ico.setAttribute('is', 'close')
this.__TITLE__.appendChild(_ico)
}
btns = []