@ibiz-template/full-code-template 0.7.41-rc.7 → 0.7.41-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ibiz-template/full-code-template",
3
- "version": "0.7.41-rc.7",
3
+ "version": "0.7.41-rc.8",
4
4
  "description": "vue3全代码模版包,根据包内容生成项目代码。",
5
- "publicPath": "https://gitee.com/api/v5/repos/iBizModeling/ibiz-fullcode-resources/raw/0.7.41-rc.7.zip?ref=main",
5
+ "publicPath": "https://gitee.com/api/v5/repos/iBizModeling/ibiz-fullcode-resources/raw/0.7.41-rc.8.zip?ref=main",
6
6
  "bin": {
7
7
  "code-generator": "src/index.js"
8
8
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ibiz-template/full-code-template",
3
3
  "private": true,
4
- "version": "0.7.41-rc.7",
4
+ "version": "0.7.41-rc.8",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -10,7 +10,7 @@
10
10
  "lint": "eslint 'src/**/*.tsx' 'src/**/*.ts' 'src/**/*.vue'",
11
11
  "lint:style": "stylelint 'src/**/*.scss'",
12
12
  "pub:temp": "publish -p .",
13
- "pub:code": "generate -m /home/zpc/workspace/project/plm-model/plm/model -o ./ --app plmweb -tv 0.7.41-rc.7 --local-mode",
13
+ "pub:code": "generate -m /home/zpc/workspace/project/plm-model/plm/model -o ./ --app plmweb -tv 0.7.41-rc.8 --local-mode",
14
14
  "compute:pkg": "ibiz-temp compute-pkg -m /home/zpc/workspace/project/plm-model/plm/model --app plmweb",
15
15
  "download:pkg": "ibiz-temp download-pkg",
16
16
  "prettier": "prettier --ignore-path '' 'src/publish/**/*.(ts|vue|tsx)' -w",
@@ -6,7 +6,7 @@ export { IBizViewShell };
6
6
 
7
7
  export default {
8
8
  install(v: App): void {
9
- v.component(IBizViewShell.name, IBizViewShell);
10
- v.component(IBizSpecialView.name, IBizSpecialView);
9
+ v.component(IBizViewShell.name!, IBizViewShell);
10
+ v.component(IBizSpecialView.name!, IBizSpecialView);
11
11
  },
12
12
  };
@@ -1,13 +1,23 @@
1
1
  /* eslint-disable no-param-reassign */
2
2
  /* eslint-disable vue/no-mutating-props */
3
3
  import {
4
+ CTX,
4
5
  EventBase,
5
6
  IModal,
6
7
  IViewProvider,
7
8
  IViewShellHooks,
8
9
  RedrawViewEvent,
9
10
  } from '@ibiz-template/runtime';
10
- import { defineComponent, h, PropType, ref, Component, Ref, watch } from 'vue';
11
+ import {
12
+ defineComponent,
13
+ h,
14
+ PropType,
15
+ ref,
16
+ Component,
17
+ Ref,
18
+ watch,
19
+ provide,
20
+ } from 'vue';
11
21
  import { IAppView } from '@ibiz/model-core';
12
22
  import './view-shell.scss';
13
23
  import { useNamespace } from '@ibiz-template/vue3-util';
@@ -20,6 +30,8 @@ export const IBizViewShell = defineComponent({
20
30
  params: { type: Object as PropType<IParams> },
21
31
  modelData: { type: Object as PropType<IAppView> },
22
32
  viewId: { type: String },
33
+ // 解决打开浮动容器(模态、抽屉、弹出框)ctx丢失问题
34
+ ctx: { type: Object as PropType<CTX> },
23
35
  viewShellHooks: { type: Object as PropType<IViewShellHooks> },
24
36
  },
25
37
  setup(props, { attrs }) {
@@ -29,7 +41,9 @@ export const IBizViewShell = defineComponent({
29
41
  const provider = ref<IViewProvider>();
30
42
  const viewComponent = ref<Component>();
31
43
  const viewModel = ref<IModel>();
32
-
44
+ if (props.ctx) {
45
+ provide('ctx', props.ctx);
46
+ }
33
47
  // 当前视图上下文
34
48
  const context: Ref<IContext> = ref(props.context);
35
49
  // 当前视图参数
@@ -411,7 +411,9 @@ export class ModelLoader implements ModelLoaderProvider {
411
411
  */
412
412
  async getAppDataEntity(appId: string, id: string): Promise<IAppDataEntity> {
413
413
  if (!appId || appId === ibiz.env.appId) {
414
- return getAppDataEntityModel(id);
414
+ const appDataEntity = await getAppDataEntityModel(id);
415
+ this.deepFillSubAppId(appDataEntity, ibiz.env.appId);
416
+ return appDataEntity;
415
417
  }
416
418
  const microAppConfig = ibiz.hub.microAppConfigCenter.getMicroApp(appId);
417
419
  const module = await System.import(