vue-cli-plugin-mocker
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

vue-cli-plugin-mocker

Usage

vue add mocker

or

yarn add vue-cli-plugin-mocker -D
npm install vue-cli-plugin-mocker -D

vue invoke mocker

PLUGIN OPTIONS

export declare type MockerPluginOption = {
  /**
   * @description mocker 文件目录
   * @default mock
   */
  dir?: string;
  /**
   * @description 是否输出示例文件
   * @default true
   */
  demo?: boolean;
  /**
   * @description 使用mockjs模拟数据
   * @default true
   */
  mock?: boolean | MockerOption;
  [key: string]: any;
};

CHANGE LOG

0.1.2

  1. 支持函数直接返回 json 数据而不必使用 res.send() 或 res.json()
  2. 添加延迟配置参数,用于模拟真实请求环境

Package Sidebar

Install

npm i vue-cli-plugin-mocker

Weekly Downloads

16

Version

0.1.10

License

MIT

Unpacked Size

34.1 kB

Total Files

25

Last publish

Collaborators

  • coffee377