import modal from './modal' import { getConfig ,getDataDict} from "../api/system"; import {addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels} from "../utils/commonUtils" import hasPermi from "../directive/permission/hasPermi" import hasRole from "../directive/permission/hasRole" import SvgIcon from "../components/SvgIcon/index.vue" import RightToolbar from "../components/RightToolbar/index.vue" import Pagination from "../components/Pagination/index.vue" import DictData from '../mixin/DictData.vue' import ExcelImport from '../components/excel/excel-import.vue' import dragable from '../directive/dragable/index' import DictTag from '../components/DictTag/index.vue' import {App} from "@vue/runtime-core"; export default { install(app: App ) { // 模态框对象 app.config.globalProperties.$modal = modal // 下载文件 app.config.globalProperties.$parseTime = parseTime app.config.globalProperties.$resetForm = resetForm app.config.globalProperties.$addDateRange = addDateRange app.config.globalProperties.$selectDictLabel = selectDictLabel app.config.globalProperties.$selectDictLabels = selectDictLabels app.config.globalProperties.$handleTree = handleTree app.config.globalProperties.$getConfig=getConfig app.config.globalProperties.$getDataDict=getDataDict app.directive('hasRole', hasRole) app.directive('hasPermi', hasPermi) app.directive('dragable', dragable) app.component('svg-icon', SvgIcon) app.component('right-toolbar', RightToolbar) // eslint-disable-next-line vue/multi-word-component-names app.component('pagination', Pagination) app.component('dict-tag', DictTag) app.component('excel-import', ExcelImport) app.mixin(DictData); } }