@ibiz-template/vue3-util 0.7.41-alpha.1 → 0.7.41-alpha.11

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 (41) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/index.system.min.js +1 -1
  3. package/es/common/control-base/control-base.css +1 -1
  4. package/es/common/control-base/control-base.d.ts +1 -0
  5. package/es/common/control-base/control-base.d.ts.map +1 -1
  6. package/es/common/control-base/control-base.mjs +38 -4
  7. package/es/common/custom-render/custom-render.d.ts.map +1 -1
  8. package/es/common/custom-render/custom-render.mjs +2 -2
  9. package/es/common/view-shell/view-shell.d.ts.map +1 -1
  10. package/es/common/view-shell/view-shell.mjs +1 -0
  11. package/es/control/panel/panel/panel.d.ts.map +1 -1
  12. package/es/control/panel/panel/panel.mjs +12 -1
  13. package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
  14. package/es/control/panel/view-layout-panel/view-layout-panel.mjs +12 -1
  15. package/es/panel-component/panel-container/panel-container.d.ts.map +1 -1
  16. package/es/panel-component/panel-container/panel-container.mjs +26 -2
  17. package/es/panel-component/panel-field/panel-field.controller.mjs +1 -1
  18. package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts +1 -0
  19. package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts.map +1 -1
  20. package/es/panel-component/teleport-placeholder/teleport-placeholder.state.d.ts +1 -1
  21. package/es/panel-component/teleport-placeholder/teleport-placeholder.state.mjs +1 -1
  22. package/es/plugin/plugin-factory/plugin-factory.d.ts +29 -30
  23. package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
  24. package/es/plugin/plugin-factory/plugin-factory.mjs +55 -40
  25. package/es/util/render/render.d.ts.map +1 -1
  26. package/es/util/render/render.mjs +4 -1
  27. package/es/util/route/route.d.ts.map +1 -1
  28. package/es/util/route/route.mjs +7 -2
  29. package/lib/common/control-base/control-base.cjs +37 -3
  30. package/lib/common/control-base/control-base.css +1 -1
  31. package/lib/common/custom-render/custom-render.cjs +1 -1
  32. package/lib/common/view-shell/view-shell.cjs +1 -0
  33. package/lib/control/panel/panel/panel.cjs +12 -1
  34. package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +12 -1
  35. package/lib/panel-component/panel-container/panel-container.cjs +25 -1
  36. package/lib/panel-component/panel-field/panel-field.controller.cjs +1 -1
  37. package/lib/panel-component/teleport-placeholder/teleport-placeholder.state.cjs +1 -1
  38. package/lib/plugin/plugin-factory/plugin-factory.cjs +55 -40
  39. package/lib/util/render/render.cjs +4 -1
  40. package/lib/util/route/route.cjs +7 -2
  41. package/package.json +6 -6
@@ -5,6 +5,7 @@ var runtime = require('@ibiz-template/runtime');
5
5
  var core = require('@ibiz-template/core');
6
6
  var ramda = require('ramda');
7
7
  require('../../use/index.cjs');
8
+ require('./control-base.css');
8
9
  var namespace = require('../../use/namespace/namespace.cjs');
9
10
 
10
11
  "use strict";
@@ -74,7 +75,7 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
74
75
  };
75
76
  const getControlRender = (data) => {
76
77
  var _a, _b;
77
- const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => item.id !== "emptypanel") : void 0;
78
+ const controlRenders = model.controlRenders ? model.controlRenders.filter((item) => !Object.values(runtime.PredefinedControlRender).includes(item.id)) : void 0;
78
79
  if (!controlRenders || controlRenders.length === 0) {
79
80
  return void 0;
80
81
  }
@@ -107,6 +108,36 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
107
108
  const data = props.controller.data || props.controller.items;
108
109
  return getControlRender(data);
109
110
  });
