update
parent
54e8243ec1
commit
d47c6e5c13
|
@ -69,7 +69,7 @@ class CollapseItem extends Component {
|
|||
title: '',
|
||||
disabled: false
|
||||
}
|
||||
_show = false
|
||||
#show = false
|
||||
contentHeight = 0
|
||||
static styles = [
|
||||
css`
|
||||
|
@ -122,17 +122,17 @@ class CollapseItem extends Component {
|
|||
this.$emit('updateValue', { name: this.name })
|
||||
}
|
||||
get show() {
|
||||
return this._show
|
||||
return this.#show
|
||||
}
|
||||
set show(val) {
|
||||
this._show = val
|
||||
this.#show = val
|
||||
this.contentHeight = this.$refs.content?.offsetHeight || 0
|
||||
this.$requestUpdate()
|
||||
}
|
||||
mounted() {
|
||||
nextTick(() => {
|
||||
this.contentHeight = this.$refs.content.offsetHeight
|
||||
this.$requestUpdate()
|
||||
this.show && this.$requestUpdate()
|
||||
})
|
||||
}
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue