ruoyi-geek-App/src/plugins/index.ts

25 lines
675 B
TypeScript
Raw Normal View History

2023-08-28 14:43:06 +00:00
import Tab from './tab'
import Auth from './auth'
import Modal from './modal'
2023-09-02 15:14:02 +00:00
import Bus from './bus';
2023-08-28 14:43:06 +00:00
import { App } from 'vue';
2023-09-02 15:14:02 +00:00
2023-08-28 14:43:06 +00:00
export const tab = Tab;
export const auth = Auth;
export const modal = Modal;
2023-09-02 15:14:02 +00:00
export const bus = Bus
2023-08-28 14:43:06 +00:00
2023-09-01 03:05:53 +00:00
/**
* API中可以通过 import { tab, auth, modal } form '@/plugins' 使tabauthmodal
* API中可以通过 this.$tab this.$auth this.$modal 使tabauthmodal
*/
2023-08-28 14:43:06 +00:00
export default {
2023-08-28 14:43:21 +00:00
install(app: App): void {
2023-08-28 14:43:06 +00:00
app.config.globalProperties.$tab = tab
app.config.globalProperties.$auth = auth
app.config.globalProperties.$modal = modal
2023-09-02 15:14:02 +00:00
app.config.globalProperties.$bus = bus
2023-08-28 14:43:06 +00:00
}
}