cool-common-utils
v0.0.1-beta.8
Published
cool工具函数库
Readme
工具函数库
安装
npm install cool-common-utils使用方法
http请求使用
import { CreateRequest } from 'cool-utils'
const baseApi = createHttp(baseURL, options)
baseApi.get('接口名称', '参数')
baseApi.post('接口名称', '参数')
baseApi.delete('接口名称', '参数')
message提示框使用
import { SweetSuccess, SweetError, SweetWarning, SweetConfirm, SweetAlert } from 'cool-utils'
SweetSuccess('') // 参数1: 提示信息, 参数2:持续时间 默认 2000
SweetError('') // 参数1: 提示信息, 参数2:持续时间 默认 2000
SweetWarning('') //参数1: 提示信息, 参数2:持续时间 默认 2000
SweetConfirm('')
SweetAlert('') //参数: 提示信息
