feat: add dict color

pull/2/head
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,