feat:删除无用代码
This commit is contained in:
@@ -62,7 +62,6 @@ Page({
|
|||||||
updatedCardList: Array<{ color: string; word: string }>,
|
updatedCardList: Array<{ color: string; word: string }>,
|
||||||
callback: () => void = () => {},
|
callback: () => void = () => {},
|
||||||
) {
|
) {
|
||||||
console.log('drawCanvas called updatedCardList:', updatedCardList);
|
|
||||||
this.setData({ cardList: updatedCardList }, callback);
|
this.setData({ cardList: updatedCardList }, callback);
|
||||||
this.textDrawService?.draw(updatedCardList);
|
this.textDrawService?.draw(updatedCardList);
|
||||||
},
|
},
|
||||||
@@ -75,7 +74,6 @@ Page({
|
|||||||
|
|
||||||
onConfirmInput(e: WechatMiniprogram.Input) {
|
onConfirmInput(e: WechatMiniprogram.Input) {
|
||||||
const { value } = e.detail;
|
const { value } = e.detail;
|
||||||
console.log('indexPage onConfirmInput value:', value);
|
|
||||||
const characters = value.split('');
|
const characters = value.split('');
|
||||||
const shuffledColors = [...WATER_COLORS.basic12].sort(
|
const shuffledColors = [...WATER_COLORS.basic12].sort(
|
||||||
() => Math.random() - 0.5,
|
() => Math.random() - 0.5,
|
||||||
@@ -86,9 +84,6 @@ Page({
|
|||||||
}));
|
}));
|
||||||
console.log('updatedCardList', updatedCardList);
|
console.log('updatedCardList', updatedCardList);
|
||||||
this.drawCanvas(updatedCardList);
|
this.drawCanvas(updatedCardList);
|
||||||
// this.setData({ cardList: updatedCardList });
|
|
||||||
// // this.renderCanvas();
|
|
||||||
// this.textDrawService?.draw(updatedCardList);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteWordCard(e: WechatMiniprogram.CustomEvent) {
|
deleteWordCard(e: WechatMiniprogram.CustomEvent) {
|
||||||
@@ -142,18 +137,6 @@ Page({
|
|||||||
currentKey: key,
|
currentKey: key,
|
||||||
currentColor: color,
|
currentColor: color,
|
||||||
});
|
});
|
||||||
// const { cardList } = this.data;
|
|
||||||
// const updatedCardList = cardList.map((item, index) =>
|
|
||||||
// index === key ? { ...item, color } : item,
|
|
||||||
// );
|
|
||||||
// this.setData({ cardList: updatedCardList });
|
|
||||||
// wx.showToast({
|
|
||||||
// title: `已更改 "${word}" 的颜色`,
|
|
||||||
// icon: 'none',
|
|
||||||
// duration: 2000,
|
|
||||||
// });
|
|
||||||
// // this.renderCanvas();
|
|
||||||
// this.textDrawService?.draw(updatedCardList);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onCloseColorPopup() {
|
onCloseColorPopup() {
|
||||||
|
|||||||
Reference in New Issue
Block a user