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

View File

@ -205,7 +205,7 @@ const getPageConfig = (options: XTableProps) => {
if (isBoolean(pagination)) { if (isBoolean(pagination)) {
options.pagerConfig = { options.pagerConfig = {
border: false, // border: false, //
background: true, // background: false, //
perfect: false, // perfect: false, //
pageSize: 10, // pageSize: 10, //
pagerCount: 7, // pagerCount: 7, //

View File

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