@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta40
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/api/index.d.ts +60 -0
- package/api/index.mjs +42 -0
- package/awesome-button/index.d.ts +60 -0
- package/awesome-button/index.mjs +49 -0
- package/base.css +1 -0
- package/chunks/B1MSrc6f.mjs +8 -0
- package/chunks/B3ajWLh3.mjs +198 -0
- package/chunks/BH_JJ8Xh.mjs +106 -0
- package/chunks/BWBHzD5N.mjs +89 -0
- package/chunks/Bd1UFJic.mjs +660 -0
- package/chunks/Bm5eiSmT.mjs +79 -0
- package/chunks/BsCS7SB5.mjs +141 -0
- package/chunks/BufIRDd0.mjs +185 -0
- package/chunks/C1AgOUe_.mjs +172 -0
- package/chunks/C3Uo82-I.mjs +35 -0
- package/chunks/C9dGL28n.mjs +56 -0
- package/chunks/CFOGMFgo.mjs +150 -0
- package/chunks/CLPSCSsy.mjs +603 -0
- package/chunks/CSyJ-vEx.mjs +17 -0
- package/chunks/CTKmEf2M.mjs +93 -0
- package/chunks/CWfUPCtS.mjs +1360 -0
- package/chunks/CXvGoZKJ.mjs +198 -0
- package/chunks/Cab-ZjRx.mjs +164 -0
- package/chunks/ChmDDqoZ2.mjs +478 -0
- package/chunks/Cj59E77g.mjs +230 -0
- package/chunks/CqTcEefA.mjs +93 -0
- package/chunks/Ct5bDJ50.mjs +38 -0
- package/chunks/CuG2Q-PM.mjs +100 -0
- package/chunks/D8UVq1t1.mjs +176 -0
- package/chunks/DDmQcNm6.mjs +93 -0
- package/chunks/DF9fJMQS.mjs +105 -0
- package/chunks/DJe97Fgi.mjs +107 -0
- package/chunks/DXYgAmil.mjs +317 -0
- package/chunks/DhtHh0jk.mjs +87 -0
- package/chunks/DiJyms_r.mjs +100 -0
- package/chunks/Ds_Tpa_M.mjs +83 -0
- package/chunks/TvNHGVAP.mjs +25 -0
- package/chunks/XCGWTz41.mjs +25 -0
- package/chunks/XqRTtFfp.mjs +166 -0
- package/chunks/cmuHpsX6.mjs +109 -0
- package/chunks/o6VhYAN52.mjs +207 -0
- package/chunks/pdwFQpA8.mjs +57 -0
- package/chunks/taicx2sd.mjs +25 -0
- package/confirm-button/index.d.ts +113 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +84 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +53 -0
- package/constants/index.mjs +4 -0
- package/editable-tree/index.d.ts +254 -0
- package/editable-tree/index.mjs +2 -0
- package/editable-tree/style.css +1 -0
- package/element-dialog/index.d.ts +337 -16
- package/element-dialog/index.mjs +2 -91
- package/empty-view/index.d.ts +2 -2
- package/empty-view/index.mjs +1 -1
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroll-area/index.mjs +1 -1
- package/form-advice/index.mjs +13 -12
- package/form-button/index.d.ts +114 -0
- package/form-button/index.mjs +36 -0
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +472 -0
- package/form-cascader/index.mjs +2 -0
- package/form-check-box-group/index.d.ts +289 -18
- package/form-check-box-group/index.mjs +1 -1
- package/form-check-box-group/style.css +1 -0
- package/form-checkbox/index.d.ts +236 -16
- package/form-checkbox/index.mjs +1 -1
- package/form-date-picker/index.d.ts +390 -19
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +87 -20
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.d.ts +145 -13
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +301 -20
- package/form-input/index.mjs +1 -1
- package/form-input/style.css +1 -0
- package/form-input-cron-expression/index.d.ts +217 -0
- package/form-input-cron-expression/index.mjs +2 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.d.ts +307 -16
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +307 -16
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +246 -18
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +307 -16
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +263 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +434 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item-config-provider/index.d.ts +22 -0
- package/form-item-config-provider/index.mjs +24 -0
- package/form-item-group/index.d.ts +91 -17
- package/form-item-group/index.mjs +2 -78
- package/form-item-group/style.css +1 -1
- package/form-item-x/index.d.ts +141 -11
- package/form-item-x/index.mjs +1 -1
- package/form-item-x/style.css +1 -0
- package/form-radio-group/index.d.ts +303 -16
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +254 -14
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +27 -26
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +537 -18
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +283 -16
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +272 -14
- package/form-switch/index.mjs +1 -1
- package/form-text/index.d.ts +165 -13
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +351 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +319 -0
- package/form-time-select/index.mjs +2 -0
- package/form-view/index.mjs +1 -1
- package/helper/dictionary.d.ts +15 -0
- package/helper/dictionary.mjs +97 -0
- package/hook/useDictionary.d.ts +60 -0
- package/hook/useDictionary.mjs +15 -0
- package/hook/useVisibilityChange.d.ts +4 -0
- package/hook/useVisibilityChange.mjs +14 -0
- package/iframe-window/index.d.ts +9 -0
- package/iframe-window/index.mjs +37 -0
- package/iframe-window/style.css +1 -0
- package/index.d.ts +52 -36
- package/index.mjs +54 -61
- package/package.json +10 -5
- package/pageable-table/index.d.ts +398 -0
- package/pageable-table/index.mjs +2 -0
- package/pageable-table/style.css +1 -0
- package/resize-observer/index.d.ts +8 -0
- package/resize-observer/index.mjs +40 -0
- package/resize-observer/style.css +1 -0
- package/resolver/index.mjs +29 -0
- package/table-column/index.d.ts +160 -0
- package/table-column/index.mjs +2 -0
- package/table-column/style.css +1 -0
- package/table-column-def/index.d.ts +85 -0
- package/table-column-def/index.mjs +11 -0
- package/table-view/index.d.ts +340 -1
- package/table-view/index.mjs +453 -6
- package/table-view/style.css +1 -0
- package/toolbar/index.d.ts +128 -1
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +188 -1
- package/toolbar-button/index.mjs +1 -8
- package/vue-cron/index.d.ts +191 -0
- package/vue-cron/index.mjs +2 -0
- package/vue-cron/style.css +1 -0
- package/web-types.json +1 -1
- package/x-input-tag/index.d.ts +2 -0
- package/x-input-tag/index.mjs +227 -0
- package/x-input-tag/style.css +1 -0
- package/year-calendar/index.d.ts +99 -0
- package/year-calendar/index.mjs +2 -0
- package/year-calendar/style.css +1 -0
- package/chunks/B4M_TFeR.mjs +0 -152
- package/chunks/B5BIQCcK.mjs +0 -149
- package/chunks/BHNKrW1j.mjs +0 -61
- package/chunks/BO9jWhBl.mjs +0 -46
- package/chunks/BZ8aOa78.mjs +0 -35
- package/chunks/Bsz7y4Xp.mjs +0 -73
- package/chunks/Bxj372sF.mjs +0 -53
- package/chunks/C33EmJN8.mjs +0 -32
- package/chunks/C6Li3-l7.mjs +0 -28
- package/chunks/CBcdalMX.mjs +0 -35
- package/chunks/CdRsyF0n.mjs +0 -43
- package/chunks/ClNahmiU.mjs +0 -23
- package/chunks/CstztYMu.mjs +0 -28
- package/chunks/DC9b53M6.mjs +0 -32
- package/chunks/DDVAgRED.mjs +0 -36
- package/chunks/DpJQABVD.mjs +0 -91
- package/chunks/ZsLNWI9x.mjs +0 -46
- package/chunks/jn_iQrVZ.mjs +0 -28
- package/constants.d.ts +0 -1
- package/constants.mjs +0 -4
- package/input/style.css +0 -1
- package/resolver.mjs +0 -79
- package/utils/style.css +0 -1
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { i as e, n as t } from "./Cj59E77g.mjs";
|
|
2
|
+
import { n } from "./CSyJ-vEx.mjs";
|
|
3
|
+
import { computed as r, createVNode as i, mergeProps as a } from "vue";
|
|
4
|
+
import { ElDatePicker as o } from "element-plus/es";
|
|
5
|
+
import { toDate as s } from "@web-utils/integrations/dayjs";
|
|
6
|
+
//#region src/components/form/props/date.ts
|
|
7
|
+
var c = {
|
|
8
|
+
...n,
|
|
9
|
+
modelValue: [
|
|
10
|
+
Number,
|
|
11
|
+
String,
|
|
12
|
+
Date,
|
|
13
|
+
Array
|
|
14
|
+
],
|
|
15
|
+
readonly: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
size: String,
|
|
20
|
+
editable: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
24
|
+
clearable: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !0
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
startPlaceholder: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "开始日期"
|
|
35
|
+
},
|
|
36
|
+
endPlaceholder: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "结束日期"
|
|
39
|
+
},
|
|
40
|
+
type: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "date"
|
|
43
|
+
},
|
|
44
|
+
format: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "YYYY-MM-DD"
|
|
47
|
+
},
|
|
48
|
+
popperClass: String,
|
|
49
|
+
popperStyle: [String, Object],
|
|
50
|
+
popperOptions: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: () => ({})
|
|
53
|
+
},
|
|
54
|
+
rangeSeparator: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "至"
|
|
57
|
+
},
|
|
58
|
+
defaultValue: Object,
|
|
59
|
+
defaultTime: Object,
|
|
60
|
+
valueFormat: String,
|
|
61
|
+
id: [String, Array],
|
|
62
|
+
name: {
|
|
63
|
+
type: [String, Array],
|
|
64
|
+
default: ""
|
|
65
|
+
},
|
|
66
|
+
unlinkPanels: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
prefixIcon: [String, Object],
|
|
71
|
+
clearIcon: [String, Object],
|
|
72
|
+
validateEvent: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !0
|
|
75
|
+
},
|
|
76
|
+
disabledDate: Function,
|
|
77
|
+
shortcuts: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default: () => []
|
|
80
|
+
},
|
|
81
|
+
cellClassName: Function,
|
|
82
|
+
teleported: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: !0
|
|
85
|
+
},
|
|
86
|
+
emptyValues: Array,
|
|
87
|
+
valueOnClear: [
|
|
88
|
+
String,
|
|
89
|
+
Number,
|
|
90
|
+
Boolean,
|
|
91
|
+
Function
|
|
92
|
+
],
|
|
93
|
+
fallbackPlacements: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: () => [
|
|
96
|
+
"bottom",
|
|
97
|
+
"top",
|
|
98
|
+
"right",
|
|
99
|
+
"left"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
placement: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: "bottom"
|
|
105
|
+
},
|
|
106
|
+
showFooter: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: !0
|
|
109
|
+
},
|
|
110
|
+
showConfirm: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !0
|
|
113
|
+
},
|
|
114
|
+
showWeekNumber: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: !1
|
|
117
|
+
},
|
|
118
|
+
automaticDropdown: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: !0
|
|
121
|
+
},
|
|
122
|
+
split: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: !0
|
|
125
|
+
},
|
|
126
|
+
startDate: String,
|
|
127
|
+
endDate: String,
|
|
128
|
+
start: String,
|
|
129
|
+
end: String,
|
|
130
|
+
year: Boolean,
|
|
131
|
+
month: Boolean,
|
|
132
|
+
dates: Boolean,
|
|
133
|
+
week: Boolean,
|
|
134
|
+
dateTime: Boolean,
|
|
135
|
+
dateTimeRange: Boolean,
|
|
136
|
+
dateRange: Boolean,
|
|
137
|
+
monthRange: Boolean,
|
|
138
|
+
miniDate: String,
|
|
139
|
+
maxDate: String
|
|
140
|
+
}, l = {
|
|
141
|
+
modelValue: !0,
|
|
142
|
+
name: !0,
|
|
143
|
+
disabled: !0,
|
|
144
|
+
emptyValues: !0,
|
|
145
|
+
type: !0,
|
|
146
|
+
valueOnClear: !0
|
|
147
|
+
}, u = (e) => n[e] === void 0 && l[e] !== !0, d = {
|
|
148
|
+
name: "FormDatePicker",
|
|
149
|
+
inheritAttrs: !1,
|
|
150
|
+
props: { ...c },
|
|
151
|
+
emits: {
|
|
152
|
+
...t,
|
|
153
|
+
"update:startDate": null,
|
|
154
|
+
"update:endDate": null
|
|
155
|
+
},
|
|
156
|
+
setup(t, { emit: n, slots: c, attrs: l }) {
|
|
157
|
+
let { emitInput: d, render: f, placeholder: p, disabled: m, listeners: h, inputProps: g } = e(t, {
|
|
158
|
+
emit: n,
|
|
159
|
+
slots: c,
|
|
160
|
+
attrs: l,
|
|
161
|
+
predicate: u,
|
|
162
|
+
messagePrefix: "请选择"
|
|
163
|
+
}), _ = r(() => t.dateTimeRange || t.dateRange || t.monthRange), v = r(() => t.year ? "YYYY" : t.month || t.monthRange ? "YYYY-MM" : t.week ? "YYYY 第 WW 周" : t.dateTime || t.dateTimeRange ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD"), y = r(() => t.year ? "year" : t.month ? "month" : t.dates ? "dates" : t.week ? "week" : t.dateTime ? "datetime" : t.dateTimeRange ? "datetimerange" : t.dateRange ? "daterange" : t.monthRange ? "monthrange" : "date"), b = r(() => {
|
|
164
|
+
if (t.miniDate) {
|
|
165
|
+
let e = s(t.miniDate);
|
|
166
|
+
return e.setDate(e.getDate() - 1), e;
|
|
167
|
+
} else return null;
|
|
168
|
+
}), x = r(() => t.maxDate ? s(t.maxDate) : null), S = (e) => {
|
|
169
|
+
if (!b.value && !x.value) return !1;
|
|
170
|
+
let t = e.getTime();
|
|
171
|
+
return b.value && !x.value ? t <= b.value.getTime() : !b.value && x.value ? t >= x.value.getTime() : b.value && x.value ? !(t > b.value.getTime() && t <= x.value.getTime()) : !1;
|
|
172
|
+
}, C = (e, t) => {
|
|
173
|
+
n("update:startDate", e), n("update:endDate", t);
|
|
174
|
+
}, w = (e) => {
|
|
175
|
+
_.value && t.split ? e ? C(e[0], e[1]) : C(null, null) : d(e);
|
|
176
|
+
}, T = r(() => _.value && t.split ? [t.startDate, t.endDate] : t.modelValue), E = r(() => t.week ? "YYYY-MM-DD" : t.valueFormat || v.value), D = r(() => t.format || v.value);
|
|
177
|
+
return () => f({ vNodes: i(o, a(h.value, g.value, {
|
|
178
|
+
style: "width: 100%",
|
|
179
|
+
type: y.value,
|
|
180
|
+
modelValue: T.value,
|
|
181
|
+
disabled: m.value,
|
|
182
|
+
placeholder: p.value,
|
|
183
|
+
format: D.value,
|
|
184
|
+
disabledDate: S,
|
|
185
|
+
"value-format": E.value,
|
|
186
|
+
"onUpdate:modelValue": w
|
|
187
|
+
}), {
|
|
188
|
+
default: c.default,
|
|
189
|
+
"range-separator": c["range-separator"],
|
|
190
|
+
"pre-month": c["pre-month"],
|
|
191
|
+
"next-month": c["next-month"],
|
|
192
|
+
"pre-year": c["pre-year"],
|
|
193
|
+
"next-year": c["next-year"]
|
|
194
|
+
}) });
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
//#endregion
|
|
198
|
+
export { d as t };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { u as e } from "./cmuHpsX6.mjs";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, getCurrentInstance as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, toHandlers as h, unref as g, useModel as _, useTemplateRef as v, withCtx as y, withModifiers as b } from "vue";
|
|
3
|
+
import { ElDialog as x } from "element-plus/es";
|
|
4
|
+
//#region src/components/dialog/props.ts
|
|
5
|
+
var S = {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: !1
|
|
9
|
+
},
|
|
10
|
+
title: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
width: [String, Number],
|
|
15
|
+
fullscreen: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !1
|
|
18
|
+
},
|
|
19
|
+
top: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
modal: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !0
|
|
26
|
+
},
|
|
27
|
+
modalPenetrable: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !1
|
|
30
|
+
},
|
|
31
|
+
modalClass: String,
|
|
32
|
+
headerClass: String,
|
|
33
|
+
bodyClass: String,
|
|
34
|
+
footerClass: String,
|
|
35
|
+
appendToBody: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
appendTo: [String, Object],
|
|
40
|
+
lockScroll: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !0
|
|
43
|
+
},
|
|
44
|
+
openDelay: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 0
|
|
47
|
+
},
|
|
48
|
+
closeDelay: {
|
|
49
|
+
type: Number,
|
|
50
|
+
default: 0
|
|
51
|
+
},
|
|
52
|
+
closeOnClickModal: { type: Boolean },
|
|
53
|
+
closeOnPressEscape: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !0
|
|
56
|
+
},
|
|
57
|
+
showClose: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !0
|
|
60
|
+
},
|
|
61
|
+
beforeClose: Function,
|
|
62
|
+
draggable: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !0
|
|
65
|
+
},
|
|
66
|
+
overflow: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: !1
|
|
69
|
+
},
|
|
70
|
+
center: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !1
|
|
73
|
+
},
|
|
74
|
+
alignCenter: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: !1
|
|
77
|
+
},
|
|
78
|
+
destroyOnClose: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: !1
|
|
81
|
+
},
|
|
82
|
+
closeIcon: [String, Object],
|
|
83
|
+
zIndex: Number,
|
|
84
|
+
headerAriaLevel: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "2"
|
|
87
|
+
},
|
|
88
|
+
transition: [String, Object],
|
|
89
|
+
customClass: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: ""
|
|
92
|
+
},
|
|
93
|
+
height: String,
|
|
94
|
+
embed: Boolean,
|
|
95
|
+
showFullscreen: Boolean,
|
|
96
|
+
showFullScreen: Boolean
|
|
97
|
+
}, C = {
|
|
98
|
+
embed: !0,
|
|
99
|
+
height: !0,
|
|
100
|
+
showFullscreen: !0,
|
|
101
|
+
showFullScreen: !0,
|
|
102
|
+
fullscreen: !0,
|
|
103
|
+
showClose: !0
|
|
104
|
+
}, w = (e) => C[e] !== !0, T = { class: "dialog-title" }, E = { class: "dialog-header-buttons" }, D = {
|
|
105
|
+
__name: "ElementDialog",
|
|
106
|
+
props: /* @__PURE__ */ c({ ...S }, {
|
|
107
|
+
modelValue: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: !1
|
|
110
|
+
},
|
|
111
|
+
modelModifiers: {}
|
|
112
|
+
}),
|
|
113
|
+
emits: /* @__PURE__ */ c({ "toggle-fullscreen": null }, ["update:modelValue"]),
|
|
114
|
+
setup(c, { expose: S, emit: C }) {
|
|
115
|
+
let D = _(c, "modelValue"), O = c, k = C, { autoBindProps: A, listeners: j } = e(O, {
|
|
116
|
+
predicate: w,
|
|
117
|
+
removeOn: !0
|
|
118
|
+
}), M = v("dialog"), N = f(O.fullscreen), P = () => {
|
|
119
|
+
N.value = !N.value, k("toggle-fullscreen", N.value);
|
|
120
|
+
}, F = t(() => N.value ? "100%" : O.height), I = s(), L = () => {
|
|
121
|
+
O.embed ? (I.parent.emit("update:visible", !1), I.parent.emit("update:modelValue", !1)) : M.value.handleClose();
|
|
122
|
+
};
|
|
123
|
+
return S({
|
|
124
|
+
close: L,
|
|
125
|
+
hide: L
|
|
126
|
+
}), (e, t) => {
|
|
127
|
+
let s = x;
|
|
128
|
+
return d(), n(s, l({
|
|
129
|
+
ref: "dialog",
|
|
130
|
+
modelValue: D.value,
|
|
131
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => D.value = e)
|
|
132
|
+
}, g(A), {
|
|
133
|
+
"show-close": !1,
|
|
134
|
+
fullscreen: g(N),
|
|
135
|
+
style: { "--dialog-body-height": g(F) }
|
|
136
|
+
}, h(g(j))), o({
|
|
137
|
+
header: y(() => [r(" @slot 对话框标题的内容;会替换标题部分,但会移除关闭按钮 "), p(e.$slots, "header", {}, () => [a("div", T, m(e.title), 1), a("div", E, [e.showFullscreen || e.showFullScreen ? (d(), i("i", {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: u(["dialog-header-button", {
|
|
140
|
+
"el-icon-full-screen": !e.fullscreen,
|
|
141
|
+
"el-icon-copy-document": e.fullscreen
|
|
142
|
+
}]),
|
|
143
|
+
onClick: b(P, ["stop"])
|
|
144
|
+
}, null, 2)) : r("v-if", !0), e.showClose ? (d(), i("i", {
|
|
145
|
+
key: 1,
|
|
146
|
+
class: "dialog-header-button el-icon-close",
|
|
147
|
+
onClick: b(L, ["stop"])
|
|
148
|
+
})) : r("v-if", !0)])])]),
|
|
149
|
+
default: y(() => [r(" @slot 对话框的默认内容 "), p(e.$slots, "default")]),
|
|
150
|
+
_: 2
|
|
151
|
+
}, [e.$slots.footer ? {
|
|
152
|
+
name: "footer",
|
|
153
|
+
fn: y(() => [r(" @slot Dialog 按钮操作区的内容 "), p(e.$slots, "footer", { close: L })]),
|
|
154
|
+
key: "0"
|
|
155
|
+
} : void 0]), 1040, [
|
|
156
|
+
"modelValue",
|
|
157
|
+
"fullscreen",
|
|
158
|
+
"style"
|
|
159
|
+
]);
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
export { D as t };
|