You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1007 B
66 lines
1007 B
Component({
|
|
observers: {
|
|
'equipment_idx'(arr){
|
|
var idx =arr
|
|
this.setData({
|
|
idx
|
|
})
|
|
}
|
|
},
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
listData: {
|
|
type: Array,
|
|
value: [],
|
|
},
|
|
isShowPicker:{
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
equipment_idx:{
|
|
type:Number,
|
|
value:0
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
imageServerUrl: getApp().globalData.imageServerUrl,
|
|
idx: 0,
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
lifetimes: {
|
|
ready :function(){
|
|
var idx =this.data.equipment_idx
|
|
this.setData({
|
|
idx
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
btn_fn(){
|
|
},
|
|
cancel(e){
|
|
this.triggerEvent('cancel',false)
|
|
},
|
|
bindChange(e){
|
|
this.setData({
|
|
idx:e.currentTarget.dataset.index
|
|
})
|
|
},
|
|
confirm(e){
|
|
this.setData({
|
|
isShowPicker:false
|
|
})
|
|
this.triggerEvent('confirm',{idx:this.data.idx})
|
|
}
|
|
}
|
|
})
|