🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` methods: { confirm(e) { this.list = [] this.result = ''; this.keya = ''; e.map((val, index) => { let result = val.label this.result += result; let keya = val.value; this.keya += keya }) }, cancel(e) {}, getLightType() { this.$http.get('/cableData/powerCategory', {}).then(res => { if (res.data.result === 1) { let server = res.data.data; let values = server.typeList for (var i = 0; i < values.length; i++) { var obj = { label: values[i].name, value: values[i].key }; this.list.push(obj); } } else { uni.showToast({ icon: "none", title: '暂无数据' }) } }) } } ```