@opendesign-plus/components 0.0.1-rc.87 → 0.0.1-rc.88
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/components/article/OArticle.vue.d.ts +12 -12
- package/dist/components/article/OArticleList.vue.d.ts +54 -0
- package/dist/components/article/index.d.ts +95 -18
- package/dist/components/article/types.d.ts +26 -0
- package/dist/components/{markdown/OMarkdownPagination.vue.d.ts → article-pagination/OArticlePagination.vue.d.ts} +9 -7
- package/dist/components/article-pagination/index.d.ts +76 -0
- package/dist/components/article-pagination/types.d.ts +4 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +3 -0
- package/dist/components/header-user/OHeaderUser.vue.d.ts +88 -1
- package/dist/components/header-user/index.d.ts +88 -1
- package/dist/components/markdown/index.d.ts +1 -68
- package/dist/components/markdown/types.d.ts +0 -4
- package/dist/components.cjs.js +40 -40
- package/dist/components.css +1 -1
- package/dist/components.es.js +11884 -11657
- package/dist/index.d.ts +1 -0
- package/dist/treeshaking/components/article/OArticle.css +45 -98
- package/dist/treeshaking/components/article/OArticle.vue.d.ts +12 -12
- package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
- package/dist/treeshaking/components/article/OArticle.vue2.mjs +3 -3
- package/dist/treeshaking/components/article/OArticleList.css +232 -0
- package/dist/treeshaking/components/article/OArticleList.vue.d.ts +54 -0
- package/dist/treeshaking/components/article/OArticleList.vue.mjs +205 -0
- package/dist/treeshaking/components/article/OArticleList.vue3.mjs +5 -0
- package/dist/treeshaking/components/article/index.d.ts +95 -18
- package/dist/treeshaking/components/article/index.mjs +9 -1
- package/dist/treeshaking/components/article/types.d.ts +26 -0
- package/dist/treeshaking/components/{markdown/OMarkdownPagination.css → article-pagination/OArticlePagination.css} +45 -45
- package/dist/treeshaking/components/{markdown/OMarkdownPagination.vue.d.ts → article-pagination/OArticlePagination.vue.d.ts} +9 -7
- package/dist/treeshaking/components/article-pagination/OArticlePagination.vue.mjs +7 -0
- package/dist/treeshaking/components/{markdown/OMarkdownPagination.vue2.mjs → article-pagination/OArticlePagination.vue2.mjs} +25 -21
- package/dist/treeshaking/components/article-pagination/index.d.ts +76 -0
- package/dist/treeshaking/components/article-pagination/index.mjs +9 -0
- package/dist/treeshaking/components/article-pagination/types.d.ts +4 -0
- package/dist/treeshaking/components/header/OHeader.css +17 -17
- package/dist/treeshaking/components/header/OHeader.vue.mjs +1 -1
- package/dist/treeshaking/components/header/OHeader.vue2.mjs +25 -1
- package/dist/treeshaking/components/header/components/HeaderNav.css +66 -73
- package/dist/treeshaking/components/header/components/HeaderNav.vue.d.ts +3 -0
- package/dist/treeshaking/components/header/components/HeaderNav.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderNav.vue2.mjs +72 -44
- package/dist/treeshaking/components/header-search/OHeaderSearch.css +42 -48
- package/dist/treeshaking/components/header-search/OHeaderSearch.vue.mjs +1 -1
- package/dist/treeshaking/components/header-search/OHeaderSearch.vue2.mjs +6 -4
- package/dist/treeshaking/components/header-user/OHeaderUser.css +40 -40
- package/dist/treeshaking/components/header-user/OHeaderUser.vue.d.ts +88 -1
- package/dist/treeshaking/components/header-user/OHeaderUser.vue.mjs +1 -1
- package/dist/treeshaking/components/header-user/OHeaderUser.vue2.mjs +49 -24
- package/dist/treeshaking/components/header-user/index.d.ts +88 -1
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +87 -114
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue2.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownTableData.css +30 -77
- package/dist/treeshaking/components/markdown/components/MarkdownTableData.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +32 -82
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/index.d.ts +1 -68
- package/dist/treeshaking/components/markdown/index.mjs +1 -8
- package/dist/treeshaking/components/markdown/replacer/code.mjs +1 -1
- package/dist/treeshaking/components/markdown/types.d.ts +0 -4
- package/dist/treeshaking/index.d.ts +1 -0
- package/dist/treeshaking/index.mjs +5 -3
- package/package.json +1 -1
- package/dist/treeshaking/components/markdown/OMarkdownPagination.vue.mjs +0 -7
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, unref, renderSlot, createCommentVNode, createElementVNode, createBlock, withCtx, Fragment, renderList, createVNode, createSlots, normalizeClass, toDisplayString, resolveDynamicComponent, createTextVNode } from "vue";
|
|
2
|
+
import { ORow, OCol, OCard, OTag, OIcon, OPagination } from "@opensig/opendesign";
|
|
3
|
+
import { useScreen } from "@opendesign-plus/composables";
|
|
4
|
+
import OEmpty from "../empty/OEmpty.vue.mjs";
|
|
5
|
+
import IconTime from "../../_virtual/icon-time.mjs";
|
|
6
|
+
import IconAvatar from "../../_virtual/icon-avatar-line.mjs";
|
|
7
|
+
const _hoisted_1 = { class: "o-article-list" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "article-filter"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = { class: "article-content" };
|
|
13
|
+
const _hoisted_4 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "item-desc"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_5 = { class: "item-info" };
|
|
18
|
+
const _hoisted_6 = { key: 0 };
|
|
19
|
+
const _hoisted_7 = { key: 1 };
|
|
20
|
+
const _hoisted_8 = { key: 2 };
|
|
21
|
+
const _hoisted_9 = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "article-pagination"
|
|
24
|
+
};
|
|
25
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
|
+
__name: "OArticleList",
|
|
27
|
+
props: {
|
|
28
|
+
data: { default: () => [] },
|
|
29
|
+
pageSize: { default: 9 },
|
|
30
|
+
pageSizes: { default: () => [9, 18, 45] },
|
|
31
|
+
defaultCovers: { default: () => [] },
|
|
32
|
+
emptyImg: {},
|
|
33
|
+
mobileLayout: { default: "h" }
|
|
34
|
+
},
|
|
35
|
+
emits: ["page-change"],
|
|
36
|
+
setup(__props, { emit: __emit }) {
|
|
37
|
+
const props = __props;
|
|
38
|
+
const emit = __emit;
|
|
39
|
+
const slots = useSlots();
|
|
40
|
+
const { lePadV } = useScreen();
|
|
41
|
+
const current = ref(1);
|
|
42
|
+
const size = ref(props.pageSize);
|
|
43
|
+
const total = computed(() => props.data.length);
|
|
44
|
+
const items = computed(() => props.data.slice((current.value - 1) * size.value, current.value * size.value));
|
|
45
|
+
const showPagination = computed(() => total.value > size.value);
|
|
46
|
+
watch(
|
|
47
|
+
() => props.pageSize,
|
|
48
|
+
(val) => {
|
|
49
|
+
size.value = val;
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
watch(
|
|
53
|
+
() => props.data,
|
|
54
|
+
() => {
|
|
55
|
+
current.value = 1;
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
watch([total, size], () => {
|
|
59
|
+
const maxPage = Math.max(1, Math.ceil(total.value / size.value));
|
|
60
|
+
if (current.value > maxPage) {
|
|
61
|
+
current.value = maxPage;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const changePage = ({ page, pageSize }) => {
|
|
65
|
+
current.value = page;
|
|
66
|
+
size.value = pageSize;
|
|
67
|
+
emit("page-change", { page, pageSize });
|
|
68
|
+
};
|
|
69
|
+
const authorText = (author) => Array.isArray(author) ? author.join(" ") : author;
|
|
70
|
+
const getCover = (item, index) => {
|
|
71
|
+
if (item.cover) {
|
|
72
|
+
return item.cover;
|
|
73
|
+
}
|
|
74
|
+
const covers = props.defaultCovers;
|
|
75
|
+
return covers.length ? covers[index % covers.length] : void 0;
|
|
76
|
+
};
|
|
77
|
+
return (_ctx, _cache) => {
|
|
78
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
79
|
+
unref(slots).filter ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
80
|
+
renderSlot(_ctx.$slots, "filter")
|
|
81
|
+
])) : createCommentVNode("", true),
|
|
82
|
+
createElementVNode("div", _hoisted_3, [
|
|
83
|
+
total.value ? (openBlock(), createBlock(unref(ORow), {
|
|
84
|
+
key: 0,
|
|
85
|
+
gap: "var(--grid-column-gutter)",
|
|
86
|
+
wrap: "wrap"
|
|
87
|
+
}, {
|
|
88
|
+
default: withCtx(() => [
|
|
89
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
90
|
+
return openBlock(), createBlock(unref(OCol), {
|
|
91
|
+
key: item.title,
|
|
92
|
+
flex: "0 1 33.33%",
|
|
93
|
+
"pad-v": { flex: "0 1 50%" },
|
|
94
|
+
phone: { flex: "0 1 100%" }
|
|
95
|
+
}, {
|
|
96
|
+
default: withCtx(() => [
|
|
97
|
+
renderSlot(_ctx.$slots, "card", {
|
|
98
|
+
item,
|
|
99
|
+
index,
|
|
100
|
+
cover: getCover(item, index)
|
|
101
|
+
}, () => [
|
|
102
|
+
createVNode(unref(OCard), {
|
|
103
|
+
title: item.title,
|
|
104
|
+
"title-row": 2,
|
|
105
|
+
"title-max-row": 2,
|
|
106
|
+
cover: getCover(item, index),
|
|
107
|
+
href: item.href,
|
|
108
|
+
layout: unref(lePadV) ? __props.mobileLayout : "v"
|
|
109
|
+
}, createSlots({
|
|
110
|
+
detail: withCtx(() => [
|
|
111
|
+
item.tag ? (openBlock(), createBlock(unref(OTag), {
|
|
112
|
+
key: 0,
|
|
113
|
+
variant: "outline",
|
|
114
|
+
class: normalizeClass(["item-type", !item.tag.label && "empty-tag"])
|
|
115
|
+
}, createSlots({
|
|
116
|
+
default: withCtx(() => [
|
|
117
|
+
createElementVNode("span", null, toDisplayString(item.tag.label), 1)
|
|
118
|
+
]),
|
|
119
|
+
_: 2
|
|
120
|
+
}, [
|
|
121
|
+
item.tag.icon ? {
|
|
122
|
+
name: "icon",
|
|
123
|
+
fn: withCtx(() => [
|
|
124
|
+
createVNode(unref(OIcon), null, {
|
|
125
|
+
default: withCtx(() => [
|
|
126
|
+
(openBlock(), createBlock(resolveDynamicComponent(item.tag.icon)))
|
|
127
|
+
]),
|
|
128
|
+
_: 2
|
|
129
|
+
}, 1024)
|
|
130
|
+
]),
|
|
131
|
+
key: "0"
|
|
132
|
+
} : void 0
|
|
133
|
+
]), 1032, ["class"])) : createCommentVNode("", true),
|
|
134
|
+
item.description ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(item.description), 1)) : createCommentVNode("", true)
|
|
135
|
+
]),
|
|
136
|
+
_: 2
|
|
137
|
+
}, [
|
|
138
|
+
item.date || item.author || item.location ? {
|
|
139
|
+
name: "footer",
|
|
140
|
+
fn: withCtx(() => [
|
|
141
|
+
createElementVNode("div", _hoisted_5, [
|
|
142
|
+
item.date ? (openBlock(), createElementBlock("span", _hoisted_6, [
|
|
143
|
+
createVNode(unref(OIcon), null, {
|
|
144
|
+
default: withCtx(() => [
|
|
145
|
+
createVNode(unref(IconTime))
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}),
|
|
149
|
+
createTextVNode(" " + toDisplayString(item.date), 1)
|
|
150
|
+
])) : createCommentVNode("", true),
|
|
151
|
+
item.author ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
152
|
+
createVNode(unref(OIcon), null, {
|
|
153
|
+
default: withCtx(() => [
|
|
154
|
+
createVNode(unref(IconAvatar))
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
}),
|
|
158
|
+
createTextVNode(" " + toDisplayString(authorText(item.author)), 1)
|
|
159
|
+
])) : createCommentVNode("", true),
|
|
160
|
+
item.location ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
|
161
|
+
createVNode(unref(OIcon), null, {
|
|
162
|
+
default: withCtx(() => [
|
|
163
|
+
createVNode(unref(IconAvatar))
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}),
|
|
167
|
+
createTextVNode(" " + toDisplayString(item.location), 1)
|
|
168
|
+
])) : createCommentVNode("", true)
|
|
169
|
+
])
|
|
170
|
+
]),
|
|
171
|
+
key: "0"
|
|
172
|
+
} : void 0
|
|
173
|
+
]), 1032, ["title", "cover", "href", "layout"])
|
|
174
|
+
])
|
|
175
|
+
]),
|
|
176
|
+
_: 2
|
|
177
|
+
}, 1024);
|
|
178
|
+
}), 128))
|
|
179
|
+
]),
|
|
180
|
+
_: 3
|
|
181
|
+
})) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
182
|
+
createVNode(OEmpty, {
|
|
183
|
+
class: "article-empty",
|
|
184
|
+
img: __props.emptyImg
|
|
185
|
+
}, null, 8, ["img"])
|
|
186
|
+
])
|
|
187
|
+
]),
|
|
188
|
+
showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
189
|
+
createVNode(unref(OPagination), {
|
|
190
|
+
page: current.value,
|
|
191
|
+
simple: unref(lePadV),
|
|
192
|
+
"show-total": true,
|
|
193
|
+
"page-size": size.value,
|
|
194
|
+
total: total.value,
|
|
195
|
+
"page-sizes": __props.pageSizes,
|
|
196
|
+
onChange: changePage
|
|
197
|
+
}, null, 8, ["page", "simple", "page-size", "total", "page-sizes"])
|
|
198
|
+
])) : createCommentVNode("", true)
|
|
199
|
+
]);
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
export {
|
|
204
|
+
_sfc_main as default
|
|
205
|
+
};
|
|
@@ -5,8 +5,8 @@ declare const OArticle: {
|
|
|
5
5
|
headerBg?: string;
|
|
6
6
|
tags?: string[];
|
|
7
7
|
community?: string;
|
|
8
|
-
prev?: import('../../index').
|
|
9
|
-
next?: import('../../index').
|
|
8
|
+
prev?: import('../../index').OArticlePaginationItemT | null;
|
|
9
|
+
next?: import('../../index').OArticlePaginationItemT | null;
|
|
10
10
|
disableH2?: boolean;
|
|
11
11
|
disableTable?: boolean;
|
|
12
12
|
disableImg?: boolean;
|
|
@@ -20,17 +20,17 @@ declare const OArticle: {
|
|
|
20
20
|
divider?: boolean;
|
|
21
21
|
radius?: string;
|
|
22
22
|
}> & Readonly<{
|
|
23
|
-
onNavigate?: ((type: "prev" | "next", item: import('../../index').
|
|
23
|
+
onNavigate?: ((type: "prev" | "next", item: import('../../index').OArticlePaginationItemT) => any) | undefined;
|
|
24
24
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
-
navigate: (type: "prev" | "next", item: import('../../index').
|
|
25
|
+
navigate: (type: "prev" | "next", item: import('../../index').OArticlePaginationItemT) => any;
|
|
26
26
|
}, import('vue').PublicProps, {
|
|
27
27
|
disableH2: boolean;
|
|
28
28
|
disableTable: boolean;
|
|
29
29
|
disableImg: boolean;
|
|
30
30
|
disableCode: boolean;
|
|
31
31
|
markdownBodyClass: string;
|
|
32
|
-
prev: import('../../index').
|
|
33
|
-
next: import('../../index').
|
|
32
|
+
prev: import('../../index').OArticlePaginationItemT | null;
|
|
33
|
+
next: import('../../index').OArticlePaginationItemT | null;
|
|
34
34
|
divider: boolean;
|
|
35
35
|
radius: string;
|
|
36
36
|
tags: string[];
|
|
@@ -48,8 +48,8 @@ declare const OArticle: {
|
|
|
48
48
|
headerBg?: string;
|
|
49
49
|
tags?: string[];
|
|
50
50
|
community?: string;
|
|
51
|
-
prev?: import('../../index').
|
|
52
|
-
next?: import('../../index').
|
|
51
|
+
prev?: import('../../index').OArticlePaginationItemT | null;
|
|
52
|
+
next?: import('../../index').OArticlePaginationItemT | null;
|
|
53
53
|
disableH2?: boolean;
|
|
54
54
|
disableTable?: boolean;
|
|
55
55
|
disableImg?: boolean;
|
|
@@ -63,15 +63,15 @@ declare const OArticle: {
|
|
|
63
63
|
divider?: boolean;
|
|
64
64
|
radius?: string;
|
|
65
65
|
}> & Readonly<{
|
|
66
|
-
onNavigate?: ((type: "prev" | "next", item: import('../../index').
|
|
66
|
+
onNavigate?: ((type: "prev" | "next", item: import('../../index').OArticlePaginationItemT) => any) | undefined;
|
|
67
67
|
}>, {}, {}, {}, {}, {
|
|
68
68
|
disableH2: boolean;
|
|
69
69
|
disableTable: boolean;
|
|
70
70
|
disableImg: boolean;
|
|
71
71
|
disableCode: boolean;
|
|
72
72
|
markdownBodyClass: string;
|
|
73
|
-
prev: import('../../index').
|
|
74
|
-
next: import('../../index').
|
|
73
|
+
prev: import('../../index').OArticlePaginationItemT | null;
|
|
74
|
+
next: import('../../index').OArticlePaginationItemT | null;
|
|
75
75
|
divider: boolean;
|
|
76
76
|
radius: string;
|
|
77
77
|
tags: string[];
|
|
@@ -86,8 +86,8 @@ declare const OArticle: {
|
|
|
86
86
|
headerBg?: string;
|
|
87
87
|
tags?: string[];
|
|
88
88
|
community?: string;
|
|
89
|
-
prev?: import('../../index').
|
|
90
|
-
next?: import('../../index').
|
|
89
|
+
prev?: import('../../index').OArticlePaginationItemT | null;
|
|
90
|
+
next?: import('../../index').OArticlePaginationItemT | null;
|
|
91
91
|
disableH2?: boolean;
|
|
92
92
|
disableTable?: boolean;
|
|
93
93
|
disableImg?: boolean;
|
|
@@ -101,17 +101,17 @@ declare const OArticle: {
|
|
|
101
101
|
divider?: boolean;
|
|
102
102
|
radius?: string;
|
|
103
103
|
}> & Readonly<{
|
|
104
|
-
onNavigate?: ((type: "prev" | "next", item: import('../../index').
|
|
104
|
+
onNavigate?: ((type: "prev" | "next", item: import('../../index').OArticlePaginationItemT) => any) | undefined;
|
|
105
105
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
106
|
-
navigate: (type: "prev" | "next", item: import('../../index').
|
|
106
|
+
navigate: (type: "prev" | "next", item: import('../../index').OArticlePaginationItemT) => any;
|
|
107
107
|
}, string, {
|
|
108
108
|
disableH2: boolean;
|
|
109
109
|
disableTable: boolean;
|
|
110
110
|
disableImg: boolean;
|
|
111
111
|
disableCode: boolean;
|
|
112
112
|
markdownBodyClass: string;
|
|
113
|
-
prev: import('../../index').
|
|
114
|
-
next: import('../../index').
|
|
113
|
+
prev: import('../../index').OArticlePaginationItemT | null;
|
|
114
|
+
next: import('../../index').OArticlePaginationItemT | null;
|
|
115
115
|
divider: boolean;
|
|
116
116
|
radius: string;
|
|
117
117
|
tags: string[];
|
|
@@ -124,4 +124,81 @@ declare const OArticle: {
|
|
|
124
124
|
}) & {
|
|
125
125
|
install(app: App): void;
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
declare const OArticleList: {
|
|
128
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../index').ArticleListPropsT> & Readonly<{
|
|
129
|
+
"onPage-change"?: ((value: {
|
|
130
|
+
page: number;
|
|
131
|
+
pageSize: number;
|
|
132
|
+
}) => any) | undefined;
|
|
133
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
134
|
+
"page-change": (value: {
|
|
135
|
+
page: number;
|
|
136
|
+
pageSize: number;
|
|
137
|
+
}) => any;
|
|
138
|
+
}, import('vue').PublicProps, {
|
|
139
|
+
data: import('../../index').ArticleItemT[];
|
|
140
|
+
pageSizes: number[];
|
|
141
|
+
pageSize: number;
|
|
142
|
+
defaultCovers: string[];
|
|
143
|
+
mobileLayout: "h" | "v";
|
|
144
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
145
|
+
P: {};
|
|
146
|
+
B: {};
|
|
147
|
+
D: {};
|
|
148
|
+
C: {};
|
|
149
|
+
M: {};
|
|
150
|
+
Defaults: {};
|
|
151
|
+
}, Readonly<import('../../index').ArticleListPropsT> & Readonly<{
|
|
152
|
+
"onPage-change"?: ((value: {
|
|
153
|
+
page: number;
|
|
154
|
+
pageSize: number;
|
|
155
|
+
}) => any) | undefined;
|
|
156
|
+
}>, {}, {}, {}, {}, {
|
|
157
|
+
data: import('../../index').ArticleItemT[];
|
|
158
|
+
pageSizes: number[];
|
|
159
|
+
pageSize: number;
|
|
160
|
+
defaultCovers: string[];
|
|
161
|
+
mobileLayout: "h" | "v";
|
|
162
|
+
}>;
|
|
163
|
+
__isFragment?: never;
|
|
164
|
+
__isTeleport?: never;
|
|
165
|
+
__isSuspense?: never;
|
|
166
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('../../index').ArticleListPropsT> & Readonly<{
|
|
167
|
+
"onPage-change"?: ((value: {
|
|
168
|
+
page: number;
|
|
169
|
+
pageSize: number;
|
|
170
|
+
}) => any) | undefined;
|
|
171
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
172
|
+
"page-change": (value: {
|
|
173
|
+
page: number;
|
|
174
|
+
pageSize: number;
|
|
175
|
+
}) => any;
|
|
176
|
+
}, string, {
|
|
177
|
+
data: import('../../index').ArticleItemT[];
|
|
178
|
+
pageSizes: number[];
|
|
179
|
+
pageSize: number;
|
|
180
|
+
defaultCovers: string[];
|
|
181
|
+
mobileLayout: "h" | "v";
|
|
182
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
183
|
+
$slots: Readonly<{
|
|
184
|
+
filter?: () => any;
|
|
185
|
+
card?: (props: {
|
|
186
|
+
item: import('../../index').ArticleItemT;
|
|
187
|
+
index: number;
|
|
188
|
+
cover?: string;
|
|
189
|
+
}) => any;
|
|
190
|
+
empty?: () => any;
|
|
191
|
+
}> & {
|
|
192
|
+
filter?: () => any;
|
|
193
|
+
card?: (props: {
|
|
194
|
+
item: import('../../index').ArticleItemT;
|
|
195
|
+
index: number;
|
|
196
|
+
cover?: string;
|
|
197
|
+
}) => any;
|
|
198
|
+
empty?: () => any;
|
|
199
|
+
};
|
|
200
|
+
}) & {
|
|
201
|
+
install(app: App): void;
|
|
202
|
+
};
|
|
203
|
+
export { OArticle, OArticleList };
|
|
204
|
+
export * from './types';
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import _OArticle from "./OArticle.vue.mjs";
|
|
2
|
+
import _sfc_main from "./OArticleList.vue.mjs";
|
|
3
|
+
import './OArticleList.css';
|
|
2
4
|
const OArticle = Object.assign(_OArticle, {
|
|
3
5
|
install(app) {
|
|
4
6
|
app.component("OArticle", _OArticle);
|
|
5
7
|
}
|
|
6
8
|
});
|
|
9
|
+
const OArticleList = Object.assign(_sfc_main, {
|
|
10
|
+
install(app) {
|
|
11
|
+
app.component("OArticleList", _sfc_main);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
7
14
|
export {
|
|
8
|
-
OArticle
|
|
15
|
+
OArticle,
|
|
16
|
+
OArticleList
|
|
9
17
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
/** 文章类型标签(卡片详情区顶部展示) */
|
|
3
|
+
export interface ArticleTagT {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: Component;
|
|
6
|
+
}
|
|
7
|
+
/** 文章列表项(新闻/博客通用) */
|
|
8
|
+
export interface ArticleItemT {
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
cover?: string;
|
|
12
|
+
href?: string;
|
|
13
|
+
date?: string;
|
|
14
|
+
author?: string | string[];
|
|
15
|
+
location?: string;
|
|
16
|
+
tag?: ArticleTagT;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
export interface ArticleListPropsT {
|
|
20
|
+
data: ArticleItemT[];
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
pageSizes?: number[];
|
|
23
|
+
defaultCovers?: string[];
|
|
24
|
+
emptyImg?: string;
|
|
25
|
+
mobileLayout?: 'h' | 'v';
|
|
26
|
+
}
|