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