form-custom-test 3.0.166 → 3.0.167

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.
@@ -1437,6 +1437,10 @@ const basicFields = [
1437
1437
  disabled: false,
1438
1438
  hidden: false,
1439
1439
  showCheckbox: false,
1440
+ checkStrictly: false,
1441
+ labelKey: "label",
1442
+ valueKey: "value",
1443
+ childrenKey: "children",
1440
1444
  clearable: true,
1441
1445
  filterable: false,
1442
1446
  allowCreate: false,
@@ -25276,6 +25280,17 @@ const _sfc_main$38 = {
25276
25280
  };
25277
25281
  },
25278
25282
  computed: {
25283
+ treeSelectProps() {
25284
+ const opts = this.field.options || {};
25285
+ return {
25286
+ label: opts.labelKey || "label",
25287
+ value: opts.valueKey || "value",
25288
+ children: opts.childrenKey || "children"
25289
+ };
25290
+ },
25291
+ treeNodeKey() {
25292
+ return this.field.options && this.field.options.valueKey || "value";
25293
+ },
25279
25294
  allowDefaultFirstOption() {
25280
25295
  return !!this.field.options.filterable && !!this.field.options.allowCreate;
25281
25296
  },
@@ -25332,8 +25347,9 @@ function _sfc_render$38(_ctx, _cache, $props, $setup, $data, $options) {
25332
25347
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.fieldModel = $event),
25333
25348
  class: "full-width-input",
25334
25349
  data: $props.field.options.optionItems,
25350
+ props: $options.treeSelectProps,
25335
25351
  "show-checkbox": $props.field.options.showCheckbox,
25336
- "node-key": "value",
25352
+ "node-key": $options.treeNodeKey,
25337
25353
  "default-expand-all": true,
25338
25354
  "expand-on-click-node": false,
25339
25355
  disabled: _ctx.getDisabled(),
@@ -25352,7 +25368,7 @@ function _sfc_render$38(_ctx, _cache, $props, $setup, $data, $options) {
25352
25368
  onBlur: _ctx.handleBlurCustomEvent,
25353
25369
  onChange: $options.handleTreeSelectChange,
25354
25370
  "check-strictly": $props.field.options.checkStrictly || false
25355
- }, null, 8, ["modelValue", "data", "show-checkbox", "disabled", "size", "clearable", "filterable", "allow-create", "default-first-option", "automatic-dropdown", "multiple", "multiple-limit", "placeholder", "remote", "remote-method", "onFocus", "onBlur", "onChange", "check-strictly"])
25371
+ }, null, 8, ["modelValue", "data", "props", "show-checkbox", "node-key", "disabled", "size", "clearable", "filterable", "allow-create", "default-first-option", "automatic-dropdown", "multiple", "multiple-limit", "placeholder", "remote", "remote-method", "onFocus", "onBlur", "onChange", "check-strictly"])
25356
25372
  ]),
25357
25373
  _: 1
25358
25374
  }, 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"]);
@@ -56377,6 +56393,19 @@ const _sfc_main$2h = {
56377
56393
  value: opts.valueKey || "value",
56378
56394
  children: opts.childrenKey || "children"
56379
56395
  };
56396
+ },
56397
+ designerTreeProps() {
56398
+ const opts = this.optionModel || {};
56399
+ const childrenKey = opts.childrenKey || "children";
56400
+ const labelKey = opts.labelKey || "label";
56401
+ return {
56402
+ children: childrenKey,
56403
+ label: labelKey
56404
+ };
56405
+ },
56406
+ designerTreeNodeKey() {
56407
+ const opts = this.optionModel || {};
56408
+ return opts.valueKey || "value";
56380
56409
  }
56381
56410
  },
56382
56411
  watch: {
@@ -56752,9 +56781,9 @@ function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
56752
56781
  ])) : $props.selectedWidget.type === "select-tree" ? (openBlock(), createElementBlock("div", _hoisted_3$g, [
56753
56782
  createVNode(_component_el_tree, {
56754
56783
  data: $options.optionModel.optionItems,
56755
- props: { children: "children", label: "label" },
56784
+ props: $options.designerTreeProps,
56756
56785
  "show-checkbox": "",
56757
- "node-key": "value",
56786
+ "node-key": $options.designerTreeNodeKey,
56758
56787
  "default-expand-all": true,
56759
56788
  "expand-on-click-node": false
56760
56789
  }, {
@@ -56790,7 +56819,7 @@ function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
56790
56819
  ])
56791
56820
  ]),
56792
56821
  _: 1
56793
- }, 8, ["data"])
56822
+ }, 8, ["data", "props", "node-key"])
56794
56823
  ])) : createCommentVNode("", true),
56795
56824
  $props.selectedWidget.type === "cascader" ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
56796
56825
  createVNode(_component_el_button, {
@@ -57060,7 +57089,7 @@ function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) {
57060
57089
  ]) : createCommentVNode("", true)
57061
57090
  ]);
57062
57091
  }
57063
- var OptionItemsSetting = /* @__PURE__ */ _export_sfc$1(_sfc_main$2h, [["render", _sfc_render$2h], ["__scopeId", "data-v-1b1072d8"]]);
57092
+ var OptionItemsSetting = /* @__PURE__ */ _export_sfc$1(_sfc_main$2h, [["render", _sfc_render$2h], ["__scopeId", "data-v-66966c40"]]);
57064
57093
  const _sfc_main$2g = {
57065
57094
  name: "optionItems-editor",
57066
57095
  mixins: [i18n$1],
@@ -68896,13 +68925,13 @@ function registerIcon(app) {
68896
68925
  if (typeof window !== "undefined") {
68897
68926
  let loadSvg = function() {
68898
68927
  var body = document.body;
68899
- var svgDom = document.getElementById("__svg__icons__dom__1779690455146__");
68928
+ var svgDom = document.getElementById("__svg__icons__dom__1779707068811__");
68900
68929
  if (!svgDom) {
68901
68930
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
68902
68931
  svgDom.style.position = "absolute";
68903
68932
  svgDom.style.width = "0";
68904
68933
  svgDom.style.height = "0";
68905
- svgDom.id = "__svg__icons__dom__1779690455146__";
68934
+ svgDom.id = "__svg__icons__dom__1779707068811__";
68906
68935
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
68907
68936
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
68908
68937
  }
@@ -80341,7 +80370,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
80341
80370
  }),
80342
80371
  createVNode(_component_el_table_column, {
80343
80372
  prop: "originalValue",
80344
- label: "\u539F\u503C\uFF08\u4E07\u5143\uFF09"
80373
+ label: "\u539F\u503C(\u4E07\u5143)"
80345
80374
  }, {
80346
80375
  default: withCtx(({ row }) => [
80347
80376
  createTextVNode(toDisplayString(row.originalValue), 1)
@@ -80350,7 +80379,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
80350
80379
  }),
80351
80380
  createVNode(_component_el_table_column, {
80352
80381
  prop: "netValue",
80353
- label: "\u51C0\u503C\uFF08\u4E07\u5143\uFF09"
80382
+ label: "\u51C0\u503C(\u4E07\u5143)"
80354
80383
  }, {
80355
80384
  default: withCtx(({ row }) => [
80356
80385
  createTextVNode(toDisplayString(row.netValue), 1)