Component({ properties: { }, data: { open: false }, methods: { show(e) { if (e.length == 0) return wx.showToast({ title: '该版本数据为空', icon: "none", mask: true }) let list = []; e.forEach(v => { let index = list.findIndex(s => s.systemclient == v.systemclient) if (index == -1) { if (v.systemclient == "wechatsaletool") { list.push({ name: "小程序", systemclient: "wechatsaletool", list: [v] }) } else if (v.systemclient == "web") { list.push({ name: "Web", systemclient: "web", list: [v] }) } else { list.push({ name: v.systemclient, systemclient: v.systemclient, list: [v] }) } } else { list[index].list.push(v) } }) this.setData({ open: true, activeKey: 0, list }) }, onChange({ detail }) { this.setData({ activeKey: detail }) }, onClose() { this.setData({ open: false, list: [], activeKey: 0, }) } } })