@ibiz-template/vue3-components 0.7.13 → 0.7.14

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.
Files changed (59) hide show
  1. package/dist/{index-WP6TUdg-.js → index-8Lu2Ax-_.js} +1 -1
  2. package/dist/index-8tvyarHw.js +4 -0
  3. package/dist/{index-kgWpXafW.js → index-Hg_8xCYx.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{xlsx-util-8i01yifN.js → xlsx-util-OfvrEAre.js} +1 -1
  7. package/es/common/carousel/carousel.d.ts +8 -0
  8. package/es/common/carousel/carousel.mjs +9 -1
  9. package/es/common/carousel-card/carousel-card.css +1 -0
  10. package/es/common/carousel-card/carousel-card.d.ts +41 -0
  11. package/es/common/carousel-card/carousel-card.mjs +218 -0
  12. package/es/common/index.mjs +2 -0
  13. package/es/control/context-menu/context-menu.d.ts +1 -0
  14. package/es/control/context-menu/context-menu.mjs +9 -1
  15. package/es/control/context-menu/index.d.ts +1 -0
  16. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +76 -1
  17. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +74 -0
  18. package/es/control/search-bar/filter-tree/filter-tree.mjs +19 -20
  19. package/es/control/toolbar/toolbar.mjs +27 -2
  20. package/es/control/tree/tree.css +1 -1
  21. package/es/control/tree/tree.mjs +2 -1
  22. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +10 -10
  23. package/es/locale/en/index.d.ts +1 -0
  24. package/es/locale/en/index.mjs +2 -1
  25. package/es/locale/zh-CN/index.d.ts +1 -0
  26. package/es/locale/zh-CN/index.mjs +2 -1
  27. package/es/panel-component/auth-captcha/auth-captcha.controller.d.ts +13 -0
  28. package/es/panel-component/auth-captcha/auth-captcha.controller.mjs +15 -11
  29. package/es/panel-component/panel-button/panel-button.controller.d.ts +1 -1
  30. package/es/panel-component/panel-button/panel-button.controller.mjs +6 -9
  31. package/es/panel-component/panel-static-carousel/index.d.ts +1 -0
  32. package/es/panel-component/panel-static-carousel/panel-static-carousel.d.ts +1 -0
  33. package/es/panel-component/panel-static-carousel/panel-static-carousel.mjs +13 -2
  34. package/es/panel-component/short-cut/short-cut.css +1 -1
  35. package/es/panel-component/short-cut/short-cut.mjs +19 -16
  36. package/es/view-engine/login-view.engine.d.ts +31 -3
  37. package/es/view-engine/login-view.engine.mjs +32 -12
  38. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +19 -5
  39. package/lib/common/carousel/carousel.cjs +9 -1
  40. package/lib/common/carousel-card/carousel-card.cjs +220 -0
  41. package/lib/common/carousel-card/carousel-card.css +1 -0
  42. package/lib/common/index.cjs +2 -0
  43. package/lib/control/context-menu/context-menu.cjs +8 -0
  44. package/lib/control/search-bar/filter-tree/filter-tree.cjs +19 -20
  45. package/lib/control/toolbar/toolbar.cjs +26 -1
  46. package/lib/control/tree/tree.cjs +2 -1
  47. package/lib/control/tree/tree.css +1 -1
  48. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +10 -10
  49. package/lib/locale/en/index.cjs +2 -1
  50. package/lib/locale/zh-CN/index.cjs +2 -1
  51. package/lib/panel-component/auth-captcha/auth-captcha.controller.cjs +15 -11
  52. package/lib/panel-component/panel-button/panel-button.controller.cjs +6 -9
  53. package/lib/panel-component/panel-static-carousel/panel-static-carousel.cjs +13 -2
  54. package/lib/panel-component/short-cut/short-cut.cjs +19 -16
  55. package/lib/panel-component/short-cut/short-cut.css +1 -1
  56. package/lib/view-engine/login-view.engine.cjs +32 -12
  57. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +17 -3
  58. package/package.json +7 -7
  59. package/dist/index-5IjaPupj.js +0 -4
@@ -739,7 +739,8 @@ var index = {
739
739
  interfaceBehaviorMode: "\u627E\u4E0D\u754C\u9762\u884C\u4E3A\u6A21\u5F0F{uiactionMode}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
740
740
  frontEndPluginNode: "\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
741
741
  viewPlugin: "\u627E\u4E0D\u5230\u89C6\u56FE\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
742
- correspondViewTypeStyle: "\u627E\u4E0D\u5230\u89C6\u56FE\u7C7B\u578B\uFF1A[{viewType}]\u7684\u89C6\u56FE\u6837\u5F0F\uFF1A[{viewStyle}]\u5BF9\u5E94\u7684\u9002\u914D\u5668"
742
+ correspondViewTypeStyle: "\u627E\u4E0D\u5230\u89C6\u56FE\u7C7B\u578B\uFF1A[{viewType}]\u7684\u89C6\u56FE\u6837\u5F0F\uFF1A[{viewStyle}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
743
+ toolbarItem: "\u627E\u4E0D\u5230\u5DE5\u5177\u680F\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668"
743
744
  }
744
745
  },
