v3.0.6
This commit is contained in:
50
source/wx/xzs-student/component/iView/tab/index.js
Normal file
50
source/wx/xzs-student/component/iView/tab/index.js
Normal file
@@ -0,0 +1,50 @@
|
||||
Component({
|
||||
externalClasses: ['i-class'],
|
||||
|
||||
relations: {
|
||||
'../tabs/index': {
|
||||
type: 'parent'
|
||||
}
|
||||
},
|
||||
|
||||
properties: {
|
||||
key: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
dot: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
count: {
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
|
||||
data: {
|
||||
current: false,
|
||||
currentColor: '',
|
||||
scroll: false
|
||||
},
|
||||
|
||||
methods: {
|
||||
changeCurrent (current) {
|
||||
this.setData({ current });
|
||||
},
|
||||
changeCurrentColor (currentColor) {
|
||||
this.setData({ currentColor });
|
||||
},
|
||||
changeScroll (scroll) {
|
||||
this.setData({ scroll });
|
||||
},
|
||||
handleClickItem () {
|
||||
const parent = this.getRelationNodes('../tabs/index')[0];
|
||||
parent.emitEvent(this.data.key);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user