feat: 选择文字

This commit is contained in:
2025-06-27 17:44:10 +08:00
parent aa9d74c2d1
commit 23ad49d333
8 changed files with 124 additions and 20 deletions
+19 -1
View File
@@ -15,6 +15,8 @@ Page({
currentKey: 0,
currentColor: '',
showIntroductionPopup: false,
showSelectWordPopup: false, // 选择文字弹窗
selectedWords: [] as string[],
},
onLoad() {
@@ -287,5 +289,21 @@ Page({
}));
console.log('cardList:', cardList);
this.drawCanvas(cardList);
}
},
openSelectWordPopup() {
this.setData({
showSelectWordPopup: true,
});
},
closeSelectWordPopup() {
this.setData({
showSelectWordPopup: false,
});
},
onSelectWord(e: WechatMiniprogram.CustomEvent) {
const { words } = e.detail;
this.setData({
selectedWords: words,
});
},
});