yc-pro-components 0.0.82 → 0.0.84
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/es/components/check-card/index.d.ts +34 -34
- package/es/components/check-card/src/index.vue.d.ts +2 -2
- package/es/components/check-card-group/index.d.ts +20 -20
- package/es/components/check-card-group/src/index.vue.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +19 -19
- package/es/components/date-picker/src/index.vue.d.ts +11 -11
- package/es/components/dialog/index.d.ts +57 -57
- package/es/components/dialog/src/index.vue.d.ts +5 -5
- package/es/components/dialog-form/index.d.ts +14 -14
- package/es/components/dialog-form/src/index.vue.d.ts +8 -8
- package/es/components/display-item/index.d.ts +18 -18
- package/es/components/display-item/src/index.vue.d.ts +18 -18
- package/es/components/drawer-form/index.d.ts +103 -103
- package/es/components/drawer-form/src/index.vue.d.ts +27 -27
- package/es/components/form/index.d.ts +39 -39
- package/es/components/form/src/form-content.vue.d.ts +27 -27
- package/es/components/form/src/index.vue.d.ts +14 -14
- package/es/components/form-item/index.d.ts +42 -42
- package/es/components/form-item/src/index.vue.d.ts +21 -13
- package/es/components/form-item/src/index.vue2.mjs +429 -301
- package/es/components/form-item/src/overflow-tooltip.d.ts +16 -0
- package/es/components/form-item/src/overflow-tooltip.mjs +67 -0
- package/es/components/header/index.d.ts +7 -7
- package/es/components/header/src/index.vue.d.ts +1 -1
- package/es/components/input-tag/index.d.ts +10 -10
- package/es/components/input-tag/src/index.vue.d.ts +2 -2
- package/es/components/layout/index.d.ts +30 -30
- package/es/components/layout/src/index.vue.d.ts +10 -10
- package/es/components/page/index.d.ts +283 -283
- package/es/components/page/src/index.vue.d.ts +97 -97
- package/es/components/pagination/index.d.ts +38 -38
- package/es/components/pagination/src/index.vue.d.ts +2 -2
- package/es/components/popover/index.d.ts +42 -42
- package/es/components/popover/src/index.vue.d.ts +3 -3
- package/es/components/radio/index.d.ts +31 -31
- package/es/components/radio/src/index.vue.d.ts +23 -23
- package/es/components/render/index.d.ts +6 -6
- package/es/components/render/src/index.vue.d.ts +2 -2
- package/es/components/search/index.d.ts +128 -128
- package/es/components/search/src/index.vue.d.ts +41 -41
- package/es/components/sidebar/index.d.ts +15 -15
- package/es/components/sidebar/src/index.vue.d.ts +5 -5
- package/es/components/steps-form/index.d.ts +19 -19
- package/es/components/steps-form/src/index.vue.d.ts +1 -1
- package/es/components/table/src/index.vue2.mjs +11 -5
- package/es/components/table/src/table-column.vue.d.ts +18 -18
- package/es/components/table/src/use-table-density.d.ts +8 -0
- package/es/components/table/src/use-table-density.mjs +24 -0
- package/es/components/yc-card/index.d.ts +19 -19
- package/es/components/yc-card/src/index.vue.d.ts +1 -1
- package/es/components/yc-drawer/store.d.ts +5 -5
- package/es/components/yc-more-actions/index.d.ts +16 -16
- package/es/components/yc-more-actions/src/index.vue.d.ts +2 -2
- package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +3 -3
- package/es/components/yc-plus-page/src/index.vue.d.ts +192 -192
- package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/es/components/yc-segmented/index.d.ts +1 -1
- package/es/components/yc-segmented/src/index.d.ts +1 -1
- package/es/components/yc-select-v2/src/index.vue.d.ts +2 -2
- package/es/components/yc-status-dialog/src/index.vue.d.ts +5 -5
- package/es/components/yc-text/src/index.vue.d.ts +2 -2
- package/es/hooks/usePlusFormReset.d.ts +288 -288
- package/es/index.css +8 -8
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/yc-components/version.d.ts +1 -1
- package/index.css +1 -1
- package/index.js +525 -306
- package/index.min.js +12 -12
- package/index.min.mjs +12 -12
- package/index.mjs +525 -306
- package/lib/components/check-card/index.d.ts +34 -34
- package/lib/components/check-card/src/index.vue.d.ts +2 -2
- package/lib/components/check-card-group/index.d.ts +20 -20
- package/lib/components/check-card-group/src/index.vue.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +19 -19
- package/lib/components/date-picker/src/index.vue.d.ts +11 -11
- package/lib/components/dialog/index.d.ts +57 -57
- package/lib/components/dialog/src/index.vue.d.ts +5 -5
- package/lib/components/dialog-form/index.d.ts +14 -14
- package/lib/components/dialog-form/src/index.vue.d.ts +8 -8
- package/lib/components/display-item/index.d.ts +18 -18
- package/lib/components/display-item/src/index.vue.d.ts +18 -18
- package/lib/components/drawer-form/index.d.ts +103 -103
- package/lib/components/drawer-form/src/index.vue.d.ts +27 -27
- package/lib/components/form/index.d.ts +39 -39
- package/lib/components/form/src/form-content.vue.d.ts +27 -27
- package/lib/components/form/src/index.vue.d.ts +14 -14
- package/lib/components/form-item/index.d.ts +42 -42
- package/lib/components/form-item/src/index.vue.d.ts +21 -13
- package/lib/components/form-item/src/index.vue2.js +428 -300
- package/lib/components/form-item/src/overflow-tooltip.d.ts +16 -0
- package/lib/components/form-item/src/overflow-tooltip.js +71 -0
- package/lib/components/header/index.d.ts +7 -7
- package/lib/components/header/src/index.vue.d.ts +1 -1
- package/lib/components/input-tag/index.d.ts +10 -10
- package/lib/components/input-tag/src/index.vue.d.ts +2 -2
- package/lib/components/layout/index.d.ts +30 -30
- package/lib/components/layout/src/index.vue.d.ts +10 -10
- package/lib/components/page/index.d.ts +283 -283
- package/lib/components/page/src/index.vue.d.ts +97 -97
- package/lib/components/pagination/index.d.ts +38 -38
- package/lib/components/pagination/src/index.vue.d.ts +2 -2
- package/lib/components/popover/index.d.ts +42 -42
- package/lib/components/popover/src/index.vue.d.ts +3 -3
- package/lib/components/radio/index.d.ts +31 -31
- package/lib/components/radio/src/index.vue.d.ts +23 -23
- package/lib/components/render/index.d.ts +6 -6
- package/lib/components/render/src/index.vue.d.ts +2 -2
- package/lib/components/search/index.d.ts +128 -128
- package/lib/components/search/src/index.vue.d.ts +41 -41
- package/lib/components/sidebar/index.d.ts +15 -15
- package/lib/components/sidebar/src/index.vue.d.ts +5 -5
- package/lib/components/steps-form/index.d.ts +19 -19
- package/lib/components/steps-form/src/index.vue.d.ts +1 -1
- package/lib/components/table/src/index.vue2.js +10 -4
- package/lib/components/table/src/table-column.vue.d.ts +18 -18
- package/lib/components/table/src/use-table-density.d.ts +8 -0
- package/lib/components/table/src/use-table-density.js +28 -0
- package/lib/components/yc-card/index.d.ts +19 -19
- package/lib/components/yc-card/src/index.vue.d.ts +1 -1
- package/lib/components/yc-drawer/store.d.ts +5 -5
- package/lib/components/yc-more-actions/index.d.ts +16 -16
- package/lib/components/yc-more-actions/src/index.vue.d.ts +2 -2
- package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +3 -3
- package/lib/components/yc-plus-page/src/index.vue.d.ts +192 -192
- package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/lib/components/yc-segmented/index.d.ts +1 -1
- package/lib/components/yc-segmented/src/index.d.ts +1 -1
- package/lib/components/yc-select-v2/src/index.vue.d.ts +2 -2
- package/lib/components/yc-status-dialog/src/index.vue.d.ts +5 -5
- package/lib/components/yc-text/src/index.vue.d.ts +2 -2
- package/lib/hooks/usePlusFormReset.d.ts +288 -288
- package/lib/index.css +7 -7
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/yc-components/version.d.ts +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-form-item.css +1 -1
- package/theme-chalk/src/form-item.scss +56 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, inject, unref,
|
|
1
|
+
import { defineComponent, ref, computed, watch, nextTick, onBeforeUnmount, inject, unref, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, createElementBlock, createCommentVNode, renderSlot, Fragment, renderList, resolveDynamicComponent, normalizeProps, createTextVNode, toDisplayString, guardReactiveProps, createVNode } from 'vue';
|
|
2
2
|
import { getLabel, getCustomProps, getFieldSlotName, getLabelSlotName, getTooltip, versionIsLessThan260 } from '../../utils/index.mjs';
|
|
3
3
|
import { QuestionFilled } from '@element-plus/icons-vue';
|
|
4
4
|
import { useGetOptions } from '../../../hooks/useGetOptions.mjs';
|
|
@@ -8,6 +8,7 @@ import 'sortablejs';
|
|
|
8
8
|
import { PlusRender } from '../../render/index.mjs';
|
|
9
9
|
import { ElText, ElDivider, ElFormItem, ElTooltip, ElIcon, ElInput, ElSelect, ElOption, ElOptionGroup } from 'element-plus';
|
|
10
10
|
import { getFieldComponent, hasFieldComponent } from './form-item.mjs';
|
|
11
|
+
import { findPlaceholderOverflow } from './overflow-tooltip.mjs';
|
|
11
12
|
import { isFunction, isArray, isDate } from '../../utils/is.mjs';
|
|
12
13
|
|
|
13
14
|
const _hoisted_1 = { class: "el-form-item__error" };
|
|
@@ -20,6 +21,7 @@ const _hoisted_4 = {
|
|
|
20
21
|
key: 1,
|
|
21
22
|
class: "plus-form-item-field"
|
|
22
23
|
};
|
|
24
|
+
const TOOLTIP_SHOW_DELAY = 300;
|
|
23
25
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
26
|
...{
|
|
25
27
|
name: "PlusFormItem"
|
|
@@ -66,6 +68,85 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
68
|
const customFieldPropsIsReady = ref(false);
|
|
67
69
|
const valueIsReady = ref(false);
|
|
68
70
|
const labelValue = computed(() => getLabel(props.label));
|
|
71
|
+
const labelTextRef = ref();
|
|
72
|
+
const labelOverflow = ref(false);
|
|
73
|
+
const labelTooltipContent = ref("");
|
|
74
|
+
const labelTooltipVisible = ref(false);
|
|
75
|
+
const placeholderTooltipVisible = ref(false);
|
|
76
|
+
const placeholderTooltipContent = ref("");
|
|
77
|
+
const placeholderVirtualRef = ref();
|
|
78
|
+
let labelTooltipTimer = null;
|
|
79
|
+
let placeholderTooltipTimer = null;
|
|
80
|
+
const syncLabelOverflow = () => {
|
|
81
|
+
const el = labelTextRef.value;
|
|
82
|
+
if (!el) {
|
|
83
|
+
labelOverflow.value = false;
|
|
84
|
+
labelTooltipContent.value = "";
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
labelTooltipContent.value = (el.textContent || "").trim();
|
|
88
|
+
labelOverflow.value = el.scrollWidth > el.clientWidth + 1;
|
|
89
|
+
};
|
|
90
|
+
const showLabelTooltip = () => {
|
|
91
|
+
syncLabelOverflow();
|
|
92
|
+
if (labelTooltipTimer) clearTimeout(labelTooltipTimer);
|
|
93
|
+
if (!labelOverflow.value || !labelTooltipContent.value) {
|
|
94
|
+
labelTooltipVisible.value = false;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (labelTooltipVisible.value) return;
|
|
98
|
+
labelTooltipTimer = setTimeout(() => {
|
|
99
|
+
labelTooltipVisible.value = true;
|
|
100
|
+
labelTooltipTimer = null;
|
|
101
|
+
}, TOOLTIP_SHOW_DELAY);
|
|
102
|
+
};
|
|
103
|
+
const hideLabelTooltip = () => {
|
|
104
|
+
if (labelTooltipTimer) clearTimeout(labelTooltipTimer);
|
|
105
|
+
labelTooltipTimer = null;
|
|
106
|
+
labelTooltipVisible.value = false;
|
|
107
|
+
};
|
|
108
|
+
const hidePlaceholderTooltip = () => {
|
|
109
|
+
if (placeholderTooltipTimer) clearTimeout(placeholderTooltipTimer);
|
|
110
|
+
placeholderTooltipTimer = null;
|
|
111
|
+
placeholderTooltipVisible.value = false;
|
|
112
|
+
placeholderTooltipContent.value = "";
|
|
113
|
+
};
|
|
114
|
+
const handlePlaceholderHover = (event) => {
|
|
115
|
+
const root = event.currentTarget;
|
|
116
|
+
if (!(root instanceof HTMLElement)) return;
|
|
117
|
+
const hit = findPlaceholderOverflow(root, event.target, {
|
|
118
|
+
x: event.clientX,
|
|
119
|
+
y: event.clientY
|
|
120
|
+
});
|
|
121
|
+
if (!hit) {
|
|
122
|
+
hidePlaceholderTooltip();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const sameTarget = placeholderTooltipContent.value === hit.text && placeholderVirtualRef.value === hit.el;
|
|
126
|
+
if (sameTarget && (placeholderTooltipVisible.value || placeholderTooltipTimer)) return;
|
|
127
|
+
if (placeholderTooltipTimer) clearTimeout(placeholderTooltipTimer);
|
|
128
|
+
placeholderTooltipVisible.value = false;
|
|
129
|
+
placeholderVirtualRef.value = hit.el;
|
|
130
|
+
placeholderTooltipContent.value = hit.text;
|
|
131
|
+
placeholderTooltipTimer = setTimeout(() => {
|
|
132
|
+
placeholderTooltipVisible.value = true;
|
|
133
|
+
placeholderTooltipTimer = null;
|
|
134
|
+
}, TOOLTIP_SHOW_DELAY);
|
|
135
|
+
};
|
|
136
|
+
watch(labelTextRef, (el, _, onCleanup) => {
|
|
137
|
+
syncLabelOverflow();
|
|
138
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
139
|
+
const observer = new ResizeObserver(() => syncLabelOverflow());
|
|
140
|
+
observer.observe(el);
|
|
141
|
+
onCleanup(() => observer.disconnect());
|
|
142
|
+
});
|
|
143
|
+
watch(labelValue, () => {
|
|
144
|
+
nextTick(syncLabelOverflow);
|
|
145
|
+
});
|
|
146
|
+
onBeforeUnmount(() => {
|
|
147
|
+
if (labelTooltipTimer) clearTimeout(labelTooltipTimer);
|
|
148
|
+
if (placeholderTooltipTimer) clearTimeout(placeholderTooltipTimer);
|
|
149
|
+
});
|
|
69
150
|
const formFieldRefs = inject(TableFormFieldRefInjectionKey, {});
|
|
70
151
|
const tableRowInfo = inject(TableFormRowInfoInjectionKey, {});
|
|
71
152
|
const params = computed(() => ({
|
|
@@ -234,212 +315,143 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
234
315
|
"label-width": _ctx.hasLabel ? (_a = customFormItemProps.value) == null ? void 0 : _a.labelWidth : "0px"
|
|
235
316
|
}), createSlots({
|
|
236
317
|
default: withCtx(() => [
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"render-type": "form",
|
|
245
|
-
"handle-change": handleChange
|
|
246
|
-
}, null, 8, ["render", "params", "callback-value", "custom-field-props"])) : createCommentVNode("v-if", true)
|
|
247
|
-
])) : _ctx.$slots[unref(getFieldSlotName)(_ctx.prop)] ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
248
|
-
renderSlot(_ctx.$slots, unref(getFieldSlotName)(_ctx.prop), mergeProps(params.value, { column: props }))
|
|
249
|
-
])) : _ctx.valueType === "select" && customFieldProps.value.multiple === true ? (openBlock(), createBlock(unref(ElSelect$1), mergeProps({
|
|
250
|
-
key: 2,
|
|
251
|
-
ref_key: "fieldInstance",
|
|
252
|
-
ref: fieldInstance,
|
|
253
|
-
modelValue: state.value,
|
|
254
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event),
|
|
255
|
-
placeholder: unref(t)("plus.field.pleaseSelect") + labelValue.value,
|
|
256
|
-
class: "plus-form-item-field",
|
|
257
|
-
clearable: _ctx.clearable
|
|
258
|
-
}, customFieldProps.value, { "onUpdate:modelValue": handleChange }), createSlots({
|
|
259
|
-
default: withCtx(() => [
|
|
260
|
-
(openBlock(true), createElementBlock(
|
|
261
|
-
Fragment,
|
|
262
|
-
null,
|
|
263
|
-
renderList(unref(customOptions), (item) => {
|
|
264
|
-
return openBlock(), createElementBlock(
|
|
265
|
-
Fragment,
|
|
266
|
-
{
|
|
267
|
-
key: item.value
|
|
268
|
-
},
|
|
269
|
-
[
|
|
270
|
-
item.options ? (openBlock(), createBlock(unref(ElOptionGroup$1), {
|
|
271
|
-
key: 0,
|
|
272
|
-
label: item.label,
|
|
273
|
-
disabled: item.disabled
|
|
274
|
-
}, {
|
|
275
|
-
default: withCtx(() => [
|
|
276
|
-
(openBlock(true), createElementBlock(
|
|
277
|
-
Fragment,
|
|
278
|
-
null,
|
|
279
|
-
renderList(item.options, (option) => {
|
|
280
|
-
return openBlock(), createBlock(unref(ElOption$1), mergeProps(
|
|
281
|
-
{
|
|
282
|
-
key: option.value,
|
|
283
|
-
label: option.label,
|
|
284
|
-
value: option.value
|
|
285
|
-
},
|
|
286
|
-
unref(isFunction)(option.fieldItemProps) ? option.fieldItemProps(option) : option.fieldItemProps
|
|
287
|
-
), {
|
|
288
|
-
default: withCtx(() => [
|
|
289
|
-
unref(isFunction)(option.fieldSlot) ? (openBlock(), createBlock(
|
|
290
|
-
resolveDynamicComponent(option.fieldSlot),
|
|
291
|
-
normalizeProps(mergeProps({ key: 0 }, option)),
|
|
292
|
-
null,
|
|
293
|
-
16
|
|
294
|
-
/* FULL_PROPS */
|
|
295
|
-
)) : unref(isFunction)(_ctx.fieldChildrenSlot) ? (openBlock(), createBlock(
|
|
296
|
-
resolveDynamicComponent(_ctx.fieldChildrenSlot),
|
|
297
|
-
normalizeProps(mergeProps({ key: 1 }, option)),
|
|
298
|
-
null,
|
|
299
|
-
16
|
|
300
|
-
/* FULL_PROPS */
|
|
301
|
-
)) : (openBlock(), createElementBlock(
|
|
302
|
-
Fragment,
|
|
303
|
-
{ key: 2 },
|
|
304
|
-
[
|
|
305
|
-
createTextVNode(
|
|
306
|
-
toDisplayString(option.label),
|
|
307
|
-
1
|
|
308
|
-
/* TEXT */
|
|
309
|
-
)
|
|
310
|
-
],
|
|
311
|
-
64
|
|
312
|
-
/* STABLE_FRAGMENT */
|
|
313
|
-
))
|
|
314
|
-
]),
|
|
315
|
-
_: 2
|
|
316
|
-
/* DYNAMIC */
|
|
317
|
-
}, 1040, ["label", "value"]);
|
|
318
|
-
}),
|
|
319
|
-
128
|
|
320
|
-
/* KEYED_FRAGMENT */
|
|
321
|
-
))
|
|
322
|
-
]),
|
|
323
|
-
_: 2
|
|
324
|
-
/* DYNAMIC */
|
|
325
|
-
}, 1032, ["label", "disabled"])) : (openBlock(), createBlock(unref(ElOption$1), mergeProps(
|
|
326
|
-
{
|
|
327
|
-
key: 1,
|
|
328
|
-
label: item.label,
|
|
329
|
-
value: item.value
|
|
330
|
-
},
|
|
331
|
-
unref(isFunction)(item.fieldItemProps) ? item.fieldItemProps(item) : item.fieldItemProps
|
|
332
|
-
), {
|
|
333
|
-
default: withCtx(() => [
|
|
334
|
-
unref(isFunction)(item.fieldSlot) ? (openBlock(), createBlock(
|
|
335
|
-
resolveDynamicComponent(item.fieldSlot),
|
|
336
|
-
normalizeProps(mergeProps({ key: 0 }, item)),
|
|
337
|
-
null,
|
|
338
|
-
16
|
|
339
|
-
/* FULL_PROPS */
|
|
340
|
-
)) : unref(isFunction)(_ctx.fieldChildrenSlot) ? (openBlock(), createBlock(
|
|
341
|
-
resolveDynamicComponent(_ctx.fieldChildrenSlot),
|
|
342
|
-
normalizeProps(mergeProps({ key: 1 }, item)),
|
|
343
|
-
null,
|
|
344
|
-
16
|
|
345
|
-
/* FULL_PROPS */
|
|
346
|
-
)) : (openBlock(), createElementBlock(
|
|
347
|
-
Fragment,
|
|
348
|
-
{ key: 2 },
|
|
349
|
-
[
|
|
350
|
-
createTextVNode(
|
|
351
|
-
toDisplayString(item.label),
|
|
352
|
-
1
|
|
353
|
-
/* TEXT */
|
|
354
|
-
)
|
|
355
|
-
],
|
|
356
|
-
64
|
|
357
|
-
/* STABLE_FRAGMENT */
|
|
358
|
-
))
|
|
359
|
-
]),
|
|
360
|
-
_: 2
|
|
361
|
-
/* DYNAMIC */
|
|
362
|
-
}, 1040, ["label", "value"]))
|
|
363
|
-
],
|
|
364
|
-
64
|
|
365
|
-
/* STABLE_FRAGMENT */
|
|
366
|
-
);
|
|
367
|
-
}),
|
|
368
|
-
128
|
|
369
|
-
/* KEYED_FRAGMENT */
|
|
370
|
-
))
|
|
371
|
-
]),
|
|
372
|
-
_: 2
|
|
373
|
-
/* DYNAMIC */
|
|
374
|
-
}, [
|
|
375
|
-
renderList(_ctx.fieldSlots, (fieldSlot, key) => {
|
|
376
|
-
return {
|
|
377
|
-
name: key,
|
|
378
|
-
fn: withCtx((data) => [
|
|
379
|
-
(openBlock(), createBlock(
|
|
380
|
-
resolveDynamicComponent(fieldSlot),
|
|
381
|
-
normalizeProps(guardReactiveProps(data)),
|
|
382
|
-
null,
|
|
383
|
-
16
|
|
384
|
-
/* FULL_PROPS */
|
|
385
|
-
))
|
|
386
|
-
])
|
|
387
|
-
};
|
|
388
|
-
})
|
|
389
|
-
]), 1040, ["modelValue", "placeholder", "clearable"])) : unref(hasFieldComponent)(_ctx.valueType) ? (openBlock(), createElementBlock(
|
|
390
|
-
Fragment,
|
|
391
|
-
{ key: 3 },
|
|
318
|
+
createElementVNode(
|
|
319
|
+
"div",
|
|
320
|
+
{
|
|
321
|
+
class: "plus-form-item__control",
|
|
322
|
+
onMouseover: handlePlaceholderHover,
|
|
323
|
+
onMouseleave: hidePlaceholderTooltip
|
|
324
|
+
},
|
|
392
325
|
[
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
326
|
+
_ctx.renderField && unref(isFunction)(_ctx.renderField) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
327
|
+
valueIsReady.value ? (openBlock(), createBlock(unref(PlusRender), {
|
|
328
|
+
key: 0,
|
|
329
|
+
render: _ctx.renderField,
|
|
330
|
+
params: params.value,
|
|
331
|
+
"callback-value": state.value,
|
|
332
|
+
"custom-field-props": customFieldProps.value,
|
|
333
|
+
"render-type": "form",
|
|
334
|
+
"handle-change": handleChange
|
|
335
|
+
}, null, 8, ["render", "params", "callback-value", "custom-field-props"])) : createCommentVNode("v-if", true)
|
|
336
|
+
])) : _ctx.$slots[unref(getFieldSlotName)(_ctx.prop)] ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
337
|
+
renderSlot(_ctx.$slots, unref(getFieldSlotName)(_ctx.prop), mergeProps(params.value, { column: props }))
|
|
338
|
+
])) : _ctx.valueType === "select" && customFieldProps.value.multiple === true ? (openBlock(), createBlock(unref(ElSelect$1), mergeProps({
|
|
339
|
+
key: 2,
|
|
397
340
|
ref_key: "fieldInstance",
|
|
398
341
|
ref: fieldInstance,
|
|
399
342
|
modelValue: state.value,
|
|
400
343
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.value = $event),
|
|
344
|
+
placeholder: unref(t)("plus.field.pleaseSelect") + labelValue.value,
|
|
401
345
|
class: "plus-form-item-field",
|
|
402
346
|
clearable: _ctx.clearable
|
|
403
|
-
},
|
|
347
|
+
}, customFieldProps.value, { "onUpdate:modelValue": handleChange }), createSlots({
|
|
404
348
|
default: withCtx(() => [
|
|
405
349
|
(openBlock(true), createElementBlock(
|
|
406
350
|
Fragment,
|
|
407
351
|
null,
|
|
408
352
|
renderList(unref(customOptions), (item) => {
|
|
409
|
-
return openBlock(),
|
|
410
|
-
|
|
411
|
-
mergeProps({
|
|
412
|
-
key: item.value
|
|
413
|
-
}, getChildrenProps(item)),
|
|
353
|
+
return openBlock(), createElementBlock(
|
|
354
|
+
Fragment,
|
|
414
355
|
{
|
|
415
|
-
|
|
416
|
-
unref(isFunction)(item.fieldSlot) ? (openBlock(), createBlock(resolveDynamicComponent(item.fieldSlot), mergeProps({
|
|
417
|
-
key: 0,
|
|
418
|
-
"model-value": state.value,
|
|
419
|
-
column: params.value
|
|
420
|
-
}, item), null, 16, ["model-value", "column"])) : unref(isFunction)(_ctx.fieldChildrenSlot) ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.fieldChildrenSlot), mergeProps({
|
|
421
|
-
key: 1,
|
|
422
|
-
"model-value": state.value,
|
|
423
|
-
column: params.value
|
|
424
|
-
}, item), null, 16, ["model-value", "column"])) : (openBlock(), createElementBlock(
|
|
425
|
-
Fragment,
|
|
426
|
-
{ key: 2 },
|
|
427
|
-
[
|
|
428
|
-
createTextVNode(
|
|
429
|
-
toDisplayString(item.label),
|
|
430
|
-
1
|
|
431
|
-
/* TEXT */
|
|
432
|
-
)
|
|
433
|
-
],
|
|
434
|
-
64
|
|
435
|
-
/* STABLE_FRAGMENT */
|
|
436
|
-
))
|
|
437
|
-
]),
|
|
438
|
-
_: 2
|
|
439
|
-
/* DYNAMIC */
|
|
356
|
+
key: item.value
|
|
440
357
|
},
|
|
441
|
-
|
|
442
|
-
|
|
358
|
+
[
|
|
359
|
+
item.options ? (openBlock(), createBlock(unref(ElOptionGroup$1), {
|
|
360
|
+
key: 0,
|
|
361
|
+
label: item.label,
|
|
362
|
+
disabled: item.disabled
|
|
363
|
+
}, {
|
|
364
|
+
default: withCtx(() => [
|
|
365
|
+
(openBlock(true), createElementBlock(
|
|
366
|
+
Fragment,
|
|
367
|
+
null,
|
|
368
|
+
renderList(item.options, (option) => {
|
|
369
|
+
return openBlock(), createBlock(unref(ElOption$1), mergeProps(
|
|
370
|
+
{
|
|
371
|
+
key: option.value,
|
|
372
|
+
label: option.label,
|
|
373
|
+
value: option.value
|
|
374
|
+
},
|
|
375
|
+
unref(isFunction)(option.fieldItemProps) ? option.fieldItemProps(option) : option.fieldItemProps
|
|
376
|
+
), {
|
|
377
|
+
default: withCtx(() => [
|
|
378
|
+
unref(isFunction)(option.fieldSlot) ? (openBlock(), createBlock(
|
|
379
|
+
resolveDynamicComponent(option.fieldSlot),
|
|
380
|
+
normalizeProps(mergeProps({ key: 0 }, option)),
|
|
381
|
+
null,
|
|
382
|
+
16
|
|
383
|
+
/* FULL_PROPS */
|
|
384
|
+
)) : unref(isFunction)(_ctx.fieldChildrenSlot) ? (openBlock(), createBlock(
|
|
385
|
+
resolveDynamicComponent(_ctx.fieldChildrenSlot),
|
|
386
|
+
normalizeProps(mergeProps({ key: 1 }, option)),
|
|
387
|
+
null,
|
|
388
|
+
16
|
|
389
|
+
/* FULL_PROPS */
|
|
390
|
+
)) : (openBlock(), createElementBlock(
|
|
391
|
+
Fragment,
|
|
392
|
+
{ key: 2 },
|
|
393
|
+
[
|
|
394
|
+
createTextVNode(
|
|
395
|
+
toDisplayString(option.label),
|
|
396
|
+
1
|
|
397
|
+
/* TEXT */
|
|
398
|
+
)
|
|
399
|
+
],
|
|
400
|
+
64
|
|
401
|
+
/* STABLE_FRAGMENT */
|
|
402
|
+
))
|
|
403
|
+
]),
|
|
404
|
+
_: 2
|
|
405
|
+
/* DYNAMIC */
|
|
406
|
+
}, 1040, ["label", "value"]);
|
|
407
|
+
}),
|
|
408
|
+
128
|
|
409
|
+
/* KEYED_FRAGMENT */
|
|
410
|
+
))
|
|
411
|
+
]),
|
|
412
|
+
_: 2
|
|
413
|
+
/* DYNAMIC */
|
|
414
|
+
}, 1032, ["label", "disabled"])) : (openBlock(), createBlock(unref(ElOption$1), mergeProps(
|
|
415
|
+
{
|
|
416
|
+
key: 1,
|
|
417
|
+
label: item.label,
|
|
418
|
+
value: item.value
|
|
419
|
+
},
|
|
420
|
+
unref(isFunction)(item.fieldItemProps) ? item.fieldItemProps(item) : item.fieldItemProps
|
|
421
|
+
), {
|
|
422
|
+
default: withCtx(() => [
|
|
423
|
+
unref(isFunction)(item.fieldSlot) ? (openBlock(), createBlock(
|
|
424
|
+
resolveDynamicComponent(item.fieldSlot),
|
|
425
|
+
normalizeProps(mergeProps({ key: 0 }, item)),
|
|
426
|
+
null,
|
|
427
|
+
16
|
|
428
|
+
/* FULL_PROPS */
|
|
429
|
+
)) : unref(isFunction)(_ctx.fieldChildrenSlot) ? (openBlock(), createBlock(
|
|
430
|
+
resolveDynamicComponent(_ctx.fieldChildrenSlot),
|
|
431
|
+
normalizeProps(mergeProps({ key: 1 }, item)),
|
|
432
|
+
null,
|
|
433
|
+
16
|
|
434
|
+
/* FULL_PROPS */
|
|
435
|
+
)) : (openBlock(), createElementBlock(
|
|
436
|
+
Fragment,
|
|
437
|
+
{ key: 2 },
|
|
438
|
+
[
|
|
439
|
+
createTextVNode(
|
|
440
|
+
toDisplayString(item.label),
|
|
441
|
+
1
|
|
442
|
+
/* TEXT */
|
|
443
|
+
)
|
|
444
|
+
],
|
|
445
|
+
64
|
|
446
|
+
/* STABLE_FRAGMENT */
|
|
447
|
+
))
|
|
448
|
+
]),
|
|
449
|
+
_: 2
|
|
450
|
+
/* DYNAMIC */
|
|
451
|
+
}, 1040, ["label", "value"]))
|
|
452
|
+
],
|
|
453
|
+
64
|
|
454
|
+
/* STABLE_FRAGMENT */
|
|
443
455
|
);
|
|
444
456
|
}),
|
|
445
457
|
128
|
|
@@ -453,27 +465,76 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
453
465
|
return {
|
|
454
466
|
name: key,
|
|
455
467
|
fn: withCtx((data) => [
|
|
456
|
-
(openBlock(), createBlock(
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
468
|
+
(openBlock(), createBlock(
|
|
469
|
+
resolveDynamicComponent(fieldSlot),
|
|
470
|
+
normalizeProps(guardReactiveProps(data)),
|
|
471
|
+
null,
|
|
472
|
+
16
|
|
473
|
+
/* FULL_PROPS */
|
|
474
|
+
))
|
|
460
475
|
])
|
|
461
476
|
};
|
|
462
477
|
})
|
|
463
|
-
]), 1040, ["modelValue", "clearable"])) : (openBlock(), createElementBlock(
|
|
478
|
+
]), 1040, ["modelValue", "placeholder", "clearable"])) : unref(hasFieldComponent)(_ctx.valueType) ? (openBlock(), createElementBlock(
|
|
464
479
|
Fragment,
|
|
465
|
-
{ key:
|
|
480
|
+
{ key: 3 },
|
|
466
481
|
[
|
|
467
|
-
createCommentVNode("
|
|
468
|
-
(
|
|
482
|
+
createCommentVNode(" \u7EDF\u4E00\u5904\u7406 "),
|
|
483
|
+
createCommentVNode(" has-children "),
|
|
484
|
+
unref(getFieldComponent)(_ctx.valueType).children ? (openBlock(), createBlock(resolveDynamicComponent(unref(getFieldComponent)(_ctx.valueType).component), mergeProps({
|
|
485
|
+
key: 0,
|
|
469
486
|
ref_key: "fieldInstance",
|
|
470
487
|
ref: fieldInstance,
|
|
471
488
|
modelValue: state.value,
|
|
472
489
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => state.value = $event),
|
|
473
490
|
class: "plus-form-item-field",
|
|
474
|
-
clearable: _ctx.clearable
|
|
475
|
-
"field-children-slot": _ctx.fieldChildrenSlot
|
|
491
|
+
clearable: _ctx.clearable
|
|
476
492
|
}, commonProps.value, { "onUpdate:modelValue": handleChange }), createSlots({
|
|
493
|
+
default: withCtx(() => [
|
|
494
|
+
(openBlock(true), createElementBlock(
|
|
495
|
+
Fragment,
|
|
496
|
+
null,
|
|
497
|
+
renderList(unref(customOptions), (item) => {
|
|
498
|
+
return openBlock(), createBlock(
|
|
499
|
+
resolveDynamicComponent(unref(getFieldComponent)(_ctx.valueType).children),
|
|
500
|
+
mergeProps({
|
|
501
|
+
key: item.value
|
|
502
|
+
}, getChildrenProps(item)),
|
|
503
|
+
{
|
|
504
|
+
default: withCtx(() => [
|
|
505
|
+
unref(isFunction)(item.fieldSlot) ? (openBlock(), createBlock(resolveDynamicComponent(item.fieldSlot), mergeProps({
|
|
506
|
+
key: 0,
|
|
507
|
+
"model-value": state.value,
|
|
508
|
+
column: params.value
|
|
509
|
+
}, item), null, 16, ["model-value", "column"])) : unref(isFunction)(_ctx.fieldChildrenSlot) ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.fieldChildrenSlot), mergeProps({
|
|
510
|
+
key: 1,
|
|
511
|
+
"model-value": state.value,
|
|
512
|
+
column: params.value
|
|
513
|
+
}, item), null, 16, ["model-value", "column"])) : (openBlock(), createElementBlock(
|
|
514
|
+
Fragment,
|
|
515
|
+
{ key: 2 },
|
|
516
|
+
[
|
|
517
|
+
createTextVNode(
|
|
518
|
+
toDisplayString(item.label),
|
|
519
|
+
1
|
|
520
|
+
/* TEXT */
|
|
521
|
+
)
|
|
522
|
+
],
|
|
523
|
+
64
|
|
524
|
+
/* STABLE_FRAGMENT */
|
|
525
|
+
))
|
|
526
|
+
]),
|
|
527
|
+
_: 2
|
|
528
|
+
/* DYNAMIC */
|
|
529
|
+
},
|
|
530
|
+
1040
|
|
531
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
532
|
+
);
|
|
533
|
+
}),
|
|
534
|
+
128
|
|
535
|
+
/* KEYED_FRAGMENT */
|
|
536
|
+
))
|
|
537
|
+
]),
|
|
477
538
|
_: 2
|
|
478
539
|
/* DYNAMIC */
|
|
479
540
|
}, [
|
|
@@ -482,88 +543,129 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
482
543
|
name: key,
|
|
483
544
|
fn: withCtx((data) => [
|
|
484
545
|
(openBlock(), createBlock(resolveDynamicComponent(fieldSlot), mergeProps({
|
|
485
|
-
|
|
546
|
+
value: state.value,
|
|
486
547
|
column: params.value
|
|
487
|
-
}, data), null, 16, ["
|
|
548
|
+
}, data), null, 16, ["value", "column"]))
|
|
488
549
|
])
|
|
489
550
|
};
|
|
490
551
|
})
|
|
491
|
-
]), 1040, ["modelValue", "clearable"
|
|
552
|
+
]), 1040, ["modelValue", "clearable"])) : (openBlock(), createElementBlock(
|
|
553
|
+
Fragment,
|
|
554
|
+
{ key: 1 },
|
|
555
|
+
[
|
|
556
|
+
createCommentVNode(" no-children "),
|
|
557
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(getFieldComponent)(_ctx.valueType).component), mergeProps({
|
|
558
|
+
ref_key: "fieldInstance",
|
|
559
|
+
ref: fieldInstance,
|
|
560
|
+
modelValue: state.value,
|
|
561
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => state.value = $event),
|
|
562
|
+
class: "plus-form-item-field",
|
|
563
|
+
clearable: _ctx.clearable,
|
|
564
|
+
"field-children-slot": _ctx.fieldChildrenSlot
|
|
565
|
+
}, commonProps.value, { "onUpdate:modelValue": handleChange }), createSlots({
|
|
566
|
+
_: 2
|
|
567
|
+
/* DYNAMIC */
|
|
568
|
+
}, [
|
|
569
|
+
renderList(_ctx.fieldSlots, (fieldSlot, key) => {
|
|
570
|
+
return {
|
|
571
|
+
name: key,
|
|
572
|
+
fn: withCtx((data) => [
|
|
573
|
+
(openBlock(), createBlock(resolveDynamicComponent(fieldSlot), mergeProps({
|
|
574
|
+
"model-value": state.value,
|
|
575
|
+
column: params.value
|
|
576
|
+
}, data), null, 16, ["model-value", "column"]))
|
|
577
|
+
])
|
|
578
|
+
};
|
|
579
|
+
})
|
|
580
|
+
]), 1040, ["modelValue", "clearable", "field-children-slot"]))
|
|
581
|
+
],
|
|
582
|
+
2112
|
|
583
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
584
|
+
))
|
|
492
585
|
],
|
|
493
|
-
|
|
494
|
-
/* STABLE_FRAGMENT
|
|
495
|
-
))
|
|
586
|
+
64
|
|
587
|
+
/* STABLE_FRAGMENT */
|
|
588
|
+
)) : _ctx.valueType === "text" ? (openBlock(), createBlock(
|
|
589
|
+
unref(ElText),
|
|
590
|
+
mergeProps({
|
|
591
|
+
key: 4,
|
|
592
|
+
ref_key: "fieldInstance",
|
|
593
|
+
ref: fieldInstance,
|
|
594
|
+
class: "plus-form-item-field"
|
|
595
|
+
}, customFieldProps.value),
|
|
596
|
+
{
|
|
597
|
+
default: withCtx(() => [
|
|
598
|
+
createTextVNode(
|
|
599
|
+
toDisplayString(state.value),
|
|
600
|
+
1
|
|
601
|
+
/* TEXT */
|
|
602
|
+
)
|
|
603
|
+
]),
|
|
604
|
+
_: 1
|
|
605
|
+
/* STABLE */
|
|
606
|
+
},
|
|
607
|
+
16
|
|
608
|
+
/* FULL_PROPS */
|
|
609
|
+
)) : _ctx.valueType === "divider" ? (openBlock(), createBlock(
|
|
610
|
+
unref(ElDivider),
|
|
611
|
+
mergeProps({
|
|
612
|
+
key: 5,
|
|
613
|
+
ref_key: "fieldInstance",
|
|
614
|
+
ref: fieldInstance,
|
|
615
|
+
class: "plus-form-item-field"
|
|
616
|
+
}, customFieldProps.value),
|
|
617
|
+
{
|
|
618
|
+
default: withCtx(() => [
|
|
619
|
+
createTextVNode(
|
|
620
|
+
toDisplayString(state.value),
|
|
621
|
+
1
|
|
622
|
+
/* TEXT */
|
|
623
|
+
)
|
|
624
|
+
]),
|
|
625
|
+
_: 1
|
|
626
|
+
/* STABLE */
|
|
627
|
+
},
|
|
628
|
+
16
|
|
629
|
+
/* FULL_PROPS */
|
|
630
|
+
)) : (openBlock(), createBlock(unref(ElInput$1), mergeProps({
|
|
631
|
+
key: 6,
|
|
632
|
+
ref_key: "fieldInstance",
|
|
633
|
+
ref: fieldInstance,
|
|
634
|
+
modelValue: state.value,
|
|
635
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => state.value = $event),
|
|
636
|
+
class: "plus-form-item-field",
|
|
637
|
+
placeholder: unref(t)("plus.field.pleaseEnter") + labelValue.value,
|
|
638
|
+
autocomplete: "off",
|
|
639
|
+
clearable: _ctx.clearable
|
|
640
|
+
}, customFieldProps.value, { "onUpdate:modelValue": handleChange }), createSlots({
|
|
641
|
+
_: 2
|
|
642
|
+
/* DYNAMIC */
|
|
643
|
+
}, [
|
|
644
|
+
renderList(_ctx.fieldSlots, (fieldSlot, key) => {
|
|
645
|
+
return {
|
|
646
|
+
name: key,
|
|
647
|
+
fn: withCtx((data) => [
|
|
648
|
+
(openBlock(), createBlock(resolveDynamicComponent(fieldSlot), mergeProps({
|
|
649
|
+
"model-value": state.value,
|
|
650
|
+
column: params.value
|
|
651
|
+
}, data), null, 16, ["model-value", "column"]))
|
|
652
|
+
])
|
|
653
|
+
};
|
|
654
|
+
})
|
|
655
|
+
]), 1040, ["modelValue", "placeholder", "clearable"])),
|
|
656
|
+
createVNode(unref(ElTooltip$1), {
|
|
657
|
+
visible: placeholderTooltipVisible.value,
|
|
658
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => placeholderTooltipVisible.value = $event),
|
|
659
|
+
content: placeholderTooltipContent.value,
|
|
660
|
+
placement: "top",
|
|
661
|
+
"virtual-triggering": "",
|
|
662
|
+
"virtual-ref": placeholderVirtualRef.value,
|
|
663
|
+
disabled: !placeholderTooltipContent.value
|
|
664
|
+
}, null, 8, ["visible", "content", "virtual-ref", "disabled"])
|
|
496
665
|
],
|
|
497
|
-
|
|
498
|
-
/*
|
|
499
|
-
)
|
|
500
|
-
unref(ElText),
|
|
501
|
-
mergeProps({
|
|
502
|
-
key: 4,
|
|
503
|
-
ref_key: "fieldInstance",
|
|
504
|
-
ref: fieldInstance,
|
|
505
|
-
class: "plus-form-item-field"
|
|
506
|
-
}, customFieldProps.value),
|
|
507
|
-
{
|
|
508
|
-
default: withCtx(() => [
|
|
509
|
-
createTextVNode(
|
|
510
|
-
toDisplayString(state.value),
|
|
511
|
-
1
|
|
512
|
-
/* TEXT */
|
|
513
|
-
)
|
|
514
|
-
]),
|
|
515
|
-
_: 1
|
|
516
|
-
/* STABLE */
|
|
517
|
-
},
|
|
518
|
-
16
|
|
519
|
-
/* FULL_PROPS */
|
|
520
|
-
)) : _ctx.valueType === "divider" ? (openBlock(), createBlock(
|
|
521
|
-
unref(ElDivider),
|
|
522
|
-
mergeProps({
|
|
523
|
-
key: 5,
|
|
524
|
-
ref_key: "fieldInstance",
|
|
525
|
-
ref: fieldInstance,
|
|
526
|
-
class: "plus-form-item-field"
|
|
527
|
-
}, customFieldProps.value),
|
|
528
|
-
{
|
|
529
|
-
default: withCtx(() => [
|
|
530
|
-
createTextVNode(
|
|
531
|
-
toDisplayString(state.value),
|
|
532
|
-
1
|
|
533
|
-
/* TEXT */
|
|
534
|
-
)
|
|
535
|
-
]),
|
|
536
|
-
_: 1
|
|
537
|
-
/* STABLE */
|
|
538
|
-
},
|
|
539
|
-
16
|
|
540
|
-
/* FULL_PROPS */
|
|
541
|
-
)) : (openBlock(), createBlock(unref(ElInput$1), mergeProps({
|
|
542
|
-
key: 6,
|
|
543
|
-
ref_key: "fieldInstance",
|
|
544
|
-
ref: fieldInstance,
|
|
545
|
-
modelValue: state.value,
|
|
546
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => state.value = $event),
|
|
547
|
-
class: "plus-form-item-field",
|
|
548
|
-
placeholder: unref(t)("plus.field.pleaseEnter") + labelValue.value,
|
|
549
|
-
autocomplete: "off",
|
|
550
|
-
clearable: _ctx.clearable
|
|
551
|
-
}, customFieldProps.value, { "onUpdate:modelValue": handleChange }), createSlots({
|
|
552
|
-
_: 2
|
|
553
|
-
/* DYNAMIC */
|
|
554
|
-
}, [
|
|
555
|
-
renderList(_ctx.fieldSlots, (fieldSlot, key) => {
|
|
556
|
-
return {
|
|
557
|
-
name: key,
|
|
558
|
-
fn: withCtx((data) => [
|
|
559
|
-
(openBlock(), createBlock(resolveDynamicComponent(fieldSlot), mergeProps({
|
|
560
|
-
"model-value": state.value,
|
|
561
|
-
column: params.value
|
|
562
|
-
}, data), null, 16, ["model-value", "column"]))
|
|
563
|
-
])
|
|
564
|
-
};
|
|
565
|
-
})
|
|
566
|
-
]), 1040, ["modelValue", "placeholder", "clearable"]))
|
|
666
|
+
32
|
|
667
|
+
/* NEED_HYDRATION */
|
|
668
|
+
)
|
|
567
669
|
]),
|
|
568
670
|
_: 2
|
|
569
671
|
/* DYNAMIC */
|
|
@@ -585,31 +687,57 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
585
687
|
name: "label",
|
|
586
688
|
fn: withCtx(({ label: currentLabel }) => [
|
|
587
689
|
createElementVNode("span", _hoisted_2, [
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
"
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
690
|
+
createVNode(unref(ElTooltip$1), {
|
|
691
|
+
visible: labelTooltipVisible.value,
|
|
692
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => labelTooltipVisible.value = $event),
|
|
693
|
+
content: labelTooltipContent.value,
|
|
694
|
+
placement: "top",
|
|
695
|
+
disabled: !labelOverflow.value || !labelTooltipContent.value
|
|
696
|
+
}, {
|
|
697
|
+
default: withCtx(() => [
|
|
698
|
+
createElementVNode(
|
|
699
|
+
"span",
|
|
700
|
+
{
|
|
701
|
+
ref_key: "labelTextRef",
|
|
702
|
+
ref: labelTextRef,
|
|
703
|
+
class: "plus-form-item__label-text",
|
|
704
|
+
onMouseenter: showLabelTooltip,
|
|
705
|
+
onMouseleave: hideLabelTooltip
|
|
706
|
+
},
|
|
707
|
+
[
|
|
708
|
+
_ctx.renderLabel && unref(isFunction)(_ctx.renderLabel) ? (openBlock(), createElementBlock(
|
|
709
|
+
Fragment,
|
|
710
|
+
{ key: 0 },
|
|
711
|
+
[
|
|
712
|
+
valueIsReady.value ? (openBlock(), createBlock(unref(PlusRender), {
|
|
713
|
+
key: 0,
|
|
714
|
+
render: _ctx.renderLabel,
|
|
715
|
+
params: params.value,
|
|
716
|
+
"callback-value": currentLabel,
|
|
717
|
+
"custom-field-props": customFieldProps.value
|
|
718
|
+
}, null, 8, ["render", "params", "callback-value", "custom-field-props"])) : createCommentVNode("v-if", true)
|
|
719
|
+
],
|
|
720
|
+
64
|
|
721
|
+
/* STABLE_FRAGMENT */
|
|
722
|
+
)) : renderSlot(_ctx.$slots, unref(getLabelSlotName)(_ctx.prop), normalizeProps(mergeProps({ key: 1 }, params.value)), () => [
|
|
723
|
+
createTextVNode(
|
|
724
|
+
toDisplayString(currentLabel),
|
|
725
|
+
1
|
|
726
|
+
/* TEXT */
|
|
727
|
+
)
|
|
728
|
+
])
|
|
729
|
+
],
|
|
730
|
+
544
|
|
731
|
+
/* NEED_HYDRATION, NEED_PATCH */
|
|
732
|
+
)
|
|
733
|
+
]),
|
|
734
|
+
_: 2
|
|
735
|
+
/* DYNAMIC */
|
|
736
|
+
}, 1032, ["visible", "content", "disabled"]),
|
|
609
737
|
_ctx.tooltip ? (openBlock(), createBlock(
|
|
610
738
|
unref(ElTooltip$1),
|
|
611
739
|
mergeProps({
|
|
612
|
-
key:
|
|
740
|
+
key: 0,
|
|
613
741
|
placement: "top"
|
|
614
742
|
}, unref(getTooltip)(_ctx.tooltip)),
|
|
615
743
|
{
|