File tree 4 files changed +170
-995
lines changed
4 files changed +170
-995
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,5 @@ export default {
33
33
)
34
34
] )
35
35
} )
36
- } ,
37
- enhanceApp ( { app, router, siteData } ) {
38
- // app is the Vue 3 app instance from `createApp()`. router is VitePress'
39
- // custom router. `siteData`` is a `ref`` of current site-level metadata.
40
- app . directive ( 'href' , {
41
- mounted ( el , binding ) {
42
- el . href = binding . value ;
43
- }
44
- } )
45
36
}
46
37
}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ import InlineWorker from './shader.js?worker&inline'
85
85
86
86
## new URL(url, import.meta.url)
87
87
88
- < a v-href = " ' https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import'+'.meta' " >import.meta.url</ a > 是一个 ESM 的原生功能,会暴露当前模块的 URL。将它与原生的 [ URL 构造器] ( https://developer.mozilla.org/en-US/docs/Web/API/URL ) 组合使用,在一个 JavaScript 模块中,通过相对路径我们就能得到一个被完整解析的静态资源 URL:
88
+ [ import.meta.url ] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import%2Emeta ) 是一个 ESM 的原生功能,会暴露当前模块的 URL。将它与原生的 [ URL 构造器] ( https://developer.mozilla.org/en-US/docs/Web/API/URL ) 组合使用,在一个 JavaScript 模块中,通过相对路径我们就能得到一个被完整解析的静态资源 URL:
89
89
90
90
``` js
91
91
const imgUrl = new URL (' ./img.png' , import .meta.url)
Original file line number Diff line number Diff line change 8
8
"private" : true ,
9
9
"devDependencies" : {
10
10
"chalk" : " ^4.1.0" ,
11
- "patch-vue-directive-ssr" : " ^0.0.1" ,
12
- "vitepress" : " ^0.12.2" ,
11
+ "gray-matter" : " ^4.0.3" ,
12
+ "lodash" : " ^4.17.21" ,
13
+ "vitepress" : " ^0.19.1" ,
13
14
"yorkie" : " ^2.0.0"
14
15
},
15
16
"scripts" : {
You can’t perform that action at this time.
0 commit comments