prevention/components/Tab/index.js

37 lines
564 B
JavaScript
Raw Normal View History

2022-11-30 14:15:33 +08:00
// components/tab/tab.js
2022-10-31 15:25:19 +08:00
Component({
/**
* 组件的属性列表
*/
2022-11-30 14:15:33 +08:00
options:{
styleIsolation:"isolated"
},
2022-10-31 15:25:19 +08:00
properties: {
2022-11-30 14:15:33 +08:00
data:{
type:Array,
},
current:{
type:[Number,String]
}
2022-10-31 15:25:19 +08:00
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
2022-11-30 14:15:33 +08:00
updateCurrent(e){
this.triggerEvent('updatedata',{current:e.currentTarget.dataset.current})
}
},
lifetimes:{
},
2022-10-31 15:25:19 +08:00
})