@kp-ui/lowcode 1.0.26 → 1.0.27

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.
@@ -1,13 +1,13 @@
1
1
  if (typeof window !== "undefined") {
2
2
  let loadSvg = function() {
3
3
  var body = document.body;
4
- var svgDom = document.getElementById("__svg__icons__dom__1745310032728__");
4
+ var svgDom = document.getElementById("__svg__icons__dom__1745574462649__");
5
5
  if (!svgDom) {
6
6
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
7
7
  svgDom.style.position = "absolute";
8
8
  svgDom.style.width = "0";
9
9
  svgDom.style.height = "0";
10
- svgDom.id = "__svg__icons__dom__1745310032728__";
10
+ svgDom.id = "__svg__icons__dom__1745574462649__";
11
11
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
12
12
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,4 +1,4 @@
1
- import { h } from "vue";
1
+ import { h, getCurrentInstance } from "vue";
2
2
  function useCustomRender() {
3
3
  const modules = /* @__PURE__ */ Object.assign({ "./components/AttachmentRender.vue": () => import("./components/AttachmentRender.vue.js") });
4
4
  const componentCache = /* @__PURE__ */ new Map();
@@ -10,7 +10,18 @@ function useCustomRender() {
10
10
  });
11
11
  });
12
12
  const loadComponent = (componentName) => {
13
- const component = componentCache.get(componentName);
13
+ let component = componentCache.get(componentName);
14
+ console.log({ componentName });
15
+ if (!component) {
16
+ const instance = getCurrentInstance();
17
+ if (instance && instance.appContext) {
18
+ const outSysCompontents = (instance == null ? void 0 : instance.appContext.config.globalProperties.compontents) || {};
19
+ const globalSysCompontents = instance.appContext.components || {};
20
+ const compontents = { ...outSysCompontents, ...globalSysCompontents };
21
+ console.log({ compontents });
22
+ component = compontents[componentName];
23
+ }
24
+ }
14
25
  if (!component) {
15
26
  console.error(`Component ${componentName} not found in cache`);
16
27
  throw new Error(`Component ${componentName} not found`);
@@ -61,7 +61,9 @@ const _sfc_main = {
61
61
  this.unregisterFromRefList();
62
62
  },
63
63
  methods: {
64
- renderComponent
64
+ renderComponent(componentName, props) {
65
+ return renderComponent(componentName, props);
66
+ }
65
67
  }
66
68
  };
67
69
  const _hoisted_1 = {
@@ -94,7 +96,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
94
96
  _: 1
95
97
  }, 8, ["designer", "field", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
96
98
  }
97
- const slotWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e4e2c89d"]]);
99
+ const slotWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-afa359a3"]]);
98
100
  export {
99
101
  slotWidget as default
100
102
  };
@@ -64,7 +64,6 @@ const _sfc_main = {
64
64
  },
65
65
  mounted() {
66
66
  this.loadDataTableDataSource();
67
- console.log(1, this.widget.options.tableColumns);
68
67
  this.$nextTick(() => {
69
68
  this.handleOnMounted();
70
69
  });
@@ -200,7 +199,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
200
199
  [vShow, !_ctx.handleHidden()]
201
200
  ]);
202
201
  }
203
- const dataTableItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-18b7a48a"]]);
202
+ const dataTableItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9fbd63af"]]);
204
203
  export {
205
204
  dataTableItem as default
206
205
  };
package/src/lang/zh-CN.js CHANGED
@@ -440,7 +440,7 @@ const zhLocale = {
440
440
  dsRequestBooleanTypeError: "布尔类型值错误",
441
441
  dsValidationError: "数据源设置存在错误,请修改",
442
442
  dsDuplicatedNameError: "数据源名称重复,请修改!",
443
- slotCompontent: "组件名称"
443
+ slotCompontent: "组件名"
444
444
  }
445
445
  },
446
446
  复制: "复制"
@@ -23,11 +23,9 @@ const http = axios.create({
23
23
  http.interceptors.request.use((config) => {
24
24
  var _a, _b, _c, _d, _e;
25
25
  const localUserInfo = getUserInfo();
26
- console.log(localUserInfo);
27
26
  const tokenId = (_b = (_a = localUserInfo == null ? void 0 : localUserInfo.loginInfo) == null ? void 0 : _a.userToken) == null ? void 0 : _b.tokenId;
28
27
  const tenantId = (_d = (_c = localUserInfo == null ? void 0 : localUserInfo.loginInfo) == null ? void 0 : _c.userToken) == null ? void 0 : _d.tenantId;
29
28
  const employeeId = (_e = localUserInfo == null ? void 0 : localUserInfo.loginInfo) == null ? void 0 : _e.employeeId;
30
- console.log(config);
31
29
  config.withCredentials = true;
32
30
  if (!config.headers) {
33
31
  config.headers = {};