优化
This commit is contained in:
@@ -13,12 +13,27 @@ const _sfc_main = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 方法定义
|
||||
handleCopy() {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: this.messagetext,
|
||||
success: () => {
|
||||
common_vendor.index.showToast({
|
||||
title: "复制成功",
|
||||
icon: "success",
|
||||
duration: 1500
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/index/chat/messageComponent/textmessage.vue:33", "复制失败:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.t($props.messagetext)
|
||||
a: common_vendor.t($props.messagetext),
|
||||
b: common_vendor.o((...args) => $options.handleCopy && $options.handleCopy(...args))
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b62657a0"]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="messagetext data-v-b62657a0">{{a}}</view>
|
||||
<view class="messagetext data-v-b62657a0" bindlongpress="{{b}}">{{a}}</view>
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
.messagetext.data-v-b62657a0{
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
letter-spacing: 1rpx;
|
||||
padding: 19rpx 30rpx 19rpx 30rpx;
|
||||
.messagetext.data-v-b62657a0 {
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
letter-spacing: 1rpx;
|
||||
padding: 19rpx 30rpx 19rpx 30rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user