docs: 更新自动拆分组件和二开文档

fix: 修复响应式换行失效的bug
fix: 修复下拉框staticOptions会生成无用代码的bug
This commit is contained in:
gaoyunqi
2024-06-13 13:47:01 +08:00
parent c0b51c4e20
commit 1ed4b6f5d4
5 changed files with 198 additions and 8 deletions

View File

@ -194,7 +194,7 @@
</a-modal>
<a-modal v-model:visible="showCompReadme" title="注意事项" @ok="closeCompReadme">
<div class="comp-readme-content">
因为组件封装的限制当使用表格布局选项卡卡片布局栅格布局时会带来一些问题包括二开嵌套问题移动端生成代码无法适配等<br/>
因为组件封装的限制当使用表格布局选项卡卡片布局栅格布局时会带来一些问题包括二开拆分不完全移动端生成代码无法适配等<br/>
无特殊需求时应该优先使用设计器提供的响应式布局或者进行源码二开<br/>
源码二开可以复用设计器生成的代码调整布局显隐权限更加方便
</div>

View File

@ -200,7 +200,6 @@
}
if (props.datasourceType === 'api') {
options.value = await apiConfigFunc(props.apiConfig, isCamelCase, formModel, props.index);
props.staticOptions.splice(0, props.staticOptions.length, options.value);
}
} else {
api = props.api;

View File

@ -3,8 +3,8 @@
<Form ref="formRef" :label-col="getProps?.labelCol" :labelAlign="getProps?.labelAlign" :layout="getProps?.layout" :model="formModel" :wrapper-col="getProps?.wrapperCol" @keypress.enter="handleEnterPress">
<Row v-bind="getRow">
<template v-for="schema in getSchemas" :key="schema.field">
<div v-if="schema?.componentProps.respBreakLine" style="width: 100%; height: 1px"></div>
<Col v-if="getIfShow(schema, formModel[schema.field])" v-show="getIsShow(schema, formModel[schema.field])" :span="getColWidth(schema)">
<div v-if="schema?.componentProps.respBreakLine" style="width: 100%; height: 1px"></div>
<template v-if="showComponent(schema) && schema.type !== 'slot'">
<SimpleFormItem v-model:value="formModel[schema.field]" :form-api="formApi" :isWorkFlow="isWorkFlow" :refreshFieldObj="refreshFieldObj" :schema="schema" />
</template>