perf: vxe

This commit is contained in:
xingyu4j
2022-11-12 17:33:48 +08:00
parent 16b3e910e4
commit 199d3ebb69
6 changed files with 22 additions and 25 deletions

View File

@ -1,4 +1,5 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import { ElCollapseTransition, ElDescriptions, ElDescriptionsItem, ElTooltip } from 'element-plus'
import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes'
@ -111,7 +112,13 @@ const toggleClick = () => {
</template>
<template #default>
<slot :name="item.field" :row="data">{{ data[item.field] }}</slot>
<slot v-if="item.dateFormat">
{{ dayjs(data[item.field]).format(item.dateFormat) }}
</slot>
<slot v-else-if="item.dictType">
<DictTag :type="item.dictType" :value="data[item.field]" />
</slot>
<slot v-else :name="item.field" :row="data">{{ data[item.field] }}</slot>
</template>
</ElDescriptionsItem>
</ElDescriptions>