Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 387 Bytes

README.md

File metadata and controls

19 lines (16 loc) · 387 Bytes

mockjs

  • 安装mockjs
    npm install dva-cli -g

*配置.roadhogrc.mock.js 设置如下

    const fs=require('fs');
    const path=require('path');
    const mockPath=path.join(__dirname+'/mock');

    const mock={};
    fs.readdirSync(mockPath).forEach(file=>{

        Object.assign(mock,require('./mock/'+file));
    });
    module.exports=mock;