From 9bfdf6ecef01397978c140aa4fbd8c4840d894fb Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期二, 15 八月 2023 13:04:35 +0800 Subject: [PATCH] 异常页面表格列的颜色 --- src/sfc/ShopNameAndID.vue | 36 +++++++++++++++++++++++------------- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/sfc/ShopNameAndID.vue b/src/sfc/ShopNameAndID.vue index 62efda0..e2b164a 100644 --- a/src/sfc/ShopNameAndID.vue +++ b/src/sfc/ShopNameAndID.vue @@ -2,17 +2,19 @@ 灏嗛�夋嫨鐨勮澶囩紪鍙疯繑鍥炵粰鐖剁粍浠� --> <script> -import axiosInstance from '../utils/request.js' +import axiosInstanceInstance from '../utils/request.js' export default { // 榛樿閫夋嫨涓�涓� - // props:{ - // devId:{ - // type: Array, - // default: ['鍏ㄩ儴','鍏ㄩ儴'], - // } + props:{ + devId:{ + type: Array, + default(){ + return ['鍏ㄩ儴','鍏ㄩ儴'] + } + } - // } - props:['devId'], + }, + // props:['devId'], emits: ['submitId'], data() { return { @@ -36,7 +38,7 @@ methods: { getDeviceInfo() { // 绾ц仈涓嬫媺妗嗘暟鎹� 浠庢帴鍙d腑鍔ㄦ�佽幏鍙� - axiosInstance.get('/fume/device').then((result) => { + axiosInstanceInstance.get('/fume/device').then((result) => { this.deviceInfo = result.data.data; this.deviceInfo.forEach((item) => { this.optionsShop[this.optionsShop.length] = { @@ -55,7 +57,15 @@ // 鎵撳紑鏃堕粯璁ゅ睍绀轰竴涓簵閾� this.deviceId = this.devId - } + }, + changeDev(){ + if(this.deviceId == null){ + this.deviceId = ['',''] + this.$emit('submitId', this.deviceId[1]) + }else{ + this.$emit('submitId', this.deviceId[1]) + } + }, } }; </script> @@ -67,11 +77,11 @@ v-model="deviceId" :options="optionsShop" :props="{ expandTrigger: 'hover' }" - - @change="$emit('submitId', deviceId[1])" + @change="changeDev" placeholder="鍏ㄩ儴" + clearable /> - <!-- @visible-change="getDeviceInfo" --> + <!-- @change="$emit('submitId', deviceId[1])" @change="changeDev"--> </span> </div> </template> -- Gitblit v1.9.3