1. 首页
  2. 数据库
  3. 其它
  4. react.js fetch 基于单例+轻提示(toast)的简单封装

react.js fetch 基于单例+轻提示(toast)的简单封装

上传者: 2021-01-17 01:02:07上传 PDF文件 39.21KB 热度 14次
Services /* eslint-disable no-useless-constructor */ import config from './config.js'; import 'whatwg-fetch' import toast from '../toast/index.js' export default class Services { constructor() { } // 单例 static getInstance() { if (!Services.instance) { Services.instance = new Services(); r
下载地址
用户评论