vuepress-theme-uniapp-official 1.6.0 → 1.6.2
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/components/DcloudSearchPage/components/AIChat/index.vue +4 -0
- package/components/DcloudSearchPage/components/AIChat/markdown-loader.js +8 -16
- package/components/DcloudSearchPage/components/AIChat/skeleton.styl +1 -1
- package/components/DcloudSearchPage/components/Results.vue +1 -5
- package/package.json +4 -5
|
@@ -251,6 +251,8 @@ window.addEventListener('resize', scrollToBottom)
|
|
|
251
251
|
box-sizing border-box
|
|
252
252
|
|
|
253
253
|
.msg
|
|
254
|
+
display flex
|
|
255
|
+
flex-direction column
|
|
254
256
|
margin-bottom 14px
|
|
255
257
|
|
|
256
258
|
.msg.user
|
|
@@ -270,12 +272,14 @@ window.addEventListener('resize', scrollToBottom)
|
|
|
270
272
|
max-width 80%
|
|
271
273
|
background white
|
|
272
274
|
border 1px solid #eee
|
|
275
|
+
margin-right auto
|
|
273
276
|
pre
|
|
274
277
|
background #f6f8fa
|
|
275
278
|
.time
|
|
276
279
|
margin-left 10px
|
|
277
280
|
|
|
278
281
|
.bubble
|
|
282
|
+
display inline-block
|
|
279
283
|
max-width 50%
|
|
280
284
|
padding 10px 14px
|
|
281
285
|
border-radius 14px
|
|
@@ -15,26 +15,18 @@ function transfromLang(lang) {
|
|
|
15
15
|
|
|
16
16
|
export async function renderMarkdown(md) {
|
|
17
17
|
if (!markedInstance) {
|
|
18
|
-
const [
|
|
19
|
-
import('marked'),
|
|
20
|
-
import('marked-highlight'),
|
|
21
|
-
import('highlight.js'),
|
|
22
|
-
]);
|
|
23
|
-
|
|
24
|
-
const marked = new Marked(
|
|
25
|
-
markedHighlight({
|
|
26
|
-
emptyLangClass: 'hljs',
|
|
27
|
-
langPrefix: 'hljs language-',
|
|
28
|
-
highlight(code, lang, info) {
|
|
29
|
-
const language = transfromLang(lang);
|
|
30
|
-
return hljs.highlight(code, { language }).value;
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
);
|
|
18
|
+
const [marked, hljs] = await Promise.all([import('marked'), import('highlight.js')]);
|
|
34
19
|
|
|
35
20
|
marked.setOptions({
|
|
36
21
|
headerIds: false,
|
|
37
22
|
mangle: false,
|
|
23
|
+
highlight(code, lang) {
|
|
24
|
+
lang = transfromLang(lang);
|
|
25
|
+
if (lang && hljs.getLanguage(lang)) {
|
|
26
|
+
return hljs.highlight(code, { language: lang }).value;
|
|
27
|
+
}
|
|
28
|
+
return hljs.highlightAuto(code).value;
|
|
29
|
+
},
|
|
38
30
|
});
|
|
39
31
|
|
|
40
32
|
markedInstance = marked;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuepress-theme-uniapp-official",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "uni-app official website theme for vuepress",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -39,16 +39,15 @@
|
|
|
39
39
|
"markdown-it-attrs": "^4.1.6",
|
|
40
40
|
"markdown-it-raw-table": "^1.0.0",
|
|
41
41
|
"markdown-it-task-lists": "^2.1.1",
|
|
42
|
-
"marked": "^
|
|
43
|
-
"marked-highlight": "^2.2.3",
|
|
42
|
+
"marked": "^3.0.8",
|
|
44
43
|
"qr-code-with-logo": "^1.1.0",
|
|
45
44
|
"vuepress-plugin-juejin-style-copy": "^1.0.4",
|
|
46
45
|
"vuepress-plugin-mermaidjs": "1.9.1",
|
|
47
46
|
"vuepress-plugin-named-chunks": "^1.1.4",
|
|
48
47
|
"vuepress-plugin-zooming": "^1.1.8",
|
|
49
|
-
"vuepress-plugin-
|
|
48
|
+
"vuepress-plugin-check-md2": "^1.0.5",
|
|
50
49
|
"vuepress-plugin-noscript-code": "^1.0.2",
|
|
51
|
-
"vuepress-plugin-
|
|
50
|
+
"vuepress-plugin-expandable-row": "^1.0.10"
|
|
52
51
|
},
|
|
53
52
|
"resolutions": {
|
|
54
53
|
"terser-webpack-plugin": "1.4.6",
|