@antdv-vue/pro-skeleton 0.0.0-stage → 1.0.3
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/CHANGELOG.md +25 -0
- package/README.md +4 -2
- package/dist/Skeleton.d.ts +18 -0
- package/dist/Skeleton.js +57 -0
- package/dist/components/Descriptions/DescriptionsItem.d.ts +13 -0
- package/dist/components/Descriptions/DescriptionsItem.js +73 -0
- package/dist/components/Descriptions/DescriptionsLargeItem.d.ts +12 -0
- package/dist/components/Descriptions/DescriptionsLargeItem.js +66 -0
- package/dist/components/Descriptions/Table.d.ts +13 -0
- package/dist/components/Descriptions/Table.js +57 -0
- package/dist/components/Descriptions/TableItem.d.ts +13 -0
- package/dist/components/Descriptions/TableItem.js +76 -0
- package/dist/components/Descriptions/index.d.ts +18 -0
- package/dist/components/Descriptions/index.js +64 -0
- package/dist/components/List/Statistic.d.ts +21 -0
- package/dist/components/List/Statistic.js +78 -0
- package/dist/components/List/index.d.ts +46 -0
- package/dist/components/List/index.js +167 -0
- package/dist/components/Result/index.d.ts +13 -0
- package/dist/components/Result/index.js +58 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/pro-skeleton.esm.js +571 -0
- package/package.json +59 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @antdv-vue/pro-skeleton
|
|
2
|
+
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ef5cfb6]
|
|
8
|
+
- @antdv-vue/pro-utils@2.1.1
|
|
9
|
+
|
|
10
|
+
## 1.0.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [244f208]
|
|
15
|
+
- @antdv-vue/pro-utils@2.1.0
|
|
16
|
+
|
|
17
|
+
## 1.0.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- feat: publish ProSkeleton with an ESM bundle.
|
|
22
|
+
- docs: sync structured changelog pages for every package.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @antdv-vue/pro-provider@2.0.0
|
|
25
|
+
- @antdv-vue/pro-utils@2.0.0
|
package/README.md
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DescriptionsPageSkeletonProps } from "./components/Descriptions/index.js";
|
|
2
|
+
import { ListPageSkeletonProps } from "./components/List/index.js";
|
|
3
|
+
import { ResultPageSkeletonProps } from "./components/Result/index.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
import { Plugin } from "vue";
|
|
6
|
+
|
|
7
|
+
//#region src/Skeleton.d.ts
|
|
8
|
+
type ProSkeletonProps = ListPageSkeletonProps & DescriptionsPageSkeletonProps & ResultPageSkeletonProps & {
|
|
9
|
+
type?: 'list' | 'result' | 'descriptions';
|
|
10
|
+
active?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const _ProSkeleton: _$vue.DefineSetupFnComponent<ProSkeletonProps, {}, {}, ListPageSkeletonProps & DescriptionsPageSkeletonProps & ResultPageSkeletonProps & {
|
|
13
|
+
type?: "list" | "result" | "descriptions";
|
|
14
|
+
active?: boolean;
|
|
15
|
+
} & {}, _$vue.PublicProps>;
|
|
16
|
+
declare const ProSkeleton: typeof _ProSkeleton & Plugin & {};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ProSkeletonProps, ProSkeleton as default };
|
package/dist/Skeleton.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import ListPageSkeleton from "./components/List/index.js";
|
|
2
|
+
import DescriptionsPageSkeleton from "./components/Descriptions/index.js";
|
|
3
|
+
import ResultPageSkeleton from "./components/Result/index.js";
|
|
4
|
+
import { createVNode, defineComponent } from "vue";
|
|
5
|
+
//#region src/Skeleton.tsx
|
|
6
|
+
const ProSkeleton = /* @__PURE__ */ defineComponent((props) => {
|
|
7
|
+
return () => {
|
|
8
|
+
const { type = "list", ...rest } = props;
|
|
9
|
+
if (type === "result") return createVNode(ResultPageSkeleton, rest, null);
|
|
10
|
+
if (type === "descriptions") return createVNode(DescriptionsPageSkeleton, rest, null);
|
|
11
|
+
return createVNode(ListPageSkeleton, rest, null);
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
props: {
|
|
15
|
+
active: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
required: false,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
pageHeader: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
required: false,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
statistic: {
|
|
26
|
+
type: [Number, Boolean],
|
|
27
|
+
required: false,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
actionButton: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: false,
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
toolbar: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
required: false,
|
|
38
|
+
default: void 0
|
|
39
|
+
},
|
|
40
|
+
list: {
|
|
41
|
+
type: [Number, Boolean],
|
|
42
|
+
required: false,
|
|
43
|
+
default: void 0
|
|
44
|
+
},
|
|
45
|
+
type: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
name: "ProSkeleton",
|
|
51
|
+
inheritAttrs: false
|
|
52
|
+
});
|
|
53
|
+
ProSkeleton.install = (app) => {
|
|
54
|
+
app.component(ProSkeleton.name, ProSkeleton);
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ProSkeleton as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Descriptions/DescriptionsItem.d.ts
|
|
5
|
+
interface DescriptionsItemSkeletonProps {
|
|
6
|
+
size?: number;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const DescriptionsItemSkeleton: _$vue.DefineSetupFnComponent<DescriptionsItemSkeletonProps, {}, CustomSlotsType<{
|
|
10
|
+
default?: () => VueNode[];
|
|
11
|
+
}>, DescriptionsItemSkeletonProps & {}, _$vue.PublicProps>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { DescriptionsItemSkeletonProps, DescriptionsItemSkeleton as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { computed, createVNode, defineComponent } from "vue";
|
|
2
|
+
import { Skeleton, useBreakpoint } from "antdv-next";
|
|
3
|
+
//#region src/components/Descriptions/DescriptionsItem.tsx
|
|
4
|
+
const MediaQueryKeyEnum = {
|
|
5
|
+
xs: 1,
|
|
6
|
+
sm: 2,
|
|
7
|
+
md: 3,
|
|
8
|
+
lg: 3,
|
|
9
|
+
xl: 3,
|
|
10
|
+
xxl: 4
|
|
11
|
+
};
|
|
12
|
+
const DescriptionsItemSkeleton = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
13
|
+
const defaultCol = computed(() => ({
|
|
14
|
+
lg: true,
|
|
15
|
+
md: true,
|
|
16
|
+
sm: false,
|
|
17
|
+
xl: false,
|
|
18
|
+
xs: false,
|
|
19
|
+
xxl: false
|
|
20
|
+
}));
|
|
21
|
+
const breakpoint = useBreakpoint();
|
|
22
|
+
expose({});
|
|
23
|
+
return () => {
|
|
24
|
+
const { size, active } = props;
|
|
25
|
+
const col = breakpoint || defaultCol;
|
|
26
|
+
const colSize = Object.keys(col.value || {}).filter((key) => col.value?.[key] === true)[0] || "md";
|
|
27
|
+
const arraySize = size === void 0 ? MediaQueryKeyEnum[colSize] || 3 : size;
|
|
28
|
+
return createVNode("div", { "style": {
|
|
29
|
+
width: "100%",
|
|
30
|
+
justifyContent: "space-between",
|
|
31
|
+
display: "flex"
|
|
32
|
+
} }, [Array.from({ length: arraySize }).fill(null).map((_, index) => createVNode("div", {
|
|
33
|
+
"key": index,
|
|
34
|
+
"style": {
|
|
35
|
+
flex: 1,
|
|
36
|
+
paddingInlineStart: index === 0 ? 0 : "24px",
|
|
37
|
+
paddingInlineEnd: index === arraySize - 1 ? 0 : "24px"
|
|
38
|
+
}
|
|
39
|
+
}, [
|
|
40
|
+
createVNode(Skeleton, {
|
|
41
|
+
"active": active,
|
|
42
|
+
"paragraph": false,
|
|
43
|
+
"title": { style: { marginBlockStart: 0 } }
|
|
44
|
+
}, null),
|
|
45
|
+
createVNode(Skeleton, {
|
|
46
|
+
"active": active,
|
|
47
|
+
"paragraph": false,
|
|
48
|
+
"title": { style: { marginBlockStart: "8px" } }
|
|
49
|
+
}, null),
|
|
50
|
+
createVNode(Skeleton, {
|
|
51
|
+
"active": active,
|
|
52
|
+
"paragraph": false,
|
|
53
|
+
"title": { style: { marginBlockStart: "8px" } }
|
|
54
|
+
}, null)
|
|
55
|
+
]))]);
|
|
56
|
+
};
|
|
57
|
+
}, {
|
|
58
|
+
props: {
|
|
59
|
+
size: {
|
|
60
|
+
type: Number,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
63
|
+
active: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
required: false,
|
|
66
|
+
default: void 0
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
name: "DescriptionsItemSkeleton",
|
|
70
|
+
inheritAttrs: false
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
export { DescriptionsItemSkeleton as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Descriptions/DescriptionsLargeItem.d.ts
|
|
5
|
+
interface DescriptionsLargeItemProps {
|
|
6
|
+
active?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const DescriptionsLargeItemSkeleton: _$vue.DefineSetupFnComponent<DescriptionsLargeItemProps, {}, CustomSlotsType<{
|
|
9
|
+
default?: () => VueNode[];
|
|
10
|
+
}>, DescriptionsLargeItemProps & {}, _$vue.PublicProps>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { DescriptionsLargeItemProps, DescriptionsLargeItemSkeleton as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createVNode, defineComponent } from "vue";
|
|
2
|
+
import { Skeleton, SkeletonButton } from "antdv-next";
|
|
3
|
+
//#region src/components/Descriptions/DescriptionsLargeItem.tsx
|
|
4
|
+
const DescriptionsLargeItemSkeleton = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
5
|
+
expose({});
|
|
6
|
+
return () => {
|
|
7
|
+
const { active } = props;
|
|
8
|
+
return createVNode("div", { "style": { marginBlockStart: "32px" } }, [createVNode(SkeletonButton, {
|
|
9
|
+
"active": active,
|
|
10
|
+
"size": "small",
|
|
11
|
+
"style": {
|
|
12
|
+
width: "100px",
|
|
13
|
+
marginBlockEnd: "16px"
|
|
14
|
+
}
|
|
15
|
+
}, null), createVNode("div", { "style": {
|
|
16
|
+
width: "100%",
|
|
17
|
+
justifyContent: "space-between",
|
|
18
|
+
display: "flex"
|
|
19
|
+
} }, [createVNode("div", { "style": {
|
|
20
|
+
flex: 1,
|
|
21
|
+
marginInlineEnd: "24px",
|
|
22
|
+
maxWidth: "300px"
|
|
23
|
+
} }, [
|
|
24
|
+
createVNode(Skeleton, {
|
|
25
|
+
"active": active,
|
|
26
|
+
"paragraph": false,
|
|
27
|
+
"title": { style: { marginBlockStart: 0 } }
|
|
28
|
+
}, null),
|
|
29
|
+
createVNode(Skeleton, {
|
|
30
|
+
"active": active,
|
|
31
|
+
"paragraph": false,
|
|
32
|
+
"title": { style: { marginBlockStart: "8px" } }
|
|
33
|
+
}, null),
|
|
34
|
+
createVNode(Skeleton, {
|
|
35
|
+
"active": active,
|
|
36
|
+
"paragraph": false,
|
|
37
|
+
"title": { style: { marginBlockStart: "8px" } }
|
|
38
|
+
}, null)
|
|
39
|
+
]), createVNode("div", { "style": {
|
|
40
|
+
flex: 1,
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
justifyContent: "center"
|
|
43
|
+
} }, [createVNode("div", { "style": {
|
|
44
|
+
maxWidth: "300px",
|
|
45
|
+
margin: "auto"
|
|
46
|
+
} }, [createVNode(Skeleton, {
|
|
47
|
+
"active": active,
|
|
48
|
+
"paragraph": false,
|
|
49
|
+
"title": { style: { marginBlockStart: 0 } }
|
|
50
|
+
}, null), createVNode(Skeleton, {
|
|
51
|
+
"active": active,
|
|
52
|
+
"paragraph": false,
|
|
53
|
+
"title": { style: { marginBlockStart: "8px" } }
|
|
54
|
+
}, null)])])])]);
|
|
55
|
+
};
|
|
56
|
+
}, {
|
|
57
|
+
props: { active: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: void 0
|
|
61
|
+
} },
|
|
62
|
+
name: "DescriptionsLargeItemSkeleton",
|
|
63
|
+
inheritAttrs: false
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { DescriptionsLargeItemSkeleton as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Descriptions/Table.d.ts
|
|
5
|
+
interface TableSkeletonProps {
|
|
6
|
+
active: boolean;
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const TableSkeleton: _$vue.DefineSetupFnComponent<TableSkeletonProps, {}, CustomSlotsType<{
|
|
10
|
+
default?: () => VueNode[];
|
|
11
|
+
}>, TableSkeletonProps & {}, _$vue.PublicProps>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TableSkeletonProps, TableSkeleton as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import TableItemSkeleton from "./TableItem.js";
|
|
2
|
+
import { createVNode, defineComponent } from "vue";
|
|
3
|
+
import { Card, Skeleton, SkeletonButton } from "antdv-next";
|
|
4
|
+
//#region src/components/Descriptions/Table.tsx
|
|
5
|
+
const TableSkeleton = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
6
|
+
expose({});
|
|
7
|
+
return () => {
|
|
8
|
+
const { active, size = 4 } = props;
|
|
9
|
+
return createVNode(Card, { "variant": "borderless" }, { default: () => [
|
|
10
|
+
createVNode(SkeletonButton, {
|
|
11
|
+
"active": active,
|
|
12
|
+
"size": "small",
|
|
13
|
+
"style": {
|
|
14
|
+
width: "100px",
|
|
15
|
+
marginBlockEnd: "16px"
|
|
16
|
+
}
|
|
17
|
+
}, null),
|
|
18
|
+
createVNode(TableItemSkeleton, {
|
|
19
|
+
"header": true,
|
|
20
|
+
"active": active
|
|
21
|
+
}, null),
|
|
22
|
+
Array.from({ length: size }).fill(null).map((_, index) => createVNode(TableItemSkeleton, {
|
|
23
|
+
"key": index,
|
|
24
|
+
"active": active
|
|
25
|
+
}, null)),
|
|
26
|
+
createVNode("div", { "style": {
|
|
27
|
+
display: "flex",
|
|
28
|
+
justifyContent: "flex-end",
|
|
29
|
+
paddingBlockStart: "16px"
|
|
30
|
+
} }, [createVNode(Skeleton, {
|
|
31
|
+
"active": active,
|
|
32
|
+
"paragraph": false,
|
|
33
|
+
"title": { style: {
|
|
34
|
+
margin: 0,
|
|
35
|
+
height: "32px",
|
|
36
|
+
float: "right",
|
|
37
|
+
maxWidth: "630px"
|
|
38
|
+
} }
|
|
39
|
+
}, null)])
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
props: {
|
|
44
|
+
active: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
type: Number,
|
|
50
|
+
required: false
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
name: "TableSkeleton",
|
|
54
|
+
inheritAttrs: false
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
export { TableSkeleton as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Descriptions/TableItem.d.ts
|
|
5
|
+
interface TableItemSkeletonProps {
|
|
6
|
+
active: boolean;
|
|
7
|
+
header?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const TableItemSkeleton: _$vue.DefineSetupFnComponent<TableItemSkeletonProps, {}, CustomSlotsType<{
|
|
10
|
+
default?: () => VueNode[];
|
|
11
|
+
}>, TableItemSkeletonProps & {}, _$vue.PublicProps>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TableItemSkeletonProps, TableItemSkeleton as default };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Line } from "../List/index.js";
|
|
2
|
+
import { Fragment, computed, createVNode, defineComponent } from "vue";
|
|
3
|
+
import { Skeleton, useBreakpoint } from "antdv-next";
|
|
4
|
+
//#region src/components/Descriptions/TableItem.tsx
|
|
5
|
+
const MediaQueryKeyEnum = {
|
|
6
|
+
xs: 1,
|
|
7
|
+
sm: 2,
|
|
8
|
+
md: 3,
|
|
9
|
+
lg: 3,
|
|
10
|
+
xl: 3,
|
|
11
|
+
xxl: 4
|
|
12
|
+
};
|
|
13
|
+
const TableItemSkeleton = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
14
|
+
const defaultCol = computed(() => ({
|
|
15
|
+
lg: true,
|
|
16
|
+
md: true,
|
|
17
|
+
sm: false,
|
|
18
|
+
xl: false,
|
|
19
|
+
xs: false,
|
|
20
|
+
xxl: false
|
|
21
|
+
}));
|
|
22
|
+
const breakpoint = useBreakpoint();
|
|
23
|
+
expose({});
|
|
24
|
+
return () => {
|
|
25
|
+
const { active, header = false } = props;
|
|
26
|
+
const col = breakpoint || defaultCol;
|
|
27
|
+
const arraySize = MediaQueryKeyEnum[Object.keys(col.value || {}).filter((key) => col.value?.[key] === true)[0] || "md"] || 3;
|
|
28
|
+
return createVNode(Fragment, null, [createVNode("div", { "style": {
|
|
29
|
+
display: "flex",
|
|
30
|
+
background: header ? "rgba(0,0,0,0.02)" : "none",
|
|
31
|
+
padding: "24px 8px"
|
|
32
|
+
} }, [Array.from({ length: arraySize }).fill(null).map((_, index) => createVNode("div", {
|
|
33
|
+
"key": index,
|
|
34
|
+
"style": {
|
|
35
|
+
flex: 1,
|
|
36
|
+
paddingInlineStart: header && index === 0 ? 0 : "20px",
|
|
37
|
+
paddingInlineEnd: "32px"
|
|
38
|
+
}
|
|
39
|
+
}, [createVNode(Skeleton, {
|
|
40
|
+
"active": active,
|
|
41
|
+
"paragraph": false,
|
|
42
|
+
"title": { style: {
|
|
43
|
+
margin: 0,
|
|
44
|
+
height: "24px",
|
|
45
|
+
width: header ? "75px" : "100%"
|
|
46
|
+
} }
|
|
47
|
+
}, null)])), createVNode("div", { "style": {
|
|
48
|
+
flex: 3,
|
|
49
|
+
paddingInlineStart: "32px"
|
|
50
|
+
} }, [createVNode(Skeleton, {
|
|
51
|
+
"active": active,
|
|
52
|
+
"paragraph": false,
|
|
53
|
+
"title": { style: {
|
|
54
|
+
margin: 0,
|
|
55
|
+
height: "24px",
|
|
56
|
+
width: header ? "75px" : "100%"
|
|
57
|
+
} }
|
|
58
|
+
}, null)])]), createVNode(Line, { "padding": "0px 0px" }, null)]);
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
props: {
|
|
62
|
+
active: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
required: true
|
|
65
|
+
},
|
|
66
|
+
header: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false,
|
|
69
|
+
default: void 0
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
name: "TableItemSkeleton",
|
|
73
|
+
inheritAttrs: false
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { TableItemSkeleton as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { FunctionalComponent } from "vue";
|
|
3
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Descriptions/index.d.ts
|
|
6
|
+
interface DescriptionsPageSkeletonProps {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
pageHeader?: false;
|
|
9
|
+
list?: false | number;
|
|
10
|
+
}
|
|
11
|
+
declare const DescriptionsSkeleton: FunctionalComponent<{
|
|
12
|
+
active: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
declare const DescriptionsPageSkeleton: _$vue.DefineSetupFnComponent<DescriptionsPageSkeletonProps, {}, CustomSlotsType<{
|
|
15
|
+
default?: () => VueNode[];
|
|
16
|
+
}>, DescriptionsPageSkeletonProps & {}, _$vue.PublicProps>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { DescriptionsPageSkeletonProps, DescriptionsSkeleton, DescriptionsPageSkeleton as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Line, PageHeaderSkeleton } from "../List/index.js";
|
|
2
|
+
import DescriptionsItemSkeleton from "./DescriptionsItem.js";
|
|
3
|
+
import DescriptionsLargeItemSkeleton from "./DescriptionsLargeItem.js";
|
|
4
|
+
import TableSkeleton from "./Table.js";
|
|
5
|
+
import { createVNode, defineComponent } from "vue";
|
|
6
|
+
import { Card, SkeletonButton } from "antdv-next";
|
|
7
|
+
//#region src/components/Descriptions/index.tsx
|
|
8
|
+
const DescriptionsSkeleton = ({ active }) => {
|
|
9
|
+
return createVNode(Card, {
|
|
10
|
+
"variant": "borderless",
|
|
11
|
+
"style": {
|
|
12
|
+
borderStartEndRadius: 0,
|
|
13
|
+
borderTopLeftRadius: 0
|
|
14
|
+
}
|
|
15
|
+
}, { default: () => [
|
|
16
|
+
createVNode(SkeletonButton, {
|
|
17
|
+
"active": active,
|
|
18
|
+
"size": "small",
|
|
19
|
+
"style": {
|
|
20
|
+
width: "100px",
|
|
21
|
+
marginBlockEnd: "16px"
|
|
22
|
+
}
|
|
23
|
+
}, null),
|
|
24
|
+
createVNode(DescriptionsItemSkeleton, { "active": active }, null),
|
|
25
|
+
createVNode(DescriptionsLargeItemSkeleton, { "active": active }, null)
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
const DescriptionsPageSkeleton = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
29
|
+
expose({});
|
|
30
|
+
return () => {
|
|
31
|
+
const { active = true, pageHeader, list } = props;
|
|
32
|
+
return createVNode("div", { "style": { width: "100%" } }, [
|
|
33
|
+
pageHeader !== false && createVNode(PageHeaderSkeleton, { "active": active }, null),
|
|
34
|
+
createVNode(DescriptionsSkeleton, { "active": active }, null),
|
|
35
|
+
list !== false && createVNode(Line, null, null),
|
|
36
|
+
list !== false && createVNode(TableSkeleton, {
|
|
37
|
+
"active": active,
|
|
38
|
+
"size": list
|
|
39
|
+
}, null)
|
|
40
|
+
]);
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
props: {
|
|
44
|
+
active: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: false,
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
49
|
+
pageHeader: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false,
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
54
|
+
list: {
|
|
55
|
+
type: [Boolean, Number],
|
|
56
|
+
required: false,
|
|
57
|
+
default: void 0
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
name: "DescriptionsPageSkeleton",
|
|
61
|
+
inheritAttrs: false
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
export { DescriptionsSkeleton, DescriptionsPageSkeleton as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
3
|
+
|
|
4
|
+
//#region src/components/List/Statistic.d.ts
|
|
5
|
+
interface StatisticSkeletonProps {
|
|
6
|
+
size?: number;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const MediaQueryKeyEnum: {
|
|
10
|
+
xs: number;
|
|
11
|
+
sm: number;
|
|
12
|
+
md: number;
|
|
13
|
+
lg: number;
|
|
14
|
+
xl: number;
|
|
15
|
+
xxl: number;
|
|
16
|
+
};
|
|
17
|
+
declare const StatisticSkeleton: _$vue.DefineSetupFnComponent<StatisticSkeletonProps, {}, CustomSlotsType<{
|
|
18
|
+
default?: () => VueNode[];
|
|
19
|
+
}>, StatisticSkeletonProps & {}, _$vue.PublicProps>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { MediaQueryKeyEnum, StatisticSkeletonProps, StatisticSkeleton as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { computed, createVNode, defineComponent } from "vue";
|
|
2
|
+
import { Card, Skeleton, SkeletonButton, useBreakpoint } from "antdv-next";
|
|
3
|
+
//#region src/components/List/Statistic.tsx
|
|
4
|
+
const MediaQueryKeyEnum = {
|
|
5
|
+
xs: 2,
|
|
6
|
+
sm: 2,
|
|
7
|
+
md: 4,
|
|
8
|
+
lg: 4,
|
|
9
|
+
xl: 6,
|
|
10
|
+
xxl: 6
|
|
11
|
+
};
|
|
12
|
+
const StatisticSkeleton = /* @__PURE__ */ defineComponent((props, { expose }) => {
|
|
13
|
+
const defaultCol = computed(() => ({
|
|
14
|
+
lg: true,
|
|
15
|
+
md: true,
|
|
16
|
+
sm: false,
|
|
17
|
+
xl: false,
|
|
18
|
+
xs: false,
|
|
19
|
+
xxl: false
|
|
20
|
+
}));
|
|
21
|
+
const breakpoint = useBreakpoint();
|
|
22
|
+
const col = computed(() => {
|
|
23
|
+
return breakpoint.value || defaultCol.value;
|
|
24
|
+
});
|
|
25
|
+
const colSize = computed(() => Object.keys(col.value).filter((key) => col.value?.[key] === true)[0] || "md");
|
|
26
|
+
const arraySize = computed(() => props.size === void 0 ? MediaQueryKeyEnum[colSize.value] || 6 : props.size);
|
|
27
|
+
const firstWidth = (index) => {
|
|
28
|
+
if (index === 0) return 0;
|
|
29
|
+
if (arraySize.value > 2) return 42;
|
|
30
|
+
return 16;
|
|
31
|
+
};
|
|
32
|
+
expose({});
|
|
33
|
+
return () => {
|
|
34
|
+
const { active } = props;
|
|
35
|
+
return createVNode(Card, {
|
|
36
|
+
"variant": "borderless",
|
|
37
|
+
"styles": { root: { marginBlockEnd: "16px" } }
|
|
38
|
+
}, { default: () => [createVNode("div", { "style": {
|
|
39
|
+
width: "100%",
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
display: "flex"
|
|
42
|
+
} }, [Array.from({ length: arraySize.value }).fill(null).map((_, index) => createVNode("div", {
|
|
43
|
+
"key": index,
|
|
44
|
+
"style": {
|
|
45
|
+
borderInlineStart: arraySize.value > 2 && index === 1 ? "1px solid rgba(0,0,0,0.06)" : void 0,
|
|
46
|
+
paddingInlineStart: firstWidth(index),
|
|
47
|
+
flex: 1,
|
|
48
|
+
marginInlineEnd: index === 0 ? "16px" : 0
|
|
49
|
+
}
|
|
50
|
+
}, [createVNode(Skeleton, {
|
|
51
|
+
"active": active,
|
|
52
|
+
"paragraph": false,
|
|
53
|
+
"title": {
|
|
54
|
+
width: "100px",
|
|
55
|
+
style: { marginBlockStart: 0 }
|
|
56
|
+
}
|
|
57
|
+
}, null), createVNode(SkeletonButton, {
|
|
58
|
+
"active": active,
|
|
59
|
+
"style": { height: "48px" }
|
|
60
|
+
}, null)]))])] });
|
|
61
|
+
};
|
|
62
|
+
}, {
|
|
63
|
+
props: {
|
|
64
|
+
size: {
|
|
65
|
+
type: Number,
|
|
66
|
+
required: false
|
|
67
|
+
},
|
|
68
|
+
active: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: false,
|
|
71
|
+
default: void 0
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
name: "StatisticSkeleton",
|
|
75
|
+
inheritAttrs: false
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { MediaQueryKeyEnum, StatisticSkeleton as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
import { FunctionalComponent } from "vue";
|
|
3
|
+
import { CustomSlotsType, VueNode } from "@v-c/util/dist/type";
|
|
4
|
+
|
|
5
|
+
//#region src/components/List/index.d.ts
|
|
6
|
+
interface ListPageSkeletonProps {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
pageHeader?: false;
|
|
9
|
+
statistic?: number | false;
|
|
10
|
+
actionButton?: false;
|
|
11
|
+
toolbar?: false;
|
|
12
|
+
list?: number | false;
|
|
13
|
+
}
|
|
14
|
+
/** 一条分割线 */
|
|
15
|
+
declare const Line: FunctionalComponent<{
|
|
16
|
+
padding?: string | number;
|
|
17
|
+
}>;
|
|
18
|
+
/** 列表子项目骨架屏 */
|
|
19
|
+
declare const ListSkeletonItem: FunctionalComponent<{
|
|
20
|
+
active: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
/** 列表骨架屏 */
|
|
23
|
+
declare const ListSkeleton: FunctionalComponent<{
|
|
24
|
+
size: number;
|
|
25
|
+
active?: boolean;
|
|
26
|
+
actionButton?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* 面包屑的 骨架屏
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
declare const PageHeaderSkeleton: FunctionalComponent<{
|
|
33
|
+
active: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* 列表操作栏的骨架屏
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
declare const ListToolbarSkeleton: FunctionalComponent<{
|
|
40
|
+
active: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
declare const ListPageSkeleton: _$vue.DefineSetupFnComponent<ListPageSkeletonProps, {}, CustomSlotsType<{
|
|
43
|
+
default?: () => VueNode[];
|
|
44
|
+
}>, ListPageSkeletonProps & {}, _$vue.PublicProps>;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Line, ListPageSkeletonProps, ListSkeleton, ListSkeletonItem, ListToolbarSkeleton, PageHeaderSkeleton, ListPageSkeleton as default };
|