mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
fix(select-option-collector): avoid depdency loops
This commit is contained in:
parent
f18af716ad
commit
63ac276a87
@ -31,7 +31,8 @@ export default {
|
||||
return {
|
||||
options: [],
|
||||
isDestroying: false,
|
||||
isMounting: true
|
||||
isMounting: true,
|
||||
isUpdatingOptions: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -53,6 +54,14 @@ export default {
|
||||
this.isMounting = false
|
||||
this.collectOptions()
|
||||
},
|
||||
updated () {
|
||||
if (!this.isUpdatingOptions) {
|
||||
this.isUpdatingOptions = true
|
||||
this.collectOptions()
|
||||
} else {
|
||||
this.isUpdatingOptions = false
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.isDestroying = true
|
||||
},
|
||||
|
@ -22,6 +22,7 @@
|
||||
<n-base-select-menu
|
||||
v-if="active"
|
||||
ref="contentInner"
|
||||
auto-pending-first-option
|
||||
class="n-select-menu"
|
||||
:theme="synthesizedTheme"
|
||||
:pattern="value"
|
||||
|
Loading…
Reference in New Issue
Block a user