vft 0.0.464 → 0.0.466
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/col/col.vue.d.ts +3 -0
- package/es/components/col/col.vue2.js +23 -22
- package/es/components/col/index.d.ts +15 -0
- package/es/components/col/types.d.ts +1 -0
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +28 -22
- package/es/components/row/index.d.ts +9 -0
- package/es/components/row/row.vue2.js +16 -14
- package/es/components/row/types.d.ts +1 -0
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/upload/upload-list.vue.d.ts +1 -0
- package/es/components/upload/upload-list.vue2.js +29 -26
- package/es/components/upload/upload.vue.d.ts +1 -0
- package/es/components/upload/upload.vue2.js +41 -35
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/col/col.vue.d.ts +3 -0
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/col/index.d.ts +15 -0
- package/lib/components/col/types.d.ts +1 -0
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/row/index.d.ts +9 -0
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/row/types.d.ts +1 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/upload/upload-list.vue.d.ts +1 -0
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -0
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/src/multiple-tabs.scss +5 -1
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/web-types.json +1 -1
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { carouselContextKey as Se, CAROUSEL_ITEM_NAME as H } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -8,16 +8,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
8
8
|
offset: number;
|
|
9
9
|
pull: number;
|
|
10
10
|
push: number;
|
|
11
|
+
className: string;
|
|
11
12
|
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ColProps>, {
|
|
12
13
|
tag: string;
|
|
13
14
|
span: number;
|
|
14
15
|
offset: number;
|
|
15
16
|
pull: number;
|
|
16
17
|
push: number;
|
|
18
|
+
className: string;
|
|
17
19
|
}>>> & Readonly<{}>, {
|
|
18
20
|
span: number;
|
|
19
21
|
push: number;
|
|
20
22
|
offset: number;
|
|
23
|
+
className: string;
|
|
21
24
|
tag: string;
|
|
22
25
|
pull: number;
|
|
23
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as f, inject as d, computed as n, createBlock as h, openBlock as $, resolveDynamicComponent as g, normalizeStyle as b, normalizeClass as v, withCtx as x, renderSlot as y } from "vue";
|
|
2
2
|
import "../row/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
|
-
import { isNumber as
|
|
4
|
+
import { isNumber as r, isObject as _ } from "@vft/utils";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../form/index.js";
|
|
@@ -9,11 +9,11 @@ import { useNamespace as C } from "../../hooks/use-namespace/index.js";
|
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
import { rowContextKey as
|
|
13
|
-
const
|
|
12
|
+
import { rowContextKey as N } from "../row/constants.js";
|
|
13
|
+
const j = f({
|
|
14
14
|
name: "vft-col"
|
|
15
15
|
}), G = /* @__PURE__ */ f({
|
|
16
|
-
...
|
|
16
|
+
...j,
|
|
17
17
|
props: {
|
|
18
18
|
tag: { default: "div" },
|
|
19
19
|
xs: {},
|
|
@@ -21,36 +21,37 @@ const E = f({
|
|
|
21
21
|
md: {},
|
|
22
22
|
lg: {},
|
|
23
23
|
xl: {},
|
|
24
|
+
className: { default: "" },
|
|
24
25
|
span: { default: 24 },
|
|
25
26
|
offset: { default: 0 },
|
|
26
27
|
pull: { default: 0 },
|
|
27
28
|
push: { default: 0 }
|
|
28
29
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
return a.value && (
|
|
33
|
-
}),
|
|
34
|
-
const
|
|
35
|
-
return ["span", "offset", "pull", "push"].forEach((
|
|
36
|
-
const l = s
|
|
37
|
-
|
|
38
|
-
}), ["xs", "sm", "md", "lg", "xl"].forEach((
|
|
39
|
-
|
|
30
|
+
setup(c) {
|
|
31
|
+
const e = c, o = C("col"), { gutter: a } = d(N, { gutter: n(() => 0) }), m = n(() => {
|
|
32
|
+
const t = {};
|
|
33
|
+
return a.value && (t.paddingLeft = t.paddingRight = `${a.value / 2}px`), t;
|
|
34
|
+
}), i = n(() => {
|
|
35
|
+
const t = [];
|
|
36
|
+
return ["span", "offset", "pull", "push"].forEach((s) => {
|
|
37
|
+
const l = e[s];
|
|
38
|
+
r(l) && (s === "span" ? t.push(o.b(`${e[s]}`)) : l > 0 && t.push(o.b(`${s}-${e[s]}`)));
|
|
39
|
+
}), ["xs", "sm", "md", "lg", "xl"].forEach((s) => {
|
|
40
|
+
r(e[s]) ? t.push(o.b(`${s}-${e[s]}`)) : _(e[s]) && Object.entries(e[s]).forEach(
|
|
40
41
|
([l, u]) => {
|
|
41
|
-
|
|
42
|
-
l !== "span" ? o.b(`${
|
|
42
|
+
t.push(
|
|
43
|
+
l !== "span" ? o.b(`${s}-${l}-${u}`) : o.b(`${s}-${u}`)
|
|
43
44
|
);
|
|
44
45
|
}
|
|
45
46
|
);
|
|
46
|
-
}), a.value &&
|
|
47
|
+
}), a.value && t.push(o.is("guttered")), e.className && t.push(e.className), [o.b(), t];
|
|
47
48
|
});
|
|
48
|
-
return (
|
|
49
|
-
class: v(
|
|
50
|
-
style: b(
|
|
49
|
+
return (t, p) => ($(), h(g(c.tag), {
|
|
50
|
+
class: v(i.value),
|
|
51
|
+
style: b(m.value)
|
|
51
52
|
}, {
|
|
52
53
|
default: x(() => [
|
|
53
|
-
y(
|
|
54
|
+
y(t.$slots, "default")
|
|
54
55
|
]),
|
|
55
56
|
_: 3
|
|
56
57
|
}, 8, ["class", "style"]));
|
|
@@ -12,6 +12,10 @@ export declare const VftCol: import("vft/es/utils").SFCWithInstall<{
|
|
|
12
12
|
type: import("vue").PropType<number>;
|
|
13
13
|
default: number;
|
|
14
14
|
};
|
|
15
|
+
className: {
|
|
16
|
+
type: import("vue").PropType<string>;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
15
19
|
tag: {
|
|
16
20
|
type: import("vue").PropType<string>;
|
|
17
21
|
default: string;
|
|
@@ -39,6 +43,7 @@ export declare const VftCol: import("vft/es/utils").SFCWithInstall<{
|
|
|
39
43
|
span: number;
|
|
40
44
|
push: number;
|
|
41
45
|
offset: number;
|
|
46
|
+
className: string;
|
|
42
47
|
tag: string;
|
|
43
48
|
pull: number;
|
|
44
49
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
@@ -61,6 +66,10 @@ export declare const VftCol: import("vft/es/utils").SFCWithInstall<{
|
|
|
61
66
|
type: import("vue").PropType<number>;
|
|
62
67
|
default: number;
|
|
63
68
|
};
|
|
69
|
+
className: {
|
|
70
|
+
type: import("vue").PropType<string>;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
64
73
|
tag: {
|
|
65
74
|
type: import("vue").PropType<string>;
|
|
66
75
|
default: string;
|
|
@@ -88,6 +97,7 @@ export declare const VftCol: import("vft/es/utils").SFCWithInstall<{
|
|
|
88
97
|
span: number;
|
|
89
98
|
push: number;
|
|
90
99
|
offset: number;
|
|
100
|
+
className: string;
|
|
91
101
|
tag: string;
|
|
92
102
|
pull: number;
|
|
93
103
|
}>;
|
|
@@ -107,6 +117,10 @@ export declare const VftCol: import("vft/es/utils").SFCWithInstall<{
|
|
|
107
117
|
type: import("vue").PropType<number>;
|
|
108
118
|
default: number;
|
|
109
119
|
};
|
|
120
|
+
className: {
|
|
121
|
+
type: import("vue").PropType<string>;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
110
124
|
tag: {
|
|
111
125
|
type: import("vue").PropType<string>;
|
|
112
126
|
default: string;
|
|
@@ -134,6 +148,7 @@ export declare const VftCol: import("vft/es/utils").SFCWithInstall<{
|
|
|
134
148
|
span: number;
|
|
135
149
|
push: number;
|
|
136
150
|
offset: number;
|
|
151
|
+
className: string;
|
|
137
152
|
tag: string;
|
|
138
153
|
pull: number;
|
|
139
154
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keysOf as f } from "@vft/utils";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import { debugWarn as v } from "../../../utils/error.js";
|
|
4
|
-
import { getCurrentInstance as l, computed as i, unref as p, provide as
|
|
4
|
+
import { ref as g, getCurrentInstance as l, computed as i, unref as p, provide as C, inject as x } from "vue";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../form/index.js";
|
|
7
7
|
import { namespaceContextKey as I, useNamespace as b, defaultNamespace as y } from "../../../hooks/use-namespace/index.js";
|
|
@@ -9,7 +9,7 @@ import "../../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import { zIndexContextKey as G, useZIndex as z, defaultInitialZIndex as K } from "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { configProviderContextKey as m } from "../constants.js";
|
|
12
|
-
const a =
|
|
12
|
+
const a = g();
|
|
13
13
|
function d(o, e = void 0) {
|
|
14
14
|
const n = l() ? x(m, a) : a;
|
|
15
15
|
return o ? i(() => n?.value?.[o] ?? e) : n;
|
|
@@ -27,7 +27,7 @@ function B(o) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const S = (o, e, n = !1) => {
|
|
30
|
-
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ?
|
|
30
|
+
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ? C : void 0);
|
|
31
31
|
if (!u) {
|
|
32
32
|
v(
|
|
33
33
|
"provideGlobalConfig",
|
|
@@ -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 { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
|
|
17
|
+
import { useFormSize as at, useFormDisabled as nt } from "../form/hooks/use-form-common-props.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 } = et(), { inputId: Y } = tt(we.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = at(), x = nt(), 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, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } 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";
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { getRouterKeyPath as d } from "@vft/router";
|
|
2
|
-
import { useMultipleTabStore as
|
|
2
|
+
import { useMultipleTabStore as D, useTabs as v } from "@vft/store";
|
|
3
3
|
import "@vft/utils";
|
|
4
|
-
import { reactive as
|
|
4
|
+
import { reactive as w, computed as M } from "vue";
|
|
5
5
|
import "../../context-menu/context-menu.vue2.js";
|
|
6
6
|
import "../../icon/index.js";
|
|
7
7
|
import "vue-router";
|
|
8
|
-
function
|
|
9
|
-
const i =
|
|
8
|
+
function K(e, t) {
|
|
9
|
+
const i = w({
|
|
10
10
|
current: null,
|
|
11
11
|
currentIndex: 0
|
|
12
|
-
}),
|
|
13
|
-
refreshPage:
|
|
14
|
-
closeAll:
|
|
12
|
+
}), n = D(), {
|
|
13
|
+
refreshPage: g,
|
|
14
|
+
closeAll: a,
|
|
15
15
|
close: u,
|
|
16
16
|
closeLeft: h,
|
|
17
|
-
closeOther:
|
|
18
|
-
closeRight:
|
|
19
|
-
newWinTab:
|
|
20
|
-
|
|
17
|
+
closeOther: f,
|
|
18
|
+
closeRight: p,
|
|
19
|
+
newWinTab: x,
|
|
20
|
+
fullScreen: b
|
|
21
|
+
} = v(), L = M(() => {
|
|
21
22
|
if (!e)
|
|
22
23
|
return;
|
|
23
|
-
const { meta: r } = e, o = i.currentIndex, c = o === 0 || o <=
|
|
24
|
+
const { meta: r } = e, o = i.currentIndex, c = o === 0 || o <= t, s = n.getTabList.length <= t || o === n.getTabList.length - 1 && n.getLastDragEndIndex >= 0, C = n.getTabList.length === t || n.getTabList.length === t + 1 && o === t, l = n.getTabList.length === t;
|
|
24
25
|
return [
|
|
25
26
|
{
|
|
26
27
|
iconCfg: { icon: "icon-refresh-right" },
|
|
27
28
|
text: "刷新",
|
|
28
|
-
handler: () =>
|
|
29
|
+
handler: () => g(e)
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
iconCfg: { icon: "icon-new-tab" },
|
|
32
33
|
text: "新页面打开",
|
|
33
|
-
handler: () =>
|
|
34
|
+
handler: () => x(e),
|
|
34
35
|
divider: !0
|
|
35
36
|
},
|
|
36
37
|
{
|
|
@@ -50,35 +51,40 @@ function E(e, n) {
|
|
|
50
51
|
text: "关闭右侧标签页",
|
|
51
52
|
disabled: s,
|
|
52
53
|
divider: !0,
|
|
53
|
-
handler: () =>
|
|
54
|
+
handler: () => p(e)
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
iconCfg: { icon: "icon-close-box-multiple-outline" },
|
|
57
58
|
text: "关闭其它标签页",
|
|
58
|
-
disabled:
|
|
59
|
-
handler: () =>
|
|
59
|
+
disabled: C,
|
|
60
|
+
handler: () => f(e)
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
63
|
iconCfg: { icon: "icon-vector-square-delete" },
|
|
63
64
|
text: "关闭所有标签页",
|
|
64
65
|
disabled: l,
|
|
65
|
-
handler: () =>
|
|
66
|
+
handler: () => a()
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
iconCfg: { icon: "icon-full-screen" },
|
|
70
|
+
text: "全屏",
|
|
71
|
+
handler: () => b(e)
|
|
66
72
|
}
|
|
67
73
|
];
|
|
68
74
|
});
|
|
69
|
-
function
|
|
75
|
+
function T(r) {
|
|
70
76
|
return (o) => {
|
|
71
77
|
if (!r)
|
|
72
78
|
return;
|
|
73
79
|
o?.preventDefault();
|
|
74
|
-
const c =
|
|
80
|
+
const c = n.getTabList.findIndex(
|
|
75
81
|
(s) => d(s) === d(r)
|
|
76
82
|
);
|
|
77
83
|
i.current = r, i.currentIndex = c;
|
|
78
84
|
};
|
|
79
85
|
}
|
|
80
|
-
return { getDropMenuList:
|
|
86
|
+
return { getDropMenuList: L, handleContextMenu: T };
|
|
81
87
|
}
|
|
82
88
|
export {
|
|
83
|
-
|
|
89
|
+
K as useTabDropdown
|
|
84
90
|
};
|
|
@@ -12,6 +12,9 @@ export declare const VftRow: import("vft/es/utils").SFCWithInstall<{
|
|
|
12
12
|
align: {
|
|
13
13
|
type: import("vue").PropType<import("./types").RowAlign>;
|
|
14
14
|
};
|
|
15
|
+
className: {
|
|
16
|
+
type: import("vue").PropType<string>;
|
|
17
|
+
};
|
|
15
18
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
16
19
|
P: {};
|
|
17
20
|
B: {};
|
|
@@ -32,6 +35,9 @@ export declare const VftRow: import("vft/es/utils").SFCWithInstall<{
|
|
|
32
35
|
align: {
|
|
33
36
|
type: import("vue").PropType<import("./types").RowAlign>;
|
|
34
37
|
};
|
|
38
|
+
className: {
|
|
39
|
+
type: import("vue").PropType<string>;
|
|
40
|
+
};
|
|
35
41
|
}>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
36
42
|
__isFragment?: never;
|
|
37
43
|
__isTeleport?: never;
|
|
@@ -49,6 +55,9 @@ export declare const VftRow: import("vft/es/utils").SFCWithInstall<{
|
|
|
49
55
|
align: {
|
|
50
56
|
type: import("vue").PropType<import("./types").RowAlign>;
|
|
51
57
|
};
|
|
58
|
+
className: {
|
|
59
|
+
type: import("vue").PropType<string>;
|
|
60
|
+
};
|
|
52
61
|
}>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
53
62
|
$slots: {
|
|
54
63
|
default?(_: {}): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as o, provide as s, computed as r, createBlock as n, openBlock as m, resolveDynamicComponent as u, normalizeStyle as f, normalizeClass as c, withCtx as g, renderSlot as d } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -9,30 +9,32 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
11
|
import { rowContextKey as p } from "./constants.js";
|
|
12
|
-
const v =
|
|
12
|
+
const v = o({
|
|
13
13
|
name: "vft-row"
|
|
14
|
-
}),
|
|
14
|
+
}), b = /* @__PURE__ */ o({
|
|
15
15
|
...v,
|
|
16
16
|
props: {
|
|
17
17
|
tag: { default: "div" },
|
|
18
18
|
gutter: { default: 0 },
|
|
19
19
|
justify: { default: "start" },
|
|
20
|
-
align: { default: "top" }
|
|
20
|
+
align: { default: "top" },
|
|
21
|
+
className: {}
|
|
21
22
|
},
|
|
22
23
|
setup(t) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
gutter:
|
|
24
|
+
const a = y("row");
|
|
25
|
+
s(p, {
|
|
26
|
+
gutter: r(() => t.gutter)
|
|
26
27
|
});
|
|
27
|
-
const i =
|
|
28
|
+
const i = r(() => {
|
|
28
29
|
const e = {};
|
|
29
30
|
return t.gutter && (e.marginRight = e.marginLeft = `-${t.gutter / 2}px`), e;
|
|
30
|
-
}), l =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
}), l = r(() => [
|
|
32
|
+
a.b(),
|
|
33
|
+
a.is(`justify-${t.justify}`, t.justify !== "start"),
|
|
34
|
+
a.is(`align-${t.align}`, t.align !== "top"),
|
|
35
|
+
t.className
|
|
34
36
|
]);
|
|
35
|
-
return (e, w) => (
|
|
37
|
+
return (e, w) => (m(), n(u(t.tag), {
|
|
36
38
|
class: c(l.value),
|
|
37
39
|
style: f(i.value)
|
|
38
40
|
}, {
|
|
@@ -44,5 +46,5 @@ const v = a({
|
|
|
44
46
|
}
|
|
45
47
|
});
|
|
46
48
|
export {
|
|
47
|
-
|
|
49
|
+
b as default
|
|
48
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne,
|
|
1
|
+
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne, createTextVNode as O, isVNode as le, resolveComponent as N } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as C, ref as
|
|
1
|
+
import { defineComponent as C, ref as B, createBlock as p, openBlock as n, TransitionGroup as F, unref as e, normalizeClass as t, withCtx as N, createElementBlock as m, renderSlot as h, Fragment as z, renderList as I, withKeys as P, createCommentVNode as a, createElementVNode as b, withModifiers as K, createVNode as f, toDisplayString as L, normalizeStyle as S, nextTick as D } from "vue";
|
|
2
2
|
import "../form/index.js";
|
|
3
3
|
import { VftIcon as u } from "../icon/index.js";
|
|
4
|
-
import { VftProgress as
|
|
4
|
+
import { VftProgress as E } from "../progress/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "@vft/utils";
|
|
7
|
-
import { debugWarn as
|
|
7
|
+
import { debugWarn as U } from "../../utils/error.js";
|
|
8
8
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
9
|
import "lodash-es";
|
|
10
10
|
import { useNamespace as g } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import { useFormDisabled as
|
|
15
|
-
import { useFormItem as
|
|
16
|
-
const
|
|
14
|
+
import { useFormDisabled as G } from "../form/hooks/use-form-common-props.js";
|
|
15
|
+
import { useFormItem as M } from "../form/hooks/use-form-item.js";
|
|
16
|
+
const R = ["onKeydown"], W = ["src"], j = ["onClick"], q = ["onClick"], A = ["onClick"], H = C({
|
|
17
17
|
name: "VftUploadList"
|
|
18
|
-
}),
|
|
19
|
-
...
|
|
18
|
+
}), ae = /* @__PURE__ */ C({
|
|
19
|
+
...H,
|
|
20
20
|
props: {
|
|
21
21
|
files: { default: [] },
|
|
22
22
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -26,12 +26,12 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
26
26
|
},
|
|
27
27
|
emits: ["remove"],
|
|
28
28
|
setup(l, { emit: T }) {
|
|
29
|
-
const w = T, i = g("upload"), c = g("icon"), $ = g("list"), d =
|
|
30
|
-
w("remove", k),
|
|
31
|
-
V?.validate("change").catch((o) =>
|
|
29
|
+
const w = T, i = g("upload"), c = g("icon"), $ = g("list"), d = G(), { formItem: V } = M(), y = B(!1), v = (k) => {
|
|
30
|
+
w("remove", k), D(() => {
|
|
31
|
+
V?.validate("change").catch((o) => U(o));
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
-
return (k, o) => (n(), p(
|
|
34
|
+
return (k, o) => (n(), p(F, {
|
|
35
35
|
tag: "ul",
|
|
36
36
|
class: t([
|
|
37
37
|
e(i).b("list"),
|
|
@@ -40,8 +40,8 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
40
40
|
]),
|
|
41
41
|
name: e($).b()
|
|
42
42
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
(n(!0), m(
|
|
43
|
+
default: N(() => [
|
|
44
|
+
(n(!0), m(z, null, I(l.files, (s, x) => (n(), m("li", {
|
|
45
45
|
key: s.uid || s.name,
|
|
46
46
|
class: t([
|
|
47
47
|
e(i).be("list", "item"),
|
|
@@ -49,25 +49,28 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
49
49
|
{ focusing: y.value }
|
|
50
50
|
]),
|
|
51
51
|
tabindex: "0",
|
|
52
|
-
onKeydown:
|
|
52
|
+
onKeydown: P((r) => !e(d) && v(s), ["delete"]),
|
|
53
53
|
onFocus: o[0] || (o[0] = (r) => y.value = !0),
|
|
54
54
|
onBlur: o[1] || (o[1] = (r) => y.value = !1),
|
|
55
55
|
onClick: o[2] || (o[2] = (r) => y.value = !1)
|
|
56
56
|
}, [
|
|
57
|
-
h(k.$slots, "default", {
|
|
57
|
+
h(k.$slots, "default", {
|
|
58
|
+
file: s,
|
|
59
|
+
index: x
|
|
60
|
+
}, () => [
|
|
58
61
|
l.listType === "picture" || s.status !== "uploading" && l.listType === "picture-card" ? (n(), m("img", {
|
|
59
62
|
key: 0,
|
|
60
63
|
class: t(e(i).be("list", "item-thumbnail")),
|
|
61
64
|
src: s.url,
|
|
62
65
|
alt: ""
|
|
63
|
-
}, null, 10,
|
|
66
|
+
}, null, 10, W)) : a("", !0),
|
|
64
67
|
s.status === "uploading" || l.listType !== "picture-card" ? (n(), m("div", {
|
|
65
68
|
key: 1,
|
|
66
69
|
class: t(e(i).be("list", "item-info"))
|
|
67
70
|
}, [
|
|
68
71
|
b("a", {
|
|
69
72
|
class: t(e(i).be("list", "item-name")),
|
|
70
|
-
onClick:
|
|
73
|
+
onClick: K((r) => l.handlePreview(s), ["prevent"])
|
|
71
74
|
}, [
|
|
72
75
|
f(e(u), {
|
|
73
76
|
class: t(e(c).m("document")),
|
|
@@ -75,14 +78,14 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
75
78
|
}, null, 8, ["class"]),
|
|
76
79
|
b("span", {
|
|
77
80
|
class: t(e(i).be("list", "item-file-name"))
|
|
78
|
-
},
|
|
79
|
-
], 10,
|
|
80
|
-
s.status === "uploading" ? (n(), p(e(
|
|
81
|
+
}, L(s.name), 3)
|
|
82
|
+
], 10, j),
|
|
83
|
+
s.status === "uploading" ? (n(), p(e(E), {
|
|
81
84
|
key: 0,
|
|
82
85
|
type: l.listType === "picture-card" ? "circle" : "line",
|
|
83
86
|
"stroke-width": l.listType === "picture-card" ? 6 : 2,
|
|
84
87
|
percentage: Number(s.percentage),
|
|
85
|
-
style:
|
|
88
|
+
style: S(l.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
86
89
|
}, null, 8, ["type", "stroke-width", "percentage", "style"])) : a("", !0)
|
|
87
90
|
], 2)) : a("", !0),
|
|
88
91
|
b("label", {
|
|
@@ -120,7 +123,7 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
120
123
|
icon: "icon-zoom-in",
|
|
121
124
|
class: t(e(c).m("zoom-in"))
|
|
122
125
|
}, null, 8, ["class"])
|
|
123
|
-
], 10,
|
|
126
|
+
], 10, q),
|
|
124
127
|
e(d) ? a("", !0) : (n(), m("span", {
|
|
125
128
|
key: 0,
|
|
126
129
|
class: t(e(i).be("list", "item-delete")),
|
|
@@ -130,10 +133,10 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
130
133
|
icon: "icon-delete",
|
|
131
134
|
class: t(e(c).m("delete"))
|
|
132
135
|
}, null, 8, ["class"])
|
|
133
|
-
], 10,
|
|
136
|
+
], 10, A))
|
|
134
137
|
], 2)) : a("", !0)
|
|
135
138
|
])
|
|
136
|
-
], 42,
|
|
139
|
+
], 42, R))), 128)),
|
|
137
140
|
h(k.$slots, "append")
|
|
138
141
|
]),
|
|
139
142
|
_: 3
|
|
@@ -141,5 +144,5 @@ const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["on
|
|
|
141
144
|
}
|
|
142
145
|
});
|
|
143
146
|
export {
|
|
144
|
-
|
|
147
|
+
ae as default
|
|
145
148
|
};
|