feat:修改练习字帖生产逻辑
This commit is contained in:
@@ -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();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user