Pārlūkot izejas kodu

停止惯性滚动

liushengqiang 2 gadi atpakaļ
vecāks
revīzija
642c33439f

+ 4 - 2
src/views/student-manage/index.tsx

@@ -204,7 +204,7 @@ export default defineComponent({
                   type="primary"
                   round
                   onClick={() => {
-                    musicGroupRef.value?.toggle(false);
+                    musicSelectRef.value?.confirm?.()
                     const option =
                       musicSelectRef.value?.getSelectedOptions?.()?.[0];
                     if (option) {
@@ -212,6 +212,7 @@ export default defineComponent({
                       studentMagege.musicGroupName = option.text;
                       handleSearch();
                     }
+                    musicGroupRef.value?.toggle(false);
                   }}>
                   确定
                 </Button>
@@ -237,13 +238,14 @@ export default defineComponent({
                   type="primary"
                   round
                   onClick={() => {
-                    subjectRef.value?.toggle(false);
+                    subjectSelectRef.value?.confirm?.()
                     const option =
                       subjectSelectRef.value?.getSelectedOptions?.()?.[0];
                     console.log(option);
                     fromData.subjectId = option.value;
                     studentMagege.subjectName = option.text;
                     handleSearch();
+                    subjectRef.value?.toggle(false);
                   }}>
                   确定
                 </Button>

+ 5 - 4
src/views/student-manage/withdraw/index.tsx

@@ -169,7 +169,7 @@ export default defineComponent({
                   type="primary"
                   round
                   onClick={() => {
-                    musicGroupRef.value?.toggle(false);
+                    musicSelectRef.value?.confirm?.()
                     const option =
                       musicSelectRef.value?.getSelectedOptions?.()?.[0];
                     if (option) {
@@ -177,6 +177,7 @@ export default defineComponent({
                       studentMagege.musicGroupName = option.text;
                       handleSearch();
                     }
+                    musicGroupRef.value?.toggle(false);
                   }}>
                   确定
                 </Button>
@@ -202,13 +203,13 @@ export default defineComponent({
                   type="primary"
                   round
                   onClick={() => {
-                    subjectRef.value?.toggle(false);
-                    const option =
-                      subjectSelectRef.value?.getSelectedOptions?.()?.[0];
+                    subjectSelectRef.value?.confirm?.()
+                    const option = subjectSelectRef.value?.getSelectedOptions?.()?.[0];
                     console.log(option);
                     fromData.subjectId = option.value;
                     studentMagege.subjectName = option.text;
                     handleSearch();
+                    subjectRef.value?.toggle(false);
                   }}>
                   确定
                 </Button>