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