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