mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
fix: 修复listClass为空时未显示Bug.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, useAttrs } from 'vue';
|
||||
import type { TagProps } from 'naive-ui';
|
||||
import { computed } from 'vue';
|
||||
import { useDict } from '@/hooks/business/dict';
|
||||
import { isNotNull } from '@/utils/common';
|
||||
|
||||
@ -21,8 +20,6 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
value: () => []
|
||||
});
|
||||
|
||||
const attrs = useAttrs() as TagProps;
|
||||
|
||||
const dictTagData = computed<Api.System.DictData[]>(() => {
|
||||
if (props.dictData) {
|
||||
return [props.dictData];
|
||||
@ -44,8 +41,7 @@ const dictTagData = computed<Api.System.DictData[]>(() => {
|
||||
:key="item.dictValue"
|
||||
class="m-1"
|
||||
:class="[item.cssClass]"
|
||||
:type="item.listClass"
|
||||
v-bind="attrs"
|
||||
:type="item.listClass || 'default'"
|
||||
>
|
||||
{{ item.dictLabel }}
|
||||
</NTag>
|
||||
|
Reference in New Issue
Block a user