feat:修改练习字帖生产逻辑

This commit is contained in:
R524809
2025-10-29 17:45:12 +08:00
parent 643a7e23e7
commit c4f27f2125
13 changed files with 141224 additions and 60061 deletions
+17
View File
@@ -18,6 +18,7 @@ Page({
currentColor: '',
showIntroductionPopup: false,
showSelectWordPopup: false, // 选择文字弹窗
selectedTemplate: 'grid', // 选中的模板类型
env: 'release',
isPCDevtool: false,
},
@@ -375,4 +376,20 @@ Page({
url: '/pages/debug/debug',
});
},
// 模板选择事件
onSelectTemplate(e: WechatMiniprogram.TouchEvent) {
const { template } = e.currentTarget.dataset;
this.setData({
selectedTemplate: template
});
// 这里后续可以添加根据模板类型更新canvas绘制效果的逻辑
console.log('选择的模板类型:', template);
// 如果有文字卡片,可以重新绘制canvas
if (this.data.cardList.length > 0) {
this.drawCanvas();
}
},
});