111
+ const disableMaskInfoRender = () => {
112
+ const disableRender = model.controlRenders ? model.controlRenders.find((item) => item.id === runtime.PredefinedControlRender.DISABLEPANEL) : void 0;
113
+ if (!disableRender) {
114
+ return vue.createVNode("div", {
115
+ "innerHTML": props.controller.state.maskOption.maskInfo || "",
116
+ "class": [ns.e("disable-mask-text")]
117
+ }, null);
118
+ }
119
+ if (disableRender.renderType === "LAYOUTPANEL_MODEL" && disableRender.layoutPanelModel) {
120
+ const htmlCode = runtime.ScriptFactory.execScriptFn({
121
+ ...props.controller.getEventArgs()
122
+ }, disableRender.layoutPanelModel, {
123
+ isAsync: false,
124
+ singleRowReturn: true
125
+ });
126
+ return vue.createVNode("div", {
127
+ "innerHTML": htmlCode,
128
+ "class": [ns.e("disable-mask-text")]
129
+ }, null);
130
+ }
131
+ if (disableRender.renderType === "LAYOUTPANEL" && disableRender.layoutPanel) {
132
+ return vue.createVNode(vue.resolveComponent("iBizControlShell"), {
133
+ "class": [ns.e("disable-mask-text")],
134
+ "data": {},
135
+ "params": props.controller.params,
136
+ "context": props.controller.context,
137
+ "modelData": disableRender.layoutPanel
138
+ }, null);
139
+ }
140
+ };
110
141
  return {
111
142
  ns,
112
143
  typeClass,
@@ -115,6 +146,7 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
115
146
  codeName,
116
147
  controls,
117
148
  customRender,
149
+ disableMaskInfoRender,
118
150
  onLayoutPanelCreated
119
151
  };
120
152
  },
@@ -164,9 +196,11 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
164
196
  }, slots);
165
197
  }
166
198
  return vue.createVNode("div", {
167
- "class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName],
199
+ "class": [this.ns.b(), this.ns.b(this.typeClass), this.ns.m(this.codeName), this.sysCssName, this.ns.is("disabled", state.disabled)],
168
200
  "style": this.inlineStyle
169
- }, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b))]);
201
+ }, [layoutPanel || this.customRender || ((_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b)), state.disabled && vue.createVNode("div", {
202
+ "class": [this.ns.e("mask-container"), this.ns.m(state.maskOption.mode.toLowerCase())]
203
+ }, [state.maskOption.mode === "MASK" && this.disableMaskInfoRender()])]);
170
204
  }
171
205
  });
172
206
 
