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.
Files changed (41) hide show
  1. package/es/components/carousel/use-carousel.js +1 -1
  2. package/es/components/col/col.vue.d.ts +3 -0
  3. package/es/components/col/col.vue2.js +23 -22
  4. package/es/components/col/index.d.ts +15 -0
  5. package/es/components/col/types.d.ts +1 -0
  6. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  7. package/es/components/input/input.vue2.js +4 -4
  8. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  9. package/es/components/multiple-tabs/use/use-tab-dropdown.js +28 -22
  10. package/es/components/row/index.d.ts +9 -0
  11. package/es/components/row/row.vue2.js +16 -14
  12. package/es/components/row/types.d.ts +1 -0
  13. package/es/components/super-form/super-form-item.vue2.js +1 -1
  14. package/es/components/upload/index.d.ts +1 -0
  15. package/es/components/upload/upload-list.vue.d.ts +1 -0
  16. package/es/components/upload/upload-list.vue2.js +29 -26
  17. package/es/components/upload/upload.vue.d.ts +1 -0
  18. package/es/components/upload/upload.vue2.js +41 -35
  19. package/es/package.json.d.ts +1 -1
  20. package/es/package.json.js +1 -1
  21. package/es/utils/vue/vnode.js +1 -1
  22. package/lib/components/col/col.vue.d.ts +3 -0
  23. package/lib/components/col/col.vue2.cjs +1 -1
  24. package/lib/components/col/index.d.ts +15 -0
  25. package/lib/components/col/types.d.ts +1 -0
  26. package/lib/components/input/input.vue2.cjs +1 -1
  27. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  28. package/lib/components/row/index.d.ts +9 -0
  29. package/lib/components/row/row.vue2.cjs +1 -1
  30. package/lib/components/row/types.d.ts +1 -0
  31. package/lib/components/upload/index.d.ts +1 -0
  32. package/lib/components/upload/upload-list.vue.d.ts +1 -0
  33. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  34. package/lib/components/upload/upload.vue.d.ts +1 -0
  35. package/lib/components/upload/upload.vue2.cjs +1 -1
  36. package/lib/package.json.cjs +1 -1
  37. package/lib/package.json.d.ts +1 -1
  38. package/package.json +4 -4
  39. package/theme-style/src/multiple-tabs.scss +5 -1
  40. package/theme-style/vft-multiple-tabs.css +1 -1
  41. 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 { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
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 c, isObject as _ } from "@vft/utils";
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 j } from "../row/constants.js";
13
- const E = f({
12
+ import { rowContextKey as N } from "../row/constants.js";
13
+ const j = f({
14
14
  name: "vft-col"
15
15
  }), G = /* @__PURE__ */ f({
16
- ...E,
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(r) {
30
- const s = r, o = C("col"), { gutter: a } = d(j, { gutter: n(() => 0) }), i = n(() => {
31
- const e = {};
32
- return a.value && (e.paddingLeft = e.paddingRight = `${a.value / 2}px`), e;
33
- }), m = n(() => {
34
- const e = [];
35
- return ["span", "offset", "pull", "push"].forEach((t) => {
36
- const l = s[t];
37
- c(l) && (t === "span" ? e.push(o.b(`${s[t]}`)) : l > 0 && e.push(o.b(`${t}-${s[t]}`)));
38
- }), ["xs", "sm", "md", "lg", "xl"].forEach((t) => {
39
- c(s[t]) ? e.push(o.b(`${t}-${s[t]}`)) : _(s[t]) && Object.entries(s[t]).forEach(
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
- e.push(
42
- l !== "span" ? o.b(`${t}-${l}-${u}`) : o.b(`${t}-${u}`)
42
+ t.push(
43
+ l !== "span" ? o.b(`${s}-${l}-${u}`) : o.b(`${s}-${u}`)
43
44
  );
44
45
  }
45
46
  );
46
- }), a.value && e.push(o.is("guttered")), [o.b(), e];
47
+ }), a.value && t.push(o.is("guttered")), e.className && t.push(e.className), [o.b(), t];
47
48
  });
48
- return (e, p) => ($(), h(g(r.tag), {
49
- class: v(m.value),
50
- style: b(i.value)
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(e.$slots, "default")
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 () => {
@@ -7,6 +7,7 @@ export interface ColProps extends ColSizeObject {
7
7
  md?: ColSize;
8
8
  lg?: ColSize;
9
9
  xl?: ColSize;
10
+ className?: string;
10
11
  }
11
12
  export type ColSizeObject = {
12
13
  /** 栅格占据的列数 */
@@ -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 g, ref as C, inject as x } from "vue";
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 = C();
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 ? g : void 0);
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 { 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";
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 } = at(), { inputId: Y } = nt(we.props, {
88
+ }), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(we.props, {
89
89
  formItemContext: F
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", {
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, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
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 C, useTabs as D } from "@vft/store";
2
+ import { useMultipleTabStore as D, useTabs as v } from "@vft/store";
3
3
  import "@vft/utils";
4
- import { reactive as v, computed as w } from "vue";
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 E(e, n) {
9
- const i = v({
8
+ function K(e, t) {
9
+ const i = w({
10
10
  current: null,
11
11
  currentIndex: 0
12
- }), t = C(), {
13
- refreshPage: a,
14
- closeAll: g,
12
+ }), n = D(), {
13
+ refreshPage: g,
14
+ closeAll: a,
15
15
  close: u,
16
16
  closeLeft: h,
17
- closeOther: p,
18
- closeRight: b,
19
- newWinTab: f
20
- } = D(), x = w(() => {
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 <= n, s = t.getTabList.length <= n || o === t.getTabList.length - 1 && t.getLastDragEndIndex >= 0, T = t.getTabList.length === n || t.getTabList.length === n + 1 && o === n, l = t.getTabList.length === n;
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: () => a(e)
29
+ handler: () => g(e)
29
30
  },
30
31
  {
31
32
  iconCfg: { icon: "icon-new-tab" },
32
33
  text: "新页面打开",
33
- handler: () => f(e),
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: () => b(e)
54
+ handler: () => p(e)
54
55
  },
55
56
  {
56
57
  iconCfg: { icon: "icon-close-box-multiple-outline" },
57
58
  text: "关闭其它标签页",
58
- disabled: T,
59
- handler: () => p(e)
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: () => g()
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 L(r) {
75
+ function T(r) {
70
76
  return (o) => {
71
77
  if (!r)
72
78
  return;
73
79
  o?.preventDefault();
74
- const c = t.getTabList.findIndex(
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: x, handleContextMenu: L };
86
+ return { getDropMenuList: L, handleContextMenu: T };
81
87
  }
82
88
  export {
83
- E as useTabDropdown
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 a, provide as n, computed as o, createBlock as s, openBlock as u, resolveDynamicComponent as m, normalizeStyle as f, normalizeClass as c, withCtx as g, renderSlot as d } from "vue";
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 = a({
12
+ const v = o({
13
13
  name: "vft-row"
14
- }), D = /* @__PURE__ */ a({
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 r = y("row");
24
- n(p, {
25
- gutter: o(() => t.gutter)
24
+ const a = y("row");
25
+ s(p, {
26
+ gutter: r(() => t.gutter)
26
27
  });
27
- const i = o(() => {
28
+ const i = r(() => {
28
29
  const e = {};
29
30
  return t.gutter && (e.marginRight = e.marginLeft = `-${t.gutter / 2}px`), e;
30
- }), l = o(() => [
31
- r.b(),
32
- r.is(`justify-${t.justify}`, t.justify !== "start"),
33
- r.is(`align-${t.align}`, t.align !== "top")
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) => (u(), s(m(t.tag), {
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
- D as default
49
+ b as default
48
50
  };
@@ -9,4 +9,5 @@ export interface RowProps {
9
9
  justify?: RowJustify;
10
10
  /** flex 布局下的垂直排列方式 */
11
11
  align?: RowAlign;
12
+ className?: string;
12
13
  }
@@ -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, isVNode as le, createTextVNode as O, resolveComponent as N } from "vue";
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";
@@ -581,6 +581,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
581
581
  $slots: {
582
582
  file?(_: {
583
583
  file: import("./types").UploadFile;
584
+ index: number;
584
585
  }): any;
585
586
  trigger?(_: {}): any;
586
587
  default?(_: {}): any;
@@ -8,6 +8,7 @@ export interface UploadListProps {
8
8
  declare function __VLS_template(): {
9
9
  default?(_: {
10
10
  file: UploadFile;
11
+ index: number;
11
12
  }): any;
12
13
  append?(_: {}): any;
13
14
  };
@@ -1,22 +1,22 @@
1
- import { defineComponent as C, ref as x, createBlock as p, openBlock as n, TransitionGroup as B, unref as e, normalizeClass as t, withCtx as F, createElementBlock as m, renderSlot as h, Fragment as N, renderList as z, withKeys as I, createCommentVNode as a, createElementVNode as b, withModifiers as P, createVNode as f, toDisplayString as K, normalizeStyle as L, nextTick as S } from "vue";
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 D } from "../progress/index.js";
4
+ import { VftProgress as E } from "../progress/index.js";
5
5
  import "@vueuse/core";
6
6
  import "@vft/utils";
7
- import { debugWarn as E } from "../../utils/error.js";
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 U } from "../form/hooks/use-form-common-props.js";
15
- import { useFormItem as G } from "../form/hooks/use-form-item.js";
16
- const M = ["onKeydown"], R = ["src"], W = ["onClick"], j = ["onClick"], q = ["onClick"], A = C({
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
- }), oe = /* @__PURE__ */ C({
19
- ...A,
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 = U(), { formItem: V } = G(), y = x(!1), v = (k) => {
30
- w("remove", k), S(() => {
31
- V?.validate("change").catch((o) => E(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(B, {
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: F(() => [
44
- (n(!0), m(N, null, z(l.files, (s) => (n(), m("li", {
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: I((r) => !e(d) && v(s), ["delete"]),
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", { file: s }, () => [
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, R)) : a("", !0),
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: P((r) => l.handlePreview(s), ["prevent"])
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
- }, K(s.name), 3)
79
- ], 10, W),
80
- s.status === "uploading" ? (n(), p(e(D), {
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: L(l.listType === "picture-card" ? "" : "margin-top: 0.5rem")
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, j),
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, q))
136
+ ], 10, A))
134
137
  ], 2)) : a("", !0)
135
138
  ])
136
- ], 42, M))), 128)),
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
- oe as default
147
+ ae as default
145
148
  };
@@ -2,6 +2,7 @@ import type { UploadProps } from './types';
2
2
  declare function __VLS_template(): {
3
3
  file?(_: {
4
4
  file: import("./types").UploadFile;
5
+ index: number;
5
6
  }): any;
6
7
  trigger?(_: {}): any;
7
8
  default?(_: {}): any;