兰宝车间质量管理系统-前端
疯狂的狮子Li
2025-02-07 2155d9f4b0e17c044121c24a03a6409beee32bb8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import modal from './modal';
import tab from './tab';
import download from './download';
import cache from './cache';
import auth from './auth';
// 预设动画
import animate from '@/animate';
 
import { download as dl } from '@/utils/request';
import { useDict } from '@/utils/dict';
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi';
 
import { App } from 'vue';
 
export default function installPlugin(app: App) {
  // 页签操作
  app.config.globalProperties.$tab = tab;
 
  // 模态框对象
  app.config.globalProperties.$modal = modal;
 
  // 缓存对象
  app.config.globalProperties.$cache = cache;
 
  // 下载文件
  app.config.globalProperties.$download = download;
 
  // 认证对象
  app.config.globalProperties.$auth = auth;
 
  // 全局方法挂载
  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;
}