提交 aaecb088 编写于 作者: zhujiamin's avatar zhujiamin

update:更新模态动态引入

上级 9eca2e48
......@@ -99,18 +99,20 @@ export class AppModal {
* @returns {Subject<any>}
* @memberof AppModal
*/
private createVueExample(view: { name: string, title: string, fileDir:string, width?: number, height?: number, isfullscreen?: boolean, customClass?: string }, context: any = {}, viewparams: any = {}, navdatas: Array<any> = [], uuid: string): Subject<any> {
private createVueExample(view: { name: string, title: string, fileDir:string, width?: number, height?: number, isfullscreen?: boolean, customClass?: string }, context: any = {}, viewparam: any = {}, navdatas: Array<any> = [], uuid: string): Subject<any> {
const self: any = this;
if (!self.store || !self.i18n) {
self.initBasicData();
}
try {
let subject: null | Subject<any> = new Subject<any>();
let props = { view: view, viewdata: context, viewparams: viewparams, navdatas: navdatas, uuid: uuid, subject: subject };
let dir = view.fileDir.replace(/@/, '../../')
let props = { view: view, context: context, viewparam: viewparam, navdatas: navdatas, uuid: uuid, subject: subject };
let dir = view.fileDir.replace(/@page/, '');
//Vite 支持使用特殊的 import.meta.glob 函数从文件系统导入多个模块
const modules = import.meta.glob('../../page/*/*/index.ts');
const AsyncComp = defineAsyncComponent({
// 工厂函数
loader: () => import(dir),
loader: modules['../../page' + dir + '/index.ts'],
// 加载异步组件时要使用的组件
loadingComponent: IbizLoading,
// 在显示 loadingComponent 之前的延迟 | 默认值:200(单位 ms)
......
......@@ -10,12 +10,12 @@ interface AppModalProps {
/**
* @description 视图上下文参数
*/
viewdata?: any;
context?: any;
/**
* @description 视图参数
*/
viewparams?: any;
viewparam?: any;
/**
* @description 导航数据
......@@ -35,8 +35,8 @@ interface AppModalProps {
const props = withDefaults(defineProps<AppModalProps>(), {
view:{},
viewdata: {},
viewparams: {},
context: {},
viewparam: {},
navdatas: [],
});
......@@ -222,8 +222,8 @@ const handleShowState = ($event: any) => {
class="viewcontainer2"
:width="width"
:height="height"
:viewdata="JSON.stringify(viewdata)"
:viewparam="JSON.stringify(viewparams)"
:context="JSON.stringify(context)"
:viewparam="JSON.stringify(viewparam)"
:navdatas="navdatas"
:viewDefaultUsage="false"
:noViewCaption="true"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册