@kp-ui/lowcode 1.0.75 → 1.0.77

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__1750137558812__");
4
+ var svgDom = document.getElementById("__svg__icons__dom__1750139836145__");
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__1750137558812__";
10
+ svgDom.id = "__svg__icons__dom__1750139836145__";
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,13 +1,15 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
+ "sideEffects": [
10
+ "./_virtual"
11
+ ],
9
12
  "types": "types/install.d.d.ts",
10
- "sideEffects": false,
11
13
  "dependencies": {
12
14
  "@element-plus/icons-vue": "^0.2.4",
13
15
  "@kp-ui/tool": "1.0.27",
@@ -45,13 +45,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  );
46
46
  const executeCustomFunction = async (ctx, functionBody) => {
47
47
  if (!functionBody) return true;
48
- try {
49
- const customFn = new Function(functionBody);
50
- return await customFn.call(ctx);
51
- } catch (error) {
52
- console.error("执行自定义函数失败:", error);
53
- return false;
54
- }
48
+ console.log("functionBody", functionBody);
49
+ const customFn = new Function(functionBody);
50
+ return await customFn.call(ctx);
55
51
  };
56
52
  const closeDialog = () => {
57
53
  emit("update:dialogVisible", false);
@@ -46,13 +46,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  }
47
47
  },
48
48
  setup(__props, { expose: __expose }) {
49
- var _a;
50
49
  const VFormRender = defineAsyncComponent(() => import("./index.vue.js"));
51
50
  const props = __props;
52
51
  const isLoading = ref(false);
53
52
  const dialogVisible = ref(false);
54
53
  const dFormRef = useComRef(VFormRender);
55
- const currentInstance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
54
+ const currentInstance = getCurrentInstance();
56
55
  const parentForm = computed(() => {
57
56
  return {
58
57
  ...props.parentFormRef,
@@ -101,13 +100,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
101
100
  const show = () => {
102
101
  dialogVisible.value = true;
103
102
  nextTick(() => {
104
- var _a2;
103
+ var _a;
105
104
  if (!!props.options.readMode) {
106
105
  dFormRef.value.setReadMode(true);
107
106
  }
108
107
  loadFormCode();
109
108
  console.log(dFormRef.value);
110
- (_a2 = dFormRef.value) == null ? void 0 : _a2.setDialogOrDrawerRef(currentInstance);
109
+ (_a = dFormRef.value) == null ? void 0 : _a.setDialogOrDrawerRef(currentInstance);
111
110
  if (props.parentFormRef) {
112
111
  props.parentFormRef.setChildFormRef(dFormRef.value);
113
112
  }
@@ -160,8 +159,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
160
159
  return dFormRef.value.getWidgetRef(widgetName, showError);
161
160
  };
162
161
  const updateTable = () => {
163
- var _a2, _b, _c;
164
- if ((_c = (_b = (_a2 = props.vfCtx) == null ? void 0 : _a2.parent) == null ? void 0 : _b.exposed) == null ? void 0 : _c.updateTable) {
162
+ var _a, _b, _c;
163
+ if ((_c = (_b = (_a = props.vfCtx) == null ? void 0 : _a.parent) == null ? void 0 : _b.exposed) == null ? void 0 : _c.updateTable) {
165
164
  props.vfCtx.parent.exposed.updateTable();
166
165
  }
167
166
  };
@@ -217,7 +216,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
216
  handleBeforeClose,
218
217
  deleteWrapperNode,
219
218
  options: __props.options,
220
- ctx: unref(currentInstance)
219
+ ctx: unref(dFormRef)
221
220
  }, null, 8, ["dialog-visible", "options", "ctx"])
222
221
  ]),
223
222
  default: withCtx(() => [
@@ -1,4 +1,5 @@
1
1
  import _sfc_main from "./dynamic-dialog.vue.js";
2
+ /* empty css */
2
3
  export {
3
4
  _sfc_main as default
4
5
  };
@@ -4,6 +4,7 @@ import comps from "../form-designer/form-widget/field-widget/index.js";
4
4
  import { buildDefaultFormJson, getContainerWidgetByName, cloneFormConfigWithoutEventHandler, deepClone, getDSByName, overwriteObj, runDataSourceRequest, getAllContainerWidgets, getAllFieldWidgets, getDefaultFormConfig, traverseFieldWidgets, getFieldWidgetByName, traverseFieldWidgetsOfContainer, insertCustomCssToHead, insertGlobalFunctionsToHtml, generateId } from "../../utils/util.js";
5
5
  import i18n, { changeLocale } from "../../utils/i18n.js";
6
6
  import _sfc_main$1 from "./dynamic-dialog.vue.js";
7
+ /* empty css */
7
8
  import DynamicDrawer from "./dynamic-drawer.vue.js";
8
9
  import { fmtHttpParams } from "../../utils/request/fmtHttpParams.js";
9
10
  /* empty css */