745
746
  service: {
@@ -26,6 +26,13 @@ class AuthCaptchaController extends runtime.PanelItemController {
26
26
  "Captcha-Code": ""
27
27
  }));
28
28
  }
29
+ /**
30
+ * 创建人机识别状态对象
31
+ *
32
+ * @protected
33
+ * @return {*} {AuthCaptchaState}
34
+ * @memberof AuthCaptchaController
35
+ */
29
36
  createState() {
30
37
  var _a;
31
38
  return new authCaptcha_state.AuthCaptchaState((_a = this.parent) == null ? void 0 : _a.state);
@@ -51,18 +58,15 @@ class AuthCaptchaController extends runtime.PanelItemController {
51
58
  async onInit() {
52
59
  super.onInit();
53
60
  await this.loadCaptcha();
54
- const view = this.panel.view;
55
- view.hooks.beforeLogin.tapPromise(async (context) => {
56
- if (!context.parentId || context.parentId === this.dataParent.model.id) {
57
- context.validate = context.validate && await this.validate();
58
- }
59
- });
60
- view.hooks.afterLogin.tap((context) => {
61
- if (!context.ok) {
62
- this.loadCaptcha();
63
- this.state.code = "";
61
+ this.panel.view.evt.on(
62
+ "onAfterLogin",
63
+ (evt) => {
64
+ if (!evt.ok && (!evt.panelDataParent || evt.panelDataParent === this.dataParent.model.id)) {
65
+ this.loadCaptcha();
66
+ this.state.code = "";
67
+ }
64
68
  }
65
- });
69
+ );
66
70
  }
67
71
  /**
68
72
  * 值校验
@@ -89,7 +89,7 @@ class PanelButtonController extends runtime.PanelItemController {
89
89
  }
90
90
  /**
91
91
  * 行为点击
92
- *
92
+ * - 在行为参数中传递panelDataParent(面板项数据父容器标识)
93
93
  * @param {MouseEvent} event
94
94
  * @return {*} {Promise<void>}
95
95
  * @memberof PanelButtonController
@@ -101,19 +101,16 @@ class PanelButtonController extends runtime.PanelItemController {
101
101
  }
102
102
  event.stopPropagation();
103
103
  event.preventDefault();
104
- const view = this.panel.view;
105
- if (actionType === "UIACTION" && uiactionId === "login" && view.model.viewType === "APPLOGINVIEW" && !await view.validate(
106
- this.dataParent.model.id
107
- )) {
108
- return;
109
- }
110
104
  await runtime.UIActionUtil.execAndResolved(
111
105
  uiactionId,
112
106
  {
113
107
  context: this.panel.context,
114
- params: this.panel.params,
108
+ params: {
109
+ panelDataParent: this.dataParent.model.id,
110
+ ...this.panel.params
111
+ },
115
112
  data: [this.data],
116
- view,
113
+ view: this.panel.view,
117
114
  event,
118
115
  noWaitRoute: true
119
116
  },
@@ -25,6 +25,7 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
25
25
  const carouselData = vue.ref([]);
26
26
  const isAuto = vue.ref(true);
27
27
  const timeSpan = vue.ref(3e3);
28
+ const carouselMode = vue.ref("default");
28
29
  const getSwipeConfig = (swipeData) => {
29
30
  const autoPlay = swipeData.find((item) => Object.is(item.key, "autoplay"));
30
31
  if (autoPlay) {
@@ -34,12 +35,17 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
34
35
  if (span) {
35
36
  timeSpan.value = Number(span.value) || 0;
36
37
  }
38
+ const carouselModeItem = swipeData.find((item) => Object.is(item.key, "carouselMode"));
39
+ if (carouselModeItem && carouselModeItem.value) {
40
+ carouselMode.value = carouselModeItem.value;
41
+ }
37
42
  };
38
43
  if ((_a = model.rawItem) == null ? void 0 : _a.rawItemParams) {
39
44
  let swipeData = [];
40
45
  const imgData = model.rawItem.rawItemParams;
41
46
  const autoplayIndex = imgData.findIndex((item) => Object.is(item.key, "autoplay"));
42
47
  const timespanIndex = imgData.findIndex((item) => Object.is(item.key, "timespan"));
48
+ const carouselModeIndex = imgData.findIndex((item) => Object.is(item.key, "carouselMode"));
43
49
  let number = 0;
44
50
  if (autoplayIndex >= 0) {
45
51
  number += 1;
@@ -47,6 +53,9 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
47
53
  if (timespanIndex >= 0) {
48
54
  number += 1;
49
55
  }
56
+ if (carouselModeIndex >= 0) {
57
+ number += 1;
58
+ }
50
59
  if (number > 0) {
51
60
  swipeData = imgData.slice(0, -number);
52
61
  getSwipeConfig(imgData.slice(-number));
@@ -73,7 +82,8 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
73
82
  ns,
74
83
  carouselData,
75
84
  isAuto,
76
- timeSpan
85
+ timeSpan,
86
+ carouselMode
77
87
  };
78
88
  },
79
89
  render() {
@@ -82,7 +92,8 @@ const PanelStaticCarousel = /* @__PURE__ */ vue.defineComponent({
82
92
  }, [vue.createVNode(vue.resolveComponent("iBizCarouselComponent"), {
83
93
  "carouselData": this.carouselData,
84
94
  "isAuto": this.isAuto,
85
- "timeSpan": this.timeSpan
95
+ "timeSpan": this.timeSpan,
96
+ "carouselMode": this.carouselMode
86
97
  }, null)]);
87
98
  }
88
99
  });
