Files
doodle-mini/miniprogram/components/word-picker/word-picker.ts
T
2025-06-27 17:44:10 +08:00

46 lines
898 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: {
ready() {
// setTimeout(() => {
// console.log('111');
// this.selectComponent('#tabs').resize();
// }, 1000);
},
},
/**
* 组件的方法列表
*/
methods: {
onClose() {
this.triggerEvent('onClose');
},
onTabChange(e: WechatMiniprogram.CustomEvent) {
this.setData({ currentTab: e.detail });
},
},
});