Browse Source

更新依赖

caner 2 years ago
parent
commit
301ae685c2
5 changed files with 1404 additions and 153 deletions
  1. 20 2
      package.json
  2. 3 3
      src/components/chat.vue
  3. 19 0
      src/env.d.ts
  4. 1 13
      src/main.ts
  5. 1361 135
      yarn.lock

+ 20 - 2
package.json

@@ -9,9 +9,27 @@
   "dependencies": {
     "axios": "^1.4.0",
     "livekit-client": "^1.9.7",
-    "naive-ui": "^2.33.3"
+    "naive-ui": "^2.33.3",
+    "vite-plugin-svg-icons": "^2.0.1",
+    "pinia": "^2.1.7",
+    "vue": "^3.2.37",
+    "vue-router": "^4.1.3"
   },
   "devDependencies": {
-    "vite": "4.1.3"
+    "@types/element-resize-detector": "^1.1.6",
+    "@types/node": "^18.15.3",
+    "@typescript-eslint/parser": "^5.40.0",
+    "@vitejs/plugin-vue": "^3.1.2",
+    "eslint": "^8.25.0",
+    "eslint-config-airbnb-base": "^15.0.0",
+    "eslint-plugin-import": "^2.26.0",
+    "eslint-plugin-vue": "^9.6.0",
+    "sass": "^1.69.3",
+    "typescript": "^4.8.4",
+    "vite": "^3.1.8",
+    "vite-plugin-cesium": "^1.2.22",
+    "vite-plugin-compression": "^0.5.1",
+    "vite-plugin-eslint": "^1.8.0",
+    "vue-tsc": "^1.0.8"
   }
 }

+ 3 - 3
src/components/chat.vue

@@ -5,7 +5,7 @@ import { ref } from "vue"
 const props = defineProps<{
     modelValue: boolean,
     expanded: number[],
-    data: { name: string, zzmc: string, yhtx: string, audio: boolean, tracks: Any[],isJoin:boolean }[],
+    data: { name: string, zzmc: string, yhtx: string, audio: boolean, tracks: string | any[],isJoin:boolean }[],
     msgData: { name: string, yhtx: string, time: string, strData: string }[]
 }>()
 
@@ -18,7 +18,7 @@ const emit = defineEmits<{
 
 const inputData = ref('')
 
-function handleItemHeaderClick(v: Any) {
+function handleItemHeaderClick(v: { expanded: any; name: number; }) {
     if (v.expanded) {
         emit('update:expanded', [...props.expanded, v.name])
     }
@@ -27,7 +27,7 @@ function handleItemHeaderClick(v: Any) {
     }
 }
 
-function changeAudio(params: { name: string, zzmc: string, yhtx: string, audio: boolean, tracks: Any[] }) {
+function changeAudio(params: { name: string, zzmc: string, yhtx: string, audio: boolean, tracks: any }) {
     emit('changeAudio', params)
 }
 

+ 19 - 0
src/env.d.ts

@@ -0,0 +1,19 @@
+
+/// <reference types="vite/client" />
+
+/** 代指任意类型 请不要随意使用 */
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+declare type Any = any
+
+// eslint-disable-next-line no-unused-vars
+declare interface Window {
+  electron: Any
+}
+
+declare module '*.vue' {
+  import type { DefineComponent } from 'vue'
+  const component: DefineComponent<{}, {}, Any>
+  export default component
+}
+
+declare module 'request'

+ 1 - 13
src/main.ts

@@ -4,24 +4,12 @@ import Icon from '@/components/icon.vue'
 import 'virtual:svg-icons-register'
 const app = createApp(App)
 
-// 提前存token
-if (window.electron) {
-  window.electron.on('getToken', (token: string) => {
-    localStorage.setItem('token', token || '')
-  })
-} else {
-  const p = window.location.search.split('?')[1]
-  const a = new URLSearchParams(p)
-  a.forEach((el, k) => {
-    localStorage.setItem(k, el)
-  })
-}
 
 // 自定义拖拽指令
 app.directive('drag', (el) => {
   const oDiv = el // 当前元素
   el.style.pointerEvents = null // 防止触发点击事件
-  oDiv.onmousedown = (e: Any) => {
+  oDiv.onmousedown = (e: { clientX: number; clientY: number }) => {
     // 找父级 是否是absolute来进行移动
     let target = oDiv
     while (window.getComputedStyle(target).position !== 'absolute' && target !== document.body) {

File diff suppressed because it is too large
+ 1361 - 135
yarn.lock


Some files were not shown because too many files changed in this diff