@@ -28,9 +28,10 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
28
28
  const ns = vue3Util.useNamespace("short-cut");
29
29
  const vue$1 = vue.getCurrentInstance().proxy;
30
30
  const router = vueRouter.useRouter();
31
- const isShowToolbar = vue.ref(false);
31
+ const shortCutUtil = ibiz.util.shortCut;
32
+ const isShowToolbar = vue.ref(true);
32
33
  const isShowMore = vue.ref(false);
33
- const data = vue.reactive(ibiz.util.shortCut.data);
34
+ const data = vue.reactive(shortCutUtil.data);
34
35
  const dragCache = {
35
36
  newIndex: 0,
36
37
  oldIndex: 0
@@ -43,6 +44,7 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
43
44
  vue$1.$forceUpdate();
44
45
  };
45
46
  vue.onMounted(() => {
47
+ isShowToolbar.value = shortCutUtil.mode !== "vertical";
46
48
  ibiz.util.shortCut.onChange(onShortCutChange);
47
49
  });
48
50
  vue.onUnmounted(() => {
@@ -52,6 +54,9 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
52
54
  isShowToolbar.value = !isShowToolbar.value;
53
55
  if (isShowToolbar.value) {
54
56
  isShowMore.value = false;
57
+ shortCutUtil.setShortCutMode("horizontal");
58
+ } else {
59
+ shortCutUtil.setShortCutMode("vertical");
55
60
  }
56
61
  };
57
62
  const onClick = (item) => {
@@ -132,22 +137,20 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
132
137
  "onClick": (event) => onDelete(event, element.key)
133
138
  }, null)]);
134
139
  }
135
- },
136
- footer: () => {
137
- if (isVertical && !isShowToolbar.value) {
138
- return vue.createVNode("div", {
139
- "class": [ns.e("item"), ns.e("action")],
140
- "onClick": onShowChange
141
- }, [vue.createVNode("ion-icon", {
142
- "class": ["expand-icon", "icon"],
143
- "name": "chevron-back-outline"
144
- }, null), vue.createVNode("div", {
145
- "class": ns.em("item", "caption")
146
- }, [ibiz.i18n.t("panelComponent.shortCut.expandToolbar")])]);
147
- }
148
140
  }
149
141
  });
150
142
  };
