starfish-form-custom 1.0.45 → 1.0.47

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.
@@ -11,7 +11,7 @@ import 'element-plus/es/components/button/style/css';
11
11
  import 'element-plus/es/components/tooltip/style/css';
12
12
  import { defineComponent, inject, ref, getCurrentInstance, reactive, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, createBlock, withCtx, createTextVNode, createVNode, Fragment, renderList, withModifiers } from 'vue';
13
13
  import { Codemirror } from 'vue-codemirror';
14
- import { _ as _export_sfc } from './main-c9f94a75.mjs';
14
+ import { _ as _export_sfc } from './main-a9ce8be4.mjs';
15
15
  import 'element-plus/es/components/icon/style/css';
16
16
  import 'element-plus/es/components/checkbox/style/css';
17
17
  import '@element-plus/icons-vue';
@@ -4,7 +4,7 @@ import 'element-plus/es/components/tooltip/style/css';
4
4
  import { defineComponent, ref, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createCommentVNode, toDisplayString, createBlock, withCtx, withModifiers, createVNode } from 'vue';
5
5
  import { QuillEditor } from '@vueup/vue-quill';
6
6
  import '@vueup/vue-quill/dist/vue-quill.snow.css';
7
- import { _ as _export_sfc, g as getFormConfig, f as fieldProps, u as useWatch } from './main-c9f94a75.mjs';
7
+ import { _ as _export_sfc, g as getFormConfig, f as fieldProps, u as useWatch } from './main-a9ce8be4.mjs';
8
8
  import 'element-plus/es/components/icon/style/css';
9
9
  import 'element-plus/es/components/input/style/css';
10
10
  import 'element-plus/es/components/checkbox/style/css';
@@ -93,7 +93,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
93
93
  }, [
94
94
  _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_2, "*")) : createCommentVNode("", true),
95
95
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
96
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
96
+ _ctx.item.data.tip && !_ctx.readonly ? (openBlock(), createBlock(_component_el_tooltip, {
97
97
  key: 1,
98
98
  class: "item",
99
99
  effect: "dark",
@@ -121,13 +121,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
121
121
  content: _ctx.content,
122
122
  "onUpdate:content": _ctx.handleContentChange,
123
123
  toolbar: "full",
124
- "read-only": _ctx.isReadonly,
124
+ "read-only": _ctx.isReadonly || _ctx.drag,
125
125
  class: "editor-content"
126
126
  }, null, 8, ["content", "onUpdate:content", "read-only"])
127
127
  ])
128
128
  ], 4)
129
129
  ], 10, _hoisted_1);
130
130
  }
131
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-44f321dd"]]);
131
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2f76c2d0"]]);
132
132
 
133
133
  export { index as default };
@@ -6,7 +6,7 @@ import 'element-plus/es/components/button/style/css';
6
6
  import 'element-plus/es/components/main/style/css';
7
7
  import 'element-plus/es/components/tooltip/style/css';
8
8
  import { defineComponent, ref, onMounted, watch, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode, createBlock, withCtx, createVNode, createTextVNode } from 'vue';
9
- import { _ as _export_sfc, a as _, g as getFormConfig, f as fieldProps, u as useWatch } from './main-c9f94a75.mjs';
9
+ import { _ as _export_sfc, a as _, g as getFormConfig, f as fieldProps, u as useWatch } from './main-a9ce8be4.mjs';
10
10
  import JSONEditor from 'jsoneditor';
11
11
  import 'element-plus/es/components/icon/style/css';
12
12
  import 'element-plus/es/components/input/style/css';
@@ -13,9 +13,9 @@ import 'element-plus/es/components/dropdown-item/style/css';
13
13
  import 'element-plus/es/components/button/style/css';
14
14
  import 'element-plus/es/components/tooltip/style/css';
15
15
  import { defineComponent, getCurrentInstance, inject, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode, createBlock, withCtx, createVNode, createTextVNode, Fragment, renderList } from 'vue';
16
- import { _ as _export_sfc, a as _, f as fieldProps, r as ruleList, b as ruleJsonData } from './main-c9f94a75.mjs';
16
+ import { _ as _export_sfc, a as _, f as fieldProps, r as ruleList, b as ruleJsonData } from './main-a9ce8be4.mjs';
17
17
  import { Delete } from '@element-plus/icons-vue';
