vft 0.0.406 → 0.0.409
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/empty/constants.d.ts +10 -12
- package/es/components/empty/constants.js +10 -2
- package/es/components/empty/empty.vue.d.ts +1 -11
- package/es/components/empty/empty.vue2.js +75 -62
- package/es/components/empty/index.d.ts +13 -12
- package/es/components/empty/style/css.d.ts +1 -0
- package/es/components/empty/style/css.js +1 -0
- package/es/components/empty/style/index.d.ts +1 -0
- package/es/components/empty/style/index.js +1 -0
- package/es/components/empty/types.d.ts +9 -0
- package/es/components/empty/types.js +1 -0
- package/es/components/table/style/css.js +1 -1
- package/es/components/table/style/index.js +1 -1
- package/es/components/table/table.vue2.js +14 -14
- package/es/components/types.d.ts +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/empty/constants.cjs +1 -1
- package/lib/components/empty/constants.d.ts +10 -12
- package/lib/components/empty/empty.vue.d.ts +1 -11
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/empty/index.d.ts +13 -12
- package/lib/components/empty/style/css.cjs +1 -1
- package/lib/components/empty/style/css.d.ts +1 -0
- package/lib/components/empty/style/index.cjs +1 -1
- package/lib/components/empty/style/index.d.ts +1 -0
- package/lib/components/empty/types.cjs +1 -0
- package/lib/components/empty/types.d.ts +9 -0
- package/lib/components/table/style/css.cjs +1 -1
- package/lib/components/table/style/index.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/types.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/icon.scss +7 -0
- package/theme-style/src/empty.scss +28 -20
- package/theme-style/vft-empty.css +1 -1
- package/theme-style/vft-upload.css +1 -1
- package/web-types.json +1 -1
- package/es/components/empty/assets/no-collect.png.js +0 -4
- package/es/components/empty/assets/no-data.png.js +0 -4
- package/es/components/empty/assets/no-filter.png.js +0 -4
- package/es/components/empty/assets/no-page-data.png.js +0 -4
- package/es/components/empty/assets/no-search.png.js +0 -4
- package/lib/components/empty/assets/no-collect.png.cjs +0 -1
- package/lib/components/empty/assets/no-data.png.cjs +0 -1
- package/lib/components/empty/assets/no-filter.png.cjs +0 -1
- package/lib/components/empty/assets/no-page-data.png.cjs +0 -1
- package/lib/components/empty/assets/no-search.png.cjs +0 -1
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
NO_SEARCH = "no-search.png"
|
|
12
|
-
}
|
|
1
|
+
export declare const EmptyEnum: {
|
|
2
|
+
readonly NotFound: "icon-not-found";
|
|
3
|
+
readonly NoFilter: "icon-no-filter";
|
|
4
|
+
readonly NoSearch: "icon-no-search";
|
|
5
|
+
readonly NetworkDisconnect: "icon-network-disconnect";
|
|
6
|
+
readonly Delete: "icon-delete";
|
|
7
|
+
readonly NoData: "icon-no-data";
|
|
8
|
+
readonly PageError: "icon-page-error";
|
|
9
|
+
};
|
|
10
|
+
export type EmptyEnumType = (typeof EmptyEnum)[keyof typeof EmptyEnum];
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
const o = {
|
|
2
|
+
NotFound: "icon-not-found",
|
|
3
|
+
NoFilter: "icon-no-filter",
|
|
4
|
+
NoSearch: "icon-no-search",
|
|
5
|
+
NetworkDisconnect: "icon-network-disconnect",
|
|
6
|
+
Delete: "icon-delete",
|
|
7
|
+
NoData: "icon-no-data",
|
|
8
|
+
PageError: "icon-page-error"
|
|
9
|
+
};
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
o as EmptyEnum
|
|
4
12
|
};
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { EmptyEnum } from './constants';
|
|
3
|
-
export interface EmptyProps {
|
|
4
|
-
/** 图片类型或字符串 支持自定义 slot */
|
|
5
|
-
img?: string;
|
|
6
|
-
type?: EmptyEnum;
|
|
7
|
-
/** 图片大小 */
|
|
8
|
-
size?: ComponentSize | string | number[];
|
|
9
|
-
/** 图片底部描述 支持自定义 slot */
|
|
10
|
-
desc?: string;
|
|
11
|
-
}
|
|
1
|
+
import type { EmptyProps } from './types';
|
|
12
2
|
declare function __VLS_template(): {
|
|
13
3
|
img?(_: {}): any;
|
|
14
4
|
default?(_: {}): any;
|
|
@@ -1,98 +1,111 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { renderTNode as _, setSize as A, VNode as E } from "@vft/utils";
|
|
1
|
+
import { defineComponent as d, getCurrentInstance as k, computed as s, resolveComponent as z, createElementBlock as l, openBlock as a, normalizeClass as c, unref as o, createElementVNode as x, createCommentVNode as m, renderSlot as u, createBlock as C, normalizeProps as E, mergeProps as D, createVNode as V } from "vue";
|
|
3
2
|
import "@vueuse/core";
|
|
4
|
-
import {
|
|
3
|
+
import { singleAttrToObj as $, renderTNode as b, VNode as h } from "@vft/utils";
|
|
4
|
+
import { addUnit as w } from "../../utils/helper.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as B } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import D from "./assets/no-filter.png.js";
|
|
14
|
-
import V from "./assets/no-page-data.png.js";
|
|
15
|
-
import $ from "./assets/no-search.png.js";
|
|
16
|
-
import { EmptyEnum as t } from "./constants.js";
|
|
17
|
-
const h = ["src"], x = u({
|
|
11
|
+
import { EmptyEnum as e } from "./constants.js";
|
|
12
|
+
const P = d({
|
|
18
13
|
name: "vft-empty"
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
14
|
+
}), H = /* @__PURE__ */ d({
|
|
15
|
+
...P,
|
|
21
16
|
props: {
|
|
22
|
-
|
|
23
|
-
type: { default: () =>
|
|
24
|
-
size: {},
|
|
17
|
+
icon: {},
|
|
18
|
+
type: { default: () => e.NoData },
|
|
19
|
+
size: { default: "default" },
|
|
25
20
|
desc: {}
|
|
26
21
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
22
|
+
setup(t) {
|
|
23
|
+
const n = B("empty"), p = k(), f = /* @__PURE__ */ new Map([
|
|
29
24
|
[
|
|
30
|
-
|
|
25
|
+
e.NotFound,
|
|
31
26
|
{
|
|
32
|
-
text: "
|
|
33
|
-
img: k
|
|
27
|
+
text: "页面不存在"
|
|
34
28
|
}
|
|
35
29
|
],
|
|
36
30
|
[
|
|
37
|
-
|
|
31
|
+
e.Delete,
|
|
38
32
|
{
|
|
39
|
-
text: "
|
|
40
|
-
size: 300,
|
|
41
|
-
img: V
|
|
33
|
+
text: "已删除"
|
|
42
34
|
}
|
|
43
35
|
],
|
|
44
36
|
[
|
|
45
|
-
|
|
37
|
+
e.NetworkDisconnect,
|
|
46
38
|
{
|
|
47
|
-
text: "
|
|
48
|
-
img: S
|
|
39
|
+
text: "网络已断开"
|
|
49
40
|
}
|
|
50
41
|
],
|
|
51
42
|
[
|
|
52
|
-
|
|
43
|
+
e.NoData,
|
|
53
44
|
{
|
|
54
|
-
text: "
|
|
55
|
-
img: D
|
|
45
|
+
text: "暂无数据"
|
|
56
46
|
}
|
|
57
47
|
],
|
|
58
48
|
[
|
|
59
|
-
|
|
49
|
+
e.PageError,
|
|
60
50
|
{
|
|
61
|
-
text: "
|
|
62
|
-
|
|
51
|
+
text: "系统异常"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
e.NoFilter,
|
|
56
|
+
{
|
|
57
|
+
text: "此筛选条件下无结果"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
e.NoSearch,
|
|
62
|
+
{
|
|
63
|
+
text: "没有搜索结果"
|
|
63
64
|
}
|
|
64
65
|
]
|
|
65
|
-
])
|
|
66
|
-
()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
]), N = s(() => f.get(t.type)), v = s(() => {
|
|
67
|
+
switch (t.size) {
|
|
68
|
+
case "large":
|
|
69
|
+
return 120;
|
|
70
|
+
case "default":
|
|
71
|
+
return 80;
|
|
72
|
+
case "small":
|
|
73
|
+
return 60;
|
|
74
|
+
default:
|
|
75
|
+
return t.size || 80;
|
|
76
|
+
}
|
|
77
|
+
}), g = s(() => $(t.icon, "icon", {
|
|
78
|
+
size: w(v.value),
|
|
79
|
+
icon: t.type
|
|
80
|
+
})), i = s(
|
|
81
|
+
() => b(p, "desc", { defaultNode: N.value?.text })
|
|
82
|
+
);
|
|
83
|
+
return (r, T) => {
|
|
84
|
+
const y = z("vft-icon");
|
|
85
|
+
return a(), l("div", {
|
|
86
|
+
class: c([o(n).b()])
|
|
74
87
|
}, [
|
|
75
|
-
|
|
88
|
+
x("div", {
|
|
89
|
+
class: c(o(n).e("image"))
|
|
90
|
+
}, [
|
|
91
|
+
r.$slots.img ? u(r.$slots, "img", { key: 0 }) : (a(), C(y, E(D({ key: 1 }, g.value)), null, 16))
|
|
92
|
+
], 2),
|
|
93
|
+
i.value ? (a(), l("span", {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: c(o(n).e("desc"))
|
|
96
|
+
}, [
|
|
97
|
+
V(o(h), { content: i.value }, null, 8, ["content"])
|
|
98
|
+
], 2)) : m("", !0),
|
|
99
|
+
r.$slots.default ? (a(), l("div", {
|
|
76
100
|
key: 1,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class: r(e(o).e("desc"))
|
|
84
|
-
}, [
|
|
85
|
-
T(e(E), { content: c.value }, null, 8, ["content"])
|
|
86
|
-
], 2)) : d("", !0),
|
|
87
|
-
m.$slots.default ? (i(), s("div", {
|
|
88
|
-
key: 1,
|
|
89
|
-
class: r(e(o).e("bottom"))
|
|
90
|
-
}, [
|
|
91
|
-
f(m.$slots, "default")
|
|
92
|
-
], 2)) : d("", !0)
|
|
93
|
-
], 2));
|
|
101
|
+
class: c(o(n).e("bottom"))
|
|
102
|
+
}, [
|
|
103
|
+
u(r.$slots, "default")
|
|
104
|
+
], 2)) : m("", !0)
|
|
105
|
+
], 2);
|
|
106
|
+
};
|
|
94
107
|
}
|
|
95
108
|
});
|
|
96
109
|
export {
|
|
97
|
-
|
|
110
|
+
H as default
|
|
98
111
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
|
+
export * from './types';
|
|
2
3
|
export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<{
|
|
3
4
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
-
|
|
5
|
-
type: import("vue").PropType<string>;
|
|
5
|
+
icon: {
|
|
6
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
6
7
|
};
|
|
7
8
|
type: {
|
|
8
|
-
type: import("vue").PropType<import("./constants").
|
|
9
|
+
type: import("vue").PropType<import("./constants").EmptyEnumType>;
|
|
9
10
|
};
|
|
10
11
|
size: {
|
|
11
|
-
type: import("vue").PropType<
|
|
12
|
+
type: import("vue").PropType<import("../types").ComponentSize>;
|
|
12
13
|
};
|
|
13
14
|
desc: {
|
|
14
15
|
type: import("vue").PropType<string>;
|
|
@@ -21,14 +22,14 @@ export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<{
|
|
|
21
22
|
M: {};
|
|
22
23
|
Defaults: {};
|
|
23
24
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
-
|
|
25
|
-
type: import("vue").PropType<string>;
|
|
25
|
+
icon: {
|
|
26
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
26
27
|
};
|
|
27
28
|
type: {
|
|
28
|
-
type: import("vue").PropType<import("./constants").
|
|
29
|
+
type: import("vue").PropType<import("./constants").EmptyEnumType>;
|
|
29
30
|
};
|
|
30
31
|
size: {
|
|
31
|
-
type: import("vue").PropType<
|
|
32
|
+
type: import("vue").PropType<import("../types").ComponentSize>;
|
|
32
33
|
};
|
|
33
34
|
desc: {
|
|
34
35
|
type: import("vue").PropType<string>;
|
|
@@ -38,14 +39,14 @@ export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<{
|
|
|
38
39
|
__isTeleport?: never;
|
|
39
40
|
__isSuspense?: never;
|
|
40
41
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
-
|
|
42
|
-
type: import("vue").PropType<string>;
|
|
42
|
+
icon: {
|
|
43
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
43
44
|
};
|
|
44
45
|
type: {
|
|
45
|
-
type: import("vue").PropType<import("./constants").
|
|
46
|
+
type: import("vue").PropType<import("./constants").EmptyEnumType>;
|
|
46
47
|
};
|
|
47
48
|
size: {
|
|
48
|
-
type: import("vue").PropType<
|
|
49
|
+
type: import("vue").PropType<import("../types").ComponentSize>;
|
|
49
50
|
};
|
|
50
51
|
desc: {
|
|
51
52
|
type: import("vue").PropType<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
2
|
+
import type { ComponentSize } from '../types';
|
|
3
|
+
import { type EmptyEnumType } from './constants';
|
|
4
|
+
export interface EmptyProps {
|
|
5
|
+
icon?: IconProps | string;
|
|
6
|
+
type?: EmptyEnumType;
|
|
7
|
+
size?: ComponentSize;
|
|
8
|
+
desc?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "vft/theme-style/base.css";
|
|
2
2
|
import "vft/theme-style/vft-clamp-toggle.css";
|
|
3
|
+
import "vft/theme-style/vft-icon.css";
|
|
3
4
|
import "vft/theme-style/vft-empty.css";
|
|
4
5
|
import "vft/theme-style/vft-pagination.css";
|
|
5
6
|
import "vft/theme-style/vft-autocomplete.css";
|
|
@@ -15,7 +16,6 @@ import "vft/theme-style/vft-radio.css";
|
|
|
15
16
|
import "vft/theme-style/vft-cascader-panel.css";
|
|
16
17
|
import "vft/theme-style/vft-cascader.css";
|
|
17
18
|
import "vft/theme-style/vft-color-picker.css";
|
|
18
|
-
import "vft/theme-style/vft-icon.css";
|
|
19
19
|
import "vft/theme-style/vft-button.css";
|
|
20
20
|
import "vft/theme-style/vft-progress.css";
|
|
21
21
|
import "vft/theme-style/vft-upload.css";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "vft/theme-style/src/base.scss";
|
|
2
2
|
import "vft/theme-style/src/clamp-toggle.scss";
|
|
3
|
+
import "vft/theme-style/src/icon.scss";
|
|
3
4
|
import "vft/theme-style/src/empty.scss";
|
|
4
5
|
import "vft/theme-style/src/pagination.scss";
|
|
5
6
|
import "vft/theme-style/src/skeleton-item.scss";
|
|
6
|
-
import "vft/theme-style/src/icon.scss";
|
|
7
7
|
import "vft/theme-style/src/skeleton.scss";
|
|
8
8
|
import "vft/theme-style/src/autocomplete.scss";
|
|
9
9
|
import "vft/theme-style/src/input.scss";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, useAttrs as ee, ref as u, getCurrentInstance as ae, computed as R, unref as e, watch as te, nextTick as oe, toRaw as le, createBlock as f, openBlock as m, withCtx as c, createElementVNode as P, normalizeClass as re, createVNode as p, createCommentVNode as D, mergeProps as H, withDirectives as ne, renderSlot as _ } from "vue";
|
|
2
2
|
import { VftEmpty as ce } from "../empty/index.js";
|
|
3
3
|
import { vLoading as ie } from "../loading/directive.js";
|
|
4
|
-
import { deepMerge as
|
|
4
|
+
import { deepMerge as F, isClient as se, omit as ge, isFunction as de } from "@vft/utils";
|
|
5
5
|
import { FormCompEnum as ue } from "../../utils/form-register.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -26,9 +26,9 @@ import { usePagination as Be } from "./use/use-pagination.js";
|
|
|
26
26
|
import { EmptyEnum as ze } from "../empty/constants.js";
|
|
27
27
|
const Re = {
|
|
28
28
|
"vft-loading-text": "加载中..."
|
|
29
|
-
}, Pe =
|
|
29
|
+
}, Pe = T({
|
|
30
30
|
name: "vft-table"
|
|
31
|
-
}), ta = /* @__PURE__ */
|
|
31
|
+
}), ta = /* @__PURE__ */ T({
|
|
32
32
|
...Pe,
|
|
33
33
|
props: {
|
|
34
34
|
sticky: {
|
|
@@ -386,10 +386,10 @@ const Re = {
|
|
|
386
386
|
"zoom"
|
|
387
387
|
],
|
|
388
388
|
setup(De, {
|
|
389
|
-
expose:
|
|
390
|
-
emit:
|
|
389
|
+
expose: E,
|
|
390
|
+
emit: A
|
|
391
391
|
}) {
|
|
392
|
-
const s = me("table"), l =
|
|
392
|
+
const s = me("table"), l = A, N = ee(), h = u(), O = u([]), g = u(), V = ae(), o = R(() => F(V.props, e(g))), {
|
|
393
393
|
getLoading: I,
|
|
394
394
|
setLoading: q
|
|
395
395
|
} = Se(o), {
|
|
@@ -609,7 +609,7 @@ const Re = {
|
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
611
|
})
|
|
612
|
-
}, [J] = fe(
|
|
612
|
+
}, [J] = fe(F({
|
|
613
613
|
schemas: [r.value?.formOptions?.addSearchAllSchema ? Z : {}],
|
|
614
614
|
rowProps: {
|
|
615
615
|
justify: "start"
|
|
@@ -633,29 +633,29 @@ const Re = {
|
|
|
633
633
|
}, Q = () => {
|
|
634
634
|
w(v()), l("form-reset");
|
|
635
635
|
};
|
|
636
|
-
return
|
|
636
|
+
return E({
|
|
637
637
|
table: h,
|
|
638
638
|
...B
|
|
639
639
|
}), (a, t) => (m(), f(e(pe), null, {
|
|
640
640
|
fallback: c(() => [p(e(be))]),
|
|
641
641
|
default: c(() => [P("div", {
|
|
642
642
|
class: re(e(s).b())
|
|
643
|
-
}, [p(e(ye),
|
|
643
|
+
}, [p(e(ye), H({
|
|
644
644
|
ref_key: "xGrid",
|
|
645
645
|
ref: h
|
|
646
646
|
}, r.value), {
|
|
647
|
-
toolbarButtons: c(() => [
|
|
647
|
+
toolbarButtons: c(() => [_(a.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (m(), f(e(Ce), {
|
|
648
648
|
key: 0,
|
|
649
649
|
onRegister: e(J),
|
|
650
650
|
onSubmit: z,
|
|
651
651
|
onReset: Q
|
|
652
|
-
}, null, 8, ["onRegister"])) : D("", !0),
|
|
652
|
+
}, null, 8, ["onRegister"])) : D("", !0), _(a.$slots, "toolbar-right")]),
|
|
653
653
|
empty: c(() => [p(e(ce), {
|
|
654
|
-
type: e(ze).
|
|
654
|
+
type: e(ze).NoData
|
|
655
655
|
}, null, 8, ["type"])]),
|
|
656
656
|
loading: c(() => [ne(P("div", Re, null, 512), [[e(ie), r.value.loading]])]),
|
|
657
657
|
_: 3
|
|
658
|
-
}, 16), r.value.showPager && e(b) ? (m(), f(e(he),
|
|
658
|
+
}, 16), r.value.showPager && e(b) ? (m(), f(e(he), H({
|
|
659
659
|
key: 0
|
|
660
660
|
}, e(i), {
|
|
661
661
|
class: [e(s).e("pager"), e(s).m("pager-" + e(i).pagePlacement)],
|
package/es/components/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ComponentSize = number | string | 'large' | 'small' | '';
|
|
1
|
+
export type ComponentSize = number | string | 'large' | 'small' | 'default';
|
|
2
2
|
export type Nullable<T> = T | null;
|
|
3
3
|
export type Recordable<T = any> = Record<string, T>;
|
|
4
4
|
export type Awaitable<T> = Promise<T> | T;
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={NotFound:"icon-not-found",NoFilter:"icon-no-filter",NoSearch:"icon-no-search",NetworkDisconnect:"icon-network-disconnect",Delete:"icon-delete",NoData:"icon-no-data",PageError:"icon-page-error"};exports.EmptyEnum=o;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
NO_SEARCH = "no-search.png"
|
|
12
|
-
}
|
|
1
|
+
export declare const EmptyEnum: {
|
|
2
|
+
readonly NotFound: "icon-not-found";
|
|
3
|
+
readonly NoFilter: "icon-no-filter";
|
|
4
|
+
readonly NoSearch: "icon-no-search";
|
|
5
|
+
readonly NetworkDisconnect: "icon-network-disconnect";
|
|
6
|
+
readonly Delete: "icon-delete";
|
|
7
|
+
readonly NoData: "icon-no-data";
|
|
8
|
+
readonly PageError: "icon-page-error";
|
|
9
|
+
};
|
|
10
|
+
export type EmptyEnumType = (typeof EmptyEnum)[keyof typeof EmptyEnum];
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { EmptyEnum } from './constants';
|
|
3
|
-
export interface EmptyProps {
|
|
4
|
-
/** 图片类型或字符串 支持自定义 slot */
|
|
5
|
-
img?: string;
|
|
6
|
-
type?: EmptyEnum;
|
|
7
|
-
/** 图片大小 */
|
|
8
|
-
size?: ComponentSize | string | number[];
|
|
9
|
-
/** 图片底部描述 支持自定义 slot */
|
|
10
|
-
desc?: string;
|
|
11
|
-
}
|
|
1
|
+
import type { EmptyProps } from './types';
|
|
12
2
|
declare function __VLS_template(): {
|
|
13
3
|
img?(_: {}): any;
|
|
14
4
|
default?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");const s=require("@vft/utils"),p=require("../../utils/helper.cjs");require("lodash-es");require("../form/index.cjs");const f=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const t=require("./constants.cjs"),E=e.defineComponent({name:"vft-empty"}),y=e.defineComponent({...E,props:{icon:{},type:{default:()=>t.EmptyEnum.NoData},size:{default:"default"},desc:{}},setup(n){const o=f.useNamespace("empty"),u=e.getCurrentInstance(),l=new Map([[t.EmptyEnum.NotFound,{text:"页面不存在"}],[t.EmptyEnum.Delete,{text:"已删除"}],[t.EmptyEnum.NetworkDisconnect,{text:"网络已断开"}],[t.EmptyEnum.NoData,{text:"暂无数据"}],[t.EmptyEnum.PageError,{text:"系统异常"}],[t.EmptyEnum.NoFilter,{text:"此筛选条件下无结果"}],[t.EmptyEnum.NoSearch,{text:"没有搜索结果"}]]),a=e.computed(()=>l.get(n.type)),i=e.computed(()=>{switch(n.size){case"large":return 120;case"default":return 80;case"small":return 60;default:return n.size||80}}),m=e.computed(()=>s.singleAttrToObj(n.icon,"icon",{size:p.addUnit(i.value),icon:n.type})),c=e.computed(()=>s.renderTNode(u,"desc",{defaultNode:a.value?.text}));return(r,v)=>{const d=e.resolveComponent("vft-icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o).b()])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(o).e("image"))},[r.$slots.img?e.renderSlot(r.$slots,"img",{key:0}):(e.openBlock(),e.createBlock(d,e.normalizeProps(e.mergeProps({key:1},m.value)),null,16))],2),c.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("desc"))},[e.createVNode(e.unref(s.VNode),{content:c.value},null,8,["content"])],2)):e.createCommentVNode("",!0),r.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).e("bottom"))},[e.renderSlot(r.$slots,"default")],2)):e.createCommentVNode("",!0)],2)}}});exports.default=y;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
|
+
export * from './types';
|
|
2
3
|
export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<{
|
|
3
4
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
-
|
|
5
|
-
type: import("vue").PropType<string>;
|
|
5
|
+
icon: {
|
|
6
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
6
7
|
};
|
|
7
8
|
type: {
|
|
8
|
-
type: import("vue").PropType<import("./constants").
|
|
9
|
+
type: import("vue").PropType<import("./constants").EmptyEnumType>;
|
|
9
10
|
};
|
|
10
11
|
size: {
|
|
11
|
-
type: import("vue").PropType<
|
|
12
|
+
type: import("vue").PropType<import("../types").ComponentSize>;
|
|
12
13
|
};
|
|
13
14
|
desc: {
|
|
14
15
|
type: import("vue").PropType<string>;
|
|
@@ -21,14 +22,14 @@ export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<{
|
|
|
21
22
|
M: {};
|
|
22
23
|
Defaults: {};
|
|
23
24
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
-
|
|
25
|
-
type: import("vue").PropType<string>;
|
|
25
|
+
icon: {
|
|
26
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
26
27
|
};
|
|
27
28
|
type: {
|
|
28
|
-
type: import("vue").PropType<import("./constants").
|
|
29
|
+
type: import("vue").PropType<import("./constants").EmptyEnumType>;
|
|
29
30
|
};
|
|
30
31
|
size: {
|
|
31
|
-
type: import("vue").PropType<
|
|
32
|
+
type: import("vue").PropType<import("../types").ComponentSize>;
|
|
32
33
|
};
|
|
33
34
|
desc: {
|
|
34
35
|
type: import("vue").PropType<string>;
|
|
@@ -38,14 +39,14 @@ export declare const VftEmpty: import("vft/es/utils").SFCWithInstall<{
|
|
|
38
39
|
__isTeleport?: never;
|
|
39
40
|
__isSuspense?: never;
|
|
40
41
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
-
|
|
42
|
-
type: import("vue").PropType<string>;
|
|
42
|
+
icon: {
|
|
43
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
43
44
|
};
|
|
44
45
|
type: {
|
|
45
|
-
type: import("vue").PropType<import("./constants").
|
|
46
|
+
type: import("vue").PropType<import("./constants").EmptyEnumType>;
|
|
46
47
|
};
|
|
47
48
|
size: {
|
|
48
|
-
type: import("vue").PropType<
|
|
49
|
+
type: import("vue").PropType<import("../types").ComponentSize>;
|
|
49
50
|
};
|
|
50
51
|
desc: {
|
|
51
52
|
type: import("vue").PropType<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("vft/theme-style/base.css");require("vft/theme-style/vft-empty.css");
|
|
1
|
+
"use strict";require("vft/theme-style/base.css");require("vft/theme-style/vft-icon.css");require("vft/theme-style/vft-empty.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("vft/theme-style/src/base.scss");require("vft/theme-style/src/empty.scss");
|
|
1
|
+
"use strict";require("vft/theme-style/src/base.scss");require("vft/theme-style/src/icon.scss");require("vft/theme-style/src/empty.scss");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
2
|
+
import type { ComponentSize } from '../types';
|
|
3
|
+
import { type EmptyEnumType } from './constants';
|
|
4
|
+
export interface EmptyProps {
|
|
5
|
+
icon?: IconProps | string;
|
|
6
|
+
type?: EmptyEnumType;
|
|
7
|
+
size?: ComponentSize;
|
|
8
|
+
desc?: string;
|
|
9
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("vft/theme-style/base.css");require("vft/theme-style/vft-clamp-toggle.css");require("vft/theme-style/vft-empty.css");require("vft/theme-style/vft-pagination.css");require("vft/theme-style/vft-autocomplete.css");require("vft/theme-style/vft-input.css");require("vft/theme-style/vft-scrollbar.css");require("vft/theme-style/vft-popper.css");require("vft/theme-style/vft-slider.css");require("vft/theme-style/vft-input-number.css");require("vft/theme-style/vft-tooltip.css");require("vft/theme-style/vft-tag.css");require("vft/theme-style/vft-checkbox.css");require("vft/theme-style/vft-radio.css");require("vft/theme-style/vft-cascader-panel.css");require("vft/theme-style/vft-cascader.css");require("vft/theme-style/vft-color-picker.css");require("vft/theme-style/vft-
|
|
1
|
+
"use strict";require("vft/theme-style/base.css");require("vft/theme-style/vft-clamp-toggle.css");require("vft/theme-style/vft-icon.css");require("vft/theme-style/vft-empty.css");require("vft/theme-style/vft-pagination.css");require("vft/theme-style/vft-autocomplete.css");require("vft/theme-style/vft-input.css");require("vft/theme-style/vft-scrollbar.css");require("vft/theme-style/vft-popper.css");require("vft/theme-style/vft-slider.css");require("vft/theme-style/vft-input-number.css");require("vft/theme-style/vft-tooltip.css");require("vft/theme-style/vft-tag.css");require("vft/theme-style/vft-checkbox.css");require("vft/theme-style/vft-radio.css");require("vft/theme-style/vft-cascader-panel.css");require("vft/theme-style/vft-cascader.css");require("vft/theme-style/vft-color-picker.css");require("vft/theme-style/vft-button.css");require("vft/theme-style/vft-progress.css");require("vft/theme-style/vft-upload.css");require("vft/theme-style/vft-input-tag.css");require("vft/theme-style/vft-check-tag.css");require("vft/theme-style/vft-checkbox-button.css");require("vft/theme-style/vft-checkbox-group.css");require("vft/theme-style/vft-radio-group.css");require("vft/theme-style/vft-radio-button.css");require("vft/theme-style/vft-date-picker.css");require("vft/theme-style/vft-time-picker.css");require("vft/theme-style/vft-virtual-list.css");require("vft/theme-style/vft-select.css");require("vft/theme-style/vft-switch.css");require("vft/theme-style/vft-divider.css");require("vft/theme-style/vft-row.css");require("vft/theme-style/vft-col.css");require("vft/theme-style/vft-form.css");require("vft/theme-style/vft-form-item.css");require("vft/theme-style/vft-time-select.css");require("vft/theme-style/vft-super-form.css");require("vft/theme-style/vft-skeleton-item.css");require("vft/theme-style/vft-skeleton.css");require("vft/theme-style/vft-table.css");
|