@silver-formily/element-plus 2.0.1 → 2.1.0
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/LICENSE +21 -21
- package/README.en-US.md +32 -0
- package/README.md +32 -35
- package/esm/__builtins__/configs/index.mjs.map +1 -1
- package/esm/__builtins__/index.mjs +15 -16
- package/esm/__builtins__/shared/hooks.mjs.map +1 -1
- package/esm/__builtins__/shared/index.mjs +11 -12
- package/esm/__builtins__/shared/loading.mjs.map +1 -1
- package/esm/__builtins__/shared/simple-version-compare.mjs.map +1 -1
- package/esm/__builtins__/shared/transform-component.d.ts +2 -6
- package/esm/__builtins__/shared/transform-component.mjs +16 -33
- package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
- package/esm/__builtins__/shared/utils.mjs +10 -10
- package/esm/__builtins__/shared/utils.mjs.map +1 -1
- package/esm/array-base/index.mjs +76 -73
- package/esm/array-base/index.mjs.map +1 -1
- package/esm/array-base/symbols.mjs.map +1 -1
- package/esm/array-base/utils.mjs +33 -29
- package/esm/array-base/utils.mjs.map +1 -1
- package/esm/array-cards/index.mjs +56 -54
- package/esm/array-cards/index.mjs.map +1 -1
- package/esm/array-collapse/index.mjs +64 -62
- package/esm/array-collapse/index.mjs.map +1 -1
- package/esm/array-collapse/utils.mjs +8 -2
- package/esm/array-collapse/utils.mjs.map +1 -1
- package/esm/array-items/index.mjs +53 -47
- package/esm/array-items/index.mjs.map +1 -1
- package/esm/array-list-tabs/index.mjs +36 -34
- package/esm/array-list-tabs/index.mjs.map +1 -1
- package/esm/array-list-tabs/utils.mjs +11 -5
- package/esm/array-list-tabs/utils.mjs.map +1 -1
- package/esm/array-table/array-table.d.ts +28 -0
- package/esm/array-table/index.d.ts +28 -0
- package/esm/array-table/index.mjs +126 -123
- package/esm/array-table/index.mjs.map +1 -1
- package/esm/array-table/types.d.ts +1 -0
- package/esm/array-table/utils.mjs +18 -12
- package/esm/array-table/utils.mjs.map +1 -1
- package/esm/array-tabs/index.mjs +19 -17
- package/esm/array-tabs/index.mjs.map +1 -1
- package/esm/cascader/index.mjs +26 -24
- package/esm/cascader/index.mjs.map +1 -1
- package/esm/checkbox/checkbox-group.d.ts +1 -4
- package/esm/checkbox/index.d.ts +442 -379
- package/esm/checkbox/index.mjs +19 -16
- package/esm/checkbox/index.mjs.map +1 -1
- package/esm/date-picker/index.mjs +14 -12
- package/esm/date-picker/index.mjs.map +1 -1
- package/esm/editable/editable.d.ts +16 -12
- package/esm/editable/index.d.ts +8 -6
- package/esm/editable/index.mjs +113 -113
- package/esm/editable/index.mjs.map +1 -1
- package/esm/form/form.mjs +6 -6
- package/esm/form/form.mjs.map +1 -1
- package/esm/form-button-group/index.mjs +33 -29
- package/esm/form-button-group/index.mjs.map +1 -1
- package/esm/form-button-group/utils.mjs +8 -2
- package/esm/form-button-group/utils.mjs.map +1 -1
- package/esm/form-collapse/index.mjs +43 -42
- package/esm/form-collapse/index.mjs.map +1 -1
- package/esm/form-collapse/utils.mjs.map +1 -1
- package/esm/form-dialog/index.d.ts +1 -1
- package/esm/form-dialog/index.mjs +22 -22
- package/esm/form-dialog/index.mjs.map +1 -1
- package/esm/form-dialog/types.d.ts +6 -6
- package/esm/form-drawer/index.d.ts +1 -1
- package/esm/form-drawer/index.mjs +21 -21
- package/esm/form-drawer/index.mjs.map +1 -1
- package/esm/form-drawer/types.d.ts +6 -6
- package/esm/form-grid/hooks.mjs.map +1 -1
- package/esm/form-grid/index.d.ts +1 -183
- package/esm/form-grid/index.mjs +23 -20
- package/esm/form-grid/index.mjs.map +1 -1
- package/esm/form-item/form-item.d.ts +2 -1
- package/esm/form-item/index.d.ts +12 -6
- package/esm/form-item/index.mjs +157 -151
- package/esm/form-item/index.mjs.map +1 -1
- package/esm/form-item/types.d.ts +0 -1
- package/esm/form-item/utils.mjs.map +1 -1
- package/esm/form-layout/form-layout.d.ts +0 -1
- package/esm/form-layout/form-layout.mjs +56 -51
- package/esm/form-layout/form-layout.mjs.map +1 -1
- package/esm/form-layout/types.d.ts +0 -2
- package/esm/form-layout/utils.d.ts +3 -3
- package/esm/form-layout/utils.mjs +55 -45
- package/esm/form-layout/utils.mjs.map +1 -1
- package/esm/form-step/index.mjs +38 -34
- package/esm/form-step/index.mjs.map +1 -1
- package/esm/form-step/utils.mjs.map +1 -1
- package/esm/form-tab/hooks.mjs.map +1 -1
- package/esm/form-tab/index.d.ts +1 -26
- package/esm/form-tab/index.mjs +36 -35
- package/esm/form-tab/index.mjs.map +1 -1
- package/esm/form-tab/utils.mjs.map +1 -1
- package/esm/index.mjs +58 -58
- package/esm/input/index.mjs +23 -20
- package/esm/input/index.mjs.map +1 -1
- package/esm/input-number/index.d.ts +258 -147
- package/esm/input-number/index.mjs +9 -7
- package/esm/input-number/index.mjs.map +1 -1
- package/esm/pagination/components/jumper.mjs.map +1 -1
- package/esm/pagination/components/next.mjs.map +1 -1
- package/esm/pagination/components/pager.mjs.map +1 -1
- package/esm/pagination/components/prev.mjs.map +1 -1
- package/esm/pagination/components/total.mjs.map +1 -1
- package/esm/pagination/pagination.mjs +109 -110
- package/esm/pagination/pagination.mjs.map +1 -1
- package/esm/password/index.mjs.map +1 -1
- package/esm/preview-text/index.mjs +35 -32
- package/esm/preview-text/index.mjs.map +1 -1
- package/esm/preview-text/utils.mjs.map +1 -1
- package/esm/radio/index.d.ts +344 -194
- package/esm/radio/index.mjs +28 -25
- package/esm/radio/index.mjs.map +1 -1
- package/esm/reset/index.d.ts +1 -62
- package/esm/reset/index.mjs +1 -1
- package/esm/reset/index.mjs.map +1 -1
- package/esm/select/index.mjs +23 -20
- package/esm/select/index.mjs.map +1 -1
- package/esm/select-table/index.d.ts +28 -0
- package/esm/select-table/index.mjs +59 -55
- package/esm/select-table/index.mjs.map +1 -1
- package/esm/select-table/select-table.d.ts +56 -0
- package/esm/submit/index.d.ts +1 -47
- package/esm/submit/index.mjs +1 -1
- package/esm/submit/index.mjs.map +1 -1
- package/esm/switch/index.d.ts +225 -189
- package/esm/switch/index.mjs.map +1 -1
- package/esm/time-picker/index.mjs +8 -6
- package/esm/time-picker/index.mjs.map +1 -1
- package/esm/time-select/index.d.ts +163 -103
- package/esm/time-select/index.mjs +8 -6
- package/esm/time-select/index.mjs.map +1 -1
- package/esm/transfer/index.d.ts +196 -115
- package/esm/transfer/index.mjs.map +1 -1
- package/esm/tree/index.mjs +43 -40
- package/esm/tree/index.mjs.map +1 -1
- package/esm/tree/utils.mjs.map +1 -1
- package/esm/tree-select/index.mjs +20 -17
- package/esm/tree-select/index.mjs.map +1 -1
- package/esm/upload/index.d.ts +404 -399
- package/esm/upload/index.mjs +9 -7
- package/esm/upload/index.mjs.map +1 -1
- package/esm/upload/upload.d.ts +800 -790
- package/esm/vendor/icon.mjs.map +1 -1
- package/esm/vendor/lodash.mjs +12 -20
- package/esm/vendor/lodash.mjs.map +1 -1
- package/esm/vendor/runtime.mjs +29 -24
- package/esm/vendor/runtime.mjs.map +1 -1
- package/esm/vendor/shared.esm-bundler.mjs +2 -2
- package/esm/vendor/sizes.mjs.map +1 -1
- package/esm/vendor/types.mjs +5 -5
- package/esm/vendor/types.mjs.map +1 -1
- package/package.json +113 -114
package/esm/editable/index.mjs
CHANGED
|
@@ -1,219 +1,219 @@
|
|
|
1
|
-
import { useField as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useField as E, connect as h, mapProps as w } from "@silver-formily/vue";
|
|
2
|
+
import { defineComponent as R, ref as m, createElementBlock as f, openBlock as d, normalizeClass as i, createVNode as u, unref as t, mergeProps as P, withCtx as n, withDirectives as z, createBlock as _, createElementVNode as C, createTextVNode as S, toDisplayString as V, renderSlot as T, computed as g, createCommentVNode as q, Fragment as I, nextTick as x } from "vue";
|
|
3
|
+
import { ElPopover as N, ElText as D, ClickOutside as A } from "element-plus";
|
|
4
|
+
import { reaction as M } from "@formily/reactive";
|
|
5
|
+
import "@formily/core";
|
|
6
|
+
import "@silver-formily/reactive-vue";
|
|
7
|
+
import { composeExport as j } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { FormBaseItem as c, fieldFeedbackMapper as F } from "../form-item/index.mjs";
|
|
9
|
+
import { Edit as L, Close as G } from "@element-plus/icons-vue";
|
|
10
|
+
import { isValid as $, isPlainObj as H } from "@formily/shared";
|
|
11
|
+
import { stylePrefix as W } from "../__builtins__/configs/index.mjs";
|
|
9
12
|
import { o as k } from "../vendor/lodash.mjs";
|
|
10
|
-
import
|
|
11
|
-
import '../styles/editable/index.css';const J = /* @__PURE__ */ z({
|
|
13
|
+
import '../styles/editable/index.css';const J = /* @__PURE__ */ R({
|
|
12
14
|
name: "FEditablePopover",
|
|
13
15
|
inheritAttrs: !1,
|
|
14
16
|
__name: "editable-popover",
|
|
15
17
|
props: {
|
|
16
|
-
label:
|
|
17
|
-
for:
|
|
18
|
-
tooltip:
|
|
19
|
-
addonBefore:
|
|
20
|
-
addonAfter:
|
|
21
|
-
extra:
|
|
22
|
-
feedbackText:
|
|
23
|
-
feedbackStatus:
|
|
18
|
+
label: {},
|
|
19
|
+
for: {},
|
|
20
|
+
tooltip: {},
|
|
21
|
+
addonBefore: {},
|
|
22
|
+
addonAfter: {},
|
|
23
|
+
extra: {},
|
|
24
|
+
feedbackText: {},
|
|
25
|
+
feedbackStatus: {},
|
|
24
26
|
asterisk: { type: Boolean },
|
|
25
27
|
colon: { type: Boolean },
|
|
26
|
-
labelAlign:
|
|
27
|
-
wrapperAlign:
|
|
28
|
+
labelAlign: {},
|
|
29
|
+
wrapperAlign: {},
|
|
28
30
|
labelWrap: { type: Boolean },
|
|
29
|
-
labelWidth:
|
|
30
|
-
wrapperWidth:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
wrapperCol: null,
|
|
31
|
+
labelWidth: {},
|
|
32
|
+
wrapperWidth: {},
|
|
33
|
+
labelCol: {},
|
|
34
|
+
wrapperCol: {},
|
|
34
35
|
fullness: { type: Boolean },
|
|
35
36
|
size: { default: "default" },
|
|
36
|
-
layout:
|
|
37
|
+
layout: {},
|
|
37
38
|
feedbackLayout: { default: "popover" },
|
|
38
|
-
tooltipLayout:
|
|
39
|
+
tooltipLayout: {}
|
|
39
40
|
},
|
|
40
41
|
setup(b) {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
42
|
+
const a = b, e = E(), r = `${W}-editable`, s = m(), l = m(!1);
|
|
43
|
+
if ($(e.value.data)) {
|
|
43
44
|
/* istanbul ignore else -- @preserve */
|
|
44
|
-
|
|
45
|
+
$(e.value.data.readPretty) || (e.value.data.readPretty = !0);
|
|
45
46
|
} else
|
|
46
47
|
e.value.data = {}, e.value.data.readPretty = !0;
|
|
47
|
-
function
|
|
48
|
-
const p =
|
|
48
|
+
function v(o) {
|
|
49
|
+
const p = s.value.parentElement;
|
|
49
50
|
/* istanbul ignore else -- @preserve */
|
|
50
|
-
p.contains(
|
|
51
|
+
p.contains(o.target) || (l.value = !1);
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
53
|
+
function y() {
|
|
54
|
+
l.value = !0;
|
|
54
55
|
}
|
|
55
|
-
return
|
|
56
|
+
return M(
|
|
56
57
|
() => e.value.form.queryFeedbacks({
|
|
57
58
|
type: "error",
|
|
58
59
|
address: `${e.value.address.entire}.*`
|
|
59
60
|
}),
|
|
60
|
-
(
|
|
61
|
-
|
|
61
|
+
(o) => {
|
|
62
|
+
o.length > 0 && (l.value = !0);
|
|
62
63
|
}
|
|
63
|
-
), (
|
|
64
|
-
class:
|
|
64
|
+
), (o, p) => (d(), f("div", {
|
|
65
|
+
class: i(r)
|
|
65
66
|
}, [
|
|
66
|
-
|
|
67
|
-
visible:
|
|
68
|
-
title:
|
|
67
|
+
u(t(N), P(o.$attrs, {
|
|
68
|
+
visible: l.value,
|
|
69
|
+
title: o.$attrs.title || t(e).title,
|
|
69
70
|
trigger: "click",
|
|
70
71
|
width: "auto"
|
|
71
72
|
}), {
|
|
72
|
-
default:
|
|
73
|
+
default: n(() => [
|
|
73
74
|
C("div", {
|
|
74
75
|
ref_key: "contentRef",
|
|
75
|
-
ref:
|
|
76
|
-
class:
|
|
76
|
+
ref: s,
|
|
77
|
+
class: i(`${r}-popover-wrapper`)
|
|
77
78
|
}, [
|
|
78
|
-
|
|
79
|
+
T(o.$slots, "default")
|
|
79
80
|
], 2)
|
|
80
81
|
]),
|
|
81
|
-
reference:
|
|
82
|
-
|
|
82
|
+
reference: n(() => [
|
|
83
|
+
z((d(), _(t(c), P(a, {
|
|
83
84
|
class: `${r}-trigger`
|
|
84
85
|
}), {
|
|
85
|
-
default:
|
|
86
|
+
default: n(() => [
|
|
86
87
|
C("div", {
|
|
87
|
-
class:
|
|
88
|
-
onClick:
|
|
88
|
+
class: i(`${r}-content`),
|
|
89
|
+
onClick: y
|
|
89
90
|
}, [
|
|
90
|
-
|
|
91
|
-
default:
|
|
91
|
+
u(t(D), null, {
|
|
92
|
+
default: n(() => [
|
|
92
93
|
S(V(t(e).title), 1)
|
|
93
94
|
]),
|
|
94
95
|
_: 1
|
|
95
96
|
}),
|
|
96
|
-
|
|
97
|
-
class:
|
|
97
|
+
u(t(L), {
|
|
98
|
+
class: i(`${r}-edit-btn`)
|
|
98
99
|
}, null, 8, ["class"])
|
|
99
100
|
], 2)
|
|
100
101
|
]),
|
|
101
102
|
_: 1
|
|
102
103
|
}, 16, ["class"])), [
|
|
103
|
-
[t(
|
|
104
|
+
[t(A), v]
|
|
104
105
|
])
|
|
105
106
|
]),
|
|
106
107
|
_: 3
|
|
107
108
|
}, 16, ["visible", "title"])
|
|
108
109
|
]));
|
|
109
110
|
}
|
|
110
|
-
}), K = /* @__PURE__ */
|
|
111
|
+
}), K = /* @__PURE__ */ R({
|
|
111
112
|
name: "FEditable",
|
|
112
113
|
__name: "editable",
|
|
113
114
|
props: {
|
|
114
|
-
label:
|
|
115
|
-
for:
|
|
116
|
-
tooltip:
|
|
117
|
-
addonBefore:
|
|
118
|
-
addonAfter:
|
|
119
|
-
extra:
|
|
120
|
-
feedbackText:
|
|
121
|
-
feedbackStatus:
|
|
115
|
+
label: {},
|
|
116
|
+
for: {},
|
|
117
|
+
tooltip: {},
|
|
118
|
+
addonBefore: {},
|
|
119
|
+
addonAfter: {},
|
|
120
|
+
extra: {},
|
|
121
|
+
feedbackText: {},
|
|
122
|
+
feedbackStatus: {},
|
|
122
123
|
asterisk: { type: Boolean },
|
|
123
124
|
colon: { type: Boolean },
|
|
124
|
-
labelAlign:
|
|
125
|
-
wrapperAlign:
|
|
125
|
+
labelAlign: {},
|
|
126
|
+
wrapperAlign: {},
|
|
126
127
|
labelWrap: { type: Boolean },
|
|
127
|
-
labelWidth:
|
|
128
|
-
wrapperWidth:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
wrapperCol: null,
|
|
128
|
+
labelWidth: {},
|
|
129
|
+
wrapperWidth: {},
|
|
130
|
+
labelCol: {},
|
|
131
|
+
wrapperCol: {},
|
|
132
132
|
fullness: { type: Boolean },
|
|
133
133
|
size: { default: "default" },
|
|
134
|
-
layout:
|
|
134
|
+
layout: {},
|
|
135
135
|
feedbackLayout: { default: "popover" },
|
|
136
|
-
tooltipLayout:
|
|
137
|
-
editProps:
|
|
136
|
+
tooltipLayout: {},
|
|
137
|
+
editProps: {}
|
|
138
138
|
},
|
|
139
139
|
setup(b) {
|
|
140
|
-
const
|
|
141
|
-
function
|
|
142
|
-
|
|
140
|
+
const a = b, e = E(), r = m(null), s = `${W}-editable`, l = m(null), v = g(() => k(a, "editProps")), y = g(() => H(a.editProps) ? { ...k(a, "editProps"), ...a.editProps } : k(a, "editProps"));
|
|
141
|
+
function o() {
|
|
142
|
+
$(e.value.data) || (e.value.data = {});
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
o(), e.value.data.readPretty = !0;
|
|
145
145
|
async function p() {
|
|
146
|
-
e.value.disabled || (
|
|
146
|
+
e.value.disabled || (o(), e.value.data.readPretty = !1, await x(), l.value.feedbackTooltipRef.updatePopper(), r.value?.querySelector("input")?.focus());
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
e.value.data?.readPretty !== !0 && (
|
|
150
|
-
e.value.data.readPretty = !0, await
|
|
148
|
+
function B() {
|
|
149
|
+
e.value.data?.readPretty !== !0 && (o(), setTimeout(async () => {
|
|
150
|
+
e.value.data.readPretty = !0, await x(), l.value?.feedbackTooltipRef.updatePopper();
|
|
151
151
|
}, 0));
|
|
152
152
|
}
|
|
153
|
-
return (O, X) => (
|
|
153
|
+
return (O, X) => (d(), f("div", {
|
|
154
154
|
ref_key: "innerRef",
|
|
155
155
|
ref: r,
|
|
156
|
-
class:
|
|
156
|
+
class: i([s, t(e).disabled && "is-disabled"])
|
|
157
157
|
}, [
|
|
158
|
-
|
|
159
|
-
class:
|
|
158
|
+
z((d(), f("div", {
|
|
159
|
+
class: i(`${s}-content`)
|
|
160
160
|
}, [
|
|
161
|
-
|
|
161
|
+
u(t(c), P({
|
|
162
162
|
ref_key: "formItemRef",
|
|
163
|
-
ref:
|
|
164
|
-
}, t(e).data?.readPretty === !1 ?
|
|
165
|
-
default:
|
|
163
|
+
ref: l
|
|
164
|
+
}, t(e).data?.readPretty === !1 ? y.value : v.value, { onClick: p }), {
|
|
165
|
+
default: n(() => [
|
|
166
166
|
C("div", null, [
|
|
167
|
-
|
|
167
|
+
T(O.$slots, "default")
|
|
168
168
|
])
|
|
169
169
|
]),
|
|
170
170
|
_: 3
|
|
171
171
|
}, 16),
|
|
172
|
-
t(e).disabled ? q("", !0) : (
|
|
173
|
-
t(e).data?.readPretty === !0 ? (
|
|
172
|
+
t(e).disabled ? q("", !0) : (d(), f(I, { key: 0 }, [
|
|
173
|
+
t(e).data?.readPretty === !0 ? (d(), _(t(c), {
|
|
174
174
|
key: 0,
|
|
175
|
-
size:
|
|
176
|
-
"feedback-layout":
|
|
175
|
+
size: a.size,
|
|
176
|
+
"feedback-layout": a.feedbackLayout
|
|
177
177
|
}, {
|
|
178
|
-
default:
|
|
179
|
-
|
|
180
|
-
class:
|
|
178
|
+
default: n(() => [
|
|
179
|
+
u(t(L), {
|
|
180
|
+
class: i(`${s}-edit-btn`),
|
|
181
181
|
onClick: p
|
|
182
182
|
}, null, 8, ["class"])
|
|
183
183
|
]),
|
|
184
184
|
_: 1
|
|
185
|
-
}, 8, ["size", "feedback-layout"])) : (
|
|
185
|
+
}, 8, ["size", "feedback-layout"])) : (d(), _(t(c), {
|
|
186
186
|
key: 1,
|
|
187
|
-
size:
|
|
188
|
-
"feedback-layout":
|
|
187
|
+
size: a.size,
|
|
188
|
+
"feedback-layout": a.feedbackLayout
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
192
|
-
class:
|
|
193
|
-
onClick:
|
|
190
|
+
default: n(() => [
|
|
191
|
+
u(t(G), {
|
|
192
|
+
class: i(`${s}-close-btn`),
|
|
193
|
+
onClick: B
|
|
194
194
|
}, null, 8, ["class"])
|
|
195
195
|
]),
|
|
196
196
|
_: 1
|
|
197
197
|
}, 8, ["size", "feedback-layout"]))
|
|
198
198
|
], 64))
|
|
199
199
|
], 2)), [
|
|
200
|
-
[t(
|
|
200
|
+
[t(A), B]
|
|
201
201
|
])
|
|
202
202
|
], 2));
|
|
203
203
|
}
|
|
204
|
-
}), Q =
|
|
204
|
+
}), Q = h(K, w(
|
|
205
205
|
{
|
|
206
206
|
required: !0,
|
|
207
207
|
description: "extra"
|
|
208
208
|
},
|
|
209
|
-
|
|
210
|
-
)), U =
|
|
209
|
+
F
|
|
210
|
+
)), U = h(J, w(
|
|
211
211
|
{
|
|
212
212
|
required: !0,
|
|
213
213
|
description: "extra"
|
|
214
214
|
},
|
|
215
|
-
|
|
216
|
-
)), ue =
|
|
215
|
+
F
|
|
216
|
+
)), ue = j(Q, {
|
|
217
217
|
Popover: U
|
|
218
218
|
});
|
|
219
219
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/editable/editable-popover.vue","../../src/editable/editable.vue","../../src/editable/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\r\nimport type { Field } from '@formily/core'\r\nimport type { IFormItemProps } from '../form-item/types'\r\nimport { Edit } from '@element-plus/icons-vue'\r\nimport { reaction } from '@formily/reactive'\r\nimport { isValid } from '@formily/shared'\r\nimport { useField } from '@silver-formily/vue'\r\nimport { ElPopover, ElText, ClickOutside as vClickOutside } from 'element-plus'\r\nimport { ref } from 'vue'\r\nimport { stylePrefix } from '../__builtins__/configs'\r\nimport { FormBaseItem } from '../form-item'\r\n\r\ndefineOptions({\r\n name: 'FEditablePopover',\r\n inheritAttrs: false,\r\n})\r\n\r\nconst props = defineProps({\n label: null,\n for: null,\n tooltip: null,\n addonBefore: null,\n addonAfter: null,\n extra: null,\n feedbackText: null,\n feedbackStatus: null,\n asterisk: { type: Boolean },\n colon: { type: Boolean },\n labelAlign: null,\n wrapperAlign: null,\n labelWrap: { type: Boolean },\n labelWidth: null,\n wrapperWidth: null,\n wrapperWrap: { type: Boolean },\n labelCol: null,\n wrapperCol: null,\n fullness: { type: Boolean },\n size: { default: 'default' },\n layout: null,\n feedbackLayout: { default: 'popover' },\n tooltipLayout: null\n})\r\n\r\nconst fieldRef = useField<Field>()\r\nconst prefixCls = `${stylePrefix}-editable`\r\nconst contentRef = ref<HTMLElement>()\r\nconst visible = ref(false)\r\n\r\nif (isValid(fieldRef.value.data)) {\r\n /* istanbul ignore else -- @preserve */\r\n if (!isValid(fieldRef.value.data.readPretty)) {\r\n fieldRef.value.data.readPretty = true\r\n }\r\n}\r\nelse {\r\n fieldRef.value.data = {}\r\n fieldRef.value.data.readPretty = true\r\n}\r\n\r\nfunction onClickOutside(e) {\r\n const popoverDOM = contentRef.value.parentElement\r\n /* istanbul ignore else -- @preserve */\r\n if (!popoverDOM.contains(e.target)) {\r\n visible.value = false\r\n }\r\n}\r\nfunction onClick() {\r\n visible.value = true\r\n}\r\n\r\nreaction(\r\n () => fieldRef.value.form.queryFeedbacks({\r\n type: 'error',\r\n address: `${fieldRef.value.address.entire}.*`,\r\n }),\r\n (errorList) => {\r\n if (errorList.length > 0) {\r\n visible.value = true\r\n }\r\n },\r\n)\r\n</script>\r\n\r\n<template>\r\n <div :class=\"prefixCls\">\r\n <ElPopover\r\n v-bind=\"$attrs\"\r\n :visible=\"visible\"\r\n :title=\"$attrs.title || fieldRef.title\" trigger=\"click\" width=\"auto\"\r\n >\r\n <template #default>\r\n <div ref=\"contentRef\" :class=\"`${prefixCls}-popover-wrapper`\">\r\n <slot />\r\n </div>\r\n </template>\r\n <template #reference>\r\n <FormBaseItem v-click-outside=\"onClickOutside\" v-bind=\"props\" :class=\"`${prefixCls}-trigger`\">\r\n <div :class=\"`${prefixCls}-content`\" @click=\"onClick\">\r\n <ElText>\r\n {{ fieldRef.title }}\r\n </ElText>\r\n <Edit :class=\"`${prefixCls}-edit-btn`\" />\r\n </div>\r\n </FormBaseItem>\r\n </template>\r\n </ElPopover>\r\n </div>\r\n</template>\r\n","<script lang=\"ts\" setup>\r\nimport type { Field } from '@formily/core'\r\nimport type { IFormItemProps } from '../form-item/types'\r\nimport { Close, Edit } from '@element-plus/icons-vue'\r\nimport { isPlainObj, isValid } from '@formily/shared'\r\nimport { useField } from '@silver-formily/vue'\r\nimport { ClickOutside as vClickOutside } from 'element-plus'\r\nimport { omit } from 'lodash-es'\r\nimport { computed, nextTick, ref } from 'vue'\r\nimport { stylePrefix } from '../__builtins__/configs'\r\nimport { FormBaseItem } from '../form-item'\r\n\r\ndefineOptions({\r\n name: 'FEditable',\r\n})\r\n\r\nconst props = defineProps({\n label: null,\n for: null,\n tooltip: null,\n addonBefore: null,\n addonAfter: null,\n extra: null,\n feedbackText: null,\n feedbackStatus: null,\n asterisk: { type: Boolean },\n colon: { type: Boolean },\n labelAlign: null,\n wrapperAlign: null,\n labelWrap: { type: Boolean },\n labelWidth: null,\n wrapperWidth: null,\n wrapperWrap: { type: Boolean },\n labelCol: null,\n wrapperCol: null,\n fullness: { type: Boolean },\n size: { default: 'default' },\n layout: null,\n feedbackLayout: { default: 'popover' },\n tooltipLayout: null,\n editProps: null\n})\r\n\r\nconst fieldRef = useField<Field>()\r\nconst innerRef = ref<HTMLElement>(null)\r\nconst prefixCls = `${stylePrefix}-editable`\r\nconst formItemRef = ref<InstanceType<typeof FormBaseItem>>(null)\r\n\r\nconst commonProps = computed(() => omit(props, 'editProps'))\r\nconst editProps = computed(() => {\r\n if (isPlainObj(props.editProps)) {\r\n return { ...omit(props, 'editProps'), ...props.editProps }\r\n }\r\n return omit(props, 'editProps')\r\n})\r\n\r\nfunction handleEnsureReadPretty() {\r\n if (!isValid(fieldRef.value.data)) {\r\n fieldRef.value.data = {}\r\n }\r\n}\r\n\r\nhandleEnsureReadPretty()\r\nfieldRef.value.data.readPretty = true\r\n\r\nasync function onClick() {\r\n if (fieldRef.value.disabled)\r\n return\r\n handleEnsureReadPretty()\r\n fieldRef.value.data.readPretty = false\r\n await nextTick()\r\n formItemRef.value.feedbackTooltipRef.updatePopper()\r\n innerRef.value?.querySelector('input')?.focus()\r\n}\r\n\r\nfunction onClickOutside() {\r\n if (fieldRef.value.data?.readPretty === true)\r\n return\r\n handleEnsureReadPretty()\r\n // 使用下拉菜单等触发的事件完成应有的操作\r\n setTimeout(async () => {\r\n fieldRef.value.data.readPretty = true\r\n await nextTick()\r\n formItemRef.value?.feedbackTooltipRef.updatePopper()\r\n }, 0)\r\n}\r\n</script>\r\n\r\n<template>\r\n <div ref=\"innerRef\" :class=\"[prefixCls, fieldRef.disabled && 'is-disabled']\">\r\n <div v-click-outside=\"onClickOutside\" :class=\"`${prefixCls}-content`\">\r\n <FormBaseItem ref=\"formItemRef\" v-bind=\"fieldRef.data?.readPretty === false ? editProps : commonProps\" @click=\"onClick\">\r\n <div>\r\n <slot />\r\n </div>\r\n </FormBaseItem>\r\n <template v-if=\"!fieldRef.disabled\">\r\n <template v-if=\"fieldRef.data?.readPretty === true\">\r\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\r\n <Edit :class=\"`${prefixCls}-edit-btn`\" @click=\"onClick\" />\r\n </FormBaseItem>\r\n </template>\r\n <template v-else>\r\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\r\n <Close :class=\"`${prefixCls}-close-btn`\" @click=\"onClickOutside\" />\r\n </FormBaseItem>\r\n </template>\r\n </template>\r\n </div>\r\n </div>\r\n</template>\r\n","import type { ElPopover } from 'element-plus'\r\nimport type { IFormItemProps } from '../form-item/types'\r\nimport { connect, mapProps } from '@silver-formily/vue'\r\nimport { composeExport } from '../__builtins__/shared'\r\nimport { fieldFeedbackMapper } from '../form-item'\r\nimport FEditablePopover from './editable-popover.vue'\r\nimport FEditable from './editable.vue'\r\nimport './style.scss'\r\n\r\nexport type EditableProps = IFormItemProps\r\nexport type EditablePopoverProps = typeof ElPopover\r\n\r\nconst EditableInner = connect(FEditable, mapProps(\r\n {\r\n required: true,\r\n description: 'extra',\r\n },\r\n fieldFeedbackMapper,\r\n))\r\n\r\nconst EditablePopover = connect(FEditablePopover, mapProps(\r\n {\r\n required: true,\r\n description: 'extra',\r\n },\r\n fieldFeedbackMapper,\r\n))\r\n\r\nexport const Editable = composeExport(EditableInner, {\r\n Popover: EditablePopover,\r\n})\r\n\r\nexport default Editable\r\n"],"names":["props","__props","fieldRef","useField","prefixCls","stylePrefix","contentRef","ref","visible","isValid","onClickOutside","e","popoverDOM","onClick","reaction","errorList","_createElementBlock","_createVNode","_unref","ElPopover","_mergeProps","_ctx","$attrs","_createElementVNode","_renderSlot","_createBlock","FormBaseItem","ElText","_createTextVNode","_toDisplayString","Edit","innerRef","formItemRef","commonProps","computed","omit","editProps","isPlainObj","handleEnsureReadPretty","nextTick","_normalizeClass","_Fragment","Close","EditableInner","connect","FEditable","mapProps","fieldFeedbackMapper","EditablePopover","FEditablePopover","Editable","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,UA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nCA,CAAc;AAAA,MAAA;;;IC9ElCiC,IAAgBC,EAAQC,GAAWC;AAAA,EACvC;AAAA,IACE,UAAU;AAAA,IACV,aAAa;AAAA,EAAA;AAAA,EAEfC;AACF,CAAC,GAEKC,IAAkBJ,EAAQK,GAAkBH;AAAA,EAChD;AAAA,IACE,UAAU;AAAA,IACV,aAAa;AAAA,EAAA;AAAA,EAEfC;AACF,CAAC,GAEYG,KAAWC,EAAcR,GAAe;AAAA,EACnD,SAASK;AACX,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/editable/editable-popover.vue","../../src/editable/editable.vue","../../src/editable/index.ts"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Edit } from '@element-plus/icons-vue'\nimport { reaction } from '@formily/reactive'\nimport { isValid } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ElPopover, ElText, ClickOutside as vClickOutside } from 'element-plus'\nimport { ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditablePopover',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<IFormItemProps>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst prefixCls = `${stylePrefix}-editable`\nconst contentRef = ref<HTMLElement>()\nconst visible = ref(false)\n\nif (isValid(fieldRef.value.data)) {\n /* istanbul ignore else -- @preserve */\n if (!isValid(fieldRef.value.data.readPretty)) {\n fieldRef.value.data.readPretty = true\n }\n}\nelse {\n fieldRef.value.data = {}\n fieldRef.value.data.readPretty = true\n}\n\nfunction onClickOutside(e) {\n const popoverDOM = contentRef.value.parentElement\n /* istanbul ignore else -- @preserve */\n if (!popoverDOM.contains(e.target)) {\n visible.value = false\n }\n}\nfunction onClick() {\n visible.value = true\n}\n\nreaction(\n () => fieldRef.value.form.queryFeedbacks({\n type: 'error',\n address: `${fieldRef.value.address.entire}.*`,\n }),\n (errorList) => {\n if (errorList.length > 0) {\n visible.value = true\n }\n },\n)\n</script>\n\n<template>\n <div :class=\"prefixCls\">\n <ElPopover\n v-bind=\"$attrs\"\n :visible=\"visible\"\n :title=\"$attrs.title || fieldRef.title\" trigger=\"click\" width=\"auto\"\n >\n <template #default>\n <div ref=\"contentRef\" :class=\"`${prefixCls}-popover-wrapper`\">\n <slot />\n </div>\n </template>\n <template #reference>\n <FormBaseItem v-click-outside=\"onClickOutside\" v-bind=\"props\" :class=\"`${prefixCls}-trigger`\">\n <div :class=\"`${prefixCls}-content`\" @click=\"onClick\">\n <ElText>\n {{ fieldRef.title }}\n </ElText>\n <Edit :class=\"`${prefixCls}-edit-btn`\" />\n </div>\n </FormBaseItem>\n </template>\n </ElPopover>\n </div>\n</template>\n","<script lang=\"ts\" setup>\nimport type { Field } from '@formily/core'\nimport type { IFormItemProps } from '../form-item/types'\nimport { Close, Edit } from '@element-plus/icons-vue'\nimport { isPlainObj, isValid } from '@formily/shared'\nimport { useField } from '@silver-formily/vue'\nimport { ClickOutside as vClickOutside } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, nextTick, ref } from 'vue'\nimport { stylePrefix } from '../__builtins__/configs'\nimport { FormBaseItem } from '../form-item'\n\ndefineOptions({\n name: 'FEditable',\n})\n\nconst props = withDefaults(defineProps<IFormItemProps & { editProps?: IFormItemProps }>(), {\n feedbackLayout: 'popover',\n size: 'default',\n})\n\nconst fieldRef = useField<Field>()\nconst innerRef = ref<HTMLElement>(null)\nconst prefixCls = `${stylePrefix}-editable`\nconst formItemRef = ref<InstanceType<typeof FormBaseItem>>(null)\n\nconst commonProps = computed(() => omit(props, 'editProps'))\nconst editProps = computed(() => {\n if (isPlainObj(props.editProps)) {\n return { ...omit(props, 'editProps'), ...props.editProps }\n }\n return omit(props, 'editProps')\n})\n\nfunction handleEnsureReadPretty() {\n if (!isValid(fieldRef.value.data)) {\n fieldRef.value.data = {}\n }\n}\n\nhandleEnsureReadPretty()\nfieldRef.value.data.readPretty = true\n\nasync function onClick() {\n if (fieldRef.value.disabled)\n return\n handleEnsureReadPretty()\n fieldRef.value.data.readPretty = false\n await nextTick()\n formItemRef.value.feedbackTooltipRef.updatePopper()\n innerRef.value?.querySelector('input')?.focus()\n}\n\nfunction onClickOutside() {\n if (fieldRef.value.data?.readPretty === true)\n return\n handleEnsureReadPretty()\n // 使用下拉菜单等触发的事件完成应有的操作\n setTimeout(async () => {\n fieldRef.value.data.readPretty = true\n await nextTick()\n formItemRef.value?.feedbackTooltipRef.updatePopper()\n }, 0)\n}\n</script>\n\n<template>\n <div ref=\"innerRef\" :class=\"[prefixCls, fieldRef.disabled && 'is-disabled']\">\n <div v-click-outside=\"onClickOutside\" :class=\"`${prefixCls}-content`\">\n <FormBaseItem ref=\"formItemRef\" v-bind=\"fieldRef.data?.readPretty === false ? editProps : commonProps\" @click=\"onClick\">\n <div>\n <slot />\n </div>\n </FormBaseItem>\n <template v-if=\"!fieldRef.disabled\">\n <template v-if=\"fieldRef.data?.readPretty === true\">\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Edit :class=\"`${prefixCls}-edit-btn`\" @click=\"onClick\" />\n </FormBaseItem>\n </template>\n <template v-else>\n <FormBaseItem :size=\"props.size\" :feedback-layout=\"props.feedbackLayout\">\n <Close :class=\"`${prefixCls}-close-btn`\" @click=\"onClickOutside\" />\n </FormBaseItem>\n </template>\n </template>\n </div>\n </div>\n</template>\n","import type { ElPopover } from 'element-plus'\nimport type { IFormItemProps } from '../form-item/types'\nimport { connect, mapProps } from '@silver-formily/vue'\nimport { composeExport } from '../__builtins__/shared'\nimport { fieldFeedbackMapper } from '../form-item'\nimport FEditablePopover from './editable-popover.vue'\nimport FEditable from './editable.vue'\nimport './style.scss'\n\nexport type EditableProps = IFormItemProps\nexport type EditablePopoverProps = typeof ElPopover\n\nconst EditableInner = connect<typeof FEditable>(FEditable, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nconst EditablePopover = connect<typeof FEditablePopover>(FEditablePopover, mapProps(\n {\n required: true,\n description: 'extra',\n },\n fieldFeedbackMapper,\n))\n\nexport const Editable = composeExport(EditableInner, {\n Popover: EditablePopover,\n})\n\nexport default Editable\n"],"names":["props","__props","fieldRef","useField","prefixCls","stylePrefix","contentRef","ref","visible","isValid","onClickOutside","e","popoverDOM","onClick","reaction","errorList","_createElementBlock","_createVNode","_unref","ElPopover","_mergeProps","_ctx","$attrs","_createElementVNode","_renderSlot","_createBlock","FormBaseItem","ElText","_createTextVNode","_toDisplayString","Edit","innerRef","formItemRef","commonProps","computed","omit","editProps","isPlainObj","handleEnsureReadPretty","nextTick","_normalizeClass","_Fragment","Close","EditableInner","connect","FEditable","mapProps","fieldFeedbackMapper","EditablePopover","FEditablePopover","Editable","composeExport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAMA,IAAQC,GAKRC,IAAWC,EAAA,GACXC,IAAY,GAAGC,CAAW,aAC1BC,IAAaC,EAAA,GACbC,IAAUD,EAAI,EAAK;AAEzB,QAAIE,EAAQP,EAAS,MAAM,IAAI,GAAG;AAAA,MAAA;AAEhC,MAAKO,EAAQP,EAAS,MAAM,KAAK,UAAU,MACzCA,EAAS,MAAM,KAAK,aAAa;AAAA,IAErC;AAEE,MAAAA,EAAS,MAAM,OAAO,CAAA,GACtBA,EAAS,MAAM,KAAK,aAAa;AAGnC,aAASQ,EAAeC,GAAG;AACzB,YAAMC,IAAaN,EAAW,MAAM;AAAA,MAAA;AAEpC,MAAKM,EAAW,SAASD,EAAE,MAAM,MAC/BH,EAAQ,QAAQ;AAAA,IAEpB;AACA,aAASK,IAAU;AACjB,MAAAL,EAAQ,QAAQ;AAAA,IAClB;AAEA,WAAAM;AAAA,MACE,MAAMZ,EAAS,MAAM,KAAK,eAAe;AAAA,QACvC,MAAM;AAAA,QACN,SAAS,GAA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A,SAAA;AAAA,YAAA;;;;QAGKH,EAAAhB,CAAA,EAAS,6BAA1Bc,EAWWyB,GAAA,EAAA,KAAA,KAAA;AAAA,UAVOvB,EAAAhB,CAAA,EAAS,MAAM,eAAU,WACvCuB,EAEeP,EAAAQ,CAAA,GAAA;AAAA;YAFA,MAAM1B,EAAM;AAAA,YAAO,mBAAiBA,EAAM;AAAA,UAAA;uBACvD,MAA0D;AAAA,cAA1DiB,EAA0DC,EAAAY,CAAA,GAAA;AAAA,gBAAnD,YAAU1B,CAAS,WAAA;AAAA,gBAAc,SAAAS;AAAA,cAAA;;;sDAI1CY,EAEeP,EAAAQ,CAAA,GAAA;AAAA;YAFA,MAAM1B,EAAM;AAAA,YAAO,mBAAiBA,EAAM;AAAA,UAAA;uBACvD,MAAmE;AAAA,cAAnEiB,EAAmEC,EAAAwB,CAAA,GAAA;AAAA,gBAA3D,YAAUtC,CAAS,YAAA;AAAA,gBAAe,SAAOM;AAAA,cAAA;;;;;;eAdnCA,CAAc;AAAA,MAAA;;;ICxDlCiC,IAAgBC,EAA0BC,GAAWC;AAAA,EACzD;AAAA,IACE,UAAU;AAAA,IACV,aAAa;AAAA,EAAA;AAAA,EAEfC;AACF,CAAC,GAEKC,IAAkBJ,EAAiCK,GAAkBH;AAAA,EACzE;AAAA,IACE,UAAU;AAAA,IACV,aAAa;AAAA,EAAA;AAAA,EAEfC;AACF,CAAC,GAEYG,KAAWC,EAAcR,GAAe;AAAA,EACnD,SAASK;AACX,CAAC;"}
|
package/esm/form/form.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as h, createBlock as f, createCommentVNode as S, openBlock as p, unref as t, withCtx as i, createVNode as n, mergeProps as d, renderSlot as s, withModifiers as F } from "vue";
|
|
2
2
|
import { useForm as v, FormProvider as w } from "@silver-formily/vue";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { _ as c } from "../form-layout/form-layout.mjs";
|
|
4
|
+
import { PreviewText as b } from "../preview-text/index.mjs";
|
|
5
5
|
const $ = /* @__PURE__ */ h({
|
|
6
6
|
name: "FForm",
|
|
7
7
|
inheritAttrs: !1,
|
|
@@ -30,11 +30,11 @@ const $ = /* @__PURE__ */ h({
|
|
|
30
30
|
form: o.form
|
|
31
31
|
}, {
|
|
32
32
|
default: i(() => [
|
|
33
|
-
n(t(
|
|
33
|
+
n(t(b), {
|
|
34
34
|
placeholder: o.previewTextPlaceholder
|
|
35
35
|
}, {
|
|
36
36
|
default: i(() => [
|
|
37
|
-
n(t(
|
|
37
|
+
n(t(c), d(m.$attrs, {
|
|
38
38
|
onSubmit: r[0] || (r[0] = (e) => a(e, l.form))
|
|
39
39
|
}), {
|
|
40
40
|
default: i(() => [
|
|
@@ -47,12 +47,12 @@ const $ = /* @__PURE__ */ h({
|
|
|
47
47
|
}, 8, ["placeholder"])
|
|
48
48
|
]),
|
|
49
49
|
_: 3
|
|
50
|
-
}, 8, ["form"])) : t(u) ? (p(), f(t(
|
|
50
|
+
}, 8, ["form"])) : t(u) ? (p(), f(t(b), {
|
|
51
51
|
key: 1,
|
|
52
52
|
placeholder: o.previewTextPlaceholder
|
|
53
53
|
}, {
|
|
54
54
|
default: i(() => [
|
|
55
|
-
n(t(
|
|
55
|
+
n(t(c), d(m.$attrs, {
|
|
56
56
|
onSubmit: r[1] || (r[1] = F((e) => a(e, t(u)), ["prevent", "stop"]))
|
|
57
57
|
}), {
|
|
58
58
|
default: i(() => [
|
package/esm/form/form.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.mjs","sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\
|
|
1
|
+
{"version":3,"file":"form.mjs","sources":["../../src/form/form.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { Form as FormType, IFormFeedback } from '@formily/core'\nimport type { PropType } from 'vue'\nimport { FormProvider, useForm } from '@silver-formily/vue'\nimport { FormLayout } from '../form-layout'\nimport { PreviewText } from '../preview-text'\n\ndefineOptions({\n name: 'FForm',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n form: {\n type: Object as PropType<FormType>,\n },\n previewTextPlaceholder: {\n type: String,\n },\n onAutoSubmit: {\n type: Function as PropType<(values: FormType['values']) => Promise<any>>,\n },\n onAutoSubmitFailed: {\n type: Function as PropType<(error: IFormFeedback[]) => void>,\n },\n})\n\nconst top = useForm()\n\nfunction handleSubmit(e: Event, form: FormType) {\n form\n .submit(values => props.onAutoSubmit?.(values))\n .catch(error => props.onAutoSubmitFailed?.(error))\n}\n</script>\n\n<template>\n <FormProvider v-if=\"props.form\" :form=\"props.form\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout v-bind=\"$attrs\" @submit=\"(e) => handleSubmit(e, form)\">\n <slot />\n </FormLayout>\n </PreviewText>\n </FormProvider>\n <template v-else-if=\"top\">\n <PreviewText :placeholder=\"props.previewTextPlaceholder\">\n <FormLayout\n v-bind=\"$attrs\"\n @submit.prevent.stop=\"(e) => handleSubmit(e, top)\"\n >\n <slot />\n </FormLayout>\n </PreviewText>\n </template>\n</template>\n"],"names":["props","__props","top","useForm","handleSubmit","e","form","values","error","_createBlock","_unref","FormProvider","_createVNode","PreviewText","FormLayout","_mergeProps","_ctx","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAeRC,IAAMC,EAAA;AAEZ,aAASC,EAAaC,GAAUC,GAAgB;AAC9C,MAAAA,EACG,OAAO,CAAAC,MAAUP,EAAM,eAAeO,CAAM,CAAC,EAC7C,MAAM,CAAAC,MAASR,EAAM,qBAAqBQ,CAAK,CAAC;AAAA,IACrD;qBAIsBR,EAAM,aAA1BS,EAMeC,EAAAC,CAAA,GAAA;AAAA;MANkB,MAAMX,EAAM;AAAA,IAAA;iBAC3C,MAIc;AAAA,QAJdY,EAIcF,EAAAG,CAAA,GAAA;AAAA,UAJA,aAAab,EAAM;AAAA,QAAA;qBAC/B,MAEa;AAAA,YAFbY,EAEaF,EAAAI,CAAA,GAFbC,EAEaC,EAAA,QAFa;AAAA,cAAG,2BAAS,MAAMZ,EAAa,GAAGH,EAAA,IAAI;AAAA,YAAA;yBAC9D,MAAQ;AAAA,gBAARgB,EAAQD,EAAA,QAAA,SAAA;AAAA,cAAA;;;;;;;;uBAION,EAAAR,CAAA,UACnBO,EAOcC,EAAAG,CAAA,GAAA;AAAA;MAPA,aAAab,EAAM;AAAA,IAAA;iBAC/B,MAKa;AAAA,QALbY,EAKaF,EAAAI,CAAA,GALbC,EAKaC,EAAA,QAJG;AAAA,UACb,6BAAsB,MAAMZ,EAAa,GAAGM,EAAAR,CAAA,CAAG,GAAA,CAAA,WAAA,MAAA,CAAA;AAAA,QAAA;qBAEhD,MAAQ;AAAA,YAARe,EAAQD,EAAA,QAAA,SAAA;AAAA,UAAA;;;;;;;;"}
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as p, computed as g, createBlock as a, openBlock as l, unref as e, mergeProps as i, withCtx as r, renderSlot as n, createVNode as y } from "vue";
|
|
2
|
+
import { useAttrs as _, ElAffix as $, ElSpace as f } from "element-plus";
|
|
3
|
+
import "@formily/reactive";
|
|
4
|
+
import "@formily/core";
|
|
5
|
+
import "@silver-formily/reactive-vue";
|
|
6
|
+
import { useForm as v } from "@silver-formily/vue";
|
|
7
|
+
import { composeExport as F } from "../__builtins__/shared/utils.mjs";
|
|
8
|
+
import { useFormLayoutId as k } from "../form-layout/utils.mjs";
|
|
9
|
+
import { prefixCls as u } from "./utils.mjs";
|
|
10
|
+
import { FormItem as h } from "../form-item/index.mjs";
|
|
11
|
+
import '../styles/form-button-group/index.css';const b = /* @__PURE__ */ p({
|
|
8
12
|
__name: "form-button-group-sticky",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
return (
|
|
12
|
-
class: `${
|
|
13
|
-
}, t
|
|
14
|
-
position: t
|
|
15
|
-
target:
|
|
13
|
+
setup(m) {
|
|
14
|
+
const t = _(), o = v(), s = k(), c = g(() => t.value.target ? t.value.target : s.value ? `#${s.value}` : o.value?.id ? `#formily-${o.value.id}` : void 0);
|
|
15
|
+
return (d, B) => (l(), a(e($), i({
|
|
16
|
+
class: `${e(u)}__sticky`
|
|
17
|
+
}, e(t), {
|
|
18
|
+
position: e(t).position ?? "bottom",
|
|
19
|
+
target: c.value
|
|
16
20
|
}), {
|
|
17
21
|
default: r(() => [
|
|
18
|
-
n(
|
|
22
|
+
n(d.$slots, "default")
|
|
19
23
|
]),
|
|
20
24
|
_: 3
|
|
21
25
|
}, 16, ["class", "position", "target"]));
|
|
22
26
|
}
|
|
23
|
-
}),
|
|
27
|
+
}), x = /* @__PURE__ */ p({
|
|
24
28
|
name: "FFormButtonGroup",
|
|
25
29
|
inheritAttrs: !1,
|
|
26
30
|
__name: "form-button-group",
|
|
@@ -38,21 +42,21 @@ import '../styles/form-button-group/index.css';const k = /* @__PURE__ */ u({
|
|
|
38
42
|
default: !1
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
|
-
setup(
|
|
42
|
-
const
|
|
43
|
-
return (o,
|
|
45
|
+
setup(m) {
|
|
46
|
+
const t = m;
|
|
47
|
+
return (o, s) => t.alignFormItem ? (l(), a(e(h), i({
|
|
44
48
|
key: 0,
|
|
45
49
|
colon: !1,
|
|
46
50
|
label: " "
|
|
47
51
|
}, o.$attrs, {
|
|
48
|
-
class:
|
|
52
|
+
class: e(u),
|
|
49
53
|
style: {
|
|
50
54
|
width: "100%"
|
|
51
55
|
}
|
|
52
56
|
}), {
|
|
53
57
|
default: r(() => [
|
|
54
|
-
|
|
55
|
-
size:
|
|
58
|
+
y(e(f), {
|
|
59
|
+
size: t.gutter
|
|
56
60
|
}, {
|
|
57
61
|
default: r(() => [
|
|
58
62
|
n(o.$slots, "default")
|
|
@@ -61,13 +65,13 @@ import '../styles/form-button-group/index.css';const k = /* @__PURE__ */ u({
|
|
|
61
65
|
}, 8, ["size"])
|
|
62
66
|
]),
|
|
63
67
|
_: 3
|
|
64
|
-
}, 16, ["class"])) : (l(),
|
|
65
|
-
class:
|
|
68
|
+
}, 16, ["class"])) : (l(), a(e(f), i({ key: 1 }, o.$attrs, {
|
|
69
|
+
class: e(u),
|
|
66
70
|
style: {
|
|
67
|
-
justifyContent:
|
|
71
|
+
justifyContent: t.align === "left" ? "flex-start" : t.align === "right" ? "flex-end" : "center",
|
|
68
72
|
display: "flex"
|
|
69
73
|
},
|
|
70
|
-
size:
|
|
74
|
+
size: t.gutter
|
|
71
75
|
}), {
|
|
72
76
|
default: r(() => [
|
|
73
77
|
n(o.$slots, "default")
|
|
@@ -75,10 +79,10 @@ import '../styles/form-button-group/index.css';const k = /* @__PURE__ */ u({
|
|
|
75
79
|
_: 3
|
|
76
80
|
}, 16, ["class", "style", "size"]));
|
|
77
81
|
}
|
|
78
|
-
}),
|
|
79
|
-
Sticky:
|
|
82
|
+
}), j = F(x, {
|
|
83
|
+
Sticky: b
|
|
80
84
|
});
|
|
81
85
|
export {
|
|
82
|
-
|
|
86
|
+
j as FormButtonGroup
|
|
83
87
|
};
|
|
84
88
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/form-button-group/form-button-group-sticky.vue","../../src/form-button-group/form-button-group.vue","../../src/form-button-group/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/form-button-group/form-button-group-sticky.vue","../../src/form-button-group/form-button-group.vue","../../src/form-button-group/index.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { AffixProps } from 'element-plus'\nimport type { ComputedRef } from 'vue'\nimport { useForm } from '@silver-formily/vue'\nimport { ElAffix, useAttrs } from 'element-plus'\nimport { computed } from 'vue'\nimport { useFormLayoutId } from '../form-layout/utils'\nimport { prefixCls } from './utils'\n\nconst attrs = useAttrs() as ComputedRef<Partial<AffixProps>>\nconst formRef = useForm()\nconst formLayoutId = useFormLayoutId()\n\nconst target = computed(() => {\n if (attrs.value.target) {\n return attrs.value.target\n }\n if (formLayoutId.value) {\n return `#${formLayoutId.value}`\n }\n return formRef.value?.id ? `#formily-${formRef.value.id}` : undefined\n})\n</script>\n\n<template>\n <ElAffix\n :class=\"`${prefixCls}__sticky`\"\n v-bind=\"attrs\"\n :position=\"attrs.position ?? 'bottom'\"\n :target=\"target\"\n >\n <slot />\n </ElAffix>\n</template>\n","<script lang=\"ts\" setup>\nimport { ElSpace } from 'element-plus'\nimport FormItem from '../form-item/index'\nimport { prefixCls } from './utils'\n\ndefineOptions({\n name: 'FFormButtonGroup',\n inheritAttrs: false,\n})\n\nconst props = defineProps({\n align: {\n type: String,\n default: 'left',\n },\n gutter: {\n type: Number,\n default: 8,\n },\n alignFormItem: {\n type: Boolean,\n default: false,\n },\n})\n</script>\n\n<template>\n <FormItem\n v-if=\"props.alignFormItem\"\n :colon=\"false\"\n label=\" \"\n v-bind=\"$attrs\"\n :class=\"prefixCls\"\n :style=\"{\n width: '100%',\n }\"\n >\n <ElSpace :size=\"props.gutter\">\n <slot />\n </ElSpace>\n </FormItem>\n <ElSpace\n v-else\n v-bind=\"$attrs\"\n :class=\"prefixCls\"\n :style=\"{\n justifyContent: props.align === 'left'\n ? 'flex-start'\n : (props.align === 'right'\n ? 'flex-end'\n : 'center'),\n display: 'flex',\n }\"\n :size=\"props.gutter\"\n >\n <slot />\n </ElSpace>\n</template>\n","import { composeExport } from '../__builtins__/shared'\nimport FormButtonGroupSticky from './form-button-group-sticky.vue'\nimport FormButtonGroupInner from './form-button-group.vue'\nimport './style.scss'\n\nexport const FormButtonGroup = composeExport(FormButtonGroupInner, {\n Sticky: FormButtonGroupSticky,\n})\n"],"names":["attrs","useAttrs","formRef","useForm","formLayoutId","useFormLayoutId","target","computed","_openBlock","_createBlock","_unref","_mergeProps","prefixCls","_renderSlot","_ctx","props","__props","$attrs","_createVNode","ElSpace","FormButtonGroup","composeExport","FormButtonGroupInner","FormButtonGroupSticky"],"mappings":";;;;;;;;;;;;;AASA,UAAMA,IAAQC,EAAA,GACRC,IAAUC,EAAA,GACVC,IAAeC,EAAA,GAEfC,IAASC,EAAS,MAClBP,EAAM,MAAM,SACPA,EAAM,MAAM,SAEjBI,EAAa,QACR,IAAIA,EAAa,KAAK,KAExBF,EAAQ,OAAO,KAAK,YAAYA,EAAQ,MAAM,EAAE,KAAK,MAC7D;sBAICM,KAAAC,EAOUC,MAPVC,EAOU;AAAA,MANP,UAAUD,EAAAE,CAAA,CAAS;AAAA,IAAA,GACZF,EAAAV,CAAA,GAAK;AAAA,MACZ,UAAUU,EAAAV,CAAA,EAAM,YAAQ;AAAA,MACxB,QAAQM,EAAA;AAAA,IAAA;iBAET,MAAQ;AAAA,QAARO,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;ACrBZ,UAAMC,IAAQC;qBAkBJD,EAAM,iBADdP,EAAA,GAAAC,EAaWC,MAbXC,EAaW;AAAA;MAXR,OAAO;AAAA,MACR,OAAM;AAAA,IAAA,GACEM,EAAAA,QAAM;AAAA,MACb,OAAOP,EAAAE,CAAA;AAAA,MACP,OAAO;AAAA;;IAEP;iBAED,MAEU;AAAA,QAFVM,EAEUR,EAAAS,CAAA,GAAA;AAAA,UAFA,MAAMJ,EAAM;AAAA,QAAA;qBACpB,MAAQ;AAAA,YAARF,EAAQC,EAAA,QAAA,SAAA;AAAA,UAAA;;;;;+BAGZL,EAeUC,EAAAS,CAAA,GAfVR,EAeU,EAAA,KAAA,EAAA,GAbAM,EAAAA,QAAM;AAAA,MACb,OAAOP,EAAAE,CAAA;AAAA,MACP,OAAK;AAAA,QAA0B,gBAAAG,EAAM,UAAK,wBAA8CA,EAAM,UAAK;;;MAQnG,MAAMA,EAAM;AAAA,IAAA;iBAEb,MAAQ;AAAA,QAARF,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;IClDCM,IAAkBC,EAAcC,GAAsB;AAAA,EACjE,QAAQC;AACV,CAAC;"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { stylePrefix as o } from "../__builtins__/configs/index.mjs";
|
|
2
|
-
|
|
2
|
+
import "vue";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
import "@formily/reactive";
|
|
5
|
+
import "@formily/core";
|
|
6
|
+
import "@silver-formily/reactive-vue";
|
|
7
|
+
import "@silver-formily/vue";
|
|
8
|
+
const s = `${o}-form-button-group`;
|
|
3
9
|
export {
|
|
4
|
-
|
|
10
|
+
s as prefixCls
|
|
5
11
|
};
|
|
6
12
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../src/form-button-group/utils.ts"],"sourcesContent":["import { stylePrefix } from '../__builtins__'\
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/form-button-group/utils.ts"],"sourcesContent":["import { stylePrefix } from '../__builtins__'\n\nexport const prefixCls = `${stylePrefix}-form-button-group`\n"],"names":["prefixCls","stylePrefix"],"mappings":";;;;;;;AAEO,MAAMA,IAAY,GAAGC,CAAW;"}
|