18
- import Dynamicform from './starfish-form-ff99f526.mjs';
18
+ import Dynamicform from './starfish-form-dfa363ef.mjs';
19
19
  import { Codemirror } from 'vue-codemirror';
20
20
  import 'element-plus/es/components/input/style/css';
21
21
  import 'element-plus/es/components/checkbox/style/css';
@@ -970,6 +970,10 @@ const fieldProps = {
970
970
  type: Boolean,
971
971
  default: false
972
972
  },
973
+ search: {
974
+ type: Boolean,
975
+ default: false
976
+ },
973
977
  labelalign: {
974
978
  type: String,
975
979
  default: "top"
@@ -1105,7 +1109,7 @@ const _hoisted_1$p = {
1105
1109
  key: 0,
1106
1110
  class: "item_require"
1107
1111
  };
1108
- const _hoisted_2$e = { class: "keyValueSelect" };
1112
+ const _hoisted_2$f = { class: "keyValueSelect" };
1109
1113
  const _hoisted_3$3 = { class: "keyValueInput" };
1110
1114
  const _hoisted_4$1 = { class: "inputItem" };
1111
1115
  const _hoisted_5$1 = { class: "inputItem" };
@@ -1153,7 +1157,7 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
1153
1157
  class: "starfish-keyValueItem",
1154
1158
  key: index
1155
1159
  }, [
1156
- createElementVNode("div", _hoisted_2$e, [
1160
+ createElementVNode("div", _hoisted_2$f, [
1157
1161
  createVNode(_component_el_checkbox, {
1158
1162
  modelValue: items.select,
1159
1163
  "onUpdate:modelValue": ($event) => items.select = $event,
@@ -1334,7 +1338,7 @@ const _hoisted_1$o = {
1334
1338
  key: 0,
1335
1339
  class: "item_require"
1336
1340
  };
1337
- const _hoisted_2$d = { class: "keyValueSelect" };
1341
+ const _hoisted_2$e = { class: "keyValueSelect" };
1338
1342
  const _hoisted_3$2 = { class: "keyValueInput" };
1339
1343
  const _hoisted_4 = { class: "inputItem" };
1340
1344
  const _hoisted_5 = { class: "inputItem" };
@@ -1382,7 +1386,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
1382
1386
  class: "starfish-keyValueItem",
1383
1387
  key: index
1384
1388
  }, [
1385
- createElementVNode("div", _hoisted_2$d, [
1389
+ createElementVNode("div", _hoisted_2$e, [
1386
1390
  createVNode(_component_el_checkbox, {
1387
1391
  modelValue: items.select,
1388
1392
  "onUpdate:modelValue": ($event) => items.select = $event,
@@ -1977,7 +1981,7 @@ const _sfc_main$l = defineComponent({
1977
1981
  }
1978
1982
  });
1979
1983
  const _hoisted_1$l = { class: "label" };
1980
- const _hoisted_2$c = {
1984
+ const _hoisted_2$d = {
1981
1985
  key: 0,
1982
1986
  class: "item_require"
1983
1987
  };
@@ -1991,7 +1995,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
1991
1995
  }, [
1992
1996
  createElementVNode("div", _hoisted_1$l, [
1993
1997
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label), 1),
1994
- _ctx.item.data.required ? (openBlock(), createElementBlock("span", _hoisted_2$c, "*")) : createCommentVNode("", true),
1998
+ _ctx.item.data.required ? (openBlock(), createElementBlock("span", _hoisted_2$d, "*")) : createCommentVNode("", true),
1995
1999
  _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
1996
2000
  key: 1,
1997
2001
  class: "item",
@@ -2047,13 +2051,34 @@ const _sfc_main$k = defineComponent({
2047
2051
  actionType: ["onChange"],
2048
2052
  setup(props) {
2049
2053
  useWatch(props);
2054
+ },
2055
+ methods: {
2056
+ getDisplayText() {
2057
+ const fieldValue = this.data[this.item.data.fieldName];
2058
+ const items = this.item.data.itemConfig?.items || [];
2059
+ if (!fieldValue && fieldValue !== 0 && fieldValue !== false) {
2060
+ return "--";
2061
+ }
2062
+ if (Array.isArray(fieldValue)) {
2063
+ if (fieldValue.length === 0)
2064
+ return "--";
2065
+ const selectedLabels = fieldValue.map((value) => {
2066
+ const item = items.find((item2) => item2.value === value);
2067
+ return item ? item.label : value;
2068
+ });
2069
+ return selectedLabels.join(", ");
2070
+ } else {
2071
+ const item = items.find((item2) => item2.value === fieldValue);
2072
+ return item ? item.label : fieldValue;
2073
+ }
2074
+ }
2050
2075
  }
2051
2076
  });
2052
2077
  const _hoisted_1$k = {
2053
2078
  key: 0,
2054
2079
  class: "item_require"
2055
2080
  };
2056
- const _hoisted_2$b = { key: 0 };
2081
+ const _hoisted_2$c = { key: 0 };
2057
2082
  function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
2058
2083
  const _component_el_tooltip = ElTooltip;
2059
2084
  const _component_el_checkbox = ElCheckbox;
@@ -2065,9 +2090,9 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
2065
2090
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
2066
2091
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
2067
2092
  }, [
2068
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$k, "*")) : createCommentVNode("", true),
2093
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$k, "*")) : createCommentVNode("", true),
2069
2094
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
2070
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
2095
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
2071
2096
  key: 1,
2072
2097
  class: "item",
2073
2098
  effect: "dark",
@@ -2084,7 +2109,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
2084
2109
  class: "control",
2085
2110
  style: normalizeStyle({ marginLeft: _ctx.labelalign != "top" ? _ctx.labelWidth + "px" : "" })
2086
2111
  }, [
2087
- !_ctx.drag && _ctx.data[_ctx.item.data.fieldName] && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$b, toDisplayString(Array.isArray(_ctx.data[_ctx.item.data.fieldName]) ? _ctx.data[_ctx.item.data.fieldName].join(",") || "--" : _ctx.data[_ctx.item.data.fieldName] || "--"), 1)) : !_ctx.drag && _ctx.data[_ctx.item.data.fieldName] ? (openBlock(), createBlock(_component_el_checkbox_group, {
2112
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$c, toDisplayString(_ctx.getDisplayText()), 1)) : !_ctx.drag && _ctx.data[_ctx.item.data.fieldName] ? (openBlock(), createBlock(_component_el_checkbox_group, {
2088
2113
  key: 1,
2089
2114
  modelValue: _ctx.data[_ctx.item.data.fieldName],
2090
2115
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
@@ -2160,7 +2185,7 @@ const _hoisted_1$j = {
2160
2185
  key: 0,
2161
2186
  class: "item_require"
2162
2187
  };
2163
- const _hoisted_2$a = { key: 0 };
2188
+ const _hoisted_2$b = { key: 0 };
2164
2189
  const _hoisted_3 = { key: 1 };
2165
2190
  function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
2166
2191
  const _component_el_tooltip = ElTooltip;
@@ -2192,7 +2217,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
2192
2217
  class: "control",
2193
2218
  style: normalizeStyle({ marginLeft: _ctx.labelalign != "top" ? _ctx.labelWidth + "px" : "" })
2194
2219
  }, [
2195
- _ctx.drag ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
2220
+ _ctx.drag ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
2196
2221
  createVNode(_component_el_input, {
2197
2222
  modelValue: _ctx.item.data.default,
2198
2223
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.item.data.default = $event),
@@ -2297,7 +2322,7 @@ const _hoisted_1$i = {
2297
2322
  key: 0,
2298
2323
  class: "item_require"
2299
2324
  };
2300
- const _hoisted_2$9 = { key: 1 };
2325
+ const _hoisted_2$a = { key: 1 };
2301
2326
  function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
2302
2327
  const _component_el_tooltip = ElTooltip;
2303
2328
  const _component_el_date_picker = ElDatePicker;
@@ -2308,9 +2333,9 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
2308
2333
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
2309
2334
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
2310
2335
  }, [
2311
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$i, "*")) : createCommentVNode("", true),
2336
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$i, "*")) : createCommentVNode("", true),
2312
2337
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
2313
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
2338
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
2314
2339
  key: 1,
2315
2340
  class: "item",
2316
2341
  effect: "dark",
@@ -2340,7 +2365,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
2340
2365
  disabled: _ctx.item.data.state === "disabled",
2341
2366
  readonly: _ctx.item.data.state === "readonly"
2342
2367
  }, null, 8, ["modelValue", "type", "format", "value-format", "placeholder", "size", "disabled", "readonly"])) : createCommentVNode("", true),
2343
- !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$9, toDisplayString(_ctx.formatReadonlyDate(_ctx.data[_ctx.item.data.fieldName], _ctx.item.data.format)), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_date_picker, {
2368
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$a, toDisplayString(_ctx.formatReadonlyDate(_ctx.data[_ctx.item.data.fieldName], _ctx.item.data.format)), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_date_picker, {
2344
2369
  key: 2,
2345
2370
  modelValue: _ctx.data[_ctx.item.data.fieldName],
2346
2371
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
@@ -2414,7 +2439,7 @@ const _hoisted_1$h = {
2414
2439
  key: 0,
2415
2440
  class: "item_require"
2416
2441
  };
2417
- const _hoisted_2$8 = { key: 1 };
2442
+ const _hoisted_2$9 = { key: 1 };
2418
2443
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
2419
2444
  const _component_el_tooltip = ElTooltip;
2420
2445
  const _component_el_date_picker = ElDatePicker;
@@ -2425,9 +2450,9 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
2425
2450
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
2426
2451
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
2427
2452
  }, [
2428
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$h, "*")) : createCommentVNode("", true),
2453
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$h, "*")) : createCommentVNode("", true),
2429
2454
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
2430
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
2455
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
2431
2456
  key: 1,
2432
2457
  class: "item",
2433
2458
  effect: "dark",
@@ -2454,7 +2479,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
2454
2479
  disabled: _ctx.item.data.state === "disabled",
2455
2480
  readonly: _ctx.item.data.state === "readonly"
2456
2481
  }, null, 8, ["modelValue", "placeholder", "size", "disabled", "readonly"])) : createCommentVNode("", true),
