提交 c6c4d840 编写于 作者: M mehaotian

Merge branch 'vuepress' of github.com:dcloudio/unidocs-zh into vuepress

......@@ -31,11 +31,11 @@ const config = {
editLinks: true,
editLinkText: '帮助我们改善此页面!',
// smoothScroll: true,
/* algolia: {
apiKey: 'ca67b01d14df58783e2f7dc45c79736e',
indexName: 'en-uniapp-dcloud',
appId: 'TZ0EGQ9J1Y'
} */
algolia: {
apiKey: '2fdcc4e76c8e260671ad70065e60b2e7',
indexName: 'zh-uniapp',
appId: 'PQIR5NL8CZ'
}
},
markdown: {
slugify(str) {
......
......@@ -61,7 +61,7 @@ export default ({
siteData
}) => {
let mounted = false
const ScrollBehavior = 'smooth'
const ScrollBehavior = 'instant'
router.beforeHooks.unshift((to, from, next) => {
next(handlePath(router, to))
......
......@@ -21,7 +21,7 @@ uni-app的[插件市场](https://ext.dcloud.net.cn/),有很多扩展组件,
这些组件uni-app都支持,但受组件本身技术特点限制,在不同端有不一样的支持度。
下面这张表格,可以清楚的表达不同类型的组件的兼容性。
[attach]52971[/attach]
![扩展组件的选择](https://img-cdn-tc.dcloud.net.cn/uploads/article/20200422/2b0f69a305534929951ef7b1bea847e6.jpg)
从表格中可以很明显看出,更推荐使用的是全端兼容的uni规范组件。
......@@ -62,7 +62,7 @@ uni ui有如下优势:
11. 支持[uni_module规范](https://uniapp.dcloud.net.cn/uni_modules),方便插件的更新
推荐在HBuilderX新建项目时,直接选择uni ui项目模板,然后在代码里直接敲u,所有组件都拉出来,不用引用、不用注册,直接就用。
[attach]53180[/attach]
![](https://img-cdn-tc.dcloud.net.cn/uploads/article/20200424/dc948a41cd85a418e84cde325c055a75.jpg)
![](http://img.cdn.aliyun.dcloud.net.cn/uni-app/doc/uni-ui-snippet.jpg)
#### 插件市场更多组件
......
......@@ -55,7 +55,7 @@ config.security = {
这个内置浏览器经过官方处理,不存在跨域问题,简单易用,推荐使用。(需HBuilderX 2.6以上)
在打开页面后,点HBuilderX右上角的预览,即可打开内部浏览器。或者在运行菜单里选择运行到内置浏览器也可以。
[attach]38169[/attach]
![](https://img-cdn-tc.dcloud.net.cn/uploads/article/20190721/601e3f94838c1623afe0c42a2355136c.png)
### 方案2 配置webpack-dev-server代理
下面是一篇比uni官网文档更详细的配置指南,这里就直接贴地址了:[https://juejin.im/post/5e43b2645188254902765766](https://juejin.im/post/5e43b2645188254902765766)
......@@ -78,21 +78,16 @@ config.security = {
#### 安装方式:
- 在线安装
使用谷歌浏览器直接打开插件地址[https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi)安装即可
>使用谷歌浏览器直接打开插件地址[https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi)安装即可
- 离线安装
国内用户如果无法在线安装,可在本页面底部下载附件,离线安装
1. 下载得到:Allow-Control-Allow-Origin.crx
2. 点击浏览器右上角的菜单按钮打开谷歌浏览器的扩展管理页面
>国内用户如果无法在线安装,可在本页面底部下载附件,离线安装
1. 下载得到:Allow-Control-Allow-Origin.crx
2. 点击浏览器右上角的菜单按钮打开谷歌浏览器的扩展管理页面
3. 将下载的扩展插件拖入扩展管理页面
[attach]27247[/attach]
![](https://img-cdn-tc.dcloud.net.cn/uploads/article/20181120/29a90981041d78630895a124b123254d.png)
[attach]27248[/attach]
3. 将下载的扩展插件拖入扩展管理页面
[attach]27257[/attach]
[attach]27258[/attach]
![](https://img-cdn-tc.dcloud.net.cn/uploads/article/20181120/c706b1b4247f8e14862c86040348d832.png)
#### 使用方式
......@@ -100,8 +95,6 @@ config.security = {
2. 在扩展栏目找到安装的插件,点击打开插件配置
3. 输入想要进行跨域调试的接口的地址,点击添加即可
[attach]27250[/attach]
#### 注意事项
* 此插件适合本地调试使用,线上部署如果和接口不同域还需要服务端配合。
* 如果实际响应的内容与浏览器预期的内容有差异还可能被[CORB](https://www.chromestatus.com/feature/5629709824032768)策略所阻止。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册