From 7494bde21ac520aa1adaba915de6863d1f14cad0 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Wed, 8 Jul 2020 10:35:00 +0800 Subject: [PATCH] docs: publicPath --- docs/collocation/manifest.md | 2 ++ docs/frame.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/collocation/manifest.md b/docs/collocation/manifest.md index b3925262..546c9132 100644 --- a/docs/collocation/manifest.md +++ b/docs/collocation/manifest.md @@ -265,6 +265,8 @@ Tips:`uni-app` 中 `manifest.json->h5->devServer` 实际上对应 `webpack` #### publicPath 配置 publicPath 为 cdn 资源地址前缀,这样编译出来的 html 文件,引用的 js,css 路径会自动变成 cdn 上的地址。 + +注意:如果想对图片生效,image组件的图片地址需要使用相对路径 **示例** diff --git a/docs/frame.md b/docs/frame.md index a8c54121..2781d7d9 100644 --- a/docs/frame.md +++ b/docs/frame.md @@ -91,7 +91,7 @@ import add from '../../common/add.js' ### css引入静态资源 -> `css`文件或`style标签`内引入`css`文件时(scss、less文件同理),只能使用相对路径 +> `css`文件或`style标签`内引入`css`文件时(scss、less文件同理),可以使用相对路径或绝对路径(`HBuilderX 2.6.6-alpha`) ```css /* 绝对路径 */ -- GitLab