2457
- !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString(_ctx.formatReadonlyDate(_ctx.data[_ctx.item.data.fieldName], _ctx.item.data.format)), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_date_picker, {
2482
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$9, toDisplayString(_ctx.formatReadonlyDate(_ctx.data[_ctx.item.data.fieldName], _ctx.item.data.format)), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_date_picker, {
2458
2483
  key: 2,
2459
2484
  modelValue: _ctx.data[_ctx.item.data.fieldName],
2460
2485
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
@@ -2522,7 +2547,7 @@ const _hoisted_1$g = {
2522
2547
  key: 0,
2523
2548
  class: "item_require"
2524
2549
  };
2525
- const _hoisted_2$7 = { key: 1 };
2550
+ const _hoisted_2$8 = { key: 1 };
2526
2551
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
2527
2552
  const _component_el_tooltip = ElTooltip;
2528
2553
  const _component_el_input_number = ElInputNumber;
@@ -2537,9 +2562,9 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
2537
2562
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
2538
2563
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
2539
2564
  }, [
2540
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$g, "*")) : createCommentVNode("", true),
2565
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$g, "*")) : createCommentVNode("", true),
2541
2566
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
2542
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
2567
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
2543
2568
  key: 1,
2544
2569
  class: "item",
2545
2570
  effect: "dark",
