vft 0.0.499 → 0.0.501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +6 -6
- package/es/components/autocomplete/index.d.ts +18 -18
- package/es/components/button/index.d.ts +9 -9
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/image-viewer/image-viewer.vue.d.ts +2 -0
- package/es/components/image-viewer/image-viewer.vue2.js +89 -85
- package/es/components/image-viewer/index.d.ts +18 -0
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popper/index.d.ts +3 -3
- package/es/components/select/index.d.ts +15 -15
- package/es/components/select/select.vue.d.ts +15 -15
- package/es/components/select/useSelect.d.ts +12 -12
- package/es/components/super-form/style/css.d.ts +1 -0
- package/es/components/super-form/style/index.d.ts +1 -0
- package/es/components/super-form/super-form-item.vue2.js +360 -325
- package/es/components/super-form/types.d.ts +3 -1
- package/es/components/table/field.js +32 -33
- package/es/components/table/table.vue2.js +51 -49
- package/es/components/table/use/use-data-source.js +166 -143
- package/es/components/table/use/use-loading.js +11 -11
- package/es/components/table/use/use-table.js +7 -6
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tree/index.d.ts +5 -5
- package/es/components/tree/tree.vue.d.ts +2 -2
- package/es/components/tree-select/select.js +24 -24
- package/es/components/tree-select/tree-select-option.js +18 -7
- package/es/components/tree-select/tree-select.vue2.js +28 -26
- package/es/components/tree-select/tree.js +27 -26
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +1 -0
- package/es/utils/form-register.js +5 -4
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +6 -6
- package/lib/components/autocomplete/index.d.ts +18 -18
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/image-viewer/image-viewer.vue.d.ts +2 -0
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/image-viewer/index.d.ts +18 -0
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popper/index.d.ts +3 -3
- package/lib/components/select/index.d.ts +15 -15
- package/lib/components/select/select.vue.d.ts +15 -15
- package/lib/components/select/useSelect.d.ts +12 -12
- package/lib/components/super-form/style/css.d.ts +1 -0
- package/lib/components/super-form/style/index.d.ts +1 -0
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +3 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/table/use/use-loading.cjs +1 -1
- package/lib/components/table/use/use-table.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tree/index.d.ts +5 -5
- package/lib/components/tree/tree.vue.d.ts +2 -2
- package/lib/components/tree-select/select.cjs +1 -1
- package/lib/components/tree-select/tree-select-option.cjs +1 -1
- package/lib/components/tree-select/tree-select.vue2.cjs +1 -1
- package/lib/components/tree-select/tree.cjs +1 -1
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +1 -0
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/icon-text.scss +1 -1
- package/theme-style/src/tree-select.scss +8 -0
- package/theme-style/vft-icon-text.css +1 -1
- package/theme-style/vft-tree-select.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as A, ref as h, effectScope as ne, computed as w, watch as R, nextTick as oe, onMounted as ae, createBlock as
|
|
1
|
+
import { defineComponent as A, ref as h, effectScope as ne, computed as w, watch as R, nextTick as oe, onMounted as ae, createBlock as ie, openBlock as z, unref as e, withCtx as S, createVNode as d, Transition as se, createElementVNode as c, normalizeStyle as V, normalizeClass as r, createElementBlock as E, createCommentVNode as re, renderSlot as le, withModifiers as ce, Fragment as H, renderList as ue, withDirectives as fe, vShow as de } from "vue";
|
|
2
2
|
import { EVENT_CODE as p } from "@vft/constants";
|
|
3
3
|
import { isNumber as Z } from "@vft/utils";
|
|
4
4
|
import { VftIcon as v } from "../icon/index.js";
|
|
5
|
-
import { useEventListener as
|
|
5
|
+
import { useEventListener as y } from "@vueuse/core";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
7
7
|
import { throttle as T } from "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import { useZIndex as ve } from "../../hooks/use-z-index/index.js";
|
|
13
13
|
import { VftTeleport as ge } from "../teleport/index.js";
|
|
14
|
-
const ke = ["src"], be = A({
|
|
14
|
+
const ke = ["src", "referrerpolicy", "crossorigin"], be = A({
|
|
15
15
|
name: "vft-image-viewer"
|
|
16
16
|
}), Ye = /* @__PURE__ */ A({
|
|
17
17
|
...be,
|
|
@@ -23,23 +23,25 @@ const ke = ["src"], be = A({
|
|
|
23
23
|
hideOnClickModal: { type: Boolean, default: !1 },
|
|
24
24
|
teleported: { type: Boolean, default: !1 },
|
|
25
25
|
closeOnPressEscape: { type: Boolean, default: !0 },
|
|
26
|
-
zoomRate: { default: 1.2 }
|
|
26
|
+
zoomRate: { default: 1.2 },
|
|
27
|
+
referrerpolicy: { default: "no-referrer" },
|
|
28
|
+
crossorigin: { default: "anonymous" }
|
|
27
29
|
},
|
|
28
30
|
emits: {
|
|
29
31
|
close: () => !0,
|
|
30
|
-
switch: (
|
|
32
|
+
switch: (t) => Z(t)
|
|
31
33
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const $ = W,
|
|
34
|
+
setup(t, { expose: P, emit: W }) {
|
|
35
|
+
const $ = W, i = me("image-viewer"), { nextZIndex: j } = ve(), I = h(), X = h([]), Y = ne(), k = h(!0), m = h(t.initialIndex), s = h({
|
|
34
36
|
scale: 1,
|
|
35
37
|
deg: 0,
|
|
36
38
|
offsetX: 0,
|
|
37
39
|
offsetY: 0,
|
|
38
40
|
enableTransition: !1
|
|
39
|
-
}), q = w(() =>
|
|
40
|
-
const { scale:
|
|
41
|
-
let u = a /
|
|
42
|
-
switch (
|
|
41
|
+
}), q = w(() => t.urlList.length <= 1), O = w(() => m.value === 0), M = w(() => m.value === t.urlList.length - 1), G = w(() => t.urlList[m.value]), J = w(() => {
|
|
42
|
+
const { scale: o, deg: n, offsetX: a, offsetY: l, enableTransition: x } = s.value;
|
|
43
|
+
let u = a / o, f = l / o;
|
|
44
|
+
switch (n % 360) {
|
|
43
45
|
case 90:
|
|
44
46
|
case -270:
|
|
45
47
|
[u, f] = [f, -u];
|
|
@@ -54,20 +56,20 @@ const ke = ["src"], be = A({
|
|
|
54
56
|
break;
|
|
55
57
|
}
|
|
56
58
|
const b = {
|
|
57
|
-
transform: `scale(${
|
|
59
|
+
transform: `scale(${o}) rotate(${n}deg) translate(${u}px, ${f}px)`,
|
|
58
60
|
transition: x ? "transform .3s" : ""
|
|
59
61
|
};
|
|
60
62
|
return b.maxWidth = b.maxHeight = "100%", b;
|
|
61
|
-
}), K = w(() => Z(
|
|
62
|
-
function
|
|
63
|
+
}), K = w(() => Z(t.zIndex) ? t.zIndex : j());
|
|
64
|
+
function C() {
|
|
63
65
|
U(), $("close");
|
|
64
66
|
}
|
|
65
67
|
function Q() {
|
|
66
|
-
const
|
|
68
|
+
const o = T((a) => {
|
|
67
69
|
switch (a.code) {
|
|
68
70
|
// ESC
|
|
69
71
|
case p.esc:
|
|
70
|
-
|
|
72
|
+
t.closeOnPressEscape && C();
|
|
71
73
|
break;
|
|
72
74
|
// SPACE
|
|
73
75
|
case p.space:
|
|
@@ -90,15 +92,15 @@ const ke = ["src"], be = A({
|
|
|
90
92
|
g("zoomOut");
|
|
91
93
|
break;
|
|
92
94
|
}
|
|
93
|
-
}),
|
|
94
|
-
const
|
|
95
|
-
g(
|
|
96
|
-
zoomRate:
|
|
95
|
+
}), n = T((a) => {
|
|
96
|
+
const l = a.deltaY || a.deltaX;
|
|
97
|
+
g(l < 0 ? "zoomIn" : "zoomOut", {
|
|
98
|
+
zoomRate: t.zoomRate,
|
|
97
99
|
enableTransition: !1
|
|
98
100
|
});
|
|
99
101
|
});
|
|
100
102
|
Y.run(() => {
|
|
101
|
-
|
|
103
|
+
y(document, "keydown", o), y(document, "wheel", n);
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
106
|
function U() {
|
|
@@ -107,25 +109,25 @@ const ke = ["src"], be = A({
|
|
|
107
109
|
function _() {
|
|
108
110
|
k.value = !1;
|
|
109
111
|
}
|
|
110
|
-
function ee(
|
|
111
|
-
k.value = !1,
|
|
112
|
+
function ee(o) {
|
|
113
|
+
k.value = !1, o.target.alt = "加载失败";
|
|
112
114
|
}
|
|
113
|
-
function te(
|
|
114
|
-
if (k.value ||
|
|
115
|
-
|
|
116
|
-
const { offsetX:
|
|
117
|
-
|
|
118
|
-
...
|
|
119
|
-
offsetX:
|
|
115
|
+
function te(o) {
|
|
116
|
+
if (k.value || o.button !== 0 || !I.value) return;
|
|
117
|
+
s.value.enableTransition = !1;
|
|
118
|
+
const { offsetX: n, offsetY: a } = s.value, l = o.pageX, x = o.pageY, u = T((b) => {
|
|
119
|
+
s.value = {
|
|
120
|
+
...s.value,
|
|
121
|
+
offsetX: n + b.pageX - l,
|
|
120
122
|
offsetY: a + b.pageY - x
|
|
121
123
|
};
|
|
122
|
-
}), f =
|
|
123
|
-
|
|
124
|
+
}), f = y(document, "mousemove", u);
|
|
125
|
+
y(document, "mouseup", () => {
|
|
124
126
|
f();
|
|
125
|
-
}),
|
|
127
|
+
}), o.preventDefault();
|
|
126
128
|
}
|
|
127
129
|
function N() {
|
|
128
|
-
|
|
130
|
+
s.value = {
|
|
129
131
|
scale: 1,
|
|
130
132
|
deg: 0,
|
|
131
133
|
offsetX: 0,
|
|
@@ -136,97 +138,97 @@ const ke = ["src"], be = A({
|
|
|
136
138
|
function B() {
|
|
137
139
|
k.value || N();
|
|
138
140
|
}
|
|
139
|
-
function L(
|
|
140
|
-
const
|
|
141
|
-
m.value = (
|
|
141
|
+
function L(o) {
|
|
142
|
+
const n = t.urlList.length;
|
|
143
|
+
m.value = (o + n) % n;
|
|
142
144
|
}
|
|
143
145
|
function D() {
|
|
144
|
-
O.value && !
|
|
146
|
+
O.value && !t.infinite || L(m.value - 1);
|
|
145
147
|
}
|
|
146
148
|
function F() {
|
|
147
|
-
M.value && !
|
|
149
|
+
M.value && !t.infinite || L(m.value + 1);
|
|
148
150
|
}
|
|
149
|
-
function g(
|
|
151
|
+
function g(o, n = {}) {
|
|
150
152
|
if (k.value) return;
|
|
151
|
-
const { rotateDeg: a, enableTransition:
|
|
153
|
+
const { rotateDeg: a, enableTransition: l } = {
|
|
152
154
|
rotateDeg: 90,
|
|
153
155
|
enableTransition: !0,
|
|
154
|
-
...
|
|
156
|
+
...n
|
|
155
157
|
};
|
|
156
|
-
switch (
|
|
158
|
+
switch (o) {
|
|
157
159
|
case "zoomOut":
|
|
158
|
-
|
|
159
|
-
(
|
|
160
|
+
s.value.scale > 0.2 && (s.value.scale = Number.parseFloat(
|
|
161
|
+
(s.value.scale / t.zoomRate).toFixed(3)
|
|
160
162
|
));
|
|
161
163
|
break;
|
|
162
164
|
case "zoomIn":
|
|
163
|
-
|
|
164
|
-
(
|
|
165
|
+
s.value.scale < 7 && (s.value.scale = Number.parseFloat(
|
|
166
|
+
(s.value.scale * t.zoomRate).toFixed(3)
|
|
165
167
|
));
|
|
166
168
|
break;
|
|
167
169
|
case "clockwise":
|
|
168
|
-
|
|
170
|
+
s.value.deg += a;
|
|
169
171
|
break;
|
|
170
172
|
case "anticlockwise":
|
|
171
|
-
|
|
173
|
+
s.value.deg -= a;
|
|
172
174
|
break;
|
|
173
175
|
}
|
|
174
|
-
|
|
176
|
+
s.value.enableTransition = l;
|
|
175
177
|
}
|
|
176
178
|
return R(G, () => {
|
|
177
179
|
oe(() => {
|
|
178
180
|
X.value[0]?.complete || (k.value = !0);
|
|
179
181
|
});
|
|
180
|
-
}), R(m, (
|
|
181
|
-
N(), $("switch",
|
|
182
|
+
}), R(m, (o) => {
|
|
183
|
+
N(), $("switch", o);
|
|
182
184
|
}), ae(() => {
|
|
183
|
-
Q(),
|
|
185
|
+
Q(), I.value?.focus?.();
|
|
184
186
|
}), P({
|
|
185
187
|
/** @description manually switch image */
|
|
186
188
|
setActiveItem: L
|
|
187
|
-
}), (
|
|
189
|
+
}), (o, n) => (z(), ie(e(ge), {
|
|
188
190
|
to: "body",
|
|
189
|
-
disabled: !
|
|
191
|
+
disabled: !t.teleported
|
|
190
192
|
}, {
|
|
191
193
|
default: S(() => [
|
|
192
|
-
d(
|
|
194
|
+
d(se, {
|
|
193
195
|
name: "viewer-fade",
|
|
194
196
|
appear: ""
|
|
195
197
|
}, {
|
|
196
198
|
default: S(() => [
|
|
197
199
|
c("div", {
|
|
198
200
|
ref_key: "wrapper",
|
|
199
|
-
ref:
|
|
201
|
+
ref: I,
|
|
200
202
|
tabindex: -1,
|
|
201
|
-
class:
|
|
203
|
+
class: r(e(i).e("wrapper")),
|
|
202
204
|
style: V({ zIndex: K.value })
|
|
203
205
|
}, [
|
|
204
206
|
c("div", {
|
|
205
|
-
class:
|
|
206
|
-
onClick:
|
|
207
|
+
class: r(e(i).e("mask")),
|
|
208
|
+
onClick: n[0] || (n[0] = ce((a) => t.hideOnClickModal && C(), ["self"]))
|
|
207
209
|
}, null, 2),
|
|
208
210
|
c("span", {
|
|
209
|
-
class:
|
|
210
|
-
onClick:
|
|
211
|
+
class: r([e(i).e("btn"), e(i).e("close")]),
|
|
212
|
+
onClick: C
|
|
211
213
|
}, [
|
|
212
214
|
d(e(v), { icon: "icon-close" })
|
|
213
215
|
], 2),
|
|
214
|
-
q.value ?
|
|
216
|
+
q.value ? re("", !0) : (z(), E(H, { key: 0 }, [
|
|
215
217
|
c("span", {
|
|
216
|
-
class:
|
|
217
|
-
e(
|
|
218
|
-
e(
|
|
219
|
-
e(
|
|
218
|
+
class: r([
|
|
219
|
+
e(i).e("btn"),
|
|
220
|
+
e(i).e("prev"),
|
|
221
|
+
e(i).is("disabled", !t.infinite && O.value)
|
|
220
222
|
]),
|
|
221
223
|
onClick: D
|
|
222
224
|
}, [
|
|
223
225
|
d(e(v), { icon: "icon-arrow-left" })
|
|
224
226
|
], 2),
|
|
225
227
|
c("span", {
|
|
226
|
-
class:
|
|
227
|
-
e(
|
|
228
|
-
e(
|
|
229
|
-
e(
|
|
228
|
+
class: r([
|
|
229
|
+
e(i).e("btn"),
|
|
230
|
+
e(i).e("next"),
|
|
231
|
+
e(i).is("disabled", !t.infinite && M.value)
|
|
230
232
|
]),
|
|
231
233
|
onClick: F
|
|
232
234
|
}, [
|
|
@@ -234,57 +236,59 @@ const ke = ["src"], be = A({
|
|
|
234
236
|
], 2)
|
|
235
237
|
], 64)),
|
|
236
238
|
c("div", {
|
|
237
|
-
class:
|
|
239
|
+
class: r([e(i).e("btn"), e(i).e("actions")])
|
|
238
240
|
}, [
|
|
239
241
|
c("div", {
|
|
240
|
-
class:
|
|
242
|
+
class: r(e(i).e("actions__inner"))
|
|
241
243
|
}, [
|
|
242
244
|
d(e(v), {
|
|
243
245
|
icon: "icon-zoom-out",
|
|
244
|
-
onClick:
|
|
246
|
+
onClick: n[1] || (n[1] = (a) => g("zoomOut"))
|
|
245
247
|
}),
|
|
246
248
|
d(e(v), {
|
|
247
249
|
icon: "icon-zoom-in",
|
|
248
|
-
onClick:
|
|
250
|
+
onClick: n[2] || (n[2] = (a) => g("zoomIn"))
|
|
249
251
|
}),
|
|
250
252
|
c("i", {
|
|
251
|
-
class:
|
|
253
|
+
class: r(e(i).e("actions__divider"))
|
|
252
254
|
}, null, 2),
|
|
253
255
|
d(e(v), {
|
|
254
256
|
icon: "icon-scale-to-original",
|
|
255
257
|
onClick: B
|
|
256
258
|
}),
|
|
257
259
|
c("i", {
|
|
258
|
-
class:
|
|
260
|
+
class: r(e(i).e("actions__divider"))
|
|
259
261
|
}, null, 2),
|
|
260
262
|
d(e(v), {
|
|
261
263
|
icon: "icon-refresh-left",
|
|
262
|
-
onClick:
|
|
264
|
+
onClick: n[3] || (n[3] = (a) => g("anticlockwise"))
|
|
263
265
|
}),
|
|
264
266
|
d(e(v), {
|
|
265
267
|
icon: "icon-refresh-right",
|
|
266
|
-
onClick:
|
|
268
|
+
onClick: n[4] || (n[4] = (a) => g("clockwise"))
|
|
267
269
|
})
|
|
268
270
|
], 2)
|
|
269
271
|
], 2),
|
|
270
272
|
c("div", {
|
|
271
|
-
class:
|
|
273
|
+
class: r(e(i).e("canvas"))
|
|
272
274
|
}, [
|
|
273
|
-
(z(!0), E(H, null, ue(
|
|
275
|
+
(z(!0), E(H, null, ue(t.urlList, (a, l) => fe((z(), E("img", {
|
|
274
276
|
ref_for: !0,
|
|
275
|
-
ref: (x) => X.value[
|
|
277
|
+
ref: (x) => X.value[l] = x,
|
|
276
278
|
key: a,
|
|
277
279
|
src: a,
|
|
278
280
|
style: V(J.value),
|
|
279
|
-
class:
|
|
281
|
+
class: r(e(i).e("img")),
|
|
282
|
+
referrerpolicy: t.referrerpolicy,
|
|
283
|
+
crossorigin: t.crossorigin,
|
|
280
284
|
onLoad: _,
|
|
281
285
|
onError: ee,
|
|
282
286
|
onMousedown: te
|
|
283
287
|
}, null, 46, ke)), [
|
|
284
|
-
[de,
|
|
288
|
+
[de, l === m.value]
|
|
285
289
|
])), 128))
|
|
286
290
|
], 2),
|
|
287
|
-
|
|
291
|
+
le(o.$slots, "default")
|
|
288
292
|
], 6)
|
|
289
293
|
]),
|
|
290
294
|
_: 3
|
|
@@ -24,6 +24,12 @@ export declare const VftImageViewer: import("vft/es/utils").SFCWithInstall<{
|
|
|
24
24
|
zoomRate: {
|
|
25
25
|
type: import("vue").PropType<number>;
|
|
26
26
|
};
|
|
27
|
+
referrerpolicy: {
|
|
28
|
+
type: import("vue").PropType<"origin" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
29
|
+
};
|
|
30
|
+
crossorigin: {
|
|
31
|
+
type: import("vue").PropType<"anonymous" | "use-credentials">;
|
|
32
|
+
};
|
|
27
33
|
}>> & Readonly<{
|
|
28
34
|
onSwitch?: ((index: number) => any) | undefined;
|
|
29
35
|
onClose?: (() => any) | undefined;
|
|
@@ -64,6 +70,12 @@ export declare const VftImageViewer: import("vft/es/utils").SFCWithInstall<{
|
|
|
64
70
|
zoomRate: {
|
|
65
71
|
type: import("vue").PropType<number>;
|
|
66
72
|
};
|
|
73
|
+
referrerpolicy: {
|
|
74
|
+
type: import("vue").PropType<"origin" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
75
|
+
};
|
|
76
|
+
crossorigin: {
|
|
77
|
+
type: import("vue").PropType<"anonymous" | "use-credentials">;
|
|
78
|
+
};
|
|
67
79
|
}>> & Readonly<{
|
|
68
80
|
onSwitch?: ((index: number) => any) | undefined;
|
|
69
81
|
onClose?: (() => any) | undefined;
|
|
@@ -98,6 +110,12 @@ export declare const VftImageViewer: import("vft/es/utils").SFCWithInstall<{
|
|
|
98
110
|
zoomRate: {
|
|
99
111
|
type: import("vue").PropType<number>;
|
|
100
112
|
};
|
|
113
|
+
referrerpolicy: {
|
|
114
|
+
type: import("vue").PropType<"origin" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
115
|
+
};
|
|
116
|
+
crossorigin: {
|
|
117
|
+
type: import("vue").PropType<"anonymous" | "use-credentials">;
|
|
118
|
+
};
|
|
101
119
|
}>> & Readonly<{
|
|
102
120
|
onSwitch?: ((index: number) => any) | undefined;
|
|
103
121
|
onClose?: (() => any) | undefined;
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as he } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
import { useFormItem as at, useFormItemInputId as nt } from "../form/hooks/use-form-item.js";
|
|
18
18
|
const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
n.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = at(), { inputId: Y } = nt(we.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = et(), x = tt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -7,14 +7,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
7
7
|
type: import("vue").PropType<string | number>;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
-
teleported: {
|
|
11
|
-
type: import("vue").PropType<boolean>;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
10
|
icon: {
|
|
15
11
|
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
16
12
|
default: string;
|
|
17
13
|
};
|
|
14
|
+
teleported: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
18
|
hideAfter: {
|
|
19
19
|
type: import("vue").PropType<number>;
|
|
20
20
|
default: number;
|
|
@@ -52,8 +52,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
52
52
|
cancel: (val: MouseEvent) => void;
|
|
53
53
|
}, import("vue").PublicProps, {
|
|
54
54
|
width: string | number;
|
|
55
|
-
teleported: boolean;
|
|
56
55
|
icon: string | import("vft/es/vft").IconProps;
|
|
56
|
+
teleported: boolean;
|
|
57
57
|
hideAfter: number;
|
|
58
58
|
persistent: boolean;
|
|
59
59
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -74,14 +74,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
74
|
type: import("vue").PropType<string | number>;
|
|
75
75
|
default: number;
|
|
76
76
|
};
|
|
77
|
-
teleported: {
|
|
78
|
-
type: import("vue").PropType<boolean>;
|
|
79
|
-
default: boolean;
|
|
80
|
-
};
|
|
81
77
|
icon: {
|
|
82
78
|
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
83
79
|
default: string;
|
|
84
80
|
};
|
|
81
|
+
teleported: {
|
|
82
|
+
type: import("vue").PropType<boolean>;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
85
|
hideAfter: {
|
|
86
86
|
type: import("vue").PropType<number>;
|
|
87
87
|
default: number;
|
|
@@ -116,8 +116,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
116
116
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
117
117
|
}>, {}, {}, {}, {}, {
|
|
118
118
|
width: string | number;
|
|
119
|
-
teleported: boolean;
|
|
120
119
|
icon: string | import("vft/es/vft").IconProps;
|
|
120
|
+
teleported: boolean;
|
|
121
121
|
hideAfter: number;
|
|
122
122
|
persistent: boolean;
|
|
123
123
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -135,14 +135,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
135
135
|
type: import("vue").PropType<string | number>;
|
|
136
136
|
default: number;
|
|
137
137
|
};
|
|
138
|
-
teleported: {
|
|
139
|
-
type: import("vue").PropType<boolean>;
|
|
140
|
-
default: boolean;
|
|
141
|
-
};
|
|
142
138
|
icon: {
|
|
143
139
|
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
144
140
|
default: string;
|
|
145
141
|
};
|
|
142
|
+
teleported: {
|
|
143
|
+
type: import("vue").PropType<boolean>;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
146
146
|
hideAfter: {
|
|
147
147
|
type: import("vue").PropType<number>;
|
|
148
148
|
default: number;
|
|
@@ -180,8 +180,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
180
180
|
cancel: (val: MouseEvent) => void;
|
|
181
181
|
}, string, {
|
|
182
182
|
width: string | number;
|
|
183
|
-
teleported: boolean;
|
|
184
183
|
icon: string | import("vft/es/vft").IconProps;
|
|
184
|
+
teleported: boolean;
|
|
185
185
|
hideAfter: number;
|
|
186
186
|
persistent: boolean;
|
|
187
187
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -43,8 +43,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
43
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
width: string | number;
|
|
46
|
-
teleported: boolean;
|
|
47
46
|
icon: string | IconProps;
|
|
47
|
+
teleported: boolean;
|
|
48
48
|
hideAfter: number;
|
|
49
49
|
persistent: boolean;
|
|
50
50
|
confirmButtonType: ButtonType;
|
|
@@ -5,7 +5,7 @@ export { VftPopperArrow, VftPopperContent, VftPopperTrigger };
|
|
|
5
5
|
export declare const VftPopper: import("vft/es/utils").SFCWithInstall<{
|
|
6
6
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
7
7
|
role: {
|
|
8
|
-
type: import("vue").PropType<"dialog" | "menu" | "grid" | "group" | "listbox" | "tooltip" | "
|
|
8
|
+
type: import("vue").PropType<"tree" | "dialog" | "menu" | "grid" | "group" | "listbox" | "tooltip" | "navigation">;
|
|
9
9
|
};
|
|
10
10
|
}>> & Readonly<{}>, {
|
|
11
11
|
triggerRef: import("vue").Ref<import("./constants").Measurable | undefined>;
|
|
@@ -22,7 +22,7 @@ export declare const VftPopper: import("vft/es/utils").SFCWithInstall<{
|
|
|
22
22
|
Defaults: {};
|
|
23
23
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
24
24
|
role: {
|
|
25
|
-
type: import("vue").PropType<"dialog" | "menu" | "grid" | "group" | "listbox" | "tooltip" | "
|
|
25
|
+
type: import("vue").PropType<"tree" | "dialog" | "menu" | "grid" | "group" | "listbox" | "tooltip" | "navigation">;
|
|
26
26
|
};
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
28
|
triggerRef: import("vue").Ref<import("./constants").Measurable | undefined>;
|
|
@@ -36,7 +36,7 @@ export declare const VftPopper: import("vft/es/utils").SFCWithInstall<{
|
|
|
36
36
|
__isSuspense?: never;
|
|
37
37
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
38
38
|
role: {
|
|
39
|
-
type: import("vue").PropType<"dialog" | "menu" | "grid" | "group" | "listbox" | "tooltip" | "
|
|
39
|
+
type: import("vue").PropType<"tree" | "dialog" | "menu" | "grid" | "group" | "listbox" | "tooltip" | "navigation">;
|
|
40
40
|
};
|
|
41
41
|
}>> & Readonly<{}>, {
|
|
42
42
|
triggerRef: import("vue").Ref<import("./constants").Measurable | undefined>;
|