@opendesign-plus-test/components 0.0.1-rc.243 → 0.0.1-rc.245
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/activity/index.d.ts +9 -9
- package/dist/components/anchor-bar/OAnchorBar.vue.d.ts +2 -2
- package/dist/components/anchor-bar/index.d.ts +9 -9
- package/dist/components/article/OArticle.vue.d.ts +14 -196
- package/dist/components/article/index.d.ts +50 -151
- package/dist/components/article-anchor/index.d.ts +9 -9
- package/dist/components/article-pagination/index.d.ts +17 -17
- package/dist/components/banner/index.d.ts +6 -6
- package/dist/components/brand/index.d.ts +15 -15
- package/dist/components/events/index.d.ts +20 -20
- package/dist/components/footer/index.d.ts +3 -3
- package/dist/components/header/OHeaderMobile.vue.d.ts +8 -8
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +1 -1
- package/dist/components/header/index.d.ts +28 -28
- package/dist/components/header-search/index.d.ts +13 -13
- package/dist/components/logo-swiper/index.d.ts +11 -11
- package/dist/components/markdown/OMarkdown.vue.d.ts +16 -7
- package/dist/components/markdown/index.d.ts +45 -13
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +6 -6
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
- package/dist/components/meeting/index.d.ts +51 -51
- package/dist/components/org/index.d.ts +9 -9
- package/dist/components/recursion-menu/index.d.ts +3 -3
- package/dist/components/search/index.d.ts +11 -11
- package/dist/components/search-doc-result/OSearchDocResult.vue.d.ts +3 -3
- package/dist/components/search-doc-result/index.d.ts +8 -8
- package/dist/components/search-result/OSearchResult.vue.d.ts +2 -2
- package/dist/components/search-result/OSearchResultHeader.vue.d.ts +24 -24
- package/dist/components/search-result/index.d.ts +31 -31
- package/dist/components/sig/index.d.ts +15 -15
- package/dist/components/summit/index.d.ts +12 -12
- package/dist/components/user-center/index.d.ts +18 -18
- package/dist/components/video/index.d.ts +3 -3
- package/dist/components.cjs.js +44 -44
- package/dist/components.css +1 -1
- package/dist/components.es.js +9808 -10037
- package/dist/index.d.ts +0 -1
- package/dist/treeshaking/components/activity/index.d.ts +9 -9
- package/dist/treeshaking/components/anchor-bar/OAnchorBar.vue.d.ts +2 -2
- package/dist/treeshaking/components/anchor-bar/index.d.ts +9 -9
- package/dist/treeshaking/components/article/OArticle.css +124 -18
- package/dist/treeshaking/components/article/OArticle.vue.d.ts +14 -196
- package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
- package/dist/treeshaking/components/article/OArticle.vue2.mjs +82 -48
- package/dist/treeshaking/components/article/index.d.ts +50 -151
- package/dist/treeshaking/components/article-anchor/OArticleAnchor.css +4 -4
- package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue.mjs +1 -1
- package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue2.mjs +5 -4
- package/dist/treeshaking/components/article-anchor/index.d.ts +9 -9
- package/dist/treeshaking/components/article-pagination/index.d.ts +17 -17
- package/dist/treeshaking/components/banner/index.d.ts +6 -6
- package/dist/treeshaking/components/brand/index.d.ts +15 -15
- package/dist/treeshaking/components/events/index.d.ts +20 -20
- package/dist/treeshaking/components/footer/index.d.ts +3 -3
- package/dist/treeshaking/components/header/OHeaderMobile.vue.d.ts +8 -8
- package/dist/treeshaking/components/header/components/HeaderNavMobile.vue.d.ts +1 -1
- package/dist/treeshaking/components/header/index.d.ts +28 -28
- package/dist/treeshaking/components/header-search/index.d.ts +13 -13
- package/dist/treeshaking/components/logo-swiper/index.d.ts +11 -11
- package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +16 -7
- package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +36 -47
- package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +261 -0
- package/dist/treeshaking/components/{article/components/DocTitle.vue.d.ts → markdown/components/MarkdownPageTitle.vue.d.ts} +5 -6
- package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +7 -0
- package/dist/treeshaking/components/{article/components/DocTitle.vue2.mjs → markdown/components/MarkdownPageTitle.vue2.mjs} +80 -131
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +22 -22
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue2.mjs +5 -11
- package/dist/treeshaking/components/markdown/index.d.ts +45 -13
- package/dist/treeshaking/components/markdown/replacer/h1.d.ts +11 -0
- package/dist/treeshaking/components/markdown/replacer/h1.mjs +29 -0
- package/dist/treeshaking/components/meeting/OMeetingPlayback.vue.d.ts +6 -6
- package/dist/treeshaking/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
- package/dist/treeshaking/components/meeting/index.d.ts +51 -51
- package/dist/treeshaking/components/org/index.d.ts +9 -9
- package/dist/treeshaking/components/recursion-menu/ORecursionMenu.vue.mjs +1 -1
- package/dist/treeshaking/components/recursion-menu/index.d.ts +3 -3
- package/dist/treeshaking/components/search/index.d.ts +11 -11
- package/dist/treeshaking/components/search-result/OSearchResultHeader.vue.d.ts +24 -24
- package/dist/treeshaking/components/search-result/index.d.ts +31 -31
- package/dist/treeshaking/components/sig/index.d.ts +15 -15
- package/dist/treeshaking/components/summit/index.d.ts +12 -12
- package/dist/treeshaking/components/user-center/index.d.ts +18 -18
- package/dist/treeshaking/components/user-center/index.mjs +0 -2
- package/dist/treeshaking/components/video/index.d.ts +3 -3
- package/dist/treeshaking/index.d.ts +0 -1
- package/dist/treeshaking/index.mjs +0 -2
- package/package.json +4 -4
- package/dist/components/article/components/ArticleTitle.vue.d.ts +0 -22
- package/dist/components/article/components/DocTitle.vue.d.ts +0 -24
- package/dist/components/doc-layout/ODocLayout.vue.d.ts +0 -38
- package/dist/components/doc-layout/index.d.ts +0 -59
- package/dist/components/doc-layout/types.d.ts +0 -23
- package/dist/treeshaking/_virtual/icon-menu-fold.mjs +0 -20
- package/dist/treeshaking/_virtual/icon-menu-unfold.mjs +0 -20
- package/dist/treeshaking/components/article/components/ArticleTitle.css +0 -123
- package/dist/treeshaking/components/article/components/ArticleTitle.vue.d.ts +0 -22
- package/dist/treeshaking/components/article/components/ArticleTitle.vue.mjs +0 -7
- package/dist/treeshaking/components/article/components/ArticleTitle.vue2.mjs +0 -97
- package/dist/treeshaking/components/article/components/DocTitle.css +0 -246
- package/dist/treeshaking/components/article/components/DocTitle.vue.mjs +0 -7
- package/dist/treeshaking/components/doc-layout/ODocLayout.css +0 -271
- package/dist/treeshaking/components/doc-layout/ODocLayout.vue.d.ts +0 -38
- package/dist/treeshaking/components/doc-layout/ODocLayout.vue.mjs +0 -7
- package/dist/treeshaking/components/doc-layout/ODocLayout.vue2.mjs +0 -165
- package/dist/treeshaking/components/doc-layout/index.d.ts +0 -59
- package/dist/treeshaking/components/doc-layout/index.mjs +0 -9
|
@@ -1,56 +1,45 @@
|
|
|
1
|
-
import { defineComponent, useCssVars, computed, toValue, ref, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, useCssVars, computed, toValue, ref, onMounted, nextTick, watch, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref, withDirectives, createBlock, withCtx, createVNode, createCommentVNode, toDisplayString, createTextVNode } from "vue";
|
|
2
|
+
import { useWindowSize } from "@vueuse/core";
|
|
3
|
+
import { OIcon, OPopover, ODivider, OLink, ODialog } from "@opensig/opendesign";
|
|
4
|
+
import { useScreen } from "@opendesign-plus/composables";
|
|
4
5
|
import { buildVueDompurifyHTMLDirective } from "vue-dompurify-html";
|
|
5
6
|
import { useI18n } from "../../../i18n/index.mjs";
|
|
6
7
|
import IconOutlink from "../../../_virtual/icon-outlink.mjs";
|
|
7
8
|
import IconMore from "../../../_virtual/icon-more.mjs";
|
|
8
9
|
import IconDownload from "../../../_virtual/icon-download.mjs";
|
|
9
10
|
import IconStar from "../../../_virtual/icon-star.mjs";
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const _hoisted_2 = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "o-doc-title-text"
|
|
15
|
-
};
|
|
11
|
+
const _hoisted_1 = { class: "o-md-page-title-content" };
|
|
12
|
+
const _hoisted_2 = { class: "o-md-page-title-text __mounted" };
|
|
16
13
|
const _hoisted_3 = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "o-doc-title-text __mounted"
|
|
19
|
-
};
|
|
20
|
-
const _hoisted_4 = {
|
|
21
14
|
key: 0,
|
|
22
|
-
class: "o-
|
|
15
|
+
class: "o-md-page-title-actions"
|
|
23
16
|
};
|
|
24
|
-
const
|
|
25
|
-
const
|
|
17
|
+
const _hoisted_4 = { class: "o-md-page-title-actions-left" };
|
|
18
|
+
const _hoisted_5 = {
|
|
26
19
|
key: 0,
|
|
27
|
-
class: "o-
|
|
20
|
+
class: "o-md-page-title-update-time"
|
|
28
21
|
};
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const _hoisted_14 = { class: "o-doc-title-dlg-action-box-icon" };
|
|
37
|
-
const _hoisted_15 = { class: "o-doc-title-dlg-action-box-label" };
|
|
22
|
+
const _hoisted_6 = { class: "o-md-page-dlg-action-box-container" };
|
|
23
|
+
const _hoisted_7 = { class: "o-md-page-dlg-action-box-icon" };
|
|
24
|
+
const _hoisted_8 = { class: "o-md-page-dlg-action-box-label" };
|
|
25
|
+
const _hoisted_9 = { class: "o-md-page-dlg-action-box-icon" };
|
|
26
|
+
const _hoisted_10 = { class: "o-md-page-dlg-action-box-label" };
|
|
27
|
+
const _hoisted_11 = { class: "o-md-page-dlg-action-box-icon" };
|
|
28
|
+
const _hoisted_12 = { class: "o-md-page-dlg-action-box-label" };
|
|
38
29
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
39
|
-
__name: "
|
|
30
|
+
__name: "MarkdownPageTitle",
|
|
40
31
|
props: {
|
|
41
32
|
el: {},
|
|
42
|
-
title: {},
|
|
43
33
|
bgImage: {},
|
|
44
34
|
sourceUrl: {},
|
|
45
35
|
updateTime: {},
|
|
46
36
|
enableDownload: { default: false },
|
|
47
|
-
enableStar: { default: false }
|
|
48
|
-
enableCopyLink: { default: false }
|
|
37
|
+
enableStar: { default: false }
|
|
49
38
|
},
|
|
50
39
|
emits: ["download", "collect"],
|
|
51
40
|
setup(__props, { emit: __emit }) {
|
|
52
41
|
useCssVars((_ctx) => ({
|
|
53
|
-
"
|
|
42
|
+
"v6981a063": bgImage.value
|
|
54
43
|
}));
|
|
55
44
|
const props = __props;
|
|
56
45
|
const emit = __emit;
|
|
@@ -62,8 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
51
|
const updateTime = computed(() => toValue(props.updateTime));
|
|
63
52
|
const enableDownload = computed(() => toValue(props.enableDownload));
|
|
64
53
|
const enableStar = computed(() => toValue(props.enableStar));
|
|
65
|
-
const
|
|
66
|
-
const showActions = computed(() => sourceUrl.value || updateTime.value || enableDownload.value || enableStar.value || enableCopyLink.value);
|
|
54
|
+
const showActions = computed(() => sourceUrl.value || updateTime.value || enableDownload.value || enableStar.value);
|
|
67
55
|
const showDivider = computed(() => sourceUrl.value && (enableDownload.value || enableStar.value));
|
|
68
56
|
const vDompurifyHtml = buildVueDompurifyHTMLDirective({
|
|
69
57
|
default: {
|
|
@@ -71,61 +59,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
59
|
}
|
|
72
60
|
});
|
|
73
61
|
const { lePadV } = useScreen();
|
|
62
|
+
const { width } = useWindowSize();
|
|
74
63
|
const { t } = useI18n();
|
|
75
|
-
const
|
|
76
|
-
const
|
|
64
|
+
const titleRef = ref();
|
|
65
|
+
const isFirstH1 = ref(false);
|
|
77
66
|
const showActionsDlg = ref(false);
|
|
67
|
+
const checkShowDownloadPdf = () => {
|
|
68
|
+
var _a;
|
|
69
|
+
const mdBodyH1 = document.querySelector(".o-markdown-body h1");
|
|
70
|
+
const myH1 = (_a = titleRef.value) == null ? void 0 : _a.querySelector("h1");
|
|
71
|
+
isFirstH1.value = myH1 === mdBodyH1;
|
|
72
|
+
};
|
|
73
|
+
onMounted(async () => {
|
|
74
|
+
await nextTick();
|
|
75
|
+
checkShowDownloadPdf();
|
|
76
|
+
});
|
|
77
|
+
watch([lePadV, width], async () => {
|
|
78
|
+
await nextTick();
|
|
79
|
+
checkShowDownloadPdf();
|
|
80
|
+
});
|
|
78
81
|
const openSourceUrl = () => {
|
|
79
82
|
window.open(sourceUrl.value, "_blank", "noopener,noreferrer");
|
|
80
|
-
showActionsDlg.value = false;
|
|
81
|
-
};
|
|
82
|
-
const copyLink = async () => {
|
|
83
|
-
const success = await useClipboard(window.location.href);
|
|
84
|
-
if (success) {
|
|
85
|
-
if (lePadV.value) {
|
|
86
|
-
toast.show(t("common.copySuccess"));
|
|
87
|
-
showActionsDlg.value = false;
|
|
88
|
-
} else {
|
|
89
|
-
message.success(t("common.copySuccess"));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
const onDownload = () => {
|
|
94
|
-
emit("download");
|
|
95
|
-
showActionsDlg.value = false;
|
|
96
|
-
};
|
|
97
|
-
const onCollect = () => {
|
|
98
|
-
emit("collect");
|
|
99
|
-
showActionsDlg.value = false;
|
|
100
83
|
};
|
|
101
84
|
return (_ctx, _cache) => {
|
|
102
85
|
var _a;
|
|
103
86
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
104
87
|
createElementVNode("div", {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
88
|
+
ref_key: "titleRef",
|
|
89
|
+
ref: titleRef,
|
|
90
|
+
class: normalizeClass(["o-md-page-title", {
|
|
91
|
+
"is-simple": !isFirstH1.value || unref(lePadV),
|
|
92
|
+
"first-h1": isFirstH1.value,
|
|
93
|
+
"more-h1": !isFirstH1.value
|
|
108
94
|
}])
|
|
109
95
|
}, [
|
|
110
96
|
createElementVNode("div", _hoisted_1, [
|
|
111
|
-
|
|
112
|
-
createElementVNode("h1", null, toDisplayString(__props.title), 1)
|
|
113
|
-
])) : withDirectives((openBlock(), createElementBlock("div", _hoisted_3, null, 512)), [
|
|
97
|
+
withDirectives(createElementVNode("div", _hoisted_2, null, 512), [
|
|
114
98
|
[unref(vDompurifyHtml), (_a = __props.el) == null ? void 0 : _a.outerHTML]
|
|
115
99
|
])
|
|
116
100
|
]),
|
|
117
|
-
showActions.value ? (openBlock(), createElementBlock("div",
|
|
118
|
-
unref(lePadV) ? (openBlock(),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
101
|
+
isFirstH1.value && showActions.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
102
|
+
unref(lePadV) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
103
|
+
showActions.value ? (openBlock(), createBlock(unref(OIcon), {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: "o-md-page-title-icon-more",
|
|
106
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showActionsDlg.value = true)
|
|
107
|
+
}, {
|
|
108
|
+
default: withCtx(() => [
|
|
109
|
+
createVNode(unref(IconMore))
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})) : createCommentVNode("", true)
|
|
113
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
114
|
+
createElementVNode("div", _hoisted_4, [
|
|
129
115
|
enableDownload.value ? (openBlock(), createBlock(unref(OPopover), {
|
|
130
116
|
key: 0,
|
|
131
117
|
position: "top",
|
|
@@ -134,7 +120,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
134
120
|
}, {
|
|
135
121
|
target: withCtx(() => [
|
|
136
122
|
createVNode(unref(OIcon), {
|
|
137
|
-
class: "o-
|
|
123
|
+
class: "o-md-page-title-icon-download",
|
|
138
124
|
onClick: _cache[1] || (_cache[1] = ($event) => emit("download"))
|
|
139
125
|
}, {
|
|
140
126
|
default: withCtx(() => [
|
|
@@ -156,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
156
142
|
}, {
|
|
157
143
|
target: withCtx(() => [
|
|
158
144
|
createVNode(unref(OIcon), {
|
|
159
|
-
class: "o-
|
|
145
|
+
class: "o-md-page-title-icon-star",
|
|
160
146
|
onClick: _cache[2] || (_cache[2] = ($event) => emit("collect"))
|
|
161
147
|
}, {
|
|
162
148
|
default: withCtx(() => [
|
|
@@ -170,36 +156,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
170
156
|
]),
|
|
171
157
|
_: 1
|
|
172
158
|
})) : createCommentVNode("", true),
|
|
173
|
-
enableCopyLink.value ? (openBlock(), createBlock(unref(OPopover), {
|
|
174
|
-
key: 2,
|
|
175
|
-
position: "top",
|
|
176
|
-
trigger: "hover",
|
|
177
|
-
offset: 12
|
|
178
|
-
}, {
|
|
179
|
-
target: withCtx(() => [
|
|
180
|
-
createVNode(unref(OIcon), {
|
|
181
|
-
class: "o-doc-title-icon-copy",
|
|
182
|
-
onClick: copyLink
|
|
183
|
-
}, {
|
|
184
|
-
default: withCtx(() => [
|
|
185
|
-
createVNode(unref(IconLink))
|
|
186
|
-
]),
|
|
187
|
-
_: 1
|
|
188
|
-
})
|
|
189
|
-
]),
|
|
190
|
-
default: withCtx(() => [
|
|
191
|
-
createElementVNode("span", null, toDisplayString(unref(t)("common.copyLink")), 1)
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
})) : createCommentVNode("", true),
|
|
195
159
|
showDivider.value ? (openBlock(), createBlock(unref(ODivider), {
|
|
196
|
-
key:
|
|
160
|
+
key: 2,
|
|
197
161
|
direction: "v",
|
|
198
162
|
style: { "--o-divider-label-gap": "0" }
|
|
199
163
|
})) : createCommentVNode("", true),
|
|
200
164
|
sourceUrl.value ? (openBlock(), createBlock(unref(OLink), {
|
|
201
|
-
key:
|
|
202
|
-
class: "o-
|
|
165
|
+
key: 3,
|
|
166
|
+
class: "o-md-page-title-source-code",
|
|
203
167
|
size: "large",
|
|
204
168
|
href: sourceUrl.value,
|
|
205
169
|
target: "_blank",
|
|
@@ -207,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
207
171
|
}, {
|
|
208
172
|
default: withCtx(() => [
|
|
209
173
|
createTextVNode(toDisplayString(unref(t)("md.gitSource")) + " ", 1),
|
|
210
|
-
createVNode(unref(OIcon), { class: "o-
|
|
174
|
+
createVNode(unref(OIcon), { class: "o-md-page-title-icon-outlink" }, {
|
|
211
175
|
default: withCtx(() => [
|
|
212
176
|
createVNode(unref(IconOutlink))
|
|
213
177
|
]),
|
|
@@ -217,14 +181,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
181
|
_: 1
|
|
218
182
|
}, 8, ["href"])) : createCommentVNode("", true)
|
|
219
183
|
]),
|
|
220
|
-
updateTime.value ? (openBlock(), createElementBlock("span",
|
|
184
|
+
updateTime.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(updateTime.value), 1)) : createCommentVNode("", true)
|
|
221
185
|
], 64))
|
|
222
186
|
])) : createCommentVNode("", true)
|
|
223
187
|
], 2),
|
|
224
188
|
unref(lePadV) && showActions.value ? (openBlock(), createBlock(unref(ODialog), {
|
|
225
189
|
key: 0,
|
|
226
190
|
visible: showActionsDlg.value,
|
|
227
|
-
"onUpdate:visible": _cache[
|
|
191
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => showActionsDlg.value = $event),
|
|
228
192
|
size: "medium",
|
|
229
193
|
"phone-half-full": ""
|
|
230
194
|
}, {
|
|
@@ -232,13 +196,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
232
196
|
createTextVNode(toDisplayString(unref(t)("md.moreActions")), 1)
|
|
233
197
|
]),
|
|
234
198
|
default: withCtx(() => [
|
|
235
|
-
createElementVNode("div",
|
|
199
|
+
createElementVNode("div", _hoisted_6, [
|
|
236
200
|
enableDownload.value ? (openBlock(), createElementBlock("div", {
|
|
237
201
|
key: 0,
|
|
238
|
-
class: "o-
|
|
239
|
-
onClick:
|
|
202
|
+
class: "o-md-page-dlg-action-box",
|
|
203
|
+
onClick: _cache[3] || (_cache[3] = ($event) => emit("download"))
|
|
240
204
|
}, [
|
|
241
|
-
createElementVNode("div",
|
|
205
|
+
createElementVNode("div", _hoisted_7, [
|
|
242
206
|
createVNode(unref(OIcon), null, {
|
|
243
207
|
default: withCtx(() => [
|
|
244
208
|
createVNode(unref(IconDownload))
|
|
@@ -246,14 +210,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
246
210
|
_: 1
|
|
247
211
|
})
|
|
248
212
|
]),
|
|
249
|
-
createElementVNode("div",
|
|
213
|
+
createElementVNode("div", _hoisted_8, toDisplayString(unref(t)("md.downloadDoc")), 1)
|
|
250
214
|
])) : createCommentVNode("", true),
|
|
251
215
|
enableStar.value ? (openBlock(), createElementBlock("div", {
|
|
252
216
|
key: 1,
|
|
253
|
-
class: "o-
|
|
254
|
-
onClick:
|
|
217
|
+
class: "o-md-page-dlg-action-box",
|
|
218
|
+
onClick: _cache[4] || (_cache[4] = ($event) => emit("collect"))
|
|
255
219
|
}, [
|
|
256
|
-
createElementVNode("div",
|
|
220
|
+
createElementVNode("div", _hoisted_9, [
|
|
257
221
|
createVNode(unref(OIcon), null, {
|
|
258
222
|
default: withCtx(() => [
|
|
259
223
|
createVNode(unref(IconStar))
|
|
@@ -261,29 +225,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
261
225
|
_: 1
|
|
262
226
|
})
|
|
263
227
|
]),
|
|
264
|
-
createElementVNode("div",
|
|
265
|
-
])) : createCommentVNode("", true),
|
|
266
|
-
enableCopyLink.value ? (openBlock(), createElementBlock("div", {
|
|
267
|
-
key: 2,
|
|
268
|
-
class: "o-doc-title-dlg-action-box",
|
|
269
|
-
onClick: copyLink
|
|
270
|
-
}, [
|
|
271
|
-
createElementVNode("div", _hoisted_12, [
|
|
272
|
-
createVNode(unref(OIcon), null, {
|
|
273
|
-
default: withCtx(() => [
|
|
274
|
-
createVNode(unref(IconLink))
|
|
275
|
-
]),
|
|
276
|
-
_: 1
|
|
277
|
-
})
|
|
278
|
-
]),
|
|
279
|
-
createElementVNode("div", _hoisted_13, toDisplayString(unref(t)("common.copyLink")), 1)
|
|
228
|
+
createElementVNode("div", _hoisted_10, toDisplayString(unref(t)("md.starDoc")), 1)
|
|
280
229
|
])) : createCommentVNode("", true),
|
|
281
230
|
sourceUrl.value ? (openBlock(), createElementBlock("div", {
|
|
282
|
-
key:
|
|
283
|
-
class: "o-
|
|
231
|
+
key: 2,
|
|
232
|
+
class: "o-md-page-dlg-action-box",
|
|
284
233
|
onClick: openSourceUrl
|
|
285
234
|
}, [
|
|
286
|
-
createElementVNode("div",
|
|
235
|
+
createElementVNode("div", _hoisted_11, [
|
|
287
236
|
createVNode(unref(OIcon), null, {
|
|
288
237
|
default: withCtx(() => [
|
|
289
238
|
createVNode(unref(IconOutlink))
|
|
@@ -291,7 +240,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
291
240
|
_: 1
|
|
292
241
|
})
|
|
293
242
|
]),
|
|
294
|
-
createElementVNode("div",
|
|
243
|
+
createElementVNode("div", _hoisted_12, toDisplayString(unref(t)("md.gitSource")), 1)
|
|
295
244
|
])) : createCommentVNode("", true)
|
|
296
245
|
])
|
|
297
246
|
]),
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon[data-v-
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-dd533245] {
|
|
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-dd533245] {
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
.o-md-title-wrap[data-v-
|
|
9
|
+
.o-md-title-wrap[data-v-dd533245] {
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: flex-start;
|
|
12
12
|
margin-top: 32px;
|
|
13
13
|
margin-bottom: 16px;
|
|
14
14
|
}
|
|
15
15
|
@media (max-width: 1680px) {
|
|
16
|
-
.o-md-title-wrap[data-v-
|
|
16
|
+
.o-md-title-wrap[data-v-dd533245] {
|
|
17
17
|
margin-top: 24px;
|
|
18
18
|
margin-bottom: 12px;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
@media (max-width: 1200px) {
|
|
22
|
-
.o-md-title-wrap[data-v-
|
|
22
|
+
.o-md-title-wrap[data-v-dd533245] {
|
|
23
23
|
margin-top: 16px;
|
|
24
24
|
margin-bottom: 8px;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
@media (max-width: 840px) {
|
|
28
|
-
.o-md-title-wrap[data-v-
|
|
28
|
+
.o-md-title-wrap[data-v-dd533245] {
|
|
29
29
|
margin-top: 28px;
|
|
30
30
|
margin-bottom: 16px;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
.o-md-title-wrap .o-md-title[data-v-
|
|
33
|
+
.o-md-title-wrap .o-md-title[data-v-dd533245] {
|
|
34
34
|
overflow-wrap: break-word;
|
|
35
35
|
word-wrap: break-word;
|
|
36
36
|
word-break: normal;
|
|
37
37
|
max-width: calc(100% - 2rem);
|
|
38
38
|
}
|
|
39
|
-
.o-md-title-wrap .o-md-title[data-v-
|
|
39
|
+
.o-md-title-wrap .o-md-title[data-v-dd533245] h2 {
|
|
40
40
|
margin-top: 0;
|
|
41
41
|
margin-bottom: 0;
|
|
42
42
|
font-size: 22px;
|
|
43
43
|
line-height: 30px;
|
|
44
44
|
}
|
|
45
45
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
46
|
-
.o-md-title-wrap .o-md-title[data-v-
|
|
46
|
+
.o-md-title-wrap .o-md-title[data-v-dd533245] h2 {
|
|
47
47
|
font-size: 18px;
|
|
48
48
|
line-height: 26px;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
52
|
-
.o-md-title-wrap .o-md-title[data-v-
|
|
52
|
+
.o-md-title-wrap .o-md-title[data-v-dd533245] h2 {
|
|
53
53
|
font-size: 16px;
|
|
54
54
|
line-height: 24px;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
58
|
-
.o-md-title-wrap .o-md-title[data-v-
|
|
58
|
+
.o-md-title-wrap .o-md-title[data-v-dd533245] h2 {
|
|
59
59
|
font-size: 16px;
|
|
60
60
|
line-height: 24px;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
@media (max-width: 600px) {
|
|
64
|
-
.o-md-title-wrap .o-md-title[data-v-
|
|
64
|
+
.o-md-title-wrap .o-md-title[data-v-dd533245] h2 {
|
|
65
65
|
font-size: 16px;
|
|
66
66
|
line-height: 24px;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
.o-md-title-wrap .o-md-title-copy-link-wrap[data-v-
|
|
69
|
+
.o-md-title-wrap .o-md-title-copy-link-wrap[data-v-dd533245] {
|
|
70
70
|
position: relative;
|
|
71
71
|
width: 1em;
|
|
72
72
|
height: 1em;
|
|
@@ -74,50 +74,50 @@
|
|
|
74
74
|
clear: both;
|
|
75
75
|
}
|
|
76
76
|
@media (max-width: 1680px) {
|
|
77
|
-
.o-md-title-wrap .o-md-title-copy-link-wrap[data-v-
|
|
77
|
+
.o-md-title-wrap .o-md-title-copy-link-wrap[data-v-dd533245] {
|
|
78
78
|
margin-left: 4px;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
.o-md-title-wrap .o-md-title-copy-link[data-v-
|
|
81
|
+
.o-md-title-wrap .o-md-title-copy-link[data-v-dd533245] {
|
|
82
82
|
position: absolute;
|
|
83
83
|
top: 2px;
|
|
84
84
|
font-size: 24px;
|
|
85
85
|
line-height: 32px;
|
|
86
86
|
}
|
|
87
87
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
88
|
-
.o-md-title-wrap .o-md-title-copy-link[data-v-
|
|
88
|
+
.o-md-title-wrap .o-md-title-copy-link[data-v-dd533245] {
|
|
89
89
|
font-size: 20px;
|
|
90
90
|
line-height: 28px;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
94
|
-
.o-md-title-wrap .o-md-title-copy-link[data-v-
|
|
94
|
+
.o-md-title-wrap .o-md-title-copy-link[data-v-dd533245] {
|
|
95
95
|
font-size: 18px;
|
|
96
96
|
line-height: 26px;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
100
|
-
.o-md-title-wrap .o-md-title-copy-link[data-v-
|
|
100
|
+
.o-md-title-wrap .o-md-title-copy-link[data-v-dd533245] {
|
|
101
101
|
font-size: 18px;
|
|
102
102
|
line-height: 26px;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
@media (max-width: 600px) {
|
|
106
|
-
.o-md-title-wrap .o-md-title-copy-link[data-v-
|
|
106
|
+
.o-md-title-wrap .o-md-title-copy-link[data-v-dd533245] {
|
|
107
107
|
font-size: 16px;
|
|
108
108
|
line-height: 24px;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
@media (hover: hover) {
|
|
112
|
-
.o-md-title-wrap .o-md-title-copy-link[data-v-
|
|
112
|
+
.o-md-title-wrap .o-md-title-copy-link[data-v-dd533245]:hover {
|
|
113
113
|
color: var(--o-color-primary1);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
.o-md-title-wrap .o-md-title-copy-link .o-md-title-icon-copy[data-v-
|
|
116
|
+
.o-md-title-wrap .o-md-title-copy-link .o-md-title-icon-copy[data-v-dd533245] {
|
|
117
117
|
color: var(--o-color-info2);
|
|
118
118
|
}
|
|
119
119
|
@media (hover: hover) {
|
|
120
|
-
.o-md-title-wrap .o-md-title-copy-link .o-md-title-icon-copy[data-v-
|
|
120
|
+
.o-md-title-wrap .o-md-title-copy-link .o-md-title-icon-copy[data-v-dd533245]:hover {
|
|
121
121
|
color: var(--o-color-info1);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./MarkdownTitle.vue2.mjs";
|
|
2
2
|
import './MarkdownTitle.css';
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const MarkdownTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const MarkdownTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd533245"]]);
|
|
5
5
|
export {
|
|
6
6
|
MarkdownTitle as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createElementBlock, withDirectives, createElementVNode, unref, createVNode, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { useMessage,
|
|
3
|
-
import {
|
|
2
|
+
import { useMessage, OPopover, OIcon } from "@opensig/opendesign";
|
|
3
|
+
import { useClipboard } from "@opendesign-plus/composables";
|
|
4
4
|
import { buildVueDompurifyHTMLDirective } from "vue-dompurify-html";
|
|
5
5
|
import { useI18n } from "../../../i18n/index.mjs";
|
|
6
6
|
import IconLink from "../../../_virtual/icon-link.mjs";
|
|
@@ -20,20 +20,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const message = useMessage();
|
|
23
|
-
const toast = useToast();
|
|
24
|
-
const { lePadV } = useScreen();
|
|
25
23
|
const { t } = useI18n();
|
|
26
24
|
const onClickCopyLink = async () => {
|
|
27
25
|
var _a, _b;
|
|
28
26
|
const text = `${window.location.origin}${window.location.pathname}#${(_b = (_a = props.el) == null ? void 0 : _a.id) == null ? void 0 : _b.replace("user-content-", "")}`;
|
|
29
27
|
if (await useClipboard(text)) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
message.success({
|
|
34
|
-
content: t("common.copySuccess")
|
|
35
|
-
});
|
|
36
|
-
}
|
|
28
|
+
message.success({
|
|
29
|
+
content: t("common.copySuccess")
|
|
30
|
+
});
|
|
37
31
|
}
|
|
38
32
|
};
|
|
39
33
|
return (_ctx, _cache) => {
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
declare const OMarkdown: {
|
|
3
3
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
4
|
+
disableH1?: boolean;
|
|
4
5
|
disableH2?: boolean;
|
|
5
6
|
disableTable?: boolean;
|
|
6
7
|
disableImg?: boolean;
|
|
7
8
|
disableCode?: boolean;
|
|
8
9
|
disableChangeCodeTheme?: boolean;
|
|
10
|
+
sourceUrl?: string;
|
|
11
|
+
updateTime?: string;
|
|
12
|
+
titleBg?: string;
|
|
13
|
+
enableDownload?: boolean;
|
|
14
|
+
enableStar?: boolean;
|
|
9
15
|
markdownBodyClass?: string;
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
onDownload?: (() => any) | undefined;
|
|
18
|
+
onCollect?: (() => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
download: () => any;
|
|
21
|
+
collect: () => any;
|
|
22
|
+
}, import('vue').PublicProps, {
|
|
23
|
+
enableDownload: boolean;
|
|
24
|
+
enableStar: boolean;
|
|
12
25
|
disableChangeCodeTheme: boolean;
|
|
26
|
+
disableH1: boolean;
|
|
13
27
|
disableH2: boolean;
|
|
14
28
|
disableTable: boolean;
|
|
15
29
|
disableImg: boolean;
|
|
16
30
|
disableCode: boolean;
|
|
17
31
|
markdownBodyClass: string;
|
|
18
|
-
hideFirstH1: boolean;
|
|
19
32
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
20
33
|
markdownBodyRef: HTMLDivElement;
|
|
21
34
|
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
@@ -26,48 +39,67 @@ declare const OMarkdown: {
|
|
|
26
39
|
M: {};
|
|
27
40
|
Defaults: {};
|
|
28
41
|
}, Readonly<{
|
|
42
|
+
disableH1?: boolean;
|
|
29
43
|
disableH2?: boolean;
|
|
30
44
|
disableTable?: boolean;
|
|
31
45
|
disableImg?: boolean;
|
|
32
46
|
disableCode?: boolean;
|
|
33
47
|
disableChangeCodeTheme?: boolean;
|
|
48
|
+
sourceUrl?: string;
|
|
49
|
+
updateTime?: string;
|
|
50
|
+
titleBg?: string;
|
|
51
|
+
enableDownload?: boolean;
|
|
52
|
+
enableStar?: boolean;
|
|
34
53
|
markdownBodyClass?: string;
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
}> & Readonly<{
|
|
55
|
+
onDownload?: (() => any) | undefined;
|
|
56
|
+
onCollect?: (() => any) | undefined;
|
|
57
|
+
}>, {}, {}, {}, {}, {
|
|
58
|
+
enableDownload: boolean;
|
|
59
|
+
enableStar: boolean;
|
|
37
60
|
disableChangeCodeTheme: boolean;
|
|
61
|
+
disableH1: boolean;
|
|
38
62
|
disableH2: boolean;
|
|
39
63
|
disableTable: boolean;
|
|
40
64
|
disableImg: boolean;
|
|
41
65
|
disableCode: boolean;
|
|
42
66
|
markdownBodyClass: string;
|
|
43
|
-
hideFirstH1: boolean;
|
|
44
67
|
}>;
|
|
45
68
|
__isFragment?: never;
|
|
46
69
|
__isTeleport?: never;
|
|
47
70
|
__isSuspense?: never;
|
|
48
71
|
} & import('vue').ComponentOptionsBase<Readonly<{
|
|
72
|
+
disableH1?: boolean;
|
|
49
73
|
disableH2?: boolean;
|
|
50
74
|
disableTable?: boolean;
|
|
51
75
|
disableImg?: boolean;
|
|
52
76
|
disableCode?: boolean;
|
|
53
77
|
disableChangeCodeTheme?: boolean;
|
|
78
|
+
sourceUrl?: string;
|
|
79
|
+
updateTime?: string;
|
|
80
|
+
titleBg?: string;
|
|
81
|
+
enableDownload?: boolean;
|
|
82
|
+
enableStar?: boolean;
|
|
54
83
|
markdownBodyClass?: string;
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
}> & Readonly<{
|
|
85
|
+
onDownload?: (() => any) | undefined;
|
|
86
|
+
onCollect?: (() => any) | undefined;
|
|
87
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
88
|
+
download: () => any;
|
|
89
|
+
collect: () => any;
|
|
90
|
+
}, string, {
|
|
91
|
+
enableDownload: boolean;
|
|
92
|
+
enableStar: boolean;
|
|
57
93
|
disableChangeCodeTheme: boolean;
|
|
94
|
+
disableH1: boolean;
|
|
58
95
|
disableH2: boolean;
|
|
59
96
|
disableTable: boolean;
|
|
60
97
|
disableImg: boolean;
|
|
61
98
|
disableCode: boolean;
|
|
62
99
|
markdownBodyClass: string;
|
|
63
|
-
hideFirstH1: boolean;
|
|
64
100
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
65
101
|
$slots: {
|
|
66
|
-
header?(_: {
|
|
67
|
-
h1: HTMLElement | undefined;
|
|
68
|
-
}): any;
|
|
69
102
|
default?(_: {}): any;
|
|
70
|
-
footer?(_: {}): any;
|
|
71
103
|
};
|
|
72
104
|
}) & {
|
|
73
105
|
install(app: App): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppContext, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export interface MarkdownPageTitleProps {
|
|
3
|
+
sourceUrl?: MaybeRefOrGetter<string | undefined>;
|
|
4
|
+
updateTime?: MaybeRefOrGetter<string | undefined>;
|
|
5
|
+
titleBg?: MaybeRefOrGetter<string | undefined>;
|
|
6
|
+
enableDownload?: MaybeRefOrGetter<boolean | undefined>;
|
|
7
|
+
enableStar?: MaybeRefOrGetter<boolean | undefined>;
|
|
8
|
+
onDownload?: () => void;
|
|
9
|
+
onCollect?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function mountMarkdownPageTitle(el: Element, context: AppContext, props?: MarkdownPageTitleProps): (() => void) | undefined;
|