2023-04-02 01:01:56 +08:00
|
|
|
import modal from './modal';
|
|
|
|
import tab from './tab';
|
|
|
|
import download from './download';
|
|
|
|
import cache from './cache';
|
|
|
|
import auth from './auth';
|
2023-12-13 10:35:55 +00:00
|
|
|
// 预设动画
|
|
|
|
import animate from '@/animate';
|
|
|
|
|
|
|
|
import { download as dl } from '@/utils/request';
|
2025-06-06 11:48:43 +08:00
|
|
|
import { useDict, getDictionaryByKey } from '@/utils/dict';
|
2023-12-13 10:35:55 +00:00
|
|
|
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
|
2025-06-05 15:55:52 +08:00
|
|
|
import {
|
|
|
|
parseTime,
|
|
|
|
addDateRange,
|
|
|
|
handleTree,
|
|
|
|
selectDictLabel,
|
|
|
|
selectDictLabels,
|
|
|
|
addDateRange2,
|
|
|
|
addDateRange3,
|
|
|
|
resetForm,
|
|
|
|
getHiddenName,
|
|
|
|
getHiddenDetailAddress
|
|
|
|
} from '@/utils/ruoyi';
|
2023-04-02 01:01:56 +08:00
|
|
|
|
|
|
|
import { App } from 'vue';
|
|
|
|
|
|
|
|
export default function installPlugin(app: App) {
|
2023-04-03 00:05:09 +08:00
|
|
|
// 页签操作
|
|
|
|
app.config.globalProperties.$tab = tab;
|
2023-04-02 01:01:56 +08:00
|
|
|
|
2023-04-03 00:05:09 +08:00
|
|
|
// 模态框对象
|
|
|
|
app.config.globalProperties.$modal = modal;
|
2023-04-02 01:01:56 +08:00
|
|
|
|
2023-04-03 00:05:09 +08:00
|
|
|
// 缓存对象
|
|
|
|
app.config.globalProperties.$cache = cache;
|
2023-04-02 01:01:56 +08:00
|
|
|
|
2023-04-03 00:05:09 +08:00
|
|
|
// 下载文件
|
|
|
|
app.config.globalProperties.$download = download;
|
2023-04-02 01:01:56 +08:00
|
|
|
|
2023-04-03 00:05:09 +08:00
|
|
|
// 认证对象
|
|
|
|
app.config.globalProperties.$auth = auth;
|
2023-12-13 10:35:55 +00:00
|
|
|
|
|
|
|
// 全局方法挂载
|
|
|
|
app.config.globalProperties.useDict = useDict;
|
|
|
|
app.config.globalProperties.getConfigKey = getConfigKey;
|
|
|
|
app.config.globalProperties.updateConfigByKey = updateConfigByKey;
|
|
|
|
app.config.globalProperties.download = dl;
|
|
|
|
app.config.globalProperties.parseTime = parseTime;
|
|
|
|
app.config.globalProperties.handleTree = handleTree;
|
|
|
|
app.config.globalProperties.addDateRange = addDateRange;
|
|
|
|
app.config.globalProperties.selectDictLabel = selectDictLabel;
|
|
|
|
app.config.globalProperties.selectDictLabels = selectDictLabels;
|
|
|
|
app.config.globalProperties.animate = animate;
|
2025-06-05 15:55:52 +08:00
|
|
|
app.config.globalProperties.addDateRange3 = addDateRange3;
|
|
|
|
app.config.globalProperties.resetForm = resetForm;
|
|
|
|
app.config.globalProperties.addDateRange2 = addDateRange2;
|
|
|
|
app.config.globalProperties.getHiddenName = getHiddenName;
|
|
|
|
app.config.globalProperties.getHiddenDetailAddress = getHiddenDetailAddress;
|
2025-06-06 11:48:43 +08:00
|
|
|
app.config.globalProperties.getDictionaryByKey = getDictionaryByKey;
|
2023-04-02 01:01:56 +08:00
|
|
|
}
|