UNPKG

tian-yan-yan

Version:

一套不算好用的组件

49 lines (44 loc) 1.64 kB
/* * 导出公共方法的统一入口 * @author 张文 * @date 2022-01-26 * */ import {DateTime} from "./DateTime" import {tyShowLoading, tyCloseLoading} from "../components/Loading" import {tyShowErrorMsg, tyCloseErrorMsg} from "../components/ErrorMsg" import tyAxios from './Axios' import {tyToast} from "./Toast"; import {DeepCopy} from "./DeepCopy"; import {LocalStorage} from "./LocalStorage"; import {SetColor} from "./SetColor"; import {Tip} from "./Tip"; import {Language} from "./Language"; import {Dict} from "./Dict" import {ApiUtils} from "./ApiUtils" import {Warehouse} from "./Warehouse"; import {TabBar} from "./TabBar"; import {tyDialog} from "./Dialog"; import {Timezone} from "./Timezone"; import {Utils} from "./Utils"; export const utils = (Vue) => { Vue.prototype.$tyDate = DateTime Vue.prototype.$tyShowLoading = tyShowLoading Vue.prototype.$tyCloseLoading = tyCloseLoading Vue.prototype.$tyShowErrorMsg = tyShowErrorMsg Vue.prototype.$tyCloseErrorMsg = tyCloseErrorMsg Vue.prototype.$tyAxios = tyAxios Vue.prototype.$tyToast = tyToast Vue.prototype.$tyDeepCopy = DeepCopy Vue.prototype.$tyLocalStorag = LocalStorage Vue.prototype.$tySetColor = SetColor Vue.prototype.$tyTip = Tip Vue.prototype.$tyLanguage = Language Vue.prototype.$tyDict = Dict Vue.prototype.$tyApiUtils = ApiUtils Vue.prototype.$tyWarehouse = Warehouse Vue.prototype.$tyPermissions = Permissions Vue.prototype.$tyTabBar = TabBar Vue.prototype.$tyDialog = tyDialog.call(Vue.prototype) Vue.prototype.$tyTimezone = Timezone Vue.prototype.$tyUtils = Utils }