143
+ const renderFoolterToolbar = () => {
144
+ return vue.createVNode("div", {
145
+ "class": [ns.e("action"), ns.is("hidden", isShowToolbar.value)],
146
+ "onClick": onShowChange
147
+ }, [vue.createVNode("ion-icon", {
148
+ "class": ["expand-icon", "icon"],
149
+ "name": "chevron-back-outline"
150
+ }, null), vue.createVNode("div", {
151
+ "class": ns.em("item", "caption")
152
+ }, [ibiz.i18n.t("panelComponent.shortCut.expandToolbar")])]);
153
+ };
151
154
  const renderMoreToolbar = () => {
152
155
  return vue.createVNode(vue.resolveComponent("el-popover"), {
153
156
  "visible": isShowMore.value,
@@ -173,7 +176,7 @@ const ShortCut = /* @__PURE__ */ vue.defineComponent({
173
176
  })]);
174
177
  },
175
178
  default: () => {
176
- return renderDraggable(true);
179
+ return [renderDraggable(true), renderFoolterToolbar()];
177
180
  }
178
181
  });
179
182
  };
@@ -1 +1 @@
1
- .ibiz-short-cut{bottom:4px;right:4px;z-index:2;position:fixed;display:flex;align-items:center;border-radius:4px;box-shadow:0 0 16px rgba(0,0,0,.0784313725);border:1px solid var(--ibiz-color-border);background:var(--ibiz-color-bg-1)}.ibiz-short-cut.is-conceal{visibility:hidden}.ibiz-short-cut__more{padding:2px;cursor:pointer}.ibiz-short-cut__more .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__more .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__more--icon{font-size:16px;margin-left:8px}.ibiz-short-cut__recover{padding:2px;display:flex;cursor:pointer;align-items:center}.ibiz-short-cut__recover .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__recover .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__item{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start}.ibiz-short-cut__item .icon{flex-shrink:0;font-size:16px}.ibiz-short-cut__item .caption-icon,.ibiz-short-cut__item .expand-icon{margin-right:8px}.ibiz-short-cut__item .close-icon,.ibiz-short-cut__item .drag-icon{visibility:hidden}.ibiz-short-cut__item .close-icon:hover{color:var(--ibiz-color-danger-hover)}.ibiz-short-cut__item--caption{flex-grow:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ibiz-short-cut__item:hover .close-icon,.ibiz-short-cut__item:hover .drag-icon{visibility:visible}.ibiz-short-cut .is-horizontal{display:flex;padding:8px 0}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item{max-width:168px;min-width:84px;padding:0 12px;border-right:1px solid var(--ibiz-color-border)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item .close-icon{right:0;position:absolute;padding-right:4px;background-color:var(--ibiz-color-white);box-shadow:-10px 0 20px 8px var(--ibiz-color-white)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item .drag-icon{display:none;margin-right:8px}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item:hover .drag-icon{display:block}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item:hover .caption-icon{display:none}.ibiz-short-cut__popover.el-popover.el-popper{padding:10px 0}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item{width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item .drag-icon{left:5px;position:absolute}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item:hover{background-color:var(--ibiz-color-fill-1)}
1
+ .ibiz-short-cut{z-index:2;bottom:26px;display:flex;position:fixed;border-radius:4px;align-items:center;box-shadow:0 0 16px rgba(0,0,0,.0784313725);background:var(--ibiz-color-bg-1);right:var(--ibiz-spacing-base-loose);border:1px solid var(--ibiz-color-border)}.ibiz-short-cut.is-conceal{visibility:hidden}.ibiz-short-cut__more{padding:2px;cursor:pointer}.ibiz-short-cut__more .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__more .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__more .recover-icon{font-size:16px;margin-left:8px}.ibiz-short-cut__recover{padding:2px;display:flex;cursor:pointer;align-items:center}.ibiz-short-cut__recover .el-tooltip__trigger{padding:8px;line-height:16px}.ibiz-short-cut__recover .el-tooltip__trigger:hover{border-radius:2px;color:var(--ibiz-color-primary);background-color:var(--ibiz-color-primary-light-default)}.ibiz-short-cut__action{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start;width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__action .expand-icon{font-size:16px;margin-right:8px}.ibiz-short-cut__item{display:flex;cursor:pointer;position:relative;align-items:center;flex-flow:row nowrap;place-content:center flex-start}.ibiz-short-cut__item .icon{flex-shrink:0;font-size:16px}.ibiz-short-cut__item .drag-icon{display:none;margin-right:8px}.ibiz-short-cut__item .caption-icon{margin-right:8px}.ibiz-short-cut__item .close-icon{visibility:hidden}.ibiz-short-cut__item .close-icon:hover{color:var(--ibiz-color-danger-hover)}.ibiz-short-cut__item--caption{flex-grow:1;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ibiz-short-cut__item:hover .drag-icon{display:block}.ibiz-short-cut__item:hover .caption-icon{display:none}.ibiz-short-cut__item:hover .close-icon{visibility:visible}.ibiz-short-cut .is-horizontal{display:flex;padding:8px 0}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item{max-width:168px;min-width:84px;padding:0 12px;border-right:1px solid var(--ibiz-color-border)}.ibiz-short-cut .is-horizontal .ibiz-short-cut__item .close-icon{right:0;position:absolute;padding-right:4px;background-color:var(--ibiz-color-white);box-shadow:-10px 0 20px 8px var(--ibiz-color-white)}.ibiz-short-cut__popover .is-hidden{display:none}.ibiz-short-cut__popover.el-popover.el-popper{padding:10px 0}.ibiz-short-cut__popover .is-vertical{max-height:400px;overflow-y:auto}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item{width:225px;height:44px;padding:9px 20px}.ibiz-short-cut__popover .is-vertical .ibiz-short-cut__item:hover{background-color:var(--ibiz-color-fill-1)}
@@ -14,14 +14,21 @@ var __publicField = (obj, key, value) => {
14
14
  class LoginViewEngine extends runtime.ViewEngineBase {
15
15
  constructor() {
16
16
  super(...arguments);
17
+ /**
18
+ * 路由对象
19
+ *
20
+ * @type {RouteLocationNormalizedLoaded}
21
+ * @memberof LoginViewEngine
22
+ */
17
23
  __publicField(this, "route", vueRouter.useRoute());
18
24
  __publicField(this, "enterKeyListener", async (event) => {
19
- if (event.key === "Enter" && this.AppLoginView.layoutPanel) {
25
+ if (event.key === "Enter" && this.view.layoutPanel) {
20
26
  const args = {
21
27
  data: [
22
28
  {
23
- username: this.AppLoginView.layoutPanel.data.username,
24
- password: this.AppLoginView.layoutPanel.data.password
29
+ username: this.view.layoutPanel.data.username,
30
+ password: this.view.layoutPanel.data.password,
31
+ captcha: this.view.layoutPanel.data.captcha
25
32
  }
26
33
  ]
27
34
  };
@@ -29,13 +36,22 @@ class LoginViewEngine extends runtime.ViewEngineBase {
29
36
  }
30
37
  });
31
38
  }
32
- get AppLoginView() {
33
- return this.view.getController("AppLoginView");
34
- }
39
+ /**
40
+ * 视图mounted生命周期执行逻辑
41
+ *
42
+ * @return {*} {Promise<void>}
43
+ * @memberof LoginViewEngine
44
+ */
35
45
  async onMounted() {
36
46
  super.onMounted();
37
47
  document.addEventListener("keydown", this.enterKeyListener);
38
48
  }
49
+ /**
50
+ * 视图destroyed生命周期执行逻辑
51
+ *
52
+ * @return {*} {Promise<void>}
53
+ * @memberof LoginViewEngine
54
+ */
39
55
  async onDestroyed() {
40
56
  super.onDestroyed();
41
57
  document.removeEventListener("keydown", this.enterKeyListener);
@@ -53,8 +69,12 @@ class LoginViewEngine extends runtime.ViewEngineBase {
53
69
  let rememberme;
54
70
  const headers = {};
55
71
  const data = args.data[0] || {};
56
- if (this.AppLoginView.layoutPanel) {
57
- const panelData = this.AppLoginView.layoutPanel.data;
72
+ const panelDataParent = args.params.panelDataParent;
73
+ if (this.view.layoutPanel) {
74
+ if (!await this.view.layoutPanel.validate(panelDataParent)) {
75
+ return;
76
+ }
77
+ const panelData = this.view.layoutPanel.data;
58
78
  if (typeof panelData.isRemember === "boolean") {
59
79
  rememberme = panelData.isRemember;
60
80
  }
@@ -75,16 +95,16 @@ class LoginViewEngine extends runtime.ViewEngineBase {
75
95
  rememberme,
76
96
  headers
77
97
  );
78
- this.view.hooks.afterLogin.call({ ok: bol });
98
+ this.view.evt.emit("onAfterLogin", { ok: bol, panelDataParent });
79
99
  if (bol === true) {
80
100
  window.location.hash = this.route.query.ru || "/";
81
101
  window.location.reload();
82
102
  }
83
103
  }
84
104
  async cancelChanges() {
85
- if (this.AppLoginView.layoutPanel) {
86
- Object.keys(this.AppLoginView.layoutPanel.panelItems).forEach((key) => {
87
- const controller = this.AppLoginView.layoutPanel.panelItems[key];
105
+ if (this.view.layoutPanel) {
106
+ Object.keys(this.view.layoutPanel.panelItems).forEach((key) => {
107
+ const controller = this.view.layoutPanel.panelItems[key];
88
108
  const { viewFieldName } = controller.model;
89
109
  if (viewFieldName) {
90
110
  controller.setDataValue("", viewFieldName);
@@ -20,10 +20,11 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
20
20
  }
21
21
  },
22
22
  setup(props) {
23
- const route = vueRouter.useRoute();
23
+ const routeObj = vueRouter.useRoute();
24
24
  const router = vueRouter.useRouter();
25
25
  const isDestroyed = vue.ref(false);
26
26
  const viewData = vue.ref({});
27
+ const pathHistory = [];
27
28
  const destroyContext = () => {
28
29
  if (viewData.value.context) {
29
30
  const {
@@ -43,9 +44,12 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
43
44
  }
44
45
  destroyContext();
45
46
  });
46
- const openView = async () => {
47
+ const openView = async (route) => {
47
48
  var _a;
48
49
  viewData.value = await vue3Util.parseRouteViewData(route, routeDepth, true);
50
+ if (isDestroyed.value) {
51
+ return;
52
+ }
49
53
  if (!(viewData.value.context instanceof core.IBizContext)) {
50
54
  viewData.value.context = core.IBizContext.create(viewData.value.context);
51
55
  }
@@ -99,6 +103,7 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
99
103
  };
100
104
  overlay = ibiz.overlay.createModal(component, void 0, opts);
101
105
  overlay.present();
106
+ pathHistory.push(route.fullPath);
102
107
  const result = await overlay.onWillDismiss();
103
108
  overlay = null;
104
109
  if (isDestroyed.value === false) {
@@ -114,7 +119,16 @@ const ModalRouterShell = /* @__PURE__ */ vue.defineComponent({
114
119
  });
115
120
  }
116
121
  };
117
- openView();
122
+ vueRouter.onBeforeRouteUpdate((to, from) => {
123
+ if (!isDestroyed.value && pathHistory.length > 0 && pathHistory.indexOf(from.fullPath) !== -1 && pathHistory.indexOf(to.fullPath) === -1) {
124
+ const pathNodes = vue3Util.route2routePath(to).pathNodes;
125
+ const lastNode = pathNodes[pathNodes.length - 1];
126
+ if (lastNode && lastNode.viewName === runtime.RouteConst.ROUTE_MODAL_TAG) {
127
+ openView(to);
128
+ }
129
+ }
130
+ });
131
+ openView(routeObj);
118
132
  return {};
119
133
  },
120
134
  render() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -32,12 +32,12 @@
32
32
  "@ibiz-template-plugin/gantt": "0.1.4",
33
33
  "@ibiz-template/core": "0.7.7-dev.0",
34
34
  "@ibiz-template/devtool": "0.0.1-dev.6",
35
- "@ibiz-template/model-helper": "0.7.13",
36
- "@ibiz-template/runtime": "0.7.13",
35
+ "@ibiz-template/model-helper": "0.7.14",
36
+ "@ibiz-template/runtime": "0.7.14",
37
37
  "@ibiz-template/theme": "^0.7.0",
38
- "@ibiz-template/vue3-util": "0.7.13",
39
- "@ibiz-template/web-theme": "^1.1.16",
40
- "@ibiz/model-core": "^0.1.25",
38
+ "@ibiz-template/vue3-util": "0.7.14",
39
+ "@ibiz-template/web-theme": "^1.1.17",
40
+ "@ibiz/model-core": "^0.1.26",
41
41
  "@imengyu/vue3-context-menu": "^1.3.5",
42
42
  "@monaco-editor/loader": "^1.4.0",
43
43
  "@wangeditor/editor": "^5.1.23",
@@ -101,7 +101,7 @@
101
101
  "@ibiz-template/runtime": "^0.7.0",
102
102
  "@ibiz-template/theme": "^0.7.0",
103
103
  "@ibiz-template/vue3-util": "^0.7.0",
104
- "@ibiz/model-core": "^0.1.25",
104
+ "@ibiz/model-core": "^0.1.26",
105
105
  "@imengyu/vue3-context-menu": "^1.3.3",
106
106
  "@monaco-editor/loader": "^1.3.3",
107
107
  "@wangeditor/editor": "^5.1.23",