zoukankan      html  css  js  c++  java
  • vue项目中,点击按钮复制其内容

    <el-table-column label="推广链接" align="center">
        <template slot-scope="scope">
            <el-button size="mini" type="infor" class="copy" data-clipboard-action="copy" :data-clipboard-text="'http://investor.jie360.com.cn/register/?key='+scope.row.registerUrl" @click="copyUrl">点击复制</el-button>
        </template>
    </el-table-column>
    copyUrl(){
                let _this = this;
         let clipboard = new this.clipboard(".copy");
         clipboard.on('success', function () {
           _this.$message({
                     message:'复制成功!',
                     type:'success'
                 })
         });
         clipboard.on('error', function () {
                    _this.$message.error("复制失败!")
         });
        },

     

  • 相关阅读:
    gdbinit理解
    debug套路
    node 版本升级
    工作方式
    vscode 插件编写
    函数闭包与装饰器
    高阶函数与递归
    函数嵌套及作用域
    函数
    文件处理
  • 原文地址:https://www.cnblogs.com/WangXinPeng/p/11624061.html
Copyright © 2011-2022 走看看