// component/popup.js
Component({
options: {
styleIsolation: 'isolated'
},
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false
},
typeReason:{
type:String,
value:''
}
},
/**
* 组件的初始数据
*/
data: {
animate: {},
hideModal: false, //模态框的状态 false-隐藏 true-显示
forValues:[],
colorsel:null,
},
/**
* 数据监听
*/
observers: {
'show': function(val) {
if (val) {this.showModal()}
else {this.hideModal()}
}
},
/**
* 组件的方法列表
*/
methods: {
selColor(e){
this.setData({
colorsel:parseInt(e.currentTarget.dataset.value)
})
}
}
})