html52.com
我爱小程序-开发者交流社区

phone1如何绑定长按选中的“张”id"18360905913?

网友回复

Admin²⁰²⁰:
长按事件里面执行复制代码:
..
let str = "张-id-18360905913";
copyString(str);
...

  copyString(str) {
    wx.setClipboardData({
      data: str,
      success(res) {
        wx.showToast({
          title: "已成功复制", //提示的内容,
          icon: "success", //图标,
          duration: 1500, //延迟时间,
          mask: true, //显示透明蒙层,防止触摸穿透,
          success: (res) => { },
        });
      },
    });
  },

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付