# using_mock.js **Repository Path**: Gnius/using_mock.js ## Basic Information - **Project Name**: using_mock.js - **Description**: Mock.js生成随机数据,拦截Ajax 请求 开始 前后端分离 让前端攻城师独立于后端进行开发。 - **Primary Language**: NodeJS - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-04-22 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mymock > mock.js模拟的 A Vue.js project data ## Build Setup ``` bash # install dependencies npm install mockjs 在项目的src目录下新建index.js console.log(Mock) 在main.js导入Mock运行 npm run dev 查看是否引入成功 # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).