feat:代码优化

This commit is contained in:
R524809
2025-12-04 17:26:04 +08:00
parent 7f8a9b1c4d
commit c8788669c7
23 changed files with 339 additions and 428 deletions
@@ -27,7 +27,6 @@ Page({
functionId: '',
hasContent: false,
showShareDialog: false,
showTypeSelector: false,
currentType: 'addition-5', // 'addition-5', 'addition-10', 'subtraction-10', 'addition-subtraction-10'
currentTypeName: '5以内加法',
typeActions: [
@@ -274,23 +273,12 @@ Page({
}
},
/** 显示类型选择器 */
onShowTypeSelector() {
this.setData({ showTypeSelector: true });
},
/** 关闭类型选择器 */
onCloseTypeSelector() {
this.setData({ showTypeSelector: false });
},
/** 选择类型 */
onSelectType(event: any) {
const { name, value } = event.detail;
this.setData({
currentType: value,
currentTypeName: name,
showTypeSelector: false,
});
// 重新生成数据
this.onRandom();