提交 41622578 编写于 作者: Cano1997's avatar Cano1997

feat: 表单分页支持动态显示

上级 accfdd48
......@@ -2,6 +2,7 @@ import { defineComponent, ref, VNode } from 'vue';
import { useNamespace } from '@ibiz-template/vue-util';
import { FormModel } from '@ibiz-template/model';
import '@ibiz-template/theme/style/components/widgets/form/form-page.scss';
import { FormPageController } from '@ibiz-template/controller';
export const FormPage = defineComponent({
name: 'FormPage',
......@@ -32,6 +33,12 @@ export const FormPage = defineComponent({
{defaultSlots.map(slot => {
const opts = slot.componentOptions!;
const props = (opts.propsData || {}) as Record<string, unknown>;
if (
props.controller &&
!(props.controller as FormPageController).visible
) {
return null;
}
return (
<i-tab-pane
class={this.ns.b('tab-item')}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册