|
@@ -10,6 +10,13 @@ Component({
|
|
},
|
|
},
|
|
change: {
|
|
change: {
|
|
type: Function
|
|
type: Function
|
|
|
|
+ },
|
|
|
|
+ sort: {
|
|
|
|
+ type: Array
|
|
|
|
+ },
|
|
|
|
+ reversed: {
|
|
|
|
+ type: Number,
|
|
|
|
+ value: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
lifetimes: {
|
|
lifetimes: {
|
|
@@ -43,7 +50,13 @@ Component({
|
|
this.setData({
|
|
this.setData({
|
|
checkedItem: this.data.checkedItem == 0 ? 1 : 0
|
|
checkedItem: this.data.checkedItem == 0 ? 1 : 0
|
|
})
|
|
})
|
|
- this.triggerEvent('change', this.data.list[this.data.checkedItem])
|
|
|
|
|
|
+ let name = this.data.list[this.data.checkedItem],
|
|
|
|
+ sort = this.data.sort;
|
|
|
|
+ for (let i = 0; i < sort.length; i++) {
|
|
|
|
+ sort[i].sorted = sort[i].sortname == name ? 1 : 0;
|
|
|
|
+ sort[i].reversed = this.data.reversed
|
|
|
|
+ }
|
|
|
|
+ this.triggerEvent('change', sort)
|
|
this.chengeSelect()
|
|
this.chengeSelect()
|
|
},
|
|
},
|
|
chengeSelect() {
|
|
chengeSelect() {
|