fix null error
This commit is contained in:
parent
f8576174fd
commit
d8d0ad0c00
1 changed files with 6 additions and 1 deletions
|
@ -131,7 +131,12 @@ export default defineComponent({
|
|||
this.$el.style.setProperty("--maxHeight", this.maxHeight + "px");
|
||||
|
||||
const calcOmit = () => {
|
||||
if (this.omitted || this.ignoreOmit || this.maxHeight == null)
|
||||
if (
|
||||
this.omitted ||
|
||||
this.ignoreOmit ||
|
||||
this.maxHeight == null ||
|
||||
this.$refs.content == null
|
||||
)
|
||||
return;
|
||||
const height = this.$refs.content.offsetHeight;
|
||||
this.omitted = height > this.maxHeight;
|
||||
|
|
Loading…
Reference in a new issue