feat: add dict color

This commit is contained in:
xingyu
2023-01-17 14:23:43 +08:00
parent e1341c187a
commit d0ad54b4d7
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { onMounted, onUpdated, PropType, ref } from 'vue'
import { getDictOptions, DictDataType } from '@/utils/dict'
import { isHexColor } from '@/utils/color'
import { ElTag } from 'element-plus'
const props = defineProps({
type: {
@ -38,7 +39,7 @@ onUpdated(() => {
:disable-transitions="true"
:key="dictData?.value + ''"
:type="dictData?.colorType"
:color="dictData?.cssClass"
:color="dictData?.cssClass && isHexColor(dictData?.cssClass) ? dictData?.cssClass : ''"
>
{{ dictData?.label }}
</ElTag>

View File

@ -205,7 +205,7 @@ const getPageConfig = (options: XTableProps) => {
if (isBoolean(pagination)) {
options.pagerConfig = {
border: false, // 带边框
background: true, // 带背景颜色
background: false, // 带背景颜色
perfect: false, // 配套的样式
pageSize: 10, // 每页大小
pagerCount: 7, // 显示页码按钮的数量

View File

@ -95,7 +95,7 @@ VXETable.setup({
}
},
pager: {
background: true,
background: false,
autoHidden: false,
perfect: true,
pageSize: 10,