Browse Source

fix: 视觉走查问题

杨凯旋 5 years ago
parent
commit
c14e85e75b

+ 4 - 4
src/packages/popup/popup.scss

@@ -50,7 +50,7 @@ $popup-close-icon-margin: 16px;
 	width: 100%;
 	width: 100%;
 
 
 	&.round {
 	&.round {
-		border-radius: 25px 25px 0 0;
+		border-radius: 20px 20px 0 0;
 	}
 	}
 }
 }
 
 
@@ -59,7 +59,7 @@ $popup-close-icon-margin: 16px;
 	right: 0;
 	right: 0;
 
 
 	&.round {
 	&.round {
-		border-radius: 25px 0 0 25px;
+		border-radius: 20px 0 0 20px;
 	}
 	}
 }
 }
 
 
@@ -68,7 +68,7 @@ $popup-close-icon-margin: 16px;
 	left: 0;
 	left: 0;
 
 
 	&.round {
 	&.round {
-		border-radius: 0 25px 25px 0;
+		border-radius: 0 20px 20px 0;
 	}
 	}
 }
 }
 
 
@@ -78,7 +78,7 @@ $popup-close-icon-margin: 16px;
 	width: 100%;
 	width: 100%;
 
 
 	&.round {
 	&.round {
-		border-radius: 0 0 25px 25px;
+		border-radius: 0 0 20px 20px;
 	}
 	}
 }
 }
 
 

+ 16 - 2
src/packages/popup/popup.vue

@@ -86,7 +86,21 @@ export default {
     }
     }
   },
   },
   beforeDestroy() {
   beforeDestroy() {
-    this.close();
+    if (this.value) {
+      this.close();
+    }
+  },
+  activated() {
+    if (this.keepAlive) {
+      this.$emit('input', true);
+      this.keepAlive = false;
+    }
+  }, 
+  deactivated() {
+    if (this.value) {
+      this.close();
+      this.keepAlive = true;
+    }
   },
   },
   watch: {
   watch: {
     value(val) {
     value(val) {
@@ -216,5 +230,5 @@ export default {
     }
     }
   }
   }
 };
 };
-export  {popupProps}
+export { popupProps };
 </script>
 </script>

+ 1 - 4
src/packages/toast/demo.vue

@@ -108,10 +108,7 @@ export default {
     },
     },
     setDefaultOptions() {
     setDefaultOptions() {
       this.$toast.setDefaultOptions({
       this.$toast.setDefaultOptions({
-        duration: 5000,
-        coverColor: 'rgba(0, 0, 0, 0.2)',
-        closeOnClickOverlay: true,
-        cover: true
+        duration: 5000
       });
       });
       this.$toast.text('将所有Toast提示展示时长设置为5000毫秒,并且点击遮罩层可关闭提示');
       this.$toast.text('将所有Toast提示展示时长设置为5000毫秒,并且点击遮罩层可关闭提示');
     },
     },

File diff suppressed because it is too large
+ 4 - 4
src/packages/toast/toast.scss