|
|
@@ -26,15 +26,23 @@
|
|
|
</a-tooltip>
|
|
|
<span class="dsc-label">{{ item.label }}</span>
|
|
|
</div>
|
|
|
-
|
|
|
</template>
|
|
|
|
|
|
<template v-if="item.valueSlot">
|
|
|
- <div class="value_slot">
|
|
|
- <slot :name="item.valueSlot" :label="item.label" :value="item.value"></slot>
|
|
|
- </div>
|
|
|
+ <div class="value_slot">
|
|
|
+ <slot :name="item.valueSlot" :label="item.label" :value="item.value"></slot>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="item?.type === 'dict'">
|
|
|
+ <bs-dic-tag :dicts="item.value"></bs-dic-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-if="item?.type === 'link'">
|
|
|
+ <bs-link :text="item.value" v-bind="item.extraProps"></bs-link>
|
|
|
</template>
|
|
|
- <template v-if="!item.valueSlot">
|
|
|
+
|
|
|
+ <template v-if="isRenderValue(item)">
|
|
|
<div class="dsc-value">
|
|
|
<bs-ellipsis-text :text="item.value" />
|
|
|
</div>
|
|
|
@@ -46,8 +54,8 @@
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import { isEmpty } from 'lodash';
|
|
|
- import {ref, useSlots} from 'vue';
|
|
|
- import {BsEllipsisText} from "/@/components/BsUi/index.js";
|
|
|
+ import { ref, useSlots } from 'vue';
|
|
|
+ import { BsEllipsisText, BsDicTag, BsLink } from '/@/components/BsUi/index.js';
|
|
|
|
|
|
const props = defineProps({
|
|
|
title: {
|
|
|
@@ -65,7 +73,7 @@
|
|
|
extraProps: {
|
|
|
required: false,
|
|
|
default: {},
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
const foldState = ref(true);
|
|
|
@@ -77,6 +85,10 @@
|
|
|
const handleClkHeader = () => {
|
|
|
foldState.value = !foldState.value;
|
|
|
};
|
|
|
+
|
|
|
+ const isRenderValue = (item) => {
|
|
|
+ return isEmpty(item.valueSlot) && isEmpty(item.type)
|
|
|
+ }
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.description {
|
|
|
@@ -92,7 +104,7 @@
|
|
|
align-items: center;
|
|
|
gap: 10px;
|
|
|
&:hover {
|
|
|
- background: rgba(#000, .1);
|
|
|
+ background: rgba(#000, 0.1);
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
&::before {
|