@opendesign-plus/components 0.0.1-rc.95 → 0.0.1-rc.97
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 -2
- package/dist/components/article/index.d.ts +6 -1
- package/dist/components/article/types.d.ts +8 -2
- package/dist/components/markdown/OMarkdown.vue.d.ts +2 -0
- package/dist/components/markdown/index.d.ts +6 -0
- package/dist/components.cjs.js +35 -35
- package/dist/components.css +1 -1
- package/dist/components.es.js +6762 -6736
- package/dist/treeshaking/_virtual/icon-email.mjs +9 -8
- package/dist/treeshaking/_virtual/icon-email2.mjs +8 -9
- package/dist/treeshaking/components/article/OArticle.vue.d.ts +12 -2
- package/dist/treeshaking/components/article/OArticleList.css +7 -6
- package/dist/treeshaking/components/article/OArticleList.vue.mjs +48 -34
- package/dist/treeshaking/components/article/index.d.ts +6 -1
- package/dist/treeshaking/components/article/types.d.ts +8 -2
- package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +2 -0
- package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +33 -12
- package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
- package/dist/treeshaking/components/markdown/index.d.ts +6 -0
- package/dist/treeshaking/components/org/OOrgMembers.vue2.mjs +1 -1
- package/dist/treeshaking/components/user-center/OAccountSetting.vue2.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
2
|
const _hoisted_1 = {
|
|
3
|
+
width: "24px",
|
|
4
|
+
height: "24px",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
3
6
|
version: "1.1",
|
|
4
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
-
|
|
6
|
-
height: "32",
|
|
7
|
-
viewBox: "0 0 32 32"
|
|
8
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
8
9
|
};
|
|
9
10
|
function render(_ctx, _cache) {
|
|
10
11
|
return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [
|
|
11
12
|
createElementVNode("path", {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
d: "M19.7302143,3.7590332 C20.8347769,3.7590332 21.7302074,4.65446353 21.7302074,5.7590332 L21.7302074,11.2494191 C21.7302074,11.6360247 21.4168126,11.9494212 21.0302108,11.9494212 C20.643609,11.9494212 20.3302142,11.6360247 20.3302142,11.2494191 L20.3304289,6.00074187 C19.2986037,6.85443694 16.9329556,8.81168905 13.2334847,11.8724982 C12.4849639,12.4917966 11.399646,12.4836263 10.6605433,11.853125 C10.6605433,11.853125 8.29408169,9.83438585 3.56115837,5.79690763 L3.56137022,18.2997234 C3.56137022,18.6310996 3.83001113,18.8997205 4.16137695,18.8997205 L19.7302143,18.8997205 C20.0615733,18.8997205 20.3302142,18.6310996 20.3302142,18.2997234 L20.3302142,14.2535395 C20.3302142,13.8669339 20.643609,13.5535374 21.0302108,13.5535374 C21.4168126,13.5535374 21.7302074,13.8669339 21.7302074,14.2535395 L21.7302074,18.2997234 C21.7302074,19.4042943 20.8347769,20.2997246 19.7302143,20.2997246 L4.16137695,20.2997246 C3.0568075,20.2997246 2.16137695,19.4042943 2.16137695,18.2997234 L2.16137695,5.7590332 C2.16137695,4.65446353 3.0568075,3.7590332 4.16137695,3.7590332 L19.7302143,3.7590332 Z M19.1508914,5.15959067 L4.97116245,5.15953281 C6.08234646,6.10744194 8.28167148,7.9836031 11.5691375,10.7880163 C11.7908756,10.9771675 12.1164692,10.9796194 12.3410309,10.7938315 C12.3410309,10.7938315 14.6109844,8.91575122 19.1508914,5.15959067 Z",
|
|
14
|
+
id: "形状结合",
|
|
15
|
+
fill: "currentColor"
|
|
15
16
|
}, null, -1)
|
|
16
17
|
])]);
|
|
17
18
|
}
|
|
18
|
-
const
|
|
19
|
+
const IconMail = { name: "user-center-icon-email", render };
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
IconMail as default
|
|
21
22
|
};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
2
|
const _hoisted_1 = {
|
|
3
|
-
width: "24px",
|
|
4
|
-
height: "24px",
|
|
5
|
-
viewBox: "0 0 24 24",
|
|
6
3
|
version: "1.1",
|
|
7
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
-
|
|
5
|
+
width: "32",
|
|
6
|
+
height: "32",
|
|
7
|
+
viewBox: "0 0 32 32"
|
|
9
8
|
};
|
|
10
9
|
function render(_ctx, _cache) {
|
|
11
10
|
return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [
|
|
12
11
|
createElementVNode("path", {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
opacity: "0.8",
|
|
13
|
+
fill: "#000",
|
|
14
|
+
d: "M26.307 5.012c1.473 0 2.667 1.193 2.667 2.667v7.32c0 0.516-0.417 0.933-0.933 0.933s-0.933-0.417-0.933-0.933l-0.001-6.997-9.461 7.828c-0.999 0.825-2.445 0.815-3.431-0.025l-9.465-8.075v16.671c0 0.441 0.359 0.8 0.8 0.8h20.759c0.441 0 0.8-0.359 0.8-0.8v-5.395c0-0.516 0.417-0.933 0.933-0.933s0.933 0.417 0.933 0.933v5.395c0 1.473-1.193 2.667-2.667 2.667h-20.759c-1.473 0-2.667-1.193-2.667-2.667v-16.721c0-1.473 1.193-2.667 2.667-2.667h20.759zM25.533 6.879h-18.907l8.799 7.505c0.296 0.252 0.729 0.256 1.029 0.008l9.079-7.513z"
|
|
16
15
|
}, null, -1)
|
|
17
16
|
])]);
|
|
18
17
|
}
|
|
19
|
-
const
|
|
18
|
+
const IconEmail = { name: "components-icon-email", render };
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
IconEmail as default
|
|
22
21
|
};
|
|
@@ -56,6 +56,7 @@ declare function __VLS_template(): {
|
|
|
56
56
|
readonly disableChangeCodeTheme?: boolean | undefined;
|
|
57
57
|
readonly markdownBodyClass?: string | undefined;
|
|
58
58
|
readonly hideFirstH1?: boolean | undefined;
|
|
59
|
+
readonly hideFirstElementMarginTop?: boolean | undefined;
|
|
59
60
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
60
61
|
$attrs: import('vue').Attrs;
|
|
61
62
|
$refs: {
|
|
@@ -79,6 +80,7 @@ declare function __VLS_template(): {
|
|
|
79
80
|
disableChangeCodeTheme?: boolean;
|
|
80
81
|
markdownBodyClass?: string;
|
|
81
82
|
hideFirstH1?: boolean;
|
|
83
|
+
hideFirstElementMarginTop?: boolean;
|
|
82
84
|
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
83
85
|
disableChangeCodeTheme: boolean;
|
|
84
86
|
disableH2: boolean;
|
|
@@ -87,6 +89,7 @@ declare function __VLS_template(): {
|
|
|
87
89
|
disableCode: boolean;
|
|
88
90
|
markdownBodyClass: string;
|
|
89
91
|
hideFirstH1: boolean;
|
|
92
|
+
hideFirstElementMarginTop: boolean;
|
|
90
93
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
91
94
|
beforeCreate?: (() => void) | (() => void)[];
|
|
92
95
|
created?: (() => void) | (() => void)[];
|
|
@@ -115,6 +118,7 @@ declare function __VLS_template(): {
|
|
|
115
118
|
disableCode: boolean;
|
|
116
119
|
markdownBodyClass: string;
|
|
117
120
|
hideFirstH1: boolean;
|
|
121
|
+
hideFirstElementMarginTop: boolean;
|
|
118
122
|
}> & Omit<Readonly<{
|
|
119
123
|
disableH2?: boolean;
|
|
120
124
|
disableTable?: boolean;
|
|
@@ -123,7 +127,8 @@ declare function __VLS_template(): {
|
|
|
123
127
|
disableChangeCodeTheme?: boolean;
|
|
124
128
|
markdownBodyClass?: string;
|
|
125
129
|
hideFirstH1?: boolean;
|
|
126
|
-
|
|
130
|
+
hideFirstElementMarginTop?: boolean;
|
|
131
|
+
}> & Readonly<{}>, "disableChangeCodeTheme" | "disableH2" | "disableTable" | "disableImg" | "disableCode" | "markdownBodyClass" | "hideFirstH1" | "hideFirstElementMarginTop"> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
127
132
|
$slots: {
|
|
128
133
|
header?(_: {
|
|
129
134
|
h1: HTMLElement | undefined;
|
|
@@ -169,6 +174,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
169
174
|
readonly disableChangeCodeTheme?: boolean | undefined;
|
|
170
175
|
readonly markdownBodyClass?: string | undefined;
|
|
171
176
|
readonly hideFirstH1?: boolean | undefined;
|
|
177
|
+
readonly hideFirstElementMarginTop?: boolean | undefined;
|
|
172
178
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
173
179
|
$attrs: import('vue').Attrs;
|
|
174
180
|
$refs: {
|
|
@@ -192,6 +198,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
192
198
|
disableChangeCodeTheme?: boolean;
|
|
193
199
|
markdownBodyClass?: string;
|
|
194
200
|
hideFirstH1?: boolean;
|
|
201
|
+
hideFirstElementMarginTop?: boolean;
|
|
195
202
|
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
196
203
|
disableChangeCodeTheme: boolean;
|
|
197
204
|
disableH2: boolean;
|
|
@@ -200,6 +207,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
200
207
|
disableCode: boolean;
|
|
201
208
|
markdownBodyClass: string;
|
|
202
209
|
hideFirstH1: boolean;
|
|
210
|
+
hideFirstElementMarginTop: boolean;
|
|
203
211
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
204
212
|
beforeCreate?: (() => void) | (() => void)[];
|
|
205
213
|
created?: (() => void) | (() => void)[];
|
|
@@ -228,6 +236,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
228
236
|
disableCode: boolean;
|
|
229
237
|
markdownBodyClass: string;
|
|
230
238
|
hideFirstH1: boolean;
|
|
239
|
+
hideFirstElementMarginTop: boolean;
|
|
231
240
|
}> & Omit<Readonly<{
|
|
232
241
|
disableH2?: boolean;
|
|
233
242
|
disableTable?: boolean;
|
|
@@ -236,7 +245,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
236
245
|
disableChangeCodeTheme?: boolean;
|
|
237
246
|
markdownBodyClass?: string;
|
|
238
247
|
hideFirstH1?: boolean;
|
|
239
|
-
|
|
248
|
+
hideFirstElementMarginTop?: boolean;
|
|
249
|
+
}> & Readonly<{}>, "disableChangeCodeTheme" | "disableH2" | "disableTable" | "disableImg" | "disableCode" | "markdownBodyClass" | "hideFirstH1" | "hideFirstElementMarginTop"> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
240
250
|
$slots: {
|
|
241
251
|
header?(_: {
|
|
242
252
|
h1: HTMLElement | undefined;
|
|
@@ -107,15 +107,16 @@
|
|
|
107
107
|
flex-wrap: wrap;
|
|
108
108
|
gap: var(--o-gap-1);
|
|
109
109
|
}
|
|
110
|
-
.o-article-list .article-content .o-card .o-card-detail .item-
|
|
111
|
-
display:
|
|
110
|
+
.o-article-list .article-content .o-card .o-card-detail .item-tags {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-wrap: wrap; /* 换行时上下间距同为 --o-gap-2 */
|
|
112
113
|
align-items: center;
|
|
113
|
-
|
|
114
|
+
gap: var(--o-gap-2);
|
|
114
115
|
}
|
|
115
|
-
.o-article-list .article-content .o-card .o-card-detail .item-
|
|
116
|
-
|
|
116
|
+
.o-article-list .article-content .o-card .o-card-detail .item-tags .item-tag {
|
|
117
|
+
padding: var(--o-gap-1);
|
|
117
118
|
}
|
|
118
|
-
.o-article-list .article-content .o-card .o-card-detail .item-
|
|
119
|
+
.o-article-list .article-content .o-card .o-card-detail .item-tags .item-tag .o-tag-icon {
|
|
119
120
|
display: flex;
|
|
120
121
|
align-items: center;
|
|
121
122
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, unref, renderSlot, createCommentVNode, createElementVNode, createBlock, withCtx, Fragment, renderList, createVNode, createSlots,
|
|
1
|
+
import { defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, unref, renderSlot, createCommentVNode, createElementVNode, createBlock, withCtx, Fragment, renderList, createVNode, createSlots, toDisplayString, resolveDynamicComponent, createTextVNode } from "vue";
|
|
2
2
|
import { ORow, OCol, OCard, OTag, OIcon, OPagination } from "@opensig/opendesign";
|
|
3
3
|
import { useScreen } from "@opendesign-plus/composables";
|
|
4
4
|
import OEmpty from "../empty/OEmpty.vue.mjs";
|
|
@@ -11,14 +11,18 @@ const _hoisted_2 = {
|
|
|
11
11
|
};
|
|
12
12
|
const _hoisted_3 = { class: "article-content" };
|
|
13
13
|
const _hoisted_4 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "item-tags"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_5 = {
|
|
14
18
|
key: 1,
|
|
15
19
|
class: "item-desc"
|
|
16
20
|
};
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
21
|
+
const _hoisted_6 = { class: "item-info" };
|
|
22
|
+
const _hoisted_7 = { key: 0 };
|
|
23
|
+
const _hoisted_8 = { key: 1 };
|
|
24
|
+
const _hoisted_9 = { key: 2 };
|
|
25
|
+
const _hoisted_10 = {
|
|
22
26
|
key: 1,
|
|
23
27
|
class: "article-pagination"
|
|
24
28
|
};
|
|
@@ -107,39 +111,49 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
111
|
href: item.href,
|
|
108
112
|
layout: unref(lePadV) ? __props.mobileLayout : "v"
|
|
109
113
|
}, createSlots({
|
|
110
|
-
detail: withCtx(() =>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
fn: withCtx(() => [
|
|
124
|
-
createVNode(unref(OIcon), null, {
|
|
114
|
+
detail: withCtx(() => {
|
|
115
|
+
var _a;
|
|
116
|
+
return [
|
|
117
|
+
((_a = item.tags) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
118
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.tags, (tag, idx) => {
|
|
119
|
+
return openBlock(), createBlock(unref(OTag), {
|
|
120
|
+
key: idx,
|
|
121
|
+
class: "item-tag",
|
|
122
|
+
color: tag.color,
|
|
123
|
+
variant: tag.variant ?? "outline",
|
|
124
|
+
size: tag.size,
|
|
125
|
+
round: tag.round
|
|
126
|
+
}, createSlots({
|
|
125
127
|
default: withCtx(() => [
|
|
126
|
-
(
|
|
128
|
+
createElementVNode("span", null, toDisplayString(tag.label), 1)
|
|
127
129
|
]),
|
|
128
130
|
_: 2
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
}, [
|
|
132
|
+
tag.icon ? {
|
|
133
|
+
name: "icon",
|
|
134
|
+
fn: withCtx(() => [
|
|
135
|
+
createVNode(unref(OIcon), null, {
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
(openBlock(), createBlock(resolveDynamicComponent(tag.icon)))
|
|
138
|
+
]),
|
|
139
|
+
_: 2
|
|
140
|
+
}, 1024)
|
|
141
|
+
]),
|
|
142
|
+
key: "0"
|
|
143
|
+
} : void 0
|
|
144
|
+
]), 1032, ["color", "variant", "size", "round"]);
|
|
145
|
+
}), 128))
|
|
146
|
+
])) : createCommentVNode("", true),
|
|
147
|
+
item.description ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(item.description), 1)) : createCommentVNode("", true)
|
|
148
|
+
];
|
|
149
|
+
}),
|
|
136
150
|
_: 2
|
|
137
151
|
}, [
|
|
138
152
|
item.date || item.author || item.location ? {
|
|
139
153
|
name: "footer",
|
|
140
154
|
fn: withCtx(() => [
|
|
141
|
-
createElementVNode("div",
|
|
142
|
-
item.date ? (openBlock(), createElementBlock("span",
|
|
155
|
+
createElementVNode("div", _hoisted_6, [
|
|
156
|
+
item.date ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
143
157
|
createVNode(unref(OIcon), null, {
|
|
144
158
|
default: withCtx(() => [
|
|
145
159
|
createVNode(unref(IconTime))
|
|
@@ -148,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
162
|
}),
|
|
149
163
|
createTextVNode(" " + toDisplayString(item.date), 1)
|
|
150
164
|
])) : createCommentVNode("", true),
|
|
151
|
-
item.author ? (openBlock(), createElementBlock("span",
|
|
165
|
+
item.author ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
|
152
166
|
createVNode(unref(OIcon), null, {
|
|
153
167
|
default: withCtx(() => [
|
|
154
168
|
createVNode(unref(IconAvatar))
|
|
@@ -157,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
157
171
|
}),
|
|
158
172
|
createTextVNode(" " + toDisplayString(authorText(item.author)), 1)
|
|
159
173
|
])) : createCommentVNode("", true),
|
|
160
|
-
item.location ? (openBlock(), createElementBlock("span",
|
|
174
|
+
item.location ? (openBlock(), createElementBlock("span", _hoisted_9, [
|
|
161
175
|
createVNode(unref(OIcon), null, {
|
|
162
176
|
default: withCtx(() => [
|
|
163
177
|
createVNode(unref(IconAvatar))
|
|
@@ -185,7 +199,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
185
199
|
}, null, 8, ["img"])
|
|
186
200
|
])
|
|
187
201
|
]),
|
|
188
|
-
showPagination.value ? (openBlock(), createElementBlock("div",
|
|
202
|
+
showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
189
203
|
createVNode(unref(OPagination), {
|
|
190
204
|
page: current.value,
|
|
191
205
|
simple: unref(lePadV),
|
|
@@ -53,6 +53,7 @@ declare const OArticle: {
|
|
|
53
53
|
readonly disableChangeCodeTheme?: boolean | undefined;
|
|
54
54
|
readonly markdownBodyClass?: string | undefined;
|
|
55
55
|
readonly hideFirstH1?: boolean | undefined;
|
|
56
|
+
readonly hideFirstElementMarginTop?: boolean | undefined;
|
|
56
57
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
57
58
|
$attrs: import('vue').Attrs;
|
|
58
59
|
$refs: {
|
|
@@ -76,6 +77,7 @@ declare const OArticle: {
|
|
|
76
77
|
disableChangeCodeTheme?: boolean;
|
|
77
78
|
markdownBodyClass?: string;
|
|
78
79
|
hideFirstH1?: boolean;
|
|
80
|
+
hideFirstElementMarginTop?: boolean;
|
|
79
81
|
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
80
82
|
disableChangeCodeTheme: boolean;
|
|
81
83
|
disableH2: boolean;
|
|
@@ -84,6 +86,7 @@ declare const OArticle: {
|
|
|
84
86
|
disableCode: boolean;
|
|
85
87
|
markdownBodyClass: string;
|
|
86
88
|
hideFirstH1: boolean;
|
|
89
|
+
hideFirstElementMarginTop: boolean;
|
|
87
90
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
88
91
|
beforeCreate?: (() => void) | (() => void)[];
|
|
89
92
|
created?: (() => void) | (() => void)[];
|
|
@@ -112,6 +115,7 @@ declare const OArticle: {
|
|
|
112
115
|
disableCode: boolean;
|
|
113
116
|
markdownBodyClass: string;
|
|
114
117
|
hideFirstH1: boolean;
|
|
118
|
+
hideFirstElementMarginTop: boolean;
|
|
115
119
|
}> & Omit<Readonly<{
|
|
116
120
|
disableH2?: boolean;
|
|
117
121
|
disableTable?: boolean;
|
|
@@ -120,7 +124,8 @@ declare const OArticle: {
|
|
|
120
124
|
disableChangeCodeTheme?: boolean;
|
|
121
125
|
markdownBodyClass?: string;
|
|
122
126
|
hideFirstH1?: boolean;
|
|
123
|
-
|
|
127
|
+
hideFirstElementMarginTop?: boolean;
|
|
128
|
+
}> & Readonly<{}>, "disableChangeCodeTheme" | "disableH2" | "disableTable" | "disableImg" | "disableCode" | "markdownBodyClass" | "hideFirstH1" | "hideFirstElementMarginTop"> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
124
129
|
$slots: {
|
|
125
130
|
header?(_: {
|
|
126
131
|
h1: HTMLElement | undefined;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
-
|
|
2
|
+
import { TagColorT, TagVariantT } from '@opensig/opendesign';
|
|
3
|
+
import { RoundT, SizeT } from '@opensig/opendesign/es/_utils/types';
|
|
4
|
+
/** 文章类型标签(卡片详情区顶部展示,从左往右排列可换行,间距 --o-gap-2) */
|
|
3
5
|
export interface ArticleTagT {
|
|
4
6
|
label: string;
|
|
5
7
|
icon?: Component;
|
|
8
|
+
color?: TagColorT;
|
|
9
|
+
variant?: TagVariantT;
|
|
10
|
+
size?: SizeT;
|
|
11
|
+
round?: RoundT;
|
|
6
12
|
}
|
|
7
13
|
/** 文章列表项(新闻/博客通用) */
|
|
8
14
|
export interface ArticleItemT {
|
|
@@ -13,7 +19,7 @@ export interface ArticleItemT {
|
|
|
13
19
|
date?: string;
|
|
14
20
|
author?: string | string[];
|
|
15
21
|
location?: string;
|
|
16
|
-
|
|
22
|
+
tags?: ArticleTagT[];
|
|
17
23
|
[key: string]: any;
|
|
18
24
|
}
|
|
19
25
|
export interface ArticleListPropsT {
|
|
@@ -6,6 +6,7 @@ type __VLS_Props = {
|
|
|
6
6
|
disableChangeCodeTheme?: boolean;
|
|
7
7
|
markdownBodyClass?: string;
|
|
8
8
|
hideFirstH1?: boolean;
|
|
9
|
+
hideFirstElementMarginTop?: boolean;
|
|
9
10
|
};
|
|
10
11
|
declare function __VLS_template(): {
|
|
11
12
|
attrs: Partial<{}>;
|
|
@@ -30,6 +31,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
30
31
|
disableCode: boolean;
|
|
31
32
|
markdownBodyClass: string;
|
|
32
33
|
hideFirstH1: boolean;
|
|
34
|
+
hideFirstElementMarginTop: boolean;
|
|
33
35
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
36
|
markdownBodyRef: HTMLDivElement;
|
|
35
37
|
}, HTMLDivElement>;
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./OMarkdown.vue2.mjs";
|
|
|
2
2
|
import './OMarkdown.css';
|
|
3
3
|
import './OMarkdown2.css';
|
|
4
4
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const _OMarkdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const _OMarkdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4be4e234"]]);
|
|
6
6
|
export {
|
|
7
7
|
_OMarkdown as default
|
|
8
8
|
};
|
|
@@ -13,7 +13,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
disableCode: { type: Boolean, default: false },
|
|
14
14
|
disableChangeCodeTheme: { type: Boolean, default: false },
|
|
15
15
|
markdownBodyClass: { default: "o-markdown-body" },
|
|
16
|
-
hideFirstH1: { type: Boolean, default: false }
|
|
16
|
+
hideFirstH1: { type: Boolean, default: false },
|
|
17
|
+
hideFirstElementMarginTop: { type: Boolean, default: true }
|
|
17
18
|
},
|
|
18
19
|
setup(__props) {
|
|
19
20
|
const props = __props;
|
|
@@ -71,18 +72,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
};
|
|
75
|
+
const isElementHidden = (el) => {
|
|
76
|
+
return !!el.hidden || el.style.display === "none" || getComputedStyle(el).display === "none";
|
|
77
|
+
};
|
|
78
|
+
const getFirstContentElement = (root) => {
|
|
79
|
+
let container = root;
|
|
80
|
+
for (let i = 0; i < 100; i++) {
|
|
81
|
+
let first = container.firstElementChild;
|
|
82
|
+
while (first && isElementHidden(first)) {
|
|
83
|
+
first = first.nextElementSibling;
|
|
84
|
+
}
|
|
85
|
+
if (!first) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
if (first.tagName === "DIV" && container.childElementCount === 1) {
|
|
89
|
+
container = first;
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
return first;
|
|
93
|
+
}
|
|
94
|
+
return container.firstElementChild;
|
|
95
|
+
};
|
|
74
96
|
const applyHandleFirstElement = () => {
|
|
75
97
|
const root = markdownBodyRef.value;
|
|
76
|
-
|
|
77
|
-
if (!target) {
|
|
98
|
+
if (!root) {
|
|
78
99
|
firstH1.value = void 0;
|
|
79
100
|
return;
|
|
80
101
|
}
|
|
81
|
-
|
|
82
|
-
if (target.tagName === "DIV" && root.childElementCount === 1) {
|
|
83
|
-
container = target;
|
|
84
|
-
}
|
|
85
|
-
const firstContent = container.firstElementChild;
|
|
102
|
+
const firstContent = getFirstContentElement(root);
|
|
86
103
|
if (!firstContent) {
|
|
87
104
|
firstH1.value = void 0;
|
|
88
105
|
return;
|
|
@@ -90,13 +107,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
107
|
firstH1.value = firstContent.tagName === "H1" ? firstContent : void 0;
|
|
91
108
|
if (props.hideFirstH1 && firstContent.tagName === "H1") {
|
|
92
109
|
firstContent.style.display = "none";
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
next
|
|
110
|
+
if (props.hideFirstElementMarginTop) {
|
|
111
|
+
const next = firstContent.nextElementSibling;
|
|
112
|
+
if (next) {
|
|
113
|
+
next.style.marginTop = "0";
|
|
114
|
+
}
|
|
96
115
|
}
|
|
97
116
|
return;
|
|
98
117
|
}
|
|
99
|
-
|
|
118
|
+
if (props.hideFirstElementMarginTop) {
|
|
119
|
+
firstContent.style.marginTop = "0";
|
|
120
|
+
}
|
|
100
121
|
};
|
|
101
122
|
const processMutations = (mutations) => {
|
|
102
123
|
const activeMap = selectorMap.value;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon[data-v-
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-4be4e234] {
|
|
2
2
|
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
3
3
|
}
|
|
4
4
|
@media (hover: hover) {
|
|
5
|
-
.hover-icon-rotate:hover .o-icon[data-v-
|
|
5
|
+
.hover-icon-rotate:hover .o-icon[data-v-4be4e234] {
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
.o-markdown.unmounted[data-v-
|
|
9
|
+
.o-markdown.unmounted[data-v-4be4e234] .o-markdown-body table {
|
|
10
10
|
display: block !important;
|
|
11
11
|
overflow: hidden !important;
|
|
12
12
|
max-height: calc(100vh - 210px) !important;
|
|
@@ -8,6 +8,7 @@ declare const OMarkdown: {
|
|
|
8
8
|
disableChangeCodeTheme?: boolean;
|
|
9
9
|
markdownBodyClass?: string;
|
|
10
10
|
hideFirstH1?: boolean;
|
|
11
|
+
hideFirstElementMarginTop?: boolean;
|
|
11
12
|
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
12
13
|
disableChangeCodeTheme: boolean;
|
|
13
14
|
disableH2: boolean;
|
|
@@ -16,6 +17,7 @@ declare const OMarkdown: {
|
|
|
16
17
|
disableCode: boolean;
|
|
17
18
|
markdownBodyClass: string;
|
|
18
19
|
hideFirstH1: boolean;
|
|
20
|
+
hideFirstElementMarginTop: boolean;
|
|
19
21
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
20
22
|
markdownBodyRef: HTMLDivElement;
|
|
21
23
|
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
@@ -33,6 +35,7 @@ declare const OMarkdown: {
|
|
|
33
35
|
disableChangeCodeTheme?: boolean;
|
|
34
36
|
markdownBodyClass?: string;
|
|
35
37
|
hideFirstH1?: boolean;
|
|
38
|
+
hideFirstElementMarginTop?: boolean;
|
|
36
39
|
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
37
40
|
disableChangeCodeTheme: boolean;
|
|
38
41
|
disableH2: boolean;
|
|
@@ -41,6 +44,7 @@ declare const OMarkdown: {
|
|
|
41
44
|
disableCode: boolean;
|
|
42
45
|
markdownBodyClass: string;
|
|
43
46
|
hideFirstH1: boolean;
|
|
47
|
+
hideFirstElementMarginTop: boolean;
|
|
44
48
|
}>;
|
|
45
49
|
__isFragment?: never;
|
|
46
50
|
__isTeleport?: never;
|
|
@@ -53,6 +57,7 @@ declare const OMarkdown: {
|
|
|
53
57
|
disableChangeCodeTheme?: boolean;
|
|
54
58
|
markdownBodyClass?: string;
|
|
55
59
|
hideFirstH1?: boolean;
|
|
60
|
+
hideFirstElementMarginTop?: boolean;
|
|
56
61
|
}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
57
62
|
disableChangeCodeTheme: boolean;
|
|
58
63
|
disableH2: boolean;
|
|
@@ -61,6 +66,7 @@ declare const OMarkdown: {
|
|
|
61
66
|
disableCode: boolean;
|
|
62
67
|
markdownBodyClass: string;
|
|
63
68
|
hideFirstH1: boolean;
|
|
69
|
+
hideFirstElementMarginTop: boolean;
|
|
64
70
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
65
71
|
$slots: {
|
|
66
72
|
header?(_: {
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, openBlock, createElementBlock, Fragment
|
|
|
2
2
|
import { OLink, OButton, OIcon, OIconChevronUp, OIconChevronDown } from "@opensig/opendesign";
|
|
3
3
|
import { useScreen } from "@opendesign-plus/composables";
|
|
4
4
|
import { useI18n } from "../../i18n/index.mjs";
|
|
5
|
-
import IconEmail from "../../_virtual/icon-
|
|
5
|
+
import IconEmail from "../../_virtual/icon-email2.mjs";
|
|
6
6
|
const _hoisted_1 = { class: "o-org-members" };
|
|
7
7
|
const _hoisted_2 = ["src", "alt"];
|
|
8
8
|
const _hoisted_3 = { class: "o-org-members-title" };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, watch, openBlock, createElementBlock, Fragment, createElementVNode, toDisplayString, unref, createCommentVNode, normalizeClass, createVNode, withCtx, renderList, createBlock, resolveDynamicComponent, createTextVNode } from "vue";
|
|
2
|
-
import IconMail from "../../_virtual/icon-
|
|
2
|
+
import IconMail from "../../_virtual/icon-email.mjs";
|
|
3
3
|
import IconPhone from "../../_virtual/icon-phone.mjs";
|
|
4
4
|
import { useMessage, OSkeleton, OIcon, OLink, OSkeletonText } from "@opensig/opendesign";
|
|
5
5
|
import { useI18n } from "../../i18n/index.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendesign-plus/components",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.97",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vue": "^3.5.13",
|
|
48
48
|
"element-plus": "2.13.1",
|
|
49
49
|
"@opendesign-plus/composables": "0.0.1-rc.10",
|
|
50
|
-
"@opendesign-plus/styles": "0.0.1-rc.
|
|
50
|
+
"@opendesign-plus/styles": "0.0.1-rc.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@vitejs/plugin-vue": "^5.2.1",
|