let isOverflow = this.$refs.isOverflow;
                for (let i in isOverflow) {
                    let cWidth = isOverflow[i].clientWidth;
                    let sWidth = isOverflow[i].scrollWidth;
                    if (sWidth > cWidth) { //超过 
                        this.$set(this.isEllipsis, i, true);
                    } else {
                        this.$set(this.isEllipsis, i, false);
                    }
                }

 

Logo

前往低代码交流专区

更多推荐