form-custom-test 3.0.66 → 3.0.68

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/dist/render.es.js CHANGED
@@ -25907,13 +25907,13 @@ function registerIcon(app) {
25907
25907
  if (typeof window !== "undefined") {
25908
25908
  let loadSvg = function() {
25909
25909
  var body = document.body;
25910
- var svgDom = document.getElementById("__svg__icons__dom__1773976044084__");
25910
+ var svgDom = document.getElementById("__svg__icons__dom__1774318548553__");
25911
25911
  if (!svgDom) {
25912
25912
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
25913
25913
  svgDom.style.position = "absolute";
25914
25914
  svgDom.style.width = "0";
25915
25915
  svgDom.style.height = "0";
25916
- svgDom.id = "__svg__icons__dom__1773976044084__";
25916
+ svgDom.id = "__svg__icons__dom__1774318548553__";
25917
25917
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
25918
25918
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
25919
25919
  }
@@ -31946,7 +31946,8 @@ const _sfc_main$j = {
31946
31946
  checkedNodes: [],
31947
31947
  treeRef: null,
31948
31948
  defaultExpandedKeys: [],
31949
- currentNodeKey: null
31949
+ currentNodeKey: null,
31950
+ search: ""
31950
31951
  };
31951
31952
  },
31952
31953
  computed: {
@@ -32019,8 +32020,24 @@ const _sfc_main$j = {
32019
32020
  }
32020
32021
  return data4;
32021
32022
  }
32023
+ this.$nextTick(() => {
32024
+ this.applyTreeFilter();
32025
+ });
32022
32026
  });
32023
32027
  },
32028
+ filterNode(value2, data2) {
32029
+ if (value2 == null || String(value2).trim() === "")
32030
+ return true;
32031
+ const keyword = String(value2).trim().toLowerCase();
32032
+ const name = (data2.name || "").toLowerCase();
32033
+ (data2.postName || "").toLowerCase();
32034
+ return name.includes(keyword);
32035
+ },
32036
+ applyTreeFilter() {
32037
+ if (this.$refs.treeRef && typeof this.$refs.treeRef.filter === "function") {
32038
+ this.$refs.treeRef.filter(this.search);
32039
+ }
32040
+ },
32024
32041
  renderContent(h, { node, data: data2 }) {
32025
32042
  return h("div", {
32026
32043
  class: "custom-tree-node"
@@ -32068,6 +32085,7 @@ const _sfc_main$j = {
32068
32085
  this.currentNodeKey = this.fieldModel && this.fieldModel[0] ? this.fieldModel[0].nodeKey : null;
32069
32086
  this.defaultExpandedKeys = this.currentNodeKey ? [this.currentNodeKey] : [];
32070
32087
  }
32088
+ this.applyTreeFilter();
32071
32089
  });
32072
32090
  },
32073
32091
  handleNodeClick(data2, node) {
@@ -32154,6 +32172,11 @@ const _sfc_main$j = {
32154
32172
  console.error("Args:", args);
32155
32173
  }
32156
32174
  }
32175
+ },
32176
+ handleSearch() {
32177
+ this.$nextTick(() => {
32178
+ this.applyTreeFilter();
32179
+ });
32157
32180
  }
32158
32181
  }
32159
32182
  };
@@ -32214,11 +32237,12 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
32214
32237
  }, createSlots({
32215
32238
  default: withCtx(() => [
32216
32239
  createVNode(_component_el_input, {
32217
- modelValue: _ctx.search,
32218
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.search = $event),
32240
+ modelValue: $data.search,
32241
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.search = $event),
32219
32242
  placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D\u8FDB\u884C\u641C\u7D22",
32243
+ onInput: $options.handleSearch,
32220
32244
  class: "pr-24px mb-30px"
32221
- }, null, 8, ["modelValue"]),
32245
+ }, null, 8, ["modelValue", "onInput"]),
32222
32246
  createVNode(_component_el_scrollbar, {
32223
32247
  height: "538px",
32224
32248
  class: "pr-24px"
@@ -32232,7 +32256,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
32232
32256
  "node-key": "nodeKey",
32233
32257
  ref: "treeRef",
32234
32258
  "default-expanded-keys": $data.defaultExpandedKeys,
32235
- "filter-node-method": _ctx.filterNode,
32259
+ "filter-node-method": $options.filterNode,
32236
32260
  "highlight-current": !$props.field.options.multiple,
32237
32261
  "current-node-key": $data.currentNodeKey,
32238
32262
  onNodeClick: $options.handleNodeClick,
@@ -32277,7 +32301,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
32277
32301
  _: 1
32278
32302
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
32279
32303
  }
32280
- var PersonTreeWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-824e8a98"]]);
32304
+ var PersonTreeWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-61b961e2"]]);
32281
32305
  const _sfc_main$i = {
32282
32306
  name: "radio-other-widget",
32283
32307
  componentName: "FieldWidget",
@@ -61509,6 +61533,18 @@ const loadExtension = function(app) {
61509
61533
  ]
61510
61534
  }));
61511
61535
  };
61536
+ function getElMessage(app) {
61537
+ var _a, _b, _c;
61538
+ try {
61539
+ if ((_b = (_a = app == null ? void 0 : app.config) == null ? void 0 : _a.globalProperties) == null ? void 0 : _b.$message)
61540
+ return app.config.globalProperties.$message;
61541
+ if (typeof window !== "undefined" && window.ElementPlus) {
61542
+ return window.ElementPlus.ElMessage || ((_c = window.ElementPlus.default) == null ? void 0 : _c.ElMessage) || null;
61543
+ }
61544
+ } catch (e) {
61545
+ }
61546
+ return null;
61547
+ }
61512
61548
  VFormRender.install = function(app) {
61513
61549
  loadExtension(app);
61514
61550
  app.use(ContainerItems);
@@ -61516,6 +61552,7 @@ VFormRender.install = function(app) {
61516
61552
  app.component(VFormRender.name, VFormRender);
61517
61553
  app.config.globalProperties.$service = service;
61518
61554
  app.provide("service", service);
61555
+ app.provide("ElMessage", getElMessage(app));
61519
61556
  };
61520
61557
  const components = [
61521
61558
  VFormRender