wangxy 1 månad sedan
förälder
incheckning
0ea770ecdd

+ 4 - 0
pages/admin/Hetong/components/addKh.vue

@@ -41,6 +41,9 @@
 import {ref,reactive,nextTick} from "vue";
 import {onLoad} from "@dcloudio/uni-app";
 import * as khApi from "@/api/kehu.js"
+
+const emits = defineEmits('success')
+
 const formData = reactive({
 	realName: '',
 	userName: '',
@@ -94,6 +97,7 @@ function htAdd(){
 				title: '新增成功'
 			})
 			goback2();
+			emits('success')
 		}
 	})
 }

+ 5 - 1
pages/admin/Hetong/components/selectKh.vue

@@ -47,7 +47,7 @@
 			</view>
 		</uni-popup>
 		
-		<addKh ref="addKhRef"></addKh>
+		<addKh ref="addKhRef" @success="onSuccess"></addKh>
 	</view>
 
 
@@ -86,6 +86,10 @@
 		size: 10,
 		activeData: null
 	})
+	
+	function onSuccess() {
+		onRefresh()
+	}
 
 	function toggle() {
 		searchDialogRef.value.handleShow();