starfish-form-custom 1.0.52 → 1.0.54
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/{formAction-23d69d7d.mjs → formAction-e36e51b3.mjs} +1 -1
- package/dist/{index-a466904a.mjs → index-058a680b.mjs} +1 -1
- package/dist/{index-7f4d4892.mjs → index-20f0d53c.mjs} +2 -2
- package/dist/{index-7b8d5fcb.mjs → index-61317ebb.mjs} +13 -4
- package/dist/{main-420fac7c.mjs → main-8ef56e86.mjs} +188 -44
- package/dist/{starfish-form-3e1eb033.mjs → starfish-form-72d9dfce.mjs} +1 -1
- package/dist/starfish-form.mjs +1 -1
- package/dist/style.css +5 -5
- package/package.json +1 -1
- package/src/common/KeyValueConfig.vue +2 -2
- package/src/common/KeyValueConfigMult.vue +2 -2
- package/src/components/CheckBox/index.vue +3 -1
- package/src/components/Date/index.vue +191 -100
- package/src/components/InputNumber/index.vue +3 -1
- package/src/components/Radio/index.vue +3 -1
- package/src/components/RichText/index.vue +3 -1
- package/src/components/Selected/index.vue +3 -1
- package/src/components/Selecteds/index.vue +7 -1
- package/src/components/Switch/index.vue +3 -1
- package/src/components/Text/index.vue +3 -1
- package/src/components/TextArea/index.vue +3 -1
- package/src/utils/fieldConfig.ts +4 -2
- package/stats.html +1 -1
|
@@ -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-
|
|
14
|
+
import { _ as _export_sfc } from './main-8ef56e86.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';
|
|
@@ -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-
|
|
9
|
+
import { _ as _export_sfc, a as _, g as getFormConfig, f as fieldProps, u as useWatch } from './main-8ef56e86.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-
|
|
16
|
+
import { _ as _export_sfc, a as _, f as fieldProps, r as ruleList, b as ruleJsonData } from './main-8ef56e86.mjs';
|
|
17
17
|
import { Delete } from '@element-plus/icons-vue';
|
|
18
|
-
import Dynamicform from './starfish-form-
|
|
18
|
+
import Dynamicform from './starfish-form-72d9dfce.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';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ElTooltip } from 'element-plus/es';
|
|
2
2
|
import 'element-plus/es/components/base/style/css';
|
|
3
3
|
import 'element-plus/es/components/tooltip/style/css';
|
|
4
|
-
import { defineComponent, ref, computed, watch, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createCommentVNode,
|
|
4
|
+
import { defineComponent, ref, computed, watch, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createCommentVNode, createVNode, withCtx, toDisplayString, createBlock, withModifiers } 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-
|
|
7
|
+
import { _ as _export_sfc, g as getFormConfig, f as fieldProps, u as useWatch } from './main-8ef56e86.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';
|
|
@@ -191,7 +191,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
191
191
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
192
192
|
}, [
|
|
193
193
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_2, "*")) : createCommentVNode("", true),
|
|
194
|
-
|
|
194
|
+
createVNode(_component_el_tooltip, {
|
|
195
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
196
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
197
|
+
placement: "top"
|
|
198
|
+
}, {
|
|
199
|
+
default: withCtx(() => [
|
|
200
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
201
|
+
]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, ["disabled", "content"]),
|
|
195
204
|
_ctx.item.data.tip && !_ctx.readonly ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
196
205
|
key: 1,
|
|
197
206
|
class: "item",
|
|
@@ -231,6 +240,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
231
240
|
], 4)
|
|
232
241
|
], 10, _hoisted_1);
|
|
233
242
|
}
|
|
234
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
243
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-34acb2a2"]]);
|
|
235
244
|
|
|
236
245
|
export { index as default };
|
|
@@ -4,7 +4,7 @@ import 'element-plus/es/components/icon/style/css';
|
|
|
4
4
|
import 'element-plus/es/components/input/style/css';
|
|
5
5
|
import 'element-plus/es/components/checkbox/style/css';
|
|
6
6
|
import 'element-plus/es/components/tooltip/style/css';
|
|
7
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode, createBlock, withCtx, Fragment, renderList, createVNode, withDirectives, inject, computed, ref, createTextVNode, getCurrentInstance, watch, vShow, resolveDynamicComponent, nextTick, reactive, defineAsyncComponent } from 'vue';
|
|
7
|
+
import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode, createBlock, withCtx, Fragment, renderList, createVNode, withDirectives, inject, computed, ref, createTextVNode, getCurrentInstance, watch, onMounted, vShow, resolveDynamicComponent, nextTick, reactive, defineAsyncComponent } from 'vue';
|
|
8
8
|
import { SemiSelect, Top, Bottom, Delete, Edit } from '@element-plus/icons-vue';
|
|
9
9
|
import 'element-plus/es/components/loading/style/css';
|
|
10
10
|
import 'element-plus/es/components/dropdown/style/css';
|
|
@@ -445,6 +445,8 @@ const fieldsMap = {
|
|
|
445
445
|
required: false,
|
|
446
446
|
rule: "[]",
|
|
447
447
|
default: "",
|
|
448
|
+
format: "YYYY-MM-DD",
|
|
449
|
+
// 日期格式
|
|
448
450
|
state: "normal"
|
|
449
451
|
},
|
|
450
452
|
ColorSelect: {
|
|
@@ -507,7 +509,7 @@ function getMoren(fieldName, component, label) {
|
|
|
507
509
|
data: {
|
|
508
510
|
fieldName: "placeholder",
|
|
509
511
|
tip: "",
|
|
510
|
-
label: "
|
|
512
|
+
label: "占位文字",
|
|
511
513
|
placeholder: "请输入占位文字",
|
|
512
514
|
showRule: "{}",
|
|
513
515
|
required: false,
|
|
@@ -645,6 +647,7 @@ function getMoren(fieldName, component, label) {
|
|
|
645
647
|
showRule: "{}",
|
|
646
648
|
required: false,
|
|
647
649
|
rule: "[]",
|
|
650
|
+
format: "YYYY-MM-DD",
|
|
648
651
|
itemConfig: {
|
|
649
652
|
value: "YYYY-MM-DD",
|
|
650
653
|
items: [
|
|
@@ -899,7 +902,7 @@ function getMoren(fieldName, component, label) {
|
|
|
899
902
|
data: {
|
|
900
903
|
fieldName,
|
|
901
904
|
tip: "",
|
|
902
|
-
label: label ? label : "
|
|
905
|
+
label: label ? label : "占位文字",
|
|
903
906
|
placeholder: "请输入占位文字",
|
|
904
907
|
showRule: "{}",
|
|
905
908
|
required: false,
|
|
@@ -1213,7 +1216,10 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1213
1216
|
class: "top",
|
|
1214
1217
|
onClick: ($event) => _ctx.handleTop(index)
|
|
1215
1218
|
}, [
|
|
1216
|
-
createVNode(_component_el_icon, {
|
|
1219
|
+
createVNode(_component_el_icon, {
|
|
1220
|
+
size: 12,
|
|
1221
|
+
style: { "color": "#fff" }
|
|
1222
|
+
}, {
|
|
1217
1223
|
default: withCtx(() => [
|
|
1218
1224
|
createVNode(_component_Top)
|
|
1219
1225
|
]),
|
|
@@ -1224,7 +1230,10 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1224
1230
|
class: "bottom",
|
|
1225
1231
|
onClick: ($event) => _ctx.handleBottom(index)
|
|
1226
1232
|
}, [
|
|
1227
|
-
createVNode(_component_el_icon, {
|
|
1233
|
+
createVNode(_component_el_icon, {
|
|
1234
|
+
size: 12,
|
|
1235
|
+
style: { "color": "#fff" }
|
|
1236
|
+
}, {
|
|
1228
1237
|
default: withCtx(() => [
|
|
1229
1238
|
createVNode(_component_Bottom)
|
|
1230
1239
|
]),
|
|
@@ -1442,7 +1451,10 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1442
1451
|
class: "top",
|
|
1443
1452
|
onClick: ($event) => _ctx.handleTop(index)
|
|
1444
1453
|
}, [
|
|
1445
|
-
createVNode(_component_el_icon, {
|
|
1454
|
+
createVNode(_component_el_icon, {
|
|
1455
|
+
size: 12,
|
|
1456
|
+
style: { "color": "#fff" }
|
|
1457
|
+
}, {
|
|
1446
1458
|
default: withCtx(() => [
|
|
1447
1459
|
createVNode(_component_Top)
|
|
1448
1460
|
]),
|
|
@@ -1453,7 +1465,10 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1453
1465
|
class: "bottom",
|
|
1454
1466
|
onClick: ($event) => _ctx.handleBottom(index)
|
|
1455
1467
|
}, [
|
|
1456
|
-
createVNode(_component_el_icon, {
|
|
1468
|
+
createVNode(_component_el_icon, {
|
|
1469
|
+
size: 12,
|
|
1470
|
+
style: { "color": "#fff" }
|
|
1471
|
+
}, {
|
|
1457
1472
|
default: withCtx(() => [
|
|
1458
1473
|
createVNode(_component_Bottom)
|
|
1459
1474
|
]),
|
|
@@ -2091,7 +2106,16 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2091
2106
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
2092
2107
|
}, [
|
|
2093
2108
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$k, "*")) : createCommentVNode("", true),
|
|
2094
|
-
|
|
2109
|
+
createVNode(_component_el_tooltip, {
|
|
2110
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
2111
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
2112
|
+
placement: "top"
|
|
2113
|
+
}, {
|
|
2114
|
+
default: withCtx(() => [
|
|
2115
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
2116
|
+
]),
|
|
2117
|
+
_: 1
|
|
2118
|
+
}, 8, ["disabled", "content"]),
|
|
2095
2119
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
2096
2120
|
key: 1,
|
|
2097
2121
|
class: "item",
|
|
@@ -2267,7 +2291,10 @@ const _sfc_main$i = defineComponent({
|
|
|
2267
2291
|
formConfig: getFormConfig("Date", [
|
|
2268
2292
|
{ fieldName: "default", component: "DateTime" },
|
|
2269
2293
|
{ fieldName: "placeholder", component: "Text" },
|
|
2270
|
-
{
|
|
2294
|
+
{
|
|
2295
|
+
fieldName: "format",
|
|
2296
|
+
component: "Selected"
|
|
2297
|
+
},
|
|
2271
2298
|
{ fieldName: "state", component: "Radio" }
|
|
2272
2299
|
]),
|
|
2273
2300
|
actionType: ["onChange"],
|
|
@@ -2276,11 +2303,12 @@ const _sfc_main$i = defineComponent({
|
|
|
2276
2303
|
},
|
|
2277
2304
|
setup(props) {
|
|
2278
2305
|
useWatch(props);
|
|
2306
|
+
const previewValue = ref("");
|
|
2279
2307
|
const getPickerType = (format) => {
|
|
2280
2308
|
if (!format)
|
|
2281
2309
|
return "date";
|
|
2282
2310
|
const formatTypeMap = {
|
|
2283
|
-
|
|
2311
|
+
YYYY: "year",
|
|
2284
2312
|
"YYYY-MM": "month",
|
|
2285
2313
|
"YYYY-MM-DD": "date",
|
|
2286
2314
|
"YYYY-MM-DD HH": "datetime",
|
|
@@ -2296,27 +2324,62 @@ const _sfc_main$i = defineComponent({
|
|
|
2296
2324
|
return dateValue;
|
|
2297
2325
|
}
|
|
2298
2326
|
if (dateValue instanceof Date) {
|
|
2299
|
-
|
|
2300
|
-
const month = String(dateValue.getMonth() + 1).padStart(2, "0");
|
|
2301
|
-
const day = String(dateValue.getDate()).padStart(2, "0");
|
|
2302
|
-
const hours = String(dateValue.getHours()).padStart(2, "0");
|
|
2303
|
-
const minutes = String(dateValue.getMinutes()).padStart(2, "0");
|
|
2304
|
-
const seconds = String(dateValue.getSeconds()).padStart(2, "0");
|
|
2305
|
-
const formatMap = {
|
|
2306
|
-
"YYYY": `${year}`,
|
|
2307
|
-
"YYYY-MM": `${year}-${month}`,
|
|
2308
|
-
"YYYY-MM-DD": `${year}-${month}-${day}`,
|
|
2309
|
-
"YYYY-MM-DD HH": `${year}-${month}-${day} ${hours}`,
|
|
2310
|
-
"YYYY-MM-DD HH:mm": `${year}-${month}-${day} ${hours}:${minutes}`,
|
|
2311
|
-
"YYYY-MM-DD HH:mm:ss": `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
2312
|
-
};
|
|
2313
|
-
return formatMap[format] || `${year}-${month}-${day}`;
|
|
2327
|
+
return formatDateToString(dateValue, format);
|
|
2314
2328
|
}
|
|
2315
2329
|
return String(dateValue);
|
|
2316
2330
|
};
|
|
2331
|
+
const formatDateToString = (date, format) => {
|
|
2332
|
+
const year = date.getFullYear();
|
|
2333
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
2334
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
2335
|
+
const hours = String(date.getHours()).padStart(2, "0");
|
|
2336
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
2337
|
+
const seconds = String(date.getSeconds()).padStart(2, "0");
|
|
2338
|
+
const formatMap = {
|
|
2339
|
+
YYYY: `${year}`,
|
|
2340
|
+
"YYYY-MM": `${year}-${month}`,
|
|
2341
|
+
"YYYY-MM-DD": `${year}-${month}-${day}`,
|
|
2342
|
+
"YYYY-MM-DD HH": `${year}-${month}-${day} ${hours}`,
|
|
2343
|
+
"YYYY-MM-DD HH:mm": `${year}-${month}-${day} ${hours}:${minutes}`,
|
|
2344
|
+
"YYYY-MM-DD HH:mm:ss": `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
2345
|
+
};
|
|
2346
|
+
return formatMap[format] || `${year}-${month}-${day}`;
|
|
2347
|
+
};
|
|
2348
|
+
const handlePreviewChange = (val) => {
|
|
2349
|
+
props.item.data.default = val;
|
|
2350
|
+
};
|
|
2351
|
+
const updatePreviewValue = () => {
|
|
2352
|
+
if (props.drag && props.item.data.default) {
|
|
2353
|
+
if (props.item.data.default instanceof Date) {
|
|
2354
|
+
previewValue.value = formatDateToString(props.item.data.default, props.item.data.format || "YYYY-MM-DD");
|
|
2355
|
+
} else {
|
|
2356
|
+
previewValue.value = props.item.data.default;
|
|
2357
|
+
}
|
|
2358
|
+
} else {
|
|
2359
|
+
previewValue.value = "";
|
|
2360
|
+
}
|
|
2361
|
+
};
|
|
2362
|
+
watch(
|
|
2363
|
+
() => props.item.data.default,
|
|
2364
|
+
() => {
|
|
2365
|
+
updatePreviewValue();
|
|
2366
|
+
},
|
|
2367
|
+
{ deep: true }
|
|
2368
|
+
);
|
|
2369
|
+
watch(
|
|
2370
|
+
() => props.item.data.format,
|
|
2371
|
+
() => {
|
|
2372
|
+
updatePreviewValue();
|
|
2373
|
+
}
|
|
2374
|
+
);
|
|
2375
|
+
onMounted(() => {
|
|
2376
|
+
updatePreviewValue();
|
|
2377
|
+
});
|
|
2317
2378
|
return {
|
|
2379
|
+
previewValue,
|
|
2318
2380
|
getPickerType,
|
|
2319
|
-
formatReadonlyDate
|
|
2381
|
+
formatReadonlyDate,
|
|
2382
|
+
handlePreviewChange
|
|
2320
2383
|
};
|
|
2321
2384
|
}
|
|
2322
2385
|
});
|
|
@@ -2329,14 +2392,27 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2329
2392
|
const _component_el_tooltip = ElTooltip;
|
|
2330
2393
|
const _component_el_date_picker = ElDatePicker;
|
|
2331
2394
|
return openBlock(), createElementBlock("div", {
|
|
2332
|
-
class: normalizeClass(["starfish-formitem", {
|
|
2395
|
+
class: normalizeClass(["starfish-formitem", {
|
|
2396
|
+
formCover: _ctx.drag,
|
|
2397
|
+
"starfish-vertical": _ctx.labelalign != "top",
|
|
2398
|
+
[_ctx.item.data.csslist?.join(" ")]: !!_ctx.item.data.csslist
|
|
2399
|
+
}])
|
|
2333
2400
|
}, [
|
|
2334
2401
|
createElementVNode("div", {
|
|
2335
2402
|
class: normalizeClass(["label", "label_" + _ctx.labelalign]),
|
|
2336
2403
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
2337
2404
|
}, [
|
|
2338
2405
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$i, "*")) : createCommentVNode("", true),
|
|
2339
|
-
|
|
2406
|
+
createVNode(_component_el_tooltip, {
|
|
2407
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
2408
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
2409
|
+
placement: "top"
|
|
2410
|
+
}, {
|
|
2411
|
+
default: withCtx(() => [
|
|
2412
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
2413
|
+
]),
|
|
2414
|
+
_: 1
|
|
2415
|
+
}, 8, ["disabled", "content"]),
|
|
2340
2416
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
2341
2417
|
key: 1,
|
|
2342
2418
|
class: "item",
|
|
@@ -2356,8 +2432,8 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2356
2432
|
}, [
|
|
2357
2433
|
_ctx.drag ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
2358
2434
|
key: 0,
|
|
2359
|
-
modelValue: _ctx.
|
|
2360
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.
|
|
2435
|
+
modelValue: _ctx.previewValue,
|
|
2436
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.previewValue = $event),
|
|
2361
2437
|
style: { "width": "320px" },
|
|
2362
2438
|
type: _ctx.getPickerType(_ctx.item.data.format),
|
|
2363
2439
|
format: _ctx.item.data.format,
|
|
@@ -2365,8 +2441,9 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2365
2441
|
placeholder: _ctx.item.data.placeholder,
|
|
2366
2442
|
size: _ctx.size,
|
|
2367
2443
|
disabled: _ctx.item.data.state === "disabled",
|
|
2368
|
-
readonly: _ctx.item.data.state === "readonly"
|
|
2369
|
-
|
|
2444
|
+
readonly: _ctx.item.data.state === "readonly",
|
|
2445
|
+
onChange: _ctx.handlePreviewChange
|
|
2446
|
+
}, null, 8, ["modelValue", "type", "format", "value-format", "placeholder", "size", "disabled", "readonly", "onChange"])) : createCommentVNode("", true),
|
|
2370
2447
|
!_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, {
|
|
2371
2448
|
key: 2,
|
|
2372
2449
|
modelValue: _ctx.data[_ctx.item.data.fieldName],
|
|
@@ -2565,7 +2642,16 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2565
2642
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
2566
2643
|
}, [
|
|
2567
2644
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$g, "*")) : createCommentVNode("", true),
|
|
2568
|
-
|
|
2645
|
+
createVNode(_component_el_tooltip, {
|
|
2646
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
2647
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
2648
|
+
placement: "top"
|
|
2649
|
+
}, {
|
|
2650
|
+
default: withCtx(() => [
|
|
2651
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
2652
|
+
]),
|
|
2653
|
+
_: 1
|
|
2654
|
+
}, 8, ["disabled", "content"]),
|
|
2569
2655
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
2570
2656
|
key: 1,
|
|
2571
2657
|
class: "item",
|
|
@@ -2665,7 +2751,16 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2665
2751
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
2666
2752
|
}, [
|
|
2667
2753
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$f, "*")) : createCommentVNode("", true),
|
|
2668
|
-
|
|
2754
|
+
createVNode(_component_el_tooltip, {
|
|
2755
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
2756
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
2757
|
+
placement: "top"
|
|
2758
|
+
}, {
|
|
2759
|
+
default: withCtx(() => [
|
|
2760
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
2761
|
+
]),
|
|
2762
|
+
_: 1
|
|
2763
|
+
}, 8, ["disabled", "content"]),
|
|
2669
2764
|
_ctx.item.data.tip && !_ctx.readonly ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
2670
2765
|
key: 1,
|
|
2671
2766
|
class: "item",
|
|
@@ -3231,7 +3326,16 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3231
3326
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
3232
3327
|
}, [
|
|
3233
3328
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$e, "*")) : createCommentVNode("", true),
|
|
3234
|
-
|
|
3329
|
+
createVNode(_component_el_tooltip, {
|
|
3330
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
3331
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
3332
|
+
placement: "top"
|
|
3333
|
+
}, {
|
|
3334
|
+
default: withCtx(() => [
|
|
3335
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
3336
|
+
]),
|
|
3337
|
+
_: 1
|
|
3338
|
+
}, 8, ["disabled", "content"]),
|
|
3235
3339
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
3236
3340
|
key: 1,
|
|
3237
3341
|
class: "item",
|
|
@@ -3366,7 +3470,16 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3366
3470
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
3367
3471
|
}, [
|
|
3368
3472
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$d, "*")) : createCommentVNode("", true),
|
|
3369
|
-
|
|
3473
|
+
createVNode(_component_el_tooltip, {
|
|
3474
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
3475
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
3476
|
+
placement: "top"
|
|
3477
|
+
}, {
|
|
3478
|
+
default: withCtx(() => [
|
|
3479
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
3480
|
+
]),
|
|
3481
|
+
_: 1
|
|
3482
|
+
}, 8, ["disabled", "content"]),
|
|
3370
3483
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
3371
3484
|
key: 1,
|
|
3372
3485
|
class: "item",
|
|
@@ -3391,6 +3504,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3391
3504
|
style: { "width": "320px" },
|
|
3392
3505
|
placeholder: _ctx.item.data.placeholder,
|
|
3393
3506
|
multiple: "",
|
|
3507
|
+
"collapse-tags": "",
|
|
3508
|
+
clearable: "",
|
|
3394
3509
|
disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly",
|
|
3395
3510
|
size: _ctx.size
|
|
3396
3511
|
}, {
|
|
@@ -3411,6 +3526,8 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3411
3526
|
style: { "width": "320px" },
|
|
3412
3527
|
placeholder: _ctx.item.data.placeholder,
|
|
3413
3528
|
multiple: "",
|
|
3529
|
+
"collapse-tags": "",
|
|
3530
|
+
clearable: "",
|
|
3414
3531
|
size: _ctx.size,
|
|
3415
3532
|
disabled: _ctx.item.data.state === "disabled" || _ctx.item.data.state === "readonly",
|
|
3416
3533
|
onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.execFunc("onFocus")),
|
|
@@ -3685,7 +3802,16 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3685
3802
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
3686
3803
|
}, [
|
|
3687
3804
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" ? (openBlock(), createElementBlock("span", _hoisted_1$a, "*")) : createCommentVNode("", true),
|
|
3688
|
-
|
|
3805
|
+
createVNode(_component_el_tooltip, {
|
|
3806
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
3807
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
3808
|
+
placement: "top"
|
|
3809
|
+
}, {
|
|
3810
|
+
default: withCtx(() => [
|
|
3811
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
3812
|
+
]),
|
|
3813
|
+
_: 1
|
|
3814
|
+
}, 8, ["disabled", "content"]),
|
|
3689
3815
|
_ctx.item.data.tip && !_ctx.readonly ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
3690
3816
|
key: 1,
|
|
3691
3817
|
class: "item",
|
|
@@ -3778,7 +3904,16 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3778
3904
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
3779
3905
|
}, [
|
|
3780
3906
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$9, "*")) : createCommentVNode("", true),
|
|
3781
|
-
|
|
3907
|
+
createVNode(_component_el_tooltip, {
|
|
3908
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
3909
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
3910
|
+
placement: "top"
|
|
3911
|
+
}, {
|
|
3912
|
+
default: withCtx(() => [
|
|
3913
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
3914
|
+
]),
|
|
3915
|
+
_: 1
|
|
3916
|
+
}, 8, ["disabled", "content"]),
|
|
3782
3917
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
3783
3918
|
key: 1,
|
|
3784
3919
|
class: "item",
|
|
@@ -3887,7 +4022,16 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3887
4022
|
style: normalizeStyle({ width: _ctx.labelWidth + "px" })
|
|
3888
4023
|
}, [
|
|
3889
4024
|
_ctx.item.data.required && !_ctx.readonly && _ctx.item.data.state !== "readonly" && !_ctx.search ? (openBlock(), createElementBlock("span", _hoisted_1$8, "*")) : createCommentVNode("", true),
|
|
3890
|
-
|
|
4025
|
+
createVNode(_component_el_tooltip, {
|
|
4026
|
+
disabled: _ctx.item.data.label.length <= 6,
|
|
4027
|
+
content: _ctx.item.data.label + _ctx.suffix,
|
|
4028
|
+
placement: "top"
|
|
4029
|
+
}, {
|
|
4030
|
+
default: withCtx(() => [
|
|
4031
|
+
createElementVNode("label", null, toDisplayString(_ctx.item.data.label) + toDisplayString(_ctx.suffix), 1)
|
|
4032
|
+
]),
|
|
4033
|
+
_: 1
|
|
4034
|
+
}, 8, ["disabled", "content"]),
|
|
3891
4035
|
_ctx.item.data.tip && !_ctx.readonly && !_ctx.search ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
3892
4036
|
key: 1,
|
|
3893
4037
|
class: "item",
|
|
@@ -5399,7 +5543,7 @@ Object.keys(files).forEach((fileName) => {
|
|
|
5399
5543
|
}
|
|
5400
5544
|
});
|
|
5401
5545
|
const RichText = defineAsyncComponent({
|
|
5402
|
-
loader: () => import('./index-
|
|
5546
|
+
loader: () => import('./index-61317ebb.mjs'),
|
|
5403
5547
|
loadingComponent: Loading
|
|
5404
5548
|
});
|
|
5405
5549
|
RichText.ControlType = "RichText";
|
|
@@ -5408,7 +5552,7 @@ RichText.icon = "icon-textEdit";
|
|
|
5408
5552
|
RichText.formConfig = getFormConfig("RichText");
|
|
5409
5553
|
utilFuns[RichText.ControlType] = RichText;
|
|
5410
5554
|
const jsonEditor = defineAsyncComponent({
|
|
5411
|
-
loader: () => import('./index-
|
|
5555
|
+
loader: () => import('./index-058a680b.mjs'),
|
|
5412
5556
|
loadingComponent: Loading
|
|
5413
5557
|
});
|
|
5414
5558
|
jsonEditor.ControlType = "JsonEditor";
|
|
@@ -5418,14 +5562,14 @@ jsonEditor.formConfig = getFormConfig("JsonEditor", [{ fieldName: "default", com
|
|
|
5418
5562
|
jsonEditor.rule = _.getJsonValidate();
|
|
5419
5563
|
utilFuns[jsonEditor.ControlType] = jsonEditor;
|
|
5420
5564
|
const formAction = defineAsyncComponent({
|
|
5421
|
-
loader: () => import('./formAction-
|
|
5565
|
+
loader: () => import('./formAction-e36e51b3.mjs'),
|
|
5422
5566
|
loadingComponent: Loading
|
|
5423
5567
|
});
|
|
5424
5568
|
formAction.ControlType = "FormAction";
|
|
5425
5569
|
formAction.isHide = true;
|
|
5426
5570
|
utilFuns[formAction.ControlType] = formAction;
|
|
5427
5571
|
const Rule = defineAsyncComponent({
|
|
5428
|
-
loader: () => import('./index-
|
|
5572
|
+
loader: () => import('./index-20f0d53c.mjs'),
|
|
5429
5573
|
loadingComponent: Loading
|
|
5430
5574
|
});
|
|
5431
5575
|
Rule.ControlType = "Rule";
|
|
@@ -5434,7 +5578,7 @@ utilFuns[Rule.ControlType] = Rule;
|
|
|
5434
5578
|
const install = (app) => {
|
|
5435
5579
|
app.config.globalProperties.$formcomponents = utilFuns;
|
|
5436
5580
|
};
|
|
5437
|
-
const Dynamicform = defineAsyncComponent(() => import('./starfish-form-
|
|
5581
|
+
const Dynamicform = defineAsyncComponent(() => import('./starfish-form-72d9dfce.mjs'));
|
|
5438
5582
|
const main = {
|
|
5439
5583
|
install
|
|
5440
5584
|
};
|
|
@@ -3,7 +3,7 @@ import 'element-plus/es/components/base/style/css';
|
|
|
3
3
|
import 'element-plus/es/components/form/style/css';
|
|
4
4
|
import 'element-plus/es/components/form-item/style/css';
|
|
5
5
|
import { defineComponent, getCurrentInstance, ref, onMounted, openBlock, createElementBlock, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, resolveDynamicComponent, createCommentVNode, toRaw } from 'vue';
|
|
6
|
-
import { _ as _export_sfc } from './main-
|
|
6
|
+
import { _ as _export_sfc } from './main-8ef56e86.mjs';
|
|
7
7
|
import 'element-plus/es/components/icon/style/css';
|
|
8
8
|
import 'element-plus/es/components/input/style/css';
|
|
9
9
|
import 'element-plus/es/components/checkbox/style/css';
|
package/dist/starfish-form.mjs
CHANGED
package/dist/style.css
CHANGED
|
@@ -424,15 +424,15 @@
|
|
|
424
424
|
width: 100%;
|
|
425
425
|
min-height: 60px;
|
|
426
426
|
height: 100%;
|
|
427
|
-
}.rich-text-editor[data-v-
|
|
427
|
+
}.rich-text-editor[data-v-34acb2a2] {
|
|
428
428
|
min-height: 200px;
|
|
429
429
|
position: relative;
|
|
430
430
|
z-index: 1;
|
|
431
431
|
}
|
|
432
|
-
[data-v-
|
|
432
|
+
[data-v-34acb2a2] .editor-content {
|
|
433
433
|
min-height: 200px;
|
|
434
434
|
}
|
|
435
|
-
[data-v-
|
|
435
|
+
[data-v-34acb2a2] .editor-content .ql-toolbar {
|
|
436
436
|
z-index: 100;
|
|
437
437
|
background: white;
|
|
438
438
|
border: 1px solid #ccc;
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
border-top-right-radius: 4px;
|
|
441
441
|
position: relative;
|
|
442
442
|
}
|
|
443
|
-
[data-v-
|
|
443
|
+
[data-v-34acb2a2] .editor-content .ql-container {
|
|
444
444
|
border: 1px solid #ccc;
|
|
445
445
|
border-top: none;
|
|
446
446
|
border-bottom-left-radius: 4px;
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
min-height: 200px;
|
|
449
449
|
z-index: 99;
|
|
450
450
|
}
|
|
451
|
-
[data-v-
|
|
451
|
+
[data-v-34acb2a2] .shape .rich-text-editor {
|
|
452
452
|
pointer-events: auto !important;
|
|
453
453
|
}.cm-gutters.cm-gutters-before {
|
|
454
454
|
background: #133F63;
|
package/package.json
CHANGED
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
<el-icon :size="12" style="color: #fff"><SemiSelect /></el-icon>
|
|
35
35
|
</div>
|
|
36
36
|
<div class="top" @click="handleTop(index)">
|
|
37
|
-
<el-icon :size="12"><Top /></el-icon>
|
|
37
|
+
<el-icon :size="12" style="color: #fff"><Top /></el-icon>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="bottom" @click="handleBottom(index)">
|
|
40
|
-
<el-icon :size="12"><Bottom /></el-icon>
|
|
40
|
+
<el-icon :size="12" style="color: #fff"><Bottom /></el-icon>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
<el-icon :size="12" style="color: #fff"><SemiSelect /></el-icon>
|
|
35
35
|
</div>
|
|
36
36
|
<div class="top" @click="handleTop(index)">
|
|
37
|
-
<el-icon :size="12"><Top /></el-icon>
|
|
37
|
+
<el-icon :size="12" style="color: #fff"><Top /></el-icon>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="bottom" @click="handleBottom(index)">
|
|
40
|
-
<el-icon :size="12"><Bottom /></el-icon>
|
|
40
|
+
<el-icon :size="12" style="color: #fff"><Bottom /></el-icon>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<div class="starfish-formitem" :class="{ formCover: drag, 'starfish-vertical': labelalign != 'top', [item.data.csslist?.join(' ')]: !!item.data.csslist}">
|
|
3
3
|
<div class="label" :class="'label_' + labelalign" :style="{width: labelWidth + 'px'}">
|
|
4
4
|
<span v-if="item.data.required && !readonly && item.data.state !== 'readonly' && !search" class="item_require">*</span>
|
|
5
|
-
<label
|
|
5
|
+
<el-tooltip :disabled="item.data.label.length <= 6" :content="item.data.label + suffix" placement="top">
|
|
6
|
+
<label>{{ item.data.label }}{{suffix}}</label>
|
|
7
|
+
</el-tooltip>
|
|
6
8
|
<el-tooltip v-if="item.data.tip && !readonly && !search" class="item" effect="dark" :content="item.data.tip" placement="top">
|
|
7
9
|
<span class="tip iconfontui icon-tishi"></span>
|
|
8
10
|
</el-tooltip>
|