//最多显⽰⼏⾏,超过后会...隐藏为0时不隐藏
type: [Number, String],
default: 0,
},
},
computed: {
text() {
return this.$;
},
},
data() {
return {
isShowHover: false,
textStyle: {},
div: null,
};
},
watch: {
row: function (val) {
this.init();
},
value: function () {
this.isShowHover = false;
cursor: "text",
};
this.$nextTick(() => {
});
},
},
mounted() {
this.init();
},
methods: {
init() {
this.div = document.querySelector(".hover-wrap");
if (!this.div && w - 0) {
this.div = ateElement("div");
this.div.className = "hover-wrap";
this.p = 0;
this.div.style.left = 0;
document.body.append(this.div);
}
if (this.div && w - 0) {
}
},
getStyle(val) {
let lineHeight = ).place("px", "") - 0 || 20; let height = ).place("px", "") - 0;
if (height > lineHeight * val) {
this.isShowHover = true;
height: `${lineHeight * val}px`,
overflow: "hidden",
textstyle
textOverflow: "ellipsis",
display: "-webkit-box",
webkitLineClamp: val,
webkitBoxOrient: "vertical",
cursor: "pointer",
};
} else {
this.isShowHover = false;
cursor: "text",
};
}
},
mouseenter(e) {
if (!this.isShowHover) {
return;
}
let box = BoundingClientRect();
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论