@kp-ui/lowcode 1.0.26 → 1.0.28
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/_virtual/virtual_svg-icons-register.js +2 -2
- package/package.json +1 -1
- package/src/components/CustomRender/index.js +13 -2
- package/src/components/form-designer/form-widget/field-widget/slot-widget.vue.js +5 -3
- package/src/components/form-render/container-item/data-table-item.vue.js +1 -2
- package/src/lang/zh-CN.js +1 -1
- package/src/utils/request/http.js +0 -2
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/types/src/components/CustomRender/index.d.ts.map +1 -1
- package/types/src/components/form-designer/toolbar-panel/index.d.ts +1 -1
- package/types/src/utils/request/http.d.ts.map +1 -1
|
@@ -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("
|
|
4
|
+
var svgDom = document.getElementById("__svg__icons__dom__1745575666096__");
|
|
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 = "
|
|
10
|
+
svgDom.id = "__svg__icons__dom__1745575666096__";
|
|
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,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
|
-
|
|
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 = {
|
|
@@ -87,14 +89,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
87
89
|
class: normalizeClass([!!$props.designState ? "slot-wrapper-design" : "slot-wrapper-render"])
|
|
88
90
|
}, [
|
|
89
91
|
!!$props.designState ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString($props.field.options.label), 1)) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
90
|
-
(openBlock(), createBlock(resolveDynamicComponent($options.renderComponent(
|
|
92
|
+
(openBlock(), createBlock(resolveDynamicComponent($options.renderComponent($props.field.options.componentName, { data: $data.attachmentList }))))
|
|
91
93
|
]))
|
|
92
94
|
], 2)
|
|
93
95
|
]),
|
|
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-
|
|
99
|
+
const slotWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3169e5c1"]]);
|
|
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-
|
|
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
|
@@ -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 = {};
|