Answer the question
In order to leave comments, you need to log in
How to track the size of an element?
Hello.
There is a div in it table:
<div :style="{ width : table.width || 100 }">
<table>
<tr>
<td><input type="text" v-model="table.text" /></td>
</tr>
</table>
</div>
Answer the question
In order to leave comments, you need to log in
data: function (){return{
lastWidth: -1
}}
mount: function() {
const el = #find
this.lastWidth = el.offsetWidth
setInterval(function(){
if (this.lastWidth != el.offsetWidth) {
// TODO
}
}, 500)
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question