Jelajahi Sumber

feat: 弹窗

ljc 2 minggu lalu
induk
melakukan
c98dc4684b
2 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 3 2
      components/AddBankDialog.vue
  2. 2 1
      pages/mine/components/AddFileDialog.vue

+ 3 - 2
components/AddBankDialog.vue

@@ -1,5 +1,5 @@
 <template>
-  <cwg-popup :title="title" :visible="visible" @close="onPopupClose" @confirm="submit">
+  <cwg-popup :title="title" :visible="visible" @close="close" @confirm="submit">
 <!--  <uni-popup ref="popupRef" type="center" style="z-index: 999;">-->
 <!--    <view class="dialog-container">-->
 <!--      <view class="dialog-header">-->
@@ -341,13 +341,14 @@ const open = async (type: number) => {
 
 // 关闭弹窗
 const close = () => {
+  resetForm();
   visible.value = false
 
 }
 
 // 弹窗真正关闭后清空表单
 const onPopupClose = () => {
-  resetForm();
+
 };
 
 // 重置表单

+ 2 - 1
pages/mine/components/AddFileDialog.vue

@@ -1,5 +1,5 @@
 <template>
-  <cwg-popup :title="form.title" :visible="visible" @close="onPopupClose" @confirm="submit" >
+  <cwg-popup :title="form.title" :visible="visible" @close="close" @confirm="submit" >
 <!--        <view class="dialog-container">-->
 <!--            <view class="dialog-header">-->
 <!--                <text class="dialog-title">{{ form.title }}</text>-->
@@ -117,6 +117,7 @@ const open = async (item) => {
 
 // 关闭弹窗
 const close = () => {
+    resetForm();
     visible.value = false
 };