1. 首页
  2. 数据库
  3. 其它
  4. storybook mock api:使用fetch mock设置获取模拟 源码

storybook mock api:使用fetch mock设置获取模拟 源码

上传者: 2021-02-27 18:59:26上传 ZIP文件 188.08KB 热度 22次
故事书模拟获取呼叫 模拟使用 api进行调用。 用法 添加装饰器以库。 使用设置程序。 import mockFetch from '../../src/index' ... storiesOf ( 'About mocking api calls' ) . addDecorator ( // Configure mockFetch mockFetch ( { fallbackToNetwork : true , sendAsJson : true , overwriteRoutes : false , } ) )
下载地址
用户评论