23 lines
491 B
TypeScript
23 lines
491 B
TypeScript
Component({
|
|
options: {
|
|
styleIsolation: 'apply-shared',
|
|
},
|
|
properties: {
|
|
tabs: {
|
|
type: Array,
|
|
value: [],
|
|
},
|
|
activeTab: {
|
|
type: String,
|
|
value: '',
|
|
},
|
|
},
|
|
methods: {
|
|
onTabTap(e: WechatMiniprogram.TouchEvent) {
|
|
const id = (e.currentTarget.dataset.id as string) || '';
|
|
if (!id) return;
|
|
this.triggerEvent('change', { id });
|
|
},
|
|
},
|
|
});
|