纸通宝SAAS仓库
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.
 

31 lines
726 B

Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
properties: {
visible: { type: Boolean, value: false },
cIndex: { type: Number, value: -1 },
paperList: { type: Array, value: [] }
},
data: {
activeIndex: 0,
cIndex: -1
},
methods: {
onClickNav: function({detail}){
console.log(detail)
},
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
var item = this.data.paperList[this.data.cIndex]
wx.nextTick(() => {
this.setData({ visible: false, cIndex: this.data.cIndex })
this.triggerEvent('select', item)
})
},
onHide: function(){
this.setData({ visible: false })
}
}
})