diff --git a/src/form/dropdown.wc b/src/form/dropdown.wc index 0764ad6..1476a86 100644 --- a/src/form/dropdown.wc +++ b/src/form/dropdown.wc @@ -241,6 +241,8 @@ export default class Dropdown { this.state.optionShow = false this.__OPTIONS__.classList.toggle('active', false) }) + + $.nextTick(_ => this._updateChildrenStat()) } unmounted() { diff --git a/src/form/option.wc b/src/form/option.wc index 1c767ec..1f35d17 100644 --- a/src/form/option.wc +++ b/src/form/option.wc @@ -119,7 +119,11 @@ export default class Option { switch (name) { case 'value': case 'label': - this[name] = val + if (val === null) { + this[name] = '' + } else { + this[name] = val + } break case 'disabled': diff --git a/src/markd/index.wc b/src/markd/index.wc index a00e0eb..34b0f18 100644 --- a/src/markd/index.wc +++ b/src/markd/index.wc @@ -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() { diff --git a/src/scroll/index.wc b/src/scroll/index.wc index c6d57ce..f46e04c 100644 --- a/src/scroll/index.wc +++ b/src/scroll/index.wc @@ -391,8 +391,7 @@ export default class Scroll { subtree: true, attributeFilter: ['style'] }) - - this._initFn(new Event('mounted')) + $.nextTick(_ => this._initFn(new Event('mounted'))) } unmounted() {