|
@@ -60,6 +60,10 @@ const props = defineProps({
|
|
|
type: [String, Number],
|
|
|
default: '' // 1: 插槽使用会返回数组
|
|
|
},
|
|
|
+ displayApiType: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
provideData: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
@@ -108,7 +112,7 @@ else if (props.provideData?.length) { // 自定义下拉数据
|
|
|
show.value = true
|
|
|
}
|
|
|
else if (props.displayDictName) {
|
|
|
- getDict(props.displayDictName, props.displayParams, props.displayApiType).then(({ data }) => {
|
|
|
+ getDict(props.displayDictName, props.displayParams, props.displayApiType || props.displayDictName).then(({ data }) => {
|
|
|
data = data?.length && data || []
|
|
|
items.value = data
|
|
|
show.value = true
|