From f52c21331fa71bd3ae6be41117f35cb54b076119 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 03 四月 2024 19:34:01 +0800 Subject: [PATCH] 添加复制功能 --- packageBookService/pages/bookServices/detail/components/teachResource/index.js | 46 +++++++++++++++++++++++++++++++--------------- 1 files changed, 31 insertions(+), 15 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/teachResource/index.js b/packageBookService/pages/bookServices/detail/components/teachResource/index.js index 6085f13..379bab2 100644 --- a/packageBookService/pages/bookServices/detail/components/teachResource/index.js +++ b/packageBookService/pages/bookServices/detail/components/teachResource/index.js @@ -2,40 +2,56 @@ properties: { applyState: { type: String, - value: 'none' + value: "none", }, rejectCause: { type: String, - value: '' + value: "", }, applyResourceLoading: { type: Boolean, value: false, - } + }, + deadline: { + type: String, + value: "", + }, }, data: { showRejectDialog: false, - confirmBtn: { content: '鐭ラ亾浜�', variant: 'base' }, + confirmBtn: { content: "鐭ラ亾浜�", variant: "base" }, }, methods: { + copy() { + wx.setClipboardData({ + data: "11", + success: function (res) { + wx.showToast({ title: "澶嶅埗鎴愬姛" }); + }, + fail: function (res) { + wx.showToast({ + title: "澶辫触", + }); + }, + }); + }, applyResource() { - debugger - var myEventDetail = {} // detail瀵硅薄锛屾彁渚涚粰浜嬩欢鐩戝惉鍑芥暟 + var myEventDetail = {}; var myEventOption = { bubbles: true, composed: true, - } // 瑙﹀彂浜嬩欢鐨勯�夐」 - this.triggerEvent('applyResource', myEventDetail, myEventOption) + }; // 瑙﹀彂浜嬩欢鐨勯�夐」 + this.triggerEvent("applyResource", myEventDetail, myEventOption); }, showDialog() { this.setData({ - showRejectDialog: true - }) + showRejectDialog: true, + }); }, closeDialog() { this.setData({ - showRejectDialog: false - }) - } - } -}) \ No newline at end of file + showRejectDialog: false, + }); + }, + }, +}); -- Gitblit v1.9.1