42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../../../common/vendor.js");
|
|
const _sfc_main = {
|
|
data() {
|
|
return {};
|
|
},
|
|
onLoad() {
|
|
},
|
|
props: {
|
|
messagetext: {
|
|
type: String,
|
|
default: ""
|
|
}
|
|
},
|
|
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),
|
|
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"]]);
|
|
wx.createComponent(Component);
|
|
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/pages/index/chat/messageComponent/textmessage.js.map
|