| | |
| | | properties: { |
| | | menuButtonInfo: Object |
| | | }, |
| | | |
| | | /** |
| | | * 组件的初始数据 |
| | | */ |
| | | data: { |
| | | activeIndex: -1, |
| | | activeParam: [], |
| | |
| | | const paramIndex = e.currentTarget.dataset.index |
| | | const { secondCateList, tagCodes, activeParam, activeIndex } = this.data |
| | | const index = tagCodes.indexOf(code) |
| | | console.log('code', code); |
| | | console.log('tagCodes', tagCodes); |
| | | if(index === -1){ |
| | | // 同param里code重复 |
| | | if(activeParam && activeParam.length > 0){ |
| | |
| | | secondCateList[activeIndex].paramIndex = -1 |
| | | secondCateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.setData({ tagCodes, secondCateList }) |
| | | }, |
| | | changeShowParams(e){ |
| | |
| | | item.paramName = '' |
| | | }) |
| | | this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 }) |
| | | this.getList() |
| | | }, |
| | | subParam() { |
| | | this.setData({ activeParam: [] }) |