@@ -2566,7 +2591,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
2566
2591
  precision: _ctx.item.data.precision,
2567
2592
  disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly"
2568
2593
  }, null, 8, ["modelValue", "controls-position", "size", "precision", "disabled"])) : createCommentVNode("", true),
2569
- !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$7, toDisplayString(_ctx.formatReadonlyNumber(_ctx.data[_ctx.item.data.fieldName], _ctx.item.data.precision)), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_input_number, {
2594
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$8, toDisplayString(_ctx.formatReadonlyNumber(_ctx.data[_ctx.item.data.fieldName], _ctx.item.data.precision)), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_input_number, {
2570
2595
  key: 2,
2571
2596
  modelValue: _ctx.data[_ctx.item.data.fieldName],
2572
2597
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
@@ -2604,13 +2629,24 @@ const _sfc_main$f = defineComponent({
2604
2629
  actionType: ["onChange"],
2605
2630
  setup(props) {
2606
2631
  useWatch(props);
2632
+ },
2633
+ methods: {
2634
+ getDisplayText() {
2635
+ const fieldValue = this.data[this.item.data.fieldName];
2636
+ const items = this.item.data.itemConfig?.items || [];
2637
+ if (fieldValue === void 0 || fieldValue === null || fieldValue === "") {
2638
+ return "--";
2639
+ }
2640
+ const selectedItem = items.find((item) => item.value === fieldValue);
2641
+ return selectedItem ? selectedItem.label : fieldValue;
2642
+ }
2607
2643
  }
2608
2644
  });
2609
2645
  const _hoisted_1$f = {
2610
2646
  key: 0,
2611
2647
  class: "item_require"
2612
2648
  };
2613
- const _hoisted_2$6 = { key: 0 };
2649
+ const _hoisted_2$7 = { key: 0 };
2614
2650
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
2615
2651
  const _component_el_tooltip = ElTooltip;
2616
2652
  const _component_el_radio = ElRadio;
@@ -2628,7 +2664,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
2628
2664
  }, [
2629
2665
  _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$f, "*")) : createCommentVNode("", true),
