From 719e0853fa45fa905d9cddc1b66eddf7e2b64563 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 27 May 2022 11:32:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=A0=B7=E5=BC=8F=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DictTag/index.vue | 4 ++-- src/main.js | 3 ++- src/utils/dict.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue index 9650428..0f49315 100644 --- a/src/components/DictTag/index.vue +++ b/src/components/DictTag/index.vue @@ -6,7 +6,7 @@ v-if="item.elTagType == 'default' || item.elTagType == ''" :key="item.value" :index="index" - :class="item.elTagType" + :class="item.elTagClass" >{{ item.label }} {{ item.label }} diff --git a/src/main.js b/src/main.js index 46c22ac..28725e7 100644 --- a/src/main.js +++ b/src/main.js @@ -25,7 +25,7 @@ import elementIcons from '@/components/SvgIcon/svgicon' import './permission' // permission control import { useDict } from '@/utils/dict' -import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel } from '@/utils/ruoyi' +import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi' // 分页组件 import Pagination from '@/components/Pagination' @@ -52,6 +52,7 @@ app.config.globalProperties.resetForm = resetForm app.config.globalProperties.handleTree = handleTree app.config.globalProperties.addDateRange = addDateRange app.config.globalProperties.selectDictLabel = selectDictLabel +app.config.globalProperties.selectDictLabels = selectDictLabels // 全局组件挂载 app.component('DictTag', DictTag) diff --git a/src/utils/dict.js b/src/utils/dict.js index 8db7d97..0f9144a 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -9,7 +9,7 @@ export function useDict(...args) { args.forEach((d, index) => { res.value[d] = []; getDicts(d).then(resp => { - res.value[d] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass })) + res.value[d] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass })) }) }) return toRefs(res.value);