[Doc] add touch emulator guide

This commit is contained in:
陈嘉涵
2019-05-28 17:48:05 +08:00
parent c3333e09fb
commit 53946102e8
4 changed files with 20 additions and 1 deletions
+13
View File
@@ -153,3 +153,16 @@ module.exports = {
```
> 注意:在配置 postcss-loader 时,应避免 ignore node_modules 目录,这会导致 Vant 的样式无法被编译
### 在桌面端使用
Vant 组件默认只适配了移动端设备,如果你需要在桌面端使用 vant,可以引入我们提供的 [@vant/touch-emulator](https://github.com/chenjiahan/vant-touch-emulator).
```bash
npm i @vant/touch-emulator -S
```
```js
// 引入模块后自动生效
import '@vant/touch-emulator';
```
+1 -1
View File
@@ -4,7 +4,7 @@ import VueRouter from 'vue-router';
import { progress } from '@vant/doc';
import App from './WapApp';
import routes from './router';
import '@vant/doc/helper/touch-simulator';
import '@vant/touch-emulator';
const router = new VueRouter({
mode: 'hash',