@opendesign-plus/components 0.0.1-rc.85 → 0.0.1-rc.86
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 +3 -0
- package/dist/components/article/index.d.ts +6 -0
- package/dist/components/markdown/OMarkdown.vue.d.ts +2 -0
- package/dist/components/markdown/components/MarkdownCode.vue.d.ts +1 -0
- package/dist/components/markdown/index.d.ts +6 -0
- package/dist/components/markdown/replacer/code.d.ts +4 -1
- package/dist/components.cjs.js +1 -1
- package/dist/components.css +1 -1
- package/dist/components.es.js +36 -21
- package/dist/treeshaking/components/article/OArticle.css +37 -30
- package/dist/treeshaking/components/article/OArticle.vue.d.ts +3 -0
- package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
- package/dist/treeshaking/components/article/OArticle.vue2.mjs +9 -4
- package/dist/treeshaking/components/article/index.d.ts +6 -0
- package/dist/treeshaking/components/markdown/OMarkdown.css +7 -0
- 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 +6 -1
- package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
- package/dist/treeshaking/components/markdown/components/MarkdownCode.vue.d.ts +1 -0
- package/dist/treeshaking/components/markdown/components/MarkdownCode.vue.mjs +1 -1
- package/dist/treeshaking/components/markdown/components/MarkdownCode.vue2.mjs +6 -4
- package/dist/treeshaking/components/markdown/components/MarkdownCode2.css +48 -42
- package/dist/treeshaking/components/markdown/index.d.ts +6 -0
- package/dist/treeshaking/components/markdown/replacer/code.d.ts +4 -1
- package/dist/treeshaking/components/markdown/replacer/code.mjs +5 -4
- package/package.json +1 -1
package/dist/components.es.js
CHANGED
|
@@ -43698,7 +43698,8 @@ const rg = { name: "components-icon-sun", render: oC }, lC = {
|
|
|
43698
43698
|
}, uC = /* @__PURE__ */ Ge({
|
|
43699
43699
|
__name: "MarkdownCode",
|
|
43700
43700
|
props: {
|
|
43701
|
-
el: {}
|
|
43701
|
+
el: {},
|
|
43702
|
+
disableChangeCodeTheme: { type: Boolean }
|
|
43702
43703
|
},
|
|
43703
43704
|
setup(i) {
|
|
43704
43705
|
const e = Tn(), t = hs(), s = av(), { t: n } = pt(), { lePadV: r } = St(), { theme: a, codeTheme: o, toggleCodeTheme: u } = zn(), d = fe(() => o.value === "dark"), f = W(!1), g = W(), S = async () => {
|
|
@@ -43719,7 +43720,8 @@ const rg = { name: "components-icon-sun", render: oC }, lC = {
|
|
|
43719
43720
|
onMouseleave: m[1] || (m[1] = (b) => f.value = !1)
|
|
43720
43721
|
}, [
|
|
43721
43722
|
l(r) || f.value ? (p(), x("div", lC, [
|
|
43722
|
-
|
|
43723
|
+
i.disableChangeCodeTheme ? ee("", !0) : (p(), ue(l(ni), {
|
|
43724
|
+
key: 0,
|
|
43723
43725
|
position: "top",
|
|
43724
43726
|
trigger: "hover",
|
|
43725
43727
|
offset: 12
|
|
@@ -43739,7 +43741,7 @@ const rg = { name: "components-icon-sun", render: oC }, lC = {
|
|
|
43739
43741
|
T("span", null, M(l(o) === "light" ? l(n)("md.darkTheme") : l(n)("md.lightTheme")), 1)
|
|
43740
43742
|
]),
|
|
43741
43743
|
_: 1
|
|
43742
|
-
}),
|
|
43744
|
+
})),
|
|
43743
43745
|
E(l(ni), {
|
|
43744
43746
|
position: "top",
|
|
43745
43747
|
trigger: "hover",
|
|
@@ -43784,18 +43786,19 @@ const rg = { name: "components-icon-sun", render: oC }, lC = {
|
|
|
43784
43786
|
})
|
|
43785
43787
|
], 34));
|
|
43786
43788
|
}
|
|
43787
|
-
}), cC = /* @__PURE__ */ nt(uC, [["__scopeId", "data-v-
|
|
43788
|
-
function dC(i, e) {
|
|
43789
|
-
var
|
|
43790
|
-
if ((
|
|
43789
|
+
}), cC = /* @__PURE__ */ nt(uC, [["__scopeId", "data-v-8895ed58"]]);
|
|
43790
|
+
function dC(i, e, t) {
|
|
43791
|
+
var r;
|
|
43792
|
+
if ((r = i.className) != null && r.includes("o-") || i.closest(".__mounted"))
|
|
43791
43793
|
return;
|
|
43792
|
-
let
|
|
43793
|
-
el: i
|
|
43794
|
+
let s = E(cC, {
|
|
43795
|
+
el: i,
|
|
43796
|
+
disableChangeCodeTheme: t == null ? void 0 : t.disableChangeCodeTheme
|
|
43794
43797
|
});
|
|
43795
|
-
|
|
43796
|
-
let
|
|
43797
|
-
return _a(
|
|
43798
|
-
|
|
43798
|
+
s.appContext = e;
|
|
43799
|
+
let n = document.createElement("div");
|
|
43800
|
+
return _a(s, n), i.replaceWith(n.querySelector(".o-md-code")), () => {
|
|
43801
|
+
s = null, n = null;
|
|
43799
43802
|
};
|
|
43800
43803
|
}
|
|
43801
43804
|
const hC = /* @__PURE__ */ Ge({
|
|
@@ -43806,6 +43809,7 @@ const hC = /* @__PURE__ */ Ge({
|
|
|
43806
43809
|
disableTable: { type: Boolean, default: !1 },
|
|
43807
43810
|
disableImg: { type: Boolean, default: !1 },
|
|
43808
43811
|
disableCode: { type: Boolean, default: !1 },
|
|
43812
|
+
disableChangeCodeTheme: { type: Boolean, default: !1 },
|
|
43809
43813
|
sourceUrl: {},
|
|
43810
43814
|
updateTime: {},
|
|
43811
43815
|
titleBg: {},
|
|
@@ -43822,7 +43826,7 @@ const hC = /* @__PURE__ */ Ge({
|
|
|
43822
43826
|
provides: f == null ? void 0 : f.provides
|
|
43823
43827
|
}), D || {}), b = fe(() => {
|
|
43824
43828
|
const F = {};
|
|
43825
|
-
|
|
43829
|
+
if (t.disableH1 || (F.h1 = (z, R) => C_(z, R, {
|
|
43826
43830
|
sourceUrl: s,
|
|
43827
43831
|
updateTime: n,
|
|
43828
43832
|
titleBg: r,
|
|
@@ -43830,7 +43834,13 @@ const hC = /* @__PURE__ */ Ge({
|
|
|
43830
43834
|
enableStar: o,
|
|
43831
43835
|
onDownload: () => u("download"),
|
|
43832
43836
|
onCollect: () => u("collect")
|
|
43833
|
-
})), t.disableH2 || (F.h2 = O_), t.disableTable || (F.table = Y_), t.disableImg || (F.img = eC), t.disableCode
|
|
43837
|
+
})), t.disableH2 || (F.h2 = O_), t.disableTable || (F.table = Y_), t.disableImg || (F.img = eC), !t.disableCode) {
|
|
43838
|
+
const z = (R, O) => dC(R, O, {
|
|
43839
|
+
disableChangeCodeTheme: t.disableChangeCodeTheme
|
|
43840
|
+
});
|
|
43841
|
+
F['div[class*="language-"]'] = z, F.pre = z;
|
|
43842
|
+
}
|
|
43843
|
+
return F;
|
|
43834
43844
|
}), w = (F, z) => {
|
|
43835
43845
|
const R = b.value[z];
|
|
43836
43846
|
R && F.querySelectorAll(`${z}:not([class*="o-"]):not([class*="el-"])`).forEach((O) => {
|
|
@@ -43887,7 +43897,7 @@ const hC = /* @__PURE__ */ Ge({
|
|
|
43887
43897
|
], 2)
|
|
43888
43898
|
], 2));
|
|
43889
43899
|
}
|
|
43890
|
-
}), uc = /* @__PURE__ */ nt(hC, [["__scopeId", "data-v-
|
|
43900
|
+
}), uc = /* @__PURE__ */ nt(hC, [["__scopeId", "data-v-31e0d0d3"]]), fC = {
|
|
43891
43901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43892
43902
|
width: "24",
|
|
43893
43903
|
height: "24",
|
|
@@ -44004,6 +44014,7 @@ const pf = { name: "components-icon-next", render: pC }, mC = { class: "o-md-pag
|
|
|
44004
44014
|
updateTime: {},
|
|
44005
44015
|
markdownBodyClass: { default: "o-markdown-body" },
|
|
44006
44016
|
removeFirstTopMargin: { type: Boolean, default: !0 },
|
|
44017
|
+
autoHideFirstH1: { type: Boolean, default: !0 },
|
|
44007
44018
|
prevLabel: {},
|
|
44008
44019
|
nextLabel: {},
|
|
44009
44020
|
divider: { type: Boolean, default: !0 },
|
|
@@ -44012,7 +44023,7 @@ const pf = { name: "components-icon-next", render: pC }, mC = { class: "o-md-pag
|
|
|
44012
44023
|
emits: ["navigate"],
|
|
44013
44024
|
setup(i, { emit: e }) {
|
|
44014
44025
|
s1((u) => ({
|
|
44015
|
-
|
|
44026
|
+
a6d11f62: o.value
|
|
44016
44027
|
}));
|
|
44017
44028
|
const t = i, s = e, { t: n } = pt(), r = fe(() => ({
|
|
44018
44029
|
disableH1: !0,
|
|
@@ -44054,19 +44065,23 @@ const pf = { name: "components-icon-next", render: pC }, mC = { class: "o-md-pag
|
|
|
44054
44065
|
key: f,
|
|
44055
44066
|
class: "o-article__tag",
|
|
44056
44067
|
size: "large",
|
|
44057
|
-
variant: "outline"
|
|
44068
|
+
variant: "outline",
|
|
44069
|
+
round: i.community === "MindSpore" ? "round" : i.radius
|
|
44058
44070
|
}, {
|
|
44059
44071
|
default: C(() => [
|
|
44060
44072
|
_e(M(f), 1)
|
|
44061
44073
|
]),
|
|
44062
44074
|
_: 2
|
|
44063
|
-
},
|
|
44075
|
+
}, 1032, ["round"]))), 128))
|
|
44064
44076
|
])) : ee("", !0),
|
|
44065
44077
|
i.updateTime ? (p(), x("span", PC, M(l(n)("md.updateTime")) + M(i.updateTime), 1)) : ee("", !0)
|
|
44066
44078
|
])) : ee("", !0)
|
|
44067
44079
|
]),
|
|
44068
44080
|
T("div", {
|
|
44069
|
-
class: ke(["o-article__content", {
|
|
44081
|
+
class: ke(["o-article__content", {
|
|
44082
|
+
"o-article__content--no-first-margin": i.removeFirstTopMargin,
|
|
44083
|
+
"o-article__content--hide-first-h1": i.autoHideFirstH1
|
|
44084
|
+
}])
|
|
44070
44085
|
}, [
|
|
44071
44086
|
E(uc, Kt(Wt(r.value)), {
|
|
44072
44087
|
default: C(() => [
|
|
@@ -44086,7 +44101,7 @@ const pf = { name: "components-icon-next", render: pC }, mC = { class: "o-md-pag
|
|
|
44086
44101
|
], 2)
|
|
44087
44102
|
], 4));
|
|
44088
44103
|
}
|
|
44089
|
-
}), mf = /* @__PURE__ */ nt(OC, [["__scopeId", "data-v-
|
|
44104
|
+
}), mf = /* @__PURE__ */ nt(OC, [["__scopeId", "data-v-3a035718"]]), IL = Object.assign(mf, {
|
|
44090
44105
|
install(i) {
|
|
44091
44106
|
i.component("OArticle", mf);
|
|
44092
44107
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon[data-v-
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-3a035718] {
|
|
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-3a035718] {
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
.o-article[data-v-
|
|
9
|
+
.o-article[data-v-3a035718] {
|
|
10
10
|
--o-gap-1: 4px;
|
|
11
11
|
--o-gap-2: 8px;
|
|
12
12
|
--o-gap-3: 12px;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
--o-gap-10: 72px;
|
|
20
20
|
}
|
|
21
21
|
@media (max-width: 1680px) {
|
|
22
|
-
.o-article[data-v-
|
|
22
|
+
.o-article[data-v-3a035718] {
|
|
23
23
|
--o-gap-1: 4px;
|
|
24
24
|
--o-gap-2: 8px;
|
|
25
25
|
--o-gap-3: 8px;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
@media (max-width: 1200px) {
|
|
36
|
-
.o-article[data-v-
|
|
36
|
+
.o-article[data-v-3a035718] {
|
|
37
37
|
--o-gap-1: 4px;
|
|
38
38
|
--o-gap-2: 8px;
|
|
39
39
|
--o-gap-3: 8px;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
@media (max-width: 840px) {
|
|
50
|
-
.o-article[data-v-
|
|
50
|
+
.o-article[data-v-3a035718] {
|
|
51
51
|
--o-gap-1: 4px;
|
|
52
52
|
--o-gap-2: 8px;
|
|
53
53
|
--o-gap-3: 12px;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
@media (max-width: 600px) {
|
|
64
|
-
.o-article[data-v-
|
|
64
|
+
.o-article[data-v-3a035718] {
|
|
65
65
|
--o-gap-1: 4px;
|
|
66
66
|
--o-gap-2: 8px;
|
|
67
67
|
--o-gap-3: 12px;
|
|
@@ -74,31 +74,31 @@
|
|
|
74
74
|
--o-gap-10: 32px;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
.o-article[data-v-
|
|
77
|
+
.o-article[data-v-3a035718] {
|
|
78
78
|
display: flex;
|
|
79
79
|
flex-direction: column;
|
|
80
80
|
min-width: 0;
|
|
81
81
|
border-radius: var(--o-article-radius);
|
|
82
82
|
}
|
|
83
|
-
.o-article__header[data-v-
|
|
83
|
+
.o-article__header[data-v-3a035718] {
|
|
84
84
|
padding: var(--o-gap-6);
|
|
85
85
|
border-radius: var(--o-article-radius) var(--o-article-radius) 0 0;
|
|
86
|
-
background-image: var(--
|
|
86
|
+
background-image: var(--a6d11f62);
|
|
87
87
|
background-position: 100% 100%;
|
|
88
88
|
background-repeat: no-repeat;
|
|
89
89
|
background-size: cover;
|
|
90
90
|
}
|
|
91
91
|
@media (max-width: 840px) {
|
|
92
|
-
.o-article__header[data-v-
|
|
92
|
+
.o-article__header[data-v-3a035718] {
|
|
93
93
|
padding: 16px;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
@media (max-width: 600px) {
|
|
97
|
-
.o-article__header[data-v-
|
|
97
|
+
.o-article__header[data-v-3a035718] {
|
|
98
98
|
padding: 12px;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
.o-article__title[data-v-
|
|
101
|
+
.o-article__title[data-v-3a035718] {
|
|
102
102
|
margin: 0;
|
|
103
103
|
color: var(--o-color-info1);
|
|
104
104
|
font-weight: 600;
|
|
@@ -106,30 +106,30 @@
|
|
|
106
106
|
line-height: 44px;
|
|
107
107
|
}
|
|
108
108
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
109
|
-
.o-article__title[data-v-
|
|
109
|
+
.o-article__title[data-v-3a035718] {
|
|
110
110
|
font-size: 20px;
|
|
111
111
|
line-height: 28px;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
115
|
-
.o-article__title[data-v-
|
|
115
|
+
.o-article__title[data-v-3a035718] {
|
|
116
116
|
font-size: 20px;
|
|
117
117
|
line-height: 28px;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
121
|
-
.o-article__title[data-v-
|
|
121
|
+
.o-article__title[data-v-3a035718] {
|
|
122
122
|
font-size: 18px;
|
|
123
123
|
line-height: 26px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
@media (max-width: 600px) {
|
|
127
|
-
.o-article__title[data-v-
|
|
127
|
+
.o-article__title[data-v-3a035718] {
|
|
128
128
|
font-size: 16px;
|
|
129
129
|
line-height: 24px;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
.o-article__meta[data-v-
|
|
132
|
+
.o-article__meta[data-v-3a035718] {
|
|
133
133
|
display: flex;
|
|
134
134
|
flex-wrap: wrap;
|
|
135
135
|
align-items: center;
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
row-gap: 8px;
|
|
139
139
|
margin-top: 8px;
|
|
140
140
|
}
|
|
141
|
-
.o-article__tags[data-v-
|
|
141
|
+
.o-article__tags[data-v-3a035718] {
|
|
142
142
|
display: flex;
|
|
143
143
|
flex-wrap: wrap;
|
|
144
144
|
align-items: center;
|
|
@@ -147,58 +147,65 @@
|
|
|
147
147
|
padding: 0;
|
|
148
148
|
list-style: none;
|
|
149
149
|
}
|
|
150
|
-
.o-article__tags-divider[data-v-
|
|
150
|
+
.o-article__tags-divider[data-v-3a035718] {
|
|
151
151
|
--o-divider-label-gap: 0;
|
|
152
|
+
height: 20px;
|
|
152
153
|
}
|
|
153
|
-
.o-article__update-time[data-v-
|
|
154
|
+
.o-article__update-time[data-v-3a035718] {
|
|
154
155
|
flex-shrink: 0;
|
|
155
156
|
color: var(--o-color-info3);
|
|
156
157
|
font-size: 14px;
|
|
157
158
|
line-height: 22px;
|
|
158
159
|
}
|
|
159
160
|
@media (min-width: 1201px) and (max-width: 1680px) {
|
|
160
|
-
.o-article__update-time[data-v-
|
|
161
|
+
.o-article__update-time[data-v-3a035718] {
|
|
161
162
|
font-size: 14px;
|
|
162
163
|
line-height: 18px;
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
@media (min-width: 841px) and (max-width: 1200px) {
|
|
166
|
-
.o-article__update-time[data-v-
|
|
167
|
+
.o-article__update-time[data-v-3a035718] {
|
|
167
168
|
font-size: 12px;
|
|
168
169
|
line-height: 18px;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
@media (min-width: 601px) and (max-width: 840px) {
|
|
172
|
-
.o-article__update-time[data-v-
|
|
173
|
+
.o-article__update-time[data-v-3a035718] {
|
|
173
174
|
font-size: 12px;
|
|
174
175
|
line-height: 18px;
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
@media (max-width: 600px) {
|
|
178
|
-
.o-article__update-time[data-v-
|
|
179
|
+
.o-article__update-time[data-v-3a035718] {
|
|
179
180
|
font-size: 12px;
|
|
180
181
|
line-height: 18px;
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
184
|
@media (max-width: 600px) {
|
|
184
|
-
.o-article__update-time[data-v-
|
|
185
|
+
.o-article__update-time[data-v-3a035718] {
|
|
185
186
|
flex-basis: 100%;
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
|
-
.o-article__tag[data-v-
|
|
189
|
+
.o-article__tag[data-v-3a035718] {
|
|
189
190
|
--tag-height: 24px;
|
|
190
191
|
--tag-padding: 0 11px;
|
|
191
192
|
}
|
|
192
|
-
.o-article__content[data-v-
|
|
193
|
+
.o-article__content[data-v-3a035718] {
|
|
193
194
|
padding: var(--o-gap-6);
|
|
194
195
|
background-color: var(--o-color-fill2);
|
|
195
196
|
border-radius: 0 0 var(--o-article-radius) var(--o-article-radius);
|
|
196
197
|
}
|
|
197
198
|
@media (max-width: 840px) {
|
|
198
|
-
.o-article__content[data-v-
|
|
199
|
+
.o-article__content[data-v-3a035718] {
|
|
199
200
|
padding: 12px;
|
|
200
201
|
}
|
|
201
202
|
}
|
|
202
|
-
.o-article__content--no-first-margin[data-v-
|
|
203
|
+
.o-article__content--no-first-margin[data-v-3a035718] .o-markdown > .o-markdown-body > div:first-child > *:first-child {
|
|
204
|
+
margin-top: 0;
|
|
205
|
+
}
|
|
206
|
+
.o-article__content--hide-first-h1[data-v-3a035718] .o-markdown > .o-markdown-body > div:first-child > h1:first-of-type {
|
|
207
|
+
display: none;
|
|
208
|
+
}
|
|
209
|
+
.o-article__content--hide-first-h1[data-v-3a035718] .o-markdown > .o-markdown-body > div:first-child > h1:first-of-type + * {
|
|
203
210
|
margin-top: 0;
|
|
204
211
|
}
|
|
@@ -26,6 +26,8 @@ type __VLS_Props = {
|
|
|
26
26
|
markdownBodyClass?: string;
|
|
27
27
|
/** 是否移除正文首个元素的上边距(o-markdown-body 内第一个 div 的首个元素,常用于正文首元素为标题时消除顶部空隙),默认 true */
|
|
28
28
|
removeFirstTopMargin?: boolean;
|
|
29
|
+
/** 是否自动隐藏正文中的第一个 h1(该 h1 通常与标题重复,作为页面标题展示),默认 true */
|
|
30
|
+
autoHideFirstH1?: boolean;
|
|
29
31
|
/** 透传给 OMarkdownPagination:上一篇文案,留空取 i18n 默认值 */
|
|
30
32
|
prevLabel?: string;
|
|
31
33
|
/** 透传给 OMarkdownPagination:下一篇文案,留空取 i18n 默认值 */
|
|
@@ -60,6 +62,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
60
62
|
radius: string;
|
|
61
63
|
tags: string[];
|
|
62
64
|
removeFirstTopMargin: boolean;
|
|
65
|
+
autoHideFirstH1: boolean;
|
|
63
66
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
64
67
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
65
68
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./OArticle.vue2.mjs";
|
|
2
2
|
import './OArticle.css';
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const _OArticle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const _OArticle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3a035718"]]);
|
|
5
5
|
export {
|
|
6
6
|
_OArticle as default
|
|
7
7
|
};
|
|
@@ -33,6 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
updateTime: {},
|
|
34
34
|
markdownBodyClass: { default: "o-markdown-body" },
|
|
35
35
|
removeFirstTopMargin: { type: Boolean, default: true },
|
|
36
|
+
autoHideFirstH1: { type: Boolean, default: true },
|
|
36
37
|
prevLabel: {},
|
|
37
38
|
nextLabel: {},
|
|
38
39
|
divider: { type: Boolean, default: true },
|
|
@@ -41,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
42
|
emits: ["navigate"],
|
|
42
43
|
setup(__props, { emit: __emit }) {
|
|
43
44
|
useCssVars((_ctx) => ({
|
|
44
|
-
"
|
|
45
|
+
"a6d11f62": headerBgStyle.value
|
|
45
46
|
}));
|
|
46
47
|
const props = __props;
|
|
47
48
|
const emit = __emit;
|
|
@@ -90,20 +91,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
90
91
|
key: tag,
|
|
91
92
|
class: "o-article__tag",
|
|
92
93
|
size: "large",
|
|
93
|
-
variant: "outline"
|
|
94
|
+
variant: "outline",
|
|
95
|
+
round: __props.community === "MindSpore" ? "round" : __props.radius
|
|
94
96
|
}, {
|
|
95
97
|
default: withCtx(() => [
|
|
96
98
|
createTextVNode(toDisplayString(tag), 1)
|
|
97
99
|
]),
|
|
98
100
|
_: 2
|
|
99
|
-
},
|
|
101
|
+
}, 1032, ["round"]);
|
|
100
102
|
}), 128))
|
|
101
103
|
])) : createCommentVNode("", true),
|
|
102
104
|
__props.updateTime ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(__props.updateTime), 1)) : createCommentVNode("", true)
|
|
103
105
|
])) : createCommentVNode("", true)
|
|
104
106
|
]),
|
|
105
107
|
createElementVNode("div", {
|
|
106
|
-
class: normalizeClass(["o-article__content", {
|
|
108
|
+
class: normalizeClass(["o-article__content", {
|
|
109
|
+
"o-article__content--no-first-margin": __props.removeFirstTopMargin,
|
|
110
|
+
"o-article__content--hide-first-h1": __props.autoHideFirstH1
|
|
111
|
+
}])
|
|
107
112
|
}, [
|
|
108
113
|
createVNode(_OMarkdown, normalizeProps(guardReactiveProps(markdownProps.value)), {
|
|
109
114
|
default: withCtx(() => [
|
|
@@ -14,6 +14,7 @@ declare const OArticle: {
|
|
|
14
14
|
updateTime?: string;
|
|
15
15
|
markdownBodyClass?: string;
|
|
16
16
|
removeFirstTopMargin?: boolean;
|
|
17
|
+
autoHideFirstH1?: boolean;
|
|
17
18
|
prevLabel?: string;
|
|
18
19
|
nextLabel?: string;
|
|
19
20
|
divider?: boolean;
|
|
@@ -34,6 +35,7 @@ declare const OArticle: {
|
|
|
34
35
|
radius: string;
|
|
35
36
|
tags: string[];
|
|
36
37
|
removeFirstTopMargin: boolean;
|
|
38
|
+
autoHideFirstH1: boolean;
|
|
37
39
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
38
40
|
P: {};
|
|
39
41
|
B: {};
|
|
@@ -55,6 +57,7 @@ declare const OArticle: {
|
|
|
55
57
|
updateTime?: string;
|
|
56
58
|
markdownBodyClass?: string;
|
|
57
59
|
removeFirstTopMargin?: boolean;
|
|
60
|
+
autoHideFirstH1?: boolean;
|
|
58
61
|
prevLabel?: string;
|
|
59
62
|
nextLabel?: string;
|
|
60
63
|
divider?: boolean;
|
|
@@ -73,6 +76,7 @@ declare const OArticle: {
|
|
|
73
76
|
radius: string;
|
|
74
77
|
tags: string[];
|
|
75
78
|
removeFirstTopMargin: boolean;
|
|
79
|
+
autoHideFirstH1: boolean;
|
|
76
80
|
}>;
|
|
77
81
|
__isFragment?: never;
|
|
78
82
|
__isTeleport?: never;
|
|
@@ -91,6 +95,7 @@ declare const OArticle: {
|
|
|
91
95
|
updateTime?: string;
|
|
92
96
|
markdownBodyClass?: string;
|
|
93
97
|
removeFirstTopMargin?: boolean;
|
|
98
|
+
autoHideFirstH1?: boolean;
|
|
94
99
|
prevLabel?: string;
|
|
95
100
|
nextLabel?: string;
|
|
96
101
|
divider?: boolean;
|
|
@@ -111,6 +116,7 @@ declare const OArticle: {
|
|
|
111
116
|
radius: string;
|
|
112
117
|
tags: string[];
|
|
113
118
|
removeFirstTopMargin: boolean;
|
|
119
|
+
autoHideFirstH1: boolean;
|
|
114
120
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
115
121
|
$slots: {
|
|
116
122
|
default?(_: {}): any;
|
|
@@ -289,6 +289,13 @@
|
|
|
289
289
|
background: var(--o-color-fill2) !important;
|
|
290
290
|
color: rgba(var(--o-grey-14), 0.9);
|
|
291
291
|
font-family: inherit;
|
|
292
|
+
word-break: normal;
|
|
293
|
+
overflow-wrap: break-word;
|
|
294
|
+
word-wrap: break-word;
|
|
295
|
+
-webkit-hyphens: auto;
|
|
296
|
+
-moz-hyphens: auto;
|
|
297
|
+
-ms-hyphens: auto;
|
|
298
|
+
hyphens: auto;
|
|
292
299
|
--o-gap-1: 4px;
|
|
293
300
|
--o-gap-2: 8px;
|
|
294
301
|
--o-gap-3: 12px;
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
disableTable?: boolean;
|
|
5
5
|
disableImg?: boolean;
|
|
6
6
|
disableCode?: boolean;
|
|
7
|
+
disableChangeCodeTheme?: boolean;
|
|
7
8
|
sourceUrl?: string;
|
|
8
9
|
updateTime?: string;
|
|
9
10
|
titleBg?: string;
|
|
@@ -31,6 +32,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
31
32
|
}>, {
|
|
32
33
|
enableDownload: boolean;
|
|
33
34
|
enableStar: boolean;
|
|
35
|
+
disableChangeCodeTheme: boolean;
|
|
34
36
|
disableH1: boolean;
|
|
35
37
|
disableH2: boolean;
|
|
36
38
|
disableTable: boolean;
|
|
@@ -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-31e0d0d3"]]);
|
|
6
6
|
export {
|
|
7
7
|
_OMarkdown as default
|
|
8
8
|
};
|
|
@@ -12,6 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
disableTable: { type: Boolean, default: false },
|
|
13
13
|
disableImg: { type: Boolean, default: false },
|
|
14
14
|
disableCode: { type: Boolean, default: false },
|
|
15
|
+
disableChangeCodeTheme: { type: Boolean, default: false },
|
|
15
16
|
sourceUrl: {},
|
|
16
17
|
updateTime: {},
|
|
17
18
|
titleBg: {},
|
|
@@ -66,7 +67,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
67
|
map.img = mountMarkdownImage;
|
|
67
68
|
}
|
|
68
69
|
if (!props.disableCode) {
|
|
69
|
-
|
|
70
|
+
const mountCode = (el, ctx) => mountMarkdownCode(el, ctx, {
|
|
71
|
+
disableChangeCodeTheme: props.disableChangeCodeTheme
|
|
72
|
+
});
|
|
73
|
+
map['div[class*="language-"]'] = mountCode;
|
|
74
|
+
map.pre = mountCode;
|
|
70
75
|
}
|
|
71
76
|
return map;
|
|
72
77
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.hover-icon-rotate .o-icon[data-v-
|
|
1
|
+
.hover-icon-rotate .o-icon[data-v-31e0d0d3] {
|
|
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-31e0d0d3] {
|
|
6
6
|
transform: rotate(-180deg);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
.o-markdown.unmounted[data-v-
|
|
9
|
+
.o-markdown.unmounted[data-v-31e0d0d3] .o-markdown-body table {
|
|
10
10
|
display: block !important;
|
|
11
11
|
overflow: hidden !important;
|
|
12
12
|
max-height: calc(100vh - 210px) !important;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OMarkdownMaybeElementT } from '../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
el: OMarkdownMaybeElementT;
|
|
4
|
+
disableChangeCodeTheme?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
6
7
|
mdCodeRef: HTMLDivElement;
|
|
@@ -2,7 +2,7 @@ import _sfc_main from "./MarkdownCode.vue2.mjs";
|
|
|
2
2
|
import './MarkdownCode.css';
|
|
3
3
|
import './MarkdownCode2.css';
|
|
4
4
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
-
const MarkdownCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5
|
+
const MarkdownCode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8895ed58"]]);
|
|
6
6
|
export {
|
|
7
7
|
MarkdownCode as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, openBlock, createElementBlock, normalizeClass, unref,
|
|
1
|
+
import { defineComponent, computed, ref, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, createElementVNode, toDisplayString, createVNode, createCommentVNode, withDirectives } from "vue";
|
|
2
2
|
import { useMessage, useToast, OPopover, OIcon, OScroller } from "@opensig/opendesign";
|
|
3
3
|
import { buildVueDompurifyHTMLDirective } from "vue-dompurify-html";
|
|
4
4
|
import { useScreen, useClipboard } from "@opendesign-plus/composables";
|
|
@@ -14,7 +14,8 @@ const _hoisted_1 = {
|
|
|
14
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
15
|
__name: "MarkdownCode",
|
|
16
16
|
props: {
|
|
17
|
-
el: {}
|
|
17
|
+
el: {},
|
|
18
|
+
disableChangeCodeTheme: { type: Boolean }
|
|
18
19
|
},
|
|
19
20
|
setup(__props) {
|
|
20
21
|
const vDompurifyHtml = buildVueDompurifyHTMLDirective();
|
|
@@ -53,7 +54,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
54
|
onMouseleave: _cache[1] || (_cache[1] = ($event) => isHover.value = false)
|
|
54
55
|
}, [
|
|
55
56
|
unref(lePadV) || isHover.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
56
|
-
|
|
57
|
+
!__props.disableChangeCodeTheme ? (openBlock(), createBlock(unref(OPopover), {
|
|
58
|
+
key: 0,
|
|
57
59
|
position: "top",
|
|
58
60
|
trigger: "hover",
|
|
59
61
|
offset: 12
|
|
@@ -73,7 +75,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
75
|
createElementVNode("span", null, toDisplayString(unref(codeTheme) === "light" ? unref(t)("md.darkTheme") : unref(t)("md.lightTheme")), 1)
|
|
74
76
|
]),
|
|
75
77
|
_: 1
|
|
76
|
-
}),
|
|
78
|
+
})) : createCommentVNode("", true),
|
|
77
79
|
createVNode(unref(OPopover), {
|
|
78
80
|
position: "top",
|
|
79
81
|
trigger: "hover",
|