one mouse click will dynamically generate dom and insert el-ag, but the parent span obtained is not accurate. It feels that the last width, can only be obtained by clicking twice. What I want to get is the width of the tag option generated by the el-select multi-box
.<div class="el-select__tags">
<span>
<span class="el-tag" >dom1</span>
<span class="el-tag" >dom2</span>
</span>
</div>
computed: {
valueData () {
this.$nextTick(() =>{
// DOM
this.tagWidth = document.querySelector(".el-select__tags span").clientWidth
console.log(this.tagWidth )
})
}
}