Commit d0ad54b4d7e90b53ec6f04bc34027f4f36ace0ac
1 parent
e1341c18
feat: add dict color
Showing
3 changed files
with
4 additions
and
3 deletions
yudao-ui-admin-vue3/src/components/DictTag/src/DictTag.vue
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | import { onMounted, onUpdated, PropType, ref } from 'vue' | 2 | import { onMounted, onUpdated, PropType, ref } from 'vue' |
| 3 | import { getDictOptions, DictDataType } from '@/utils/dict' | 3 | import { getDictOptions, DictDataType } from '@/utils/dict' |
| 4 | +import { isHexColor } from '@/utils/color' | ||
| 4 | import { ElTag } from 'element-plus' | 5 | import { ElTag } from 'element-plus' |
| 5 | const props = defineProps({ | 6 | const props = defineProps({ |
| 6 | type: { | 7 | type: { |
| @@ -38,7 +39,7 @@ onUpdated(() => { | @@ -38,7 +39,7 @@ onUpdated(() => { | ||
| 38 | :disable-transitions="true" | 39 | :disable-transitions="true" |
| 39 | :key="dictData?.value + ''" | 40 | :key="dictData?.value + ''" |
| 40 | :type="dictData?.colorType" | 41 | :type="dictData?.colorType" |
| 41 | - :color="dictData?.cssClass" | 42 | + :color="dictData?.cssClass && isHexColor(dictData?.cssClass) ? dictData?.cssClass : ''" |
| 42 | > | 43 | > |
| 43 | {{ dictData?.label }} | 44 | {{ dictData?.label }} |
| 44 | </ElTag> | 45 | </ElTag> |
yudao-ui-admin-vue3/src/components/XTable/src/XTable.vue
| @@ -205,7 +205,7 @@ const getPageConfig = (options: XTableProps) => { | @@ -205,7 +205,7 @@ const getPageConfig = (options: XTableProps) => { | ||
| 205 | if (isBoolean(pagination)) { | 205 | if (isBoolean(pagination)) { |
| 206 | options.pagerConfig = { | 206 | options.pagerConfig = { |
| 207 | border: false, // 带边框 | 207 | border: false, // 带边框 |
| 208 | - background: true, // 带背景颜色 | 208 | + background: false, // 带背景颜色 |
| 209 | perfect: false, // 配套的样式 | 209 | perfect: false, // 配套的样式 |
| 210 | pageSize: 10, // 每页大小 | 210 | pageSize: 10, // 每页大小 |
| 211 | pagerCount: 7, // 显示页码按钮的数量 | 211 | pagerCount: 7, // 显示页码按钮的数量 |
yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts