Bladeren bron

修改加载数据

lex-xin 3 maanden geleden
bovenliggende
commit
8c31c11692
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      src/views/cloudPractice/cloudPractice.tsx
  2. 2 2
      src/views/cloudPractice/useData.ts

+ 1 - 1
src/views/cloudPractice/cloudPractice.tsx

@@ -751,7 +751,7 @@ export default defineComponent({
       }
 
       const __init = async () => {
-         await getInstrumentCodes()
+         getInstrumentCodes()
          await handleAllSearchList()
          await handleAllGetSubject()
          await handleAllGetList()

+ 2 - 2
src/views/cloudPractice/useData.ts

@@ -6,7 +6,7 @@ import { getToken } from "@/libs/auth"
 import { httpAjax } from "@/plugin/httpAjax"
 
 import userStore from "@/store/modules/user"
-import { ref } from "vue"
+import { ref, shallowRef } from "vue"
 
 /**
  * 搜索数据
@@ -14,7 +14,7 @@ import { ref } from "vue"
 export const useFunction = () => {
    const userStoreHook = userStore()
    const loading = ref(false)
-   const instrumentCodes = ref<any>({}) // 乐器code
+   const instrumentCodes = shallowRef<any>({}) // 乐器code
 
    /** 跳转云教练 */
    const isPracticeShow = ref(false)