Przeglądaj źródła

feat: 引入uv-ui 库

潘潘 2 lat temu
rodzic
commit
0a0246715d
5 zmienionych plików z 257 dodań i 266 usunięć
  1. 1 0
      package.json
  2. 1 0
      pages.config.ts
  3. 242 264
      pnpm-lock.yaml
  4. 4 1
      src/main.ts
  5. 9 1
      src/shime-uni.d.ts

+ 1 - 0
package.json

@@ -68,6 +68,7 @@
     ]
   },
   "dependencies": {
+    "@climblee/uv-ui": "^1.1.20",
     "@dcloudio/uni-app": "3.0.0-3090920231225001",
     "@dcloudio/uni-app-plus": "3.0.0-3090920231225001",
     "@dcloudio/uni-components": "3.0.0-3090920231225001",

+ 1 - 0
pages.config.ts

@@ -12,6 +12,7 @@ export default defineUniPages({
     autoscan: true,
     custom: {
       '^uni-(.*)': '@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue',
+      '^uv-(.*)': '@climblee/uv-ui/components/uv-$1/uv-$1.vue',
     },
   },
 })

Plik diff jest za duży
+ 242 - 264
pnpm-lock.yaml


+ 4 - 1
src/main.ts

@@ -1,4 +1,5 @@
 import { createSSRApp } from 'vue'
+import uvUI from '@climblee/uv-ui'
 import App from './App.vue'
 import store from './store'
 import i18n from './locale/index'
@@ -7,7 +8,9 @@ import 'virtual:uno.css'
 
 export function createApp() {
   const app = createSSRApp(App)
-  app.use(store).use(i18n)
+  app.use(store)
+  app.use(i18n)
+  app.use(uvUI)
   return {
     app,
   }

+ 9 - 1
src/shime-uni.d.ts

@@ -2,5 +2,13 @@ export {}
 
 declare module 'vue' {
   type Hooks = App.AppInstance & Page.PageInstance
-  interface ComponentCustomOptions extends Hooks {}
+  interface ComponentCustomOptions extends Hooks {
+    $uv?: any
+  }
+}
+
+declare global {
+  interface Uni {
+    $uv?: any
+  }
 }