@@ -1 +1 @@
1
- .ibiz-control{width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}
1
+ .ibiz-control{--ibiz-control-base-scrollbar-width:0px;--ibiz-control-base-mask-text-color:var(--ibiz-color-primary-text);--ibiz-control-base-mask-background-color-blank:transparent;--ibiz-control-base-mask-background-color-mask:rgba(0, 0, 0, 0.5);width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}.ibiz-control.is-disabled{position:relative}.ibiz-control__mask-container{position:absolute;top:0;left:0;z-index:10;width:calc(100% - var(--ibiz-control-base-scrollbar-width));height:100%}.ibiz-control--blank{background-color:var(--ibiz-control-base-mask-background-color-blank)}.ibiz-control--mask{color:var(--ibiz-control-base-mask-text-color);background-color:var(--ibiz-control-base-mask-background-color-mask);display:flex;align-items:center;justify-content:center}
@@ -49,7 +49,7 @@ const IBizCustomRender = /* @__PURE__ */ vue.defineComponent({
49
49
  if (!controlRenders || controlRenders.length === 0) {
50
50
  return void 0;
51
51
  }
52
- const noDataRender = controlRenders.find((item) => item.id === "emptypanel");
52
+ const noDataRender = controlRenders.find((item) => item.id === runtime.PredefinedControlRender.EMPTYPANEL);
53
53
  if (!noDataRender)
54
54
  return void 0;
55
55
  if (noDataRender.renderType === "LAYOUTPANEL_MODEL" && noDataRender.layoutPanelModel) {
@@ -198,6 +198,7 @@ const IBizViewShell = /* @__PURE__ */ vue.defineComponent({
198
198
  Object.assign(params.value, redrawData.params);
199
199
  const modal = attrs.modal;
200
200
  if (modal) {
201
+ modal.hooks.preDismiss.clear();
201
202
  modal.hooks.shouldDismiss.clear();
202
203
  modal.hooks.beforeDismiss.clear();
203
204
  }
@@ -66,12 +66,23 @@ function renderPanelItem(panelItem, c, ins) {
66
66
  tempStyle = panelItem.cssStyle;
67
67
  }
68
68
  const panelItemC = panelItems[panelItem.id];
69
+ const attrs = renderAttrs(panelItem, panelItemC);
70
+ if (attrs.dynamicstyle) {
71
+ if (typeof attrs.dynamicstyle === "object") {
72
+ tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
73
+ return "".concat(key, ":").concat(value, ";");
74
+ }).join("");
75
+ } else {
76
+ tempStyle += attrs.dynamicstyle;
77
+ }
78
+ delete attrs.dynamicstyle;
79
+ }
69
80
  return vue.h(component, {
70
81
  modelData: panelItem,
71
82
  controller: panelItemC,
72
83
  key: panelItem.id,
73
84
  style: tempStyle,
74
- attrs: renderAttrs(panelItem, panelItemC)
85
+ attrs
75
86
  }, children);
76
87
  }
77
88
  const PanelControl = /* @__PURE__ */ vue.defineComponent({
@@ -146,12 +146,23 @@ const ViewLayoutPanelControl = /* @__PURE__ */ vue.defineComponent({
146
146
  tempStyle = panelItem.cssStyle;
147
147
  }
148
148
  const panelItemC = panelItems[panelItem.id];
149
+ const attrs = renderAttrs(panelItem, panelItemC);
150
+ if (attrs.dynamicstyle) {
151
+ if (typeof attrs.dynamicstyle === "object") {
152
+ tempStyle += Object.entries(attrs.dynamicstyle).map(([key, value]) => {
153
+ return "".concat(key, ":").concat(value, ";");
154
+ }).join("");
155
+ } else {
156
+ tempStyle += attrs.dynamicstyle;
157
+ }
158
+ delete attrs.dynamicstyle;
159
+ }
149
160
  return vue.h(component, {
150
161
  modelData: panelItem,
151
162
  controller: panelItemC,
152
163
  key: panelItem.id,
153
164
  style: tempStyle,
154
- attrs: renderAttrs(panelItem, panelItemC)
165
+ attrs
155
166
  }, children);
156
167
  };
157
168
  vue.provide("renderPanelItem", renderPanelItem);
@@ -44,7 +44,7 @@ const PanelContainer = /* @__PURE__ */ vue.defineComponent({
44
44
  };
45
45
  },
46
46
  render() {
47
- var _a, _b;
47
+ var _a, _b, _c;
48
48
  let _slot;
49
49
  const defaultSlots = ((_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) || [];
50
50
  const content = vue.createVNode(vue.resolveComponent("iBizRow"), {
@@ -64,6 +64,30 @@ const PanelContainer = /* @__PURE__ */ vue.defineComponent({
64
64
  })) ? _slot : {
65
65
  default: () => [_slot]
66
66
  });
67
+ const attrs = (_c = this.$attrs) == null ? void 0 : _c.attrs;
68
+ if (attrs && attrs.dynamictooltip) {
69
+ return vue.createVNode(vue.resolveComponent("el-tooltip"), {
70
+ "placement": "right",
71
+ "popper-class": this.ns.e("dynamic-tooltip")
72
+ }, {
73
+ default: () => {
74
+ return vue.createVNode("div", vue.mergeProps({
75
+ "class": this.classArr,
76
+ "onClick": () => {
77
+ this.controller.onClick();
78
+ }
79
+ }, this.$attrs), [this.controller.model.cssStyle ? vue.createVNode("style", {
80
+ "type": "text/css"
81
+ }, [this.controller.model.cssStyle]) : null, content]);
82
+ },
83
+ content: () => {
84
+ return vue.createVNode("div", {
85
+ "class": this.ns.e("dynamic-tooltip-content"),
86
+ "innerHTML": attrs.dynamictooltip
87
+ }, null);
88
+ }
89
+ });
90
+ }
67
91
  return vue.createVNode("div", {
68
92
  "class": this.classArr,
69
93
  "onClick": () => {
@@ -86,7 +86,7 @@ class PanelFieldController extends runtime.PanelItemController {
86
86
  */
87
87
  async validate() {
88
88
  var _a;
89
- if (this.state.visible && !this.model.allowEmpty && !this.value) {
89
+ if (this.state.visible && this.state.required && !this.value) {
90
90
  this.state.error = ((_a = this.editor) == null ? void 0 : _a.model.placeHolder) || ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty", {
91
91
  caption: this.model.caption
92
92
  });
@@ -7,7 +7,7 @@ class TeleportPlaceholderState extends runtime.PanelItemState {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  /**
10
- * @description 可根据该参数从嵌入视图里找到占位面板成员用于渲染,通过自定义补充参数配置
10
+ * @description 嵌入视图中的部件可依据该参数找到传送占位面板项进行位置替换,参数默认格式为 “当前视图标识-需传送部件标识”;也可通过面板项参数(TeleportTag)来指定
11
11
  * @exposedoc
12
12
  * @type {string}
13
13
  * @memberof TeleportPlaceholderState
@@ -36,12 +36,10 @@ class PluginFactory {
36
36
  */
37
37
  this.pluginCache = /* @__PURE__ */ new Map();
38
38
  /**
39
- * 所有的插件
40
- *
41
- * @author chitanda
42
- * @date 2023-02-02 16:02:55
39
+ * @description 所有的插件
43
40
  * @protected
44
- * @type {Plugin[]}
41
+ * @type {{ code: Plugin; extraParams: IParams }[]}
42
+ * @memberof PluginFactory
45
43
  */
46
44
  this.pluginCodes = [];
47
45
  /**
@@ -118,7 +116,7 @@ class PluginFactory {
118
116
  */
119
117
  register(app) {
120
118
  this.pluginCodes.forEach((plugin) => {
121
- app.use(plugin);
119
+ app.use(plugin.code, plugin.extraParams);
122
120
  });
123
121
  }
124
122
  /**
@@ -138,31 +136,30 @@ class PluginFactory {
138
136
  }
139
137
  }
140
138
  /**
141
- * 插件刚加载完成回来,设置到目前所有的 vue 实例当中
142
- *
143
- * @author chitanda
144
- * @date 2023-02-02 17:02:38
139
+ * @description 插件刚加载完成回来,设置到目前所有的 vue 实例当中
145
140
  * @protected
146
141
  * @param {Plugin} code
142
+ * @param {IParams} [extraParams={}]
143
+ * @memberof PluginFactory
147
144
  */
148
- setPluginCode(code) {
149
- this.pluginCodes.push(code);
150
- app_hooks.AppHooks.useComponent.callSync(null, code);
145
+ setPluginCode(code, extraParams = {}) {
146
+ this.pluginCodes.push({ code, extraParams });
147
+ app_hooks.AppHooks.useComponent.callSync(null, code, extraParams);
151
148
  }
152
149
  /**
153
- * 加载插件
154
- *
155
- * @author chitanda
156
- * @date 2022-10-31 14:10:13
150
+ * @description 加载插件
157
151
  * @param {ISysPFPlugin} plugin
158
- * @return {*} {Promise<boolean>}
152
+ * @param {string} [appId=ibiz.env.appId]
153
+ * @returns {*} {Promise<boolean>}
154
+ * @memberof PluginFactory
159
155
  */
160
- async loadPlugin(plugin) {
156
+ async loadPlugin(plugin, appId = ibiz.env.appId) {
161
157
  if (plugin.runtimeObject === true) {
162
158
  const pluginRef = plugin;
163
159
  if (pluginRef) {
164
160
  const rtObjectName = pluginRef.rtobjectName;
165
161
  const rtObjectRepo = pluginRef.rtobjectRepo;
162
+ const replaceDefault = pluginRef.replaceDefault;
166
163
  if (this.isIgnore(rtObjectRepo)) {
167
164
  return true;
168
165
  }
@@ -181,7 +178,9 @@ class PluginFactory {
181
178
  try {
182
179
  const p = this.loadPluginRef(
183
180
  pluginRef.rtobjectName,
184
- pluginRef.rtobjectRepo
181
+ pluginRef.rtobjectRepo,
182
+ appId,
183
+ { replaceDefault }
185
184
  );
186
185
  this.loadQueue.set(rtObjectRepo, p);
187
186
  const result = await p;
@@ -199,14 +198,15 @@ class PluginFactory {
199
198
  return false;
200
199
  }
201
200
  /**
202
- * 加载应用插件
203
- *
204
- * @author chitanda
205
- * @date 2022-10-31 16:10:57
206
- * @param {IPSAppPFPluginRef} pluginRef
207
- * @return {*} {Promise<boolean>}
201
+ * @description 加载应用插件
202
+ * @param {string} rtObjectName
203
+ * @param {string} rtObjectRepo
204
+ * @param {string} [appId=ibiz.env.appId]
205
+ * @param {IParams} [params={}]
206
+ * @returns {*} {Promise<boolean>}
207
+ * @memberof PluginFactory
208
208
  */
209
- async loadPluginRef(rtObjectName, rtObjectRepo) {
209
+ async loadPluginRef(rtObjectName, rtObjectRepo, appId = ibiz.env.appId, extraParams = {}) {
210
210
  if (this.isIgnore(rtObjectRepo)) {
211
211
  return true;
212
212
  }
@@ -216,7 +216,7 @@ class PluginFactory {
216
216
  let configData = null;
217
217
  {
218
218
  const pluginPath = rtObjectRepo;
219
- const configUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/package.json") : "".concat(ibiz.env.pluginBaseUrl, "/").concat(index.pathBrowserify.join(pluginPath, "package.json"));
219
+ const configUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/package.json") : "".concat(ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId ? ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId) : ibiz.env.pluginBaseUrl, "/").concat(index.pathBrowserify.join(pluginPath, "package.json"));
220
220
  const res = await ibiz.net.axios({
221
221
  method: "get",
222
222
  headers: { "Access-Control-Allow-Origin": "*" },
@@ -229,6 +229,7 @@ class PluginFactory {
229
229
  }
230
230
  configData = res.data;
231
231
  }
232
+ Object.assign(configData, { appId, extraParams });
232
233
  const remotePlugin = new runtime.RemotePluginItem(
233
234
  rtObjectName,
234
235
  rtObjectRepo,
@@ -257,17 +258,24 @@ class PluginFactory {
257
258
  */
258
259
  async loadScript(remotePlugin) {
259
260
  const pluginPath = remotePlugin.repo;
260
- const { name, system, styles = [] } = remotePlugin.config;
261
+ const {
262
+ name,
263
+ appId,
264
+ system,
265
+ styles = [],
266
+ extraParams = {}
267
+ } = remotePlugin.config;
261
268
  let scriptUrl = "";
262
269
  scriptUrl = index.pathBrowserify.join(pluginPath, system);
263
270
  if (scriptUrl) {
264
271
  if (this.cache.has(scriptUrl)) {
265
272
  return;
266
273
  }
274
+ const baseUrl = ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId ? ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId) : ibiz.env.pluginBaseUrl;
267
275
  let data = null;
268
- const url = this.parseUrl(scriptUrl);
276
+ const url = this.parseUrl(scriptUrl, baseUrl);
269
277
  const styleUrls = (typeof styles === "string" ? [styles] : styles).map(
270
- (styleUrl) => this.parseUrl(index.default.join(pluginPath, styleUrl))
278
+ (styleUrl) => this.parseUrl(index.default.join(pluginPath, styleUrl), baseUrl)
271
279
  );
272
280
  System.addImportMap({
273
281
  imports: {
@@ -281,7 +289,7 @@ class PluginFactory {
281
289
  data = await System.import(name);
282
290
  if (data) {
283
291
  if (data.default) {
284
- this.setPluginCode(data.default);
292
+ this.setPluginCode(data.default, extraParams);
285
293
  } else {
286
294
  throw new core.RuntimeError(
287
295
  ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad")
@@ -341,7 +349,10 @@ class PluginFactory {
341
349
  if (!config["systemjs-importmap"]) {
342
350
  return;
343
351
  }
344
- const importMap = this.handleSystemImportMap(config["systemjs-importmap"]);
352
+ const importMap = this.handleSystemImportMap(
353
+ config["systemjs-importmap"],
354
+ config.appId
355
+ );
345
356
  if (importMap.packages) {
346
357
  const pkgs = importMap.packages;
347
358
  for (const key in pkgs) {
@@ -356,22 +367,26 @@ class PluginFactory {
356
367
  ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad")
357
368
  );
358
369
  }
359
- await this.loadPluginExternal(res.data);
370
+ const result = res.data;
371
+ Object.assign(result, { appId: config.appId });
372
+ await this.loadPluginExternal(result);
360
373
  }
361
374
  }
362
375
  System.addImportMap(importMap);
363
376
  }
364
377
  /**
365
- * 处理 systemjs importmap 配置
366
- *
367
- * @author chitanda
368
- * @date 2024-01-11 20:01:07
378
+ * @description 处理 systemjs importmap 配置
369
379
  * @protected
370
380
  * @param {ISystemImportMap} importMap
371
- * @return {*} {IParams}
381
+ * @param {string} appId
382
+ * @returns {*} {(ISystemImportMap | null)}
383
+ * @memberof PluginFactory
372
384
  */
373
- handleSystemImportMap(importMap) {
385
+ handleSystemImportMap(importMap, appId) {
374
386
  if (importMap) {
387
+ if (!importMap.baseUrl && ibiz.env.runContainer === "FULLCODE" && appId !== ibiz.env.appId) {
388
+ importMap.baseUrl = ibiz.hub.microAppConfigCenter.getPluginBaseUrl(appId);
389
+ }
375
390
  if (importMap.packages) {
376
391
  const pkgs = importMap.packages;
377
392
  for (const key in pkgs) {
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var ramda = require('ramda');
4
+ var runtime = require('@ibiz-template/runtime');
4
5
 
5
6
  "use strict";
6
7
  function renderString(value) {
@@ -26,7 +27,9 @@ const hasEmptyPanelRenderer = (c) => {
26
27
  if (!controlRenders || controlRenders.length === 0) {
27
28
  return false;
28
29
  }
29
- return !!controlRenders.find((item) => item.id === "emptypanel");
30
+ return !!controlRenders.find(
31
+ (item) => item.id === runtime.PredefinedControlRender.EMPTYPANEL
32
+ );
30
33
  };
31
34
 
32
35
  exports.hasEmptyPanelRenderer = hasEmptyPanelRenderer;
@@ -38,7 +38,7 @@ function route2routePath(route, isRouteModal = false) {
38
38
  params = void 0;
39
39
  } else {
40
40
  if (params.srfnavctx) {
41
- context = JSON.parse(decodeURIComponent(params.srfnavctx));
41
+ context = JSON.parse(params.srfnavctx);
42
42
  delete params.srfnavctx;
43
43
  }
44
44
  if (params.srfnav) {
@@ -119,8 +119,13 @@ function getOwnRouteContext(context) {
119
119
  }
120
120
  delete ownContext.attributekeys;
121
121
  }
122
+ let srfKeepNull = false;
123
+ if (Object.prototype.hasOwnProperty.call(ownContext, "srfkeepnull")) {
124
+ srfKeepNull = ownContext.srfkeepnull === true || ownContext.srfkeepnull === "true";
125
+ delete ownContext.srfkeepnull;
126
+ }
122
127
  Object.keys(ownContext).forEach((key) => {
123
- if (excludeKeys.includes(key) || ramda.isNil(ownContext[key])) {
128
+ if (excludeKeys.includes(key) || !srfKeepNull && ramda.isNil(ownContext[key])) {
124
129
  delete ownContext[key];
125
130
  }
126
131
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-util",
3
- "version": "0.7.41-alpha.1",
3
+ "version": "0.7.41-alpha.11",
4
4
  "description": "通用组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "types": "es/index.d.ts",
@@ -37,10 +37,10 @@
37
37
  "license": "MIT",
38
38
  "devDependencies": {
39
39
  "@ibiz-template/cli": "^0.3.10",
40
- "@ibiz-template/core": "^0.7.41-alpha.1",
41
- "@ibiz-template/runtime": "^0.7.41-alpha.1",
40
+ "@ibiz-template/core": "^0.7.41-alpha.9",
41
+ "@ibiz-template/runtime": "^0.7.41-alpha.11",
42
42
  "@ibiz-template/theme": "^0.7.39",
43
- "@ibiz/model-core": "^0.1.75",
43
+ "@ibiz/model-core": "^0.1.79",
44
44
  "@types/path-browserify": "^1.0.2",
45
45
  "@types/qs": "^6.9.11",
46
46
  "@types/systemjs": "^6.13.5",
@@ -57,7 +57,7 @@
57
57
  "peerDependencies": {
58
58
  "@ibiz-template/core": "^0.6.0",
59
59
  "@ibiz-template/runtime": "^0.6.0",
60
- "@ibiz/model-core": "^0.1.75",
60
+ "@ibiz/model-core": "^0.1.79",
61
61
  "dayjs": "^1.11.10",
62
62
  "path-browserify": "^1.0.1",
63
63
  "pinia": "^2.1.7",
@@ -67,5 +67,5 @@
67
67
  "vue": "^3.3.8",
68
68
  "vue-router": "^4.2.4"
69
69
  },
70
- "gitHead": "49b4a4328c21f6b4725855f6f1a1c00a72ed8065"
70
+ "gitHead": "2178dbbddab047b198a6908e16ff3ee6c1a34b33"
71
71
  }