Browse Source

供应商发票申请--插槽公用组件

hella_online_20240906
yufei_wang 2 months ago
parent
commit
8d00508818
  1. 1
      src/components/Descriptions/src/Descriptions.vue
  2. 1
      src/types/descriptions.d.ts

1
src/components/Descriptions/src/Descriptions.vue

@ -151,6 +151,7 @@ const showAll = () =>{
item.valueFilter(data[item.field])
}}</span>
</slot>
<slot v-else-if="item.slotFilter" :name="'Descriptions_'+item.field" :row="data">{{ data[item.field] }}</slot>
<slot v-else-if="item.dictType">
<div v-if="data[item.field]&&Array.isArray(data[item.field])" >
<DictTag :type="item.dictType" :value="cur" v-for="(cur,key) in data[item.field]" :key="key" style="margin-right: 6px;margin-bottom: 6px;"/>

1
src/types/descriptions.d.ts

@ -10,5 +10,6 @@ export interface DescriptionsSchema {
labelClassName?: string
dateFormat?: string // add by 星语:支持时间的格式化
valueFilter?: function // 展示的过滤函数
slotFilter?:boolean // 插槽自定义内容
dictType?: string // add by 星语:支持 dict 字典数据
}

Loading…
Cancel
Save