Vue之多行文本超出两行显示省略号

2020-11-13  本文已影响0人  兰觅
display: -webkit-box;
/* -webkit-box-orient: vertical; */
/*! autoprefixer: off */
-webkit-box-orient: vertical;
/* autoprefixer: on */
//超出多少行显示省略号
-webkit-line-clamp: 2;
overflow: hidden;

Vue —— 复制文本

copyText() {
    const input = document.createElement("input");
    input.setAttribute("readonly", "readonly");
    input.setAttribute("value", "hello world");
    document.body.appendChild(input);
    input.select();
    input.setSelectionRange(0, 9999);
    if (document.execCommand("copy")) {
        document.execCommand("copy");
        console.log("复制成功");
    }
    document.body.removeChild(input);
}

系列教程《一步步带你做vue后台管理框架》第一课
Vue相关技术

上一篇 下一篇

猜你喜欢

热点阅读