wangguoyu преди 5 месеца
родител
ревизия
fb2609d449
променени са 4 файла, в които са добавени 32 реда и са изтрити 4 реда
  1. 12 0
      common/prototype.js
  2. 4 0
      main.js
  3. 1 1
      package.json
  4. 15 3
      unpackage/dist/cache/.vite/deps/_metadata.json

+ 12 - 0
common/prototype.js

@@ -0,0 +1,12 @@
+/**
+ * @全局挂载
+ * @API 全局事件
+ */
+import common from '../utils/common.js'
+import Aliplayer from 'aliplayer';
+export default {
+    install(app) {
+        app.config.globalProperties.$Common = common
+        app.config.globalProperties.Aliplayer = Aliplayer
+    }
+}

+ 4 - 0
main.js

@@ -3,9 +3,13 @@ import App from './App.vue'
 //import plugins from './plugins' // plugins
 //import './permission' // permission
 import { createPinia } from 'pinia'
+import uviewPlus from 'uview-plus'
+import prototype from './common/prototype.js'//全局挂载
+const pinia = createPinia()
 // 创建Vue应用实例
 const app = createApp(App)
 //app.use(plugins)
 app.use(createPinia())
+app.use(uviewPlus)
 // 挂载Vue应用实例
 app.mount('#app')

+ 1 - 1
package.json

@@ -4,6 +4,7 @@
 	"description": "",
 	"main": "main.js",
 	"dependencies": {
+		"aliplayer": "^1.0.3",
 		"axios": "^1.7.2",
 		"jsencrypt": "^3.3.2",
 		"pinia": "^2.1.7",
@@ -11,7 +12,6 @@
 		"uview-plus": "^3.3.42",
 		"vue": "^3.5.13"
 	},
-	"devDependencies": {},
 	"uni-app": {
 		"scripts": {
 			"dev-h5": {

+ 15 - 3
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -2,18 +2,30 @@
   "hash": "2a404f3e",
   "configHash": "088a760f",
   "lockfileHash": "e3b0c442",
-  "browserHash": "082c642f",
+  "browserHash": "316c4aa5",
   "optimized": {
     "jsencrypt": {
       "src": "../../../../../node_modules/jsencrypt/lib/index.js",
       "file": "jsencrypt.js",
-      "fileHash": "b20b551a",
+      "fileHash": "e90645e5",
       "needsInterop": false
     },
     "ts-md5/dist/md5": {
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "file": "ts-md5_dist_md5.js",
-      "fileHash": "f1831990",
+      "fileHash": "a21b68a0",
+      "needsInterop": true
+    },
+    "uview-plus": {
+      "src": "../../../../../node_modules/uview-plus/index.js",
+      "file": "uview-plus.js",
+      "fileHash": "216d018e",
+      "needsInterop": false
+    },
+    "aliplayer": {
+      "src": "../../../../../node_modules/aliplayer/lib/index.umd.js",
+      "file": "aliplayer.js",
+      "fileHash": "822c51ae",
       "needsInterop": true
     }
   },