From fe75cffbf3bae6777aa2794fd89fa5dc37f5df8d Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 15 七月 2025 10:11:23 +0800 Subject: [PATCH] 项目初始化 --- src/plugins/index.ts | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/src/plugins/index.ts b/src/plugins/index.ts new file mode 100644 index 0000000..b92063f --- /dev/null +++ b/src/plugins/index.ts @@ -0,0 +1,32 @@ +import Tab from './tab' +import Auth from './auth' +import Modal from './modal' +import Bus from './bus'; +import Socket from './socketclient' +import { App } from 'vue'; + + +export const tab = Tab; +export const auth = Auth; +export const modal = Modal; +export const bus = Bus +export const socket = Socket + +/** + * 鍦ㄧ粍鍚堝紡API涓彲浠ラ�氳繃 import { tab, auth, modal } form '@/plugins' 鏉ヤ娇鐢╰ab銆乤uth銆乵odal + * 鍦ㄩ�夐」寮廇PI涓彲浠ラ�氳繃 this.$tab this.$auth this.$modal 鏉ヤ娇鐢╰ab銆乤uth銆乵odal + */ +export default { + install(app: App): void { + // 椤甸潰鎿嶄綔 + app.config.globalProperties.$tab = tab + // 璁よ瘉瀵硅薄 + app.config.globalProperties.$auth = auth + // 妯℃�佹瀵硅薄 + app.config.globalProperties.$modal = modal + // 鍏ㄥ眬浜嬩欢鎬荤嚎 + app.config.globalProperties.$bus = bus + // socket瀵硅薄 + app.config.globalProperties.$socket = socket + } +} -- Gitblit v1.9.3