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

优化滚动组件;下拉组件

old
宇天 2021-05-07 20:37:47 +08:00
parent 80cd4adad9
commit 17ce8fe6fa
4 changed files with 11 additions and 4 deletions

View File

@ -241,6 +241,8 @@ export default class Dropdown {
this.state.optionShow = false
this.__OPTIONS__.classList.toggle('active', false)
})
$.nextTick(_ => this._updateChildrenStat())
}
unmounted() {

View File

@ -119,7 +119,11 @@ export default class Option {
switch (name) {
case 'value':
case 'label':
if (val === null) {
this[name] = ''
} else {
this[name] = val
}
break
case 'disabled':

View File

@ -209,7 +209,9 @@ export default class Markd {
} else {
this.__BOX__.innerHTML = ''
}
this.dispatchEvent(new CustomEvent('ready', { bubbles: true }))
this.dispatchEvent(
new CustomEvent('ready', { bubbles: true, cancelable: true })
)
}
clear() {

View File

@ -391,8 +391,7 @@ export default class Scroll {
subtree: true,
attributeFilter: ['style']
})
this._initFn(new Event('mounted'))
$.nextTick(_ => this._initFn(new Event('mounted')))
}
unmounted() {