2630
2666
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
2631
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
2667
+ _ctx.item.data.tip && !_ctx.readonly ? (openBlock(), createBlock(_component_el_tooltip, {
2632
2668
  key: 1,
2633
2669
  class: "item",
2634
2670
  effect: "dark",
@@ -2645,7 +2681,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
2645
2681
  class: "control",
2646
2682
  style: normalizeStyle({ marginLeft: _ctx.labelalign != "top" ? _ctx.labelWidth + "px" : "" })
2647
2683
  }, [
2648
- !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(_ctx.data[_ctx.item.data.fieldName] || "--"), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_radio_group, {
2684
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$7, toDisplayString(_ctx.getDisplayText()), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_radio_group, {
2649
2685
  key: 1,
2650
2686
  modelValue: _ctx.data[_ctx.item.data.fieldName],
2651
2687
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
@@ -3055,9 +3091,14 @@ const validateNumberD2 = `(rule, value, callback) => {
3055
3091
  // 电话号码校验规则
3056
3092
  const validatePhone = `(rule, value, callback) => {
3057
3093
  if (value === "" || value == null) {
3058
- callback(new Error("请输入"));
3059
- } else if (!/^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(value)) {
3060
- callback(new Error("请输入正确的电话号码"));
3094
+ callback(new Error("请输入电话号码"));
3095
+ return;
3096
+ }
3097
+ var re = /^1[3,4,5,6,7,8,9][0-9]{9}$/;
3098
+
3099
+ if (!re.test(value)) {
3100
+ callback(new Error("请输入正确的11位手机号码"));
3101
+ return;
3061
3102
  }
3062
3103
  callback();
3063
3104
  }`;
@@ -3066,7 +3107,7 @@ const validatePhone = `(rule, value, callback) => {
3066
3107
  const validateIdCard = `(rule, value, callback) => {
3067
3108
  if (value === "" || value == null) {
3068
3109
  callback(new Error("请输入"));
3069
- } else if (!/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(value)) {
3110
+ } else if (!/^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$/.test(value)) {
3070
3111
  callback(new Error("请输入正确的身份证号"));
3071
3112
  }
3072
3113
  callback();
@@ -3152,13 +3193,24 @@ const _sfc_main$e = defineComponent({
3152
3193
  }
3153
3194
  }
3154
3195
  };
3196
+ },
3197
+ methods: {
3198
+ getDisplayText() {
3199
+ const fieldValue = this.data[this.item.data.fieldName];
3200
+ const items = this.item.data.itemConfig?.items || [];
3201
+ if (fieldValue === void 0 || fieldValue === null || fieldValue === "") {
3202
+ return this.item.data.placeholder || "--";
3203
+ }
3204
+ const selectedItem = items.find((item) => item.value === fieldValue);
3205
+ return selectedItem ? selectedItem.label : fieldValue;
3206
+ }
3155
3207
  }
3156
3208
  });
3157
3209
  const _hoisted_1$e = {
3158
3210
  key: 0,
3159
3211
  class: "item_require"
3160
3212
  };
3161
- const _hoisted_2$5 = { key: 1 };
3213
+ const _hoisted_2$6 = { key: 1 };
3162
3214
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
3163
3215
  const _component_el_tooltip = ElTooltip;
3164
3216
  const _component_el_option = ElOption;
@@ -3174,9 +3226,9 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
3174
3226
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
3175
3227
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
3176
3228
  }, [
3177
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$e, "*")) : createCommentVNode("", true),
3229
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$e, "*")) : createCommentVNode("", true),
3178
3230
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
3179
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
3231
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
3180
3232
  key: 1,
3181
3233
  class: "item",
3182
3234
  effect: "dark",
@@ -3199,6 +3251,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
3199
3251
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.item.data.itemConfig.value = $event),
3200
3252
  style: { "width": "320px" },
3201
3253
  placeholder: _ctx.item.data.placeholder,
3254
+ clearable: "",
3202
3255
  size: _ctx.size,
3203
3256
  disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly"
3204
3257
  }, {
@@ -3213,13 +3266,14 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
3213
3266
  ]),
3214
3267
  _: 1
3215
3268
  }, 8, ["modelValue", "placeholder", "size", "disabled"])) : createCommentVNode("", true),
3216
- !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$5, toDisplayString(_ctx.data[_ctx.item.data.fieldName] || "--"), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_select, {
3269
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(_ctx.getDisplayText()), 1)) : !_ctx.drag ? (openBlock(), createBlock(_component_el_select, {
3217
3270
  key: 2,
3218
3271
  modelValue: _ctx.data[_ctx.item.data.fieldName],
3219
3272
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
3220
3273
  style: { "width": "320px" },
3221
3274
  placeholder: _ctx.item.data.placeholder,
3222
3275
  size: _ctx.size,
3276
+ clearable: "",
3223
3277
  disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly",
3224
3278
  onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.execFunc("onFocus")),
3225
3279
  onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.execFunc("onBlur"))
@@ -3262,22 +3316,6 @@ const _sfc_main$d = defineComponent({
3262
3316
  setup(props) {
3263
3317
  const vm = getCurrentInstance();
3264
3318
  useWatch(props);
3265
- const getReadonlyDisplayValue = () => {
3266
- try {
3267
- const fieldValue = props.data[props.item.data.fieldName];
3268
- if (Array.isArray(fieldValue)) {
3269
- return fieldValue.length > 0 ? fieldValue.join(",") : "--";
3270
- }
3271
- const configValue = props.item.data.itemConfig?.value;
3272
- if (Array.isArray(configValue)) {
3273
- return configValue.length > 0 ? configValue.join(",") : "--";
3274
- }
3275
- return "--";
3276
- } catch (error) {
3277
- console.error("Error getting readonly display value:", error);
3278
- return "--";
3279
- }
3280
- };
3281
3319
  return {
3282
3320
  execFunc(type) {
3283
3321
  if (props.item.data.action && props.item.data.action[type]) {
@@ -3285,16 +3323,29 @@ const _sfc_main$d = defineComponent({
3285
3323
  props.item.data.fieldName
3286
3324
  ]);
3287
3325
  }
3288
- },
3289
- getReadonlyDisplayValue
3326
+ }
3290
3327
  };
3328
+ },
3329
+ methods: {
3330
+ getDisplayText() {
3331
+ const fieldValue = this.data[this.item.data.fieldName];
3332
+ const items = this.item.data.itemConfig?.items || [];
3333
+ if (!fieldValue || !Array.isArray(fieldValue) || fieldValue.length === 0) {
3334
+ return this.item.data.placeholder || "--";
3335
+ }
3336
+ const selectedLabels = fieldValue.map((value) => {
3337
+ const item = items.find((item2) => item2.value === value);
3338
+ return item ? item.label : value;
3339
+ });
3340
+ return selectedLabels.join(", ");
3341
+ }
3291
3342
  }
3292
3343
  });
3293
3344
  const _hoisted_1$d = {
3294
3345
  key: 0,
3295
3346
  class: "item_require"
3296
3347
  };
3297
- const _hoisted_2$4 = { key: 1 };
3348
+ const _hoisted_2$5 = { key: 1 };
3298
3349
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
3299
3350
  const _component_el_tooltip = ElTooltip;
3300
3351
  const _component_el_option = ElOption;
@@ -3310,9 +3361,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
3310
3361
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
3311
3362
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
3312
3363
  }, [
3313
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$d, "*")) : createCommentVNode("", true),
3364
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$d, "*")) : createCommentVNode("", true),
3314
3365
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
3315
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
3366
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
3316
3367
  key: 1,
3317
3368
  class: "item",
3318
3369
  effect: "dark",
@@ -3349,7 +3400,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
3349
3400
  }), 128))
3350
3401
  ]),
3351
3402
  _: 1
3352
- }, 8, ["modelValue", "placeholder", "disabled", "size"])) : !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$4, toDisplayString(_ctx.getReadonlyDisplayValue()), 1)) : (openBlock(), createBlock(_component_el_select, {
3403
+ }, 8, ["modelValue", "placeholder", "disabled", "size"])) : !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$5, toDisplayString(_ctx.getDisplayText()), 1)) : (openBlock(), createBlock(_component_el_select, {
3353
3404
  key: 2,
3354
3405
  modelValue: _ctx.data[_ctx.item.data.fieldName],
3355
3406
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
@@ -3599,12 +3650,22 @@ const _sfc_main$a = defineComponent({
3599
3650
  actionType: ["onChange"],
3600
3651
  setup(props) {
3601
3652
  useWatch(props);
3653
+ },
3654
+ methods: {
3655
+ getDisplayText() {
3656
+ const fieldValue = this.data[this.item.data.fieldName];
3657
+ if (fieldValue === void 0 || fieldValue === null) {
3658
+ return "--";
3659
+ }
3660
+ return fieldValue ? "\u662F" : "\u5426";
3661
+ }
3602
3662
  }
3603
3663
  });
3604
3664
  const _hoisted_1$a = {
3605
3665
  key: 0,
3606
3666
  class: "item_require"
3607
3667
  };
3668
+ const _hoisted_2$4 = { key: 0 };
3608
3669
  function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
3609
3670
  const _component_el_tooltip = ElTooltip;
3610
3671
  const _component_el_switch = ElSwitch;
@@ -3621,7 +3682,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
3621
3682
  }, [
3622
3683
  _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$a, "*")) : createCommentVNode("", true),
3623
3684
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
3624
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
3685
+ _ctx.item.data.tip && !_ctx.readonly ? (openBlock(), createBlock(_component_el_tooltip, {
3625
3686
  key: 1,
3626
3687
  class: "item",
3627
3688
  effect: "dark",
@@ -3638,20 +3699,19 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
3638
3699
  class: "control",
3639
3700
  style: normalizeStyle({ marginLeft: _ctx.labelalign != "top" ? _ctx.labelWidth + "px" : "" })
3640
3701
  }, [
3641
- _ctx.drag ? (openBlock(), createBlock(_component_el_switch, {
3642
- key: 0,
3702
+ !_ctx.drag && (_ctx.item.data.state === "readonly" || _ctx.readonly) ? (openBlock(), createElementBlock("span", _hoisted_2$4, toDisplayString(_ctx.getDisplayText()), 1)) : _ctx.drag ? (openBlock(), createBlock(_component_el_switch, {
3703
+ key: 1,
3643
3704
  modelValue: _ctx.item.data.default,
3644
3705
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.item.data.default = $event),
3645
3706
  size: _ctx.size,
3646
3707
  disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly"
3647
- }, null, 8, ["modelValue", "size", "disabled"])) : createCommentVNode("", true),
3648
- !_ctx.drag ? (openBlock(), createBlock(_component_el_switch, {
3649
- key: 1,
3708
+ }, null, 8, ["modelValue", "size", "disabled"])) : (openBlock(), createBlock(_component_el_switch, {
3709
+ key: 2,
3650
3710
  modelValue: _ctx.data[_ctx.item.data.fieldName],
3651
3711
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.data[_ctx.item.data.fieldName] = $event),
3652
3712
  size: _ctx.size,
3653
3713
  disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly"
3654
- }, null, 8, ["modelValue", "size", "disabled"])) : createCommentVNode("", true)
3714
+ }, null, 8, ["modelValue", "size", "disabled"]))
3655
3715
  ], 4)
3656
3716
  ], 2);
3657
3717
  }
@@ -3713,9 +3773,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
3713
3773
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
3714
3774
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
3715
3775
  }, [
3716
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$9, "*")) : createCommentVNode("", true),
3776
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$9, "*")) : createCommentVNode("", true),
3717
3777
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
3718
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
3778
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
3719
3779
  key: 1,
3720
3780
  class: "item",
3721
3781
  effect: "dark",
@@ -3822,9 +3882,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
3822
3882
  class: normalizeClass(["label", "label_" + _ctx.labelalign]),
3823
3883
  style: normalizeStyle({ width: _ctx.labelWidth + "px" })
3824
3884
  }, [
3825
- _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$8, "*")) : createCommentVNode("", true),
3885
+ _ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$8, "*")) : createCommentVNode("", true),
3826
3886
  createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1),
3827
- _ctx.item.data.tip ? (openBlock(), createBlock(_component_el_tooltip, {
3887
+ _ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
3828
3888
  key: 1,
3829
3889
  class: "item",
3830
3890
  effect: "dark",
@@ -5335,7 +5395,7 @@ Object.keys(files).forEach((fileName) => {
5335
5395
  }
5336
5396
  });
5337
5397
  const RichText = defineAsyncComponent({
5338
- loader: () => import('./index-b3b75fee.mjs'),
5398
+ loader: () => import('./index-8980a82d.mjs'),
5339
5399
  loadingComponent: Loading
5340
5400
  });
5341
5401
  RichText.ControlType = "RichText";
@@ -5344,7 +5404,7 @@ RichText.icon = "icon-textEdit";
5344
5404
  RichText.formConfig = getFormConfig("RichText");
5345
5405
  utilFuns[RichText.ControlType] = RichText;
5346
5406
  const jsonEditor = defineAsyncComponent({
5347
- loader: () => import('./index-d029d3de.mjs'),
5407
+ loader: () => import('./index-bf109006.mjs'),
5348
5408
  loadingComponent: Loading
5349
5409
  });
5350
5410
  jsonEditor.ControlType = "JsonEditor";
@@ -5354,14 +5414,14 @@ jsonEditor.formConfig = getFormConfig("JsonEditor", [{ fieldName: "default", com
5354
5414
  jsonEditor.rule = _.getJsonValidate();
5355
5415
  utilFuns[jsonEditor.ControlType] = jsonEditor;
5356
5416
  const formAction = defineAsyncComponent({
5357
- loader: () => import('./formAction-47da9ade.mjs'),
5417
+ loader: () => import('./formAction-003dce29.mjs'),
5358
5418
  loadingComponent: Loading
5359
5419
  });
5360
5420
  formAction.ControlType = "FormAction";
5361
5421
  formAction.isHide = true;
5362
5422
  utilFuns[formAction.ControlType] = formAction;
5363
5423
  const Rule = defineAsyncComponent({
5364
- loader: () => import('./index-2d78c11c.mjs'),
5424
+ loader: () => import('./index-ffe5a532.mjs'),
5365
5425
  loadingComponent: Loading
5366
5426
  });
5367
5427
  Rule.ControlType = "Rule";
@@ -5370,7 +5430,7 @@ utilFuns[Rule.ControlType] = Rule;
5370
5430
  const install = (app) => {
5371
5431
  app.config.globalProperties.$formcomponents = utilFuns;
5372
5432
  };
5373
- const Dynamicform = defineAsyncComponent(() => import('./starfish-form-ff99f526.mjs'));
5433
+ const Dynamicform = defineAsyncComponent(() => import('./starfish-form-dfa363ef.mjs'));
5374
5434
  const main = {
5375
5435
  install
5376
5436
  };