fix: 设备联调
This commit is contained in:
@@ -120,14 +120,8 @@
|
||||
provide('addChildForm', addChildForm);
|
||||
|
||||
const getFormClass = computed(() => {
|
||||
if (props.formLayout === 'flexVertical') {
|
||||
return formConfig.formLayout.flexVertical;
|
||||
}
|
||||
if (props.formLayout === 'flex') {
|
||||
return formConfig.formLayout.flex;
|
||||
}
|
||||
if (props.formLayout === 'flexv2') {
|
||||
return formConfig.formLayout.flexv2;
|
||||
if (props.formLayout) {
|
||||
return formConfig.formLayout[props.formLayout as keyof typeof formConfig.formLayout];
|
||||
}
|
||||
return formConfig.formLayout.vertical;
|
||||
});
|
||||
|
@@ -10,10 +10,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="min-height: 300px">
|
||||
<div style="min-height: 300px; overflow-y: scroll">
|
||||
<ns-tree v-if="treeData?.length" v-bind="getBindValue" v-model:selectedKeys="selectedKeys">
|
||||
<template #[item]="data" v-for="(item, index) in Object.keys($slots)" :key="index">
|
||||
<slot :name="item" v-bind="data || {}"></slot>
|
||||
<slot :name="item" v-bind="{ ...data, formModel } || {}"></slot>
|
||||
</template>
|
||||
</ns-tree>
|
||||
<!-- <a-empty v-if="!treeData?.length" /> -->
|
||||
|
@@ -11,6 +11,17 @@ export const formConfig = {
|
||||
gutter: [0, 0],
|
||||
justify: 'space-around',
|
||||
},
|
||||
formVertical: {
|
||||
layout: 'horizontal',
|
||||
class: 'ns-vertical-form',
|
||||
wrapperCol: { span: 24 },
|
||||
labelCol: { span: 0 },
|
||||
span: 24,
|
||||
sm: null, //≥576px <=768
|
||||
lg: null, //>= 768
|
||||
gutter: [0, 0],
|
||||
justify: 'space-around',
|
||||
},
|
||||
flex: {
|
||||
// layout: 'horizontal',
|
||||
class: 'ns-flex-form ns-flex-form-horizontal',
|
||||
|
Reference in New Issue
Block a user