Files
doodle-mini/miniprogram/components/word-picker/word-picker.ts
T
2025-06-26 17:12:35 +08:00

41 lines
736 B
TypeScript

import { WORDS } from '../../constants/words';
Component({
options: {},
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false,
},
currentTab: {
type: Number,
value: 0,
},
},
/**
* 组件的初始数据
*/
data: {
wordList: WORDS,
selectedWords: [],
},
lifetimes: {
attached() { },
},
/**
* 组件的方法列表
*/
methods: {
onClose() {
this.triggerEvent('onClose');
},
onTabChange(e: WechatMiniprogram.CustomEvent) {
this.setData({ currentTab: e.detail });
},
},
});