fix: 修改物模型的其他配置按照类型配置
* fix: 修改登录后跳转方式 * fix: 修改物模型的其他配置按照类型配置
This commit is contained in:
parent
8fb5d479ee
commit
8307a1353e
|
@ -8,18 +8,32 @@
|
|||
</template>
|
||||
<template #content>
|
||||
<div style="max-width: 400px;" class="ant-form-vertical">
|
||||
<j-form-item v-for="item in config.properties" :name="name.concat([item.property])" :label="item.name">
|
||||
<template v-if='item.type?.type === "string"'>
|
||||
<j-form-item v-for="item in config.properties" :key="item.property" :name="name.concat([item.property])" :label="item.name">
|
||||
<!-- <template v-if='item.type?.type === "string"'>
|
||||
<j-input v-model:value='value[item.property]' size="small" :placeholder="`请输入${item.name}`"/>
|
||||
</template>
|
||||
<j-select v-else v-model:value="value[item.property]" :options="item.type?.elements?.map((e: { 'text': string, 'value': string }) => ({
|
||||
<template v-else-if='item.type?.type === "int"'>
|
||||
<j-input-number style="width: 100%;" v-model:value='value[item.property]' size="small" :placeholder="`请输入${item.name}`"/>
|
||||
</template>
|
||||
<j-select v-else :mode="item.type?.multi ? 'multiple' : ''" v-model:value="value[item.property]" :options="item.type?.elements?.map((e: { 'text': string, 'value': string }) => ({
|
||||
label: e.text,
|
||||
value: e.value,
|
||||
}))" size="small" :placeholder="`请输入${item.name}`"></j-select>
|
||||
}))" size="small" :placeholder="`请输入${item.name}`"></j-select> -->
|
||||
<ValueItem
|
||||
v-model:modelValue="value[item.property]"
|
||||
:itemType="item.type?.type"
|
||||
:mode="item?.type?.multi ? 'multiple' : ''"
|
||||
:options="
|
||||
item.type?.elements?.map(e => ({
|
||||
label: e.text,
|
||||
value: e.value,
|
||||
}))
|
||||
"
|
||||
/>
|
||||
</j-form-item>
|
||||
</div>
|
||||
</template>
|
||||
{{ config.name || 存储配置 }}
|
||||
{{ config.name || '存储配置' }}
|
||||
<AIcon type="EditOutlined" class="item-icon" />
|
||||
</j-popover>
|
||||
</j-button>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<div class="value-item-warp">
|
||||
<j-select
|
||||
v-if="typeMap.get(itemType) === 'select'"
|
||||
:mode="mode"
|
||||
v-model:value="myValue"
|
||||
:options="options"
|
||||
allowClear
|
||||
|
@ -139,6 +140,11 @@ const props = defineProps({
|
|||
type: Array as PropType<DefaultOptionType[]>,
|
||||
default: () => [],
|
||||
},
|
||||
// 多选框
|
||||
mode: {
|
||||
type: String as PropType<'multiple' | 'tags' | 'combobox' | ''>,
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
// type Props = {
|
||||
// itemData?: Object;
|
||||
|
|
Loading…
Reference in New Issue