package.json
为dev添加--host 0.0.0.0

 "scripts": {
    "dev": "webpack-dev-server --host 0.0.0.0 --inline --progress --config build/webpack.dev.conf.js",
    "start": "npm run dev",
    "lint": "eslint --ext .js,.vue src",
    "build": "node build/build.js"
  },

然后使用手机访问pc ip地址即可

标签: none

添加新评论