feat: add dict color
parent
e1341c187a
commit
d0ad54b4d7
|
@ -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>
|
||||
|
|
|
@ -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, // 显示页码按钮的数量
|
||||
|
|
|
@ -95,7 +95,7 @@ VXETable.setup({
|
|||
}
|
||||
},
|
||||
pager: {
|
||||
background: true,
|
||||
background: false,
|
||||
autoHidden: false,
|
||||
perfect: true,
|
||||
pageSize: 10,
|
||||
|
|
Loading…
Reference in New Issue