优化 WechatModal 组件的动画效果,调整缩放比例和过渡曲线以提升用户体验
This commit is contained in:
		@@ -225,8 +225,8 @@ onUnmounted(() => {
 | 
			
		||||
  border-radius: 12px;
 | 
			
		||||
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
  transform: scale(0.95);
 | 
			
		||||
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
 | 
			
		||||
  transform: scale(0.98);
 | 
			
		||||
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 | 
			
		||||
  z-index: v-bind('zIndex + 1');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -384,22 +384,22 @@ onUnmounted(() => {
 | 
			
		||||
 | 
			
		||||
@keyframes scaleUp {
 | 
			
		||||
  from {
 | 
			
		||||
    transform: scale(0.95) translateY(10px);
 | 
			
		||||
    transform: scale(0.98);
 | 
			
		||||
    opacity: 0;
 | 
			
		||||
  }
 | 
			
		||||
  to {
 | 
			
		||||
    transform: scale(1) translateY(0);
 | 
			
		||||
    transform: scale(1);
 | 
			
		||||
    opacity: 1;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@keyframes scaleDown {
 | 
			
		||||
  from {
 | 
			
		||||
    transform: scale(1) translateY(0);
 | 
			
		||||
    transform: scale(1);
 | 
			
		||||
    opacity: 1;
 | 
			
		||||
  }
 | 
			
		||||
  to {
 | 
			
		||||
    transform: scale(0.95) translateY(10px);
 | 
			
		||||
    transform: scale(0.98);
 | 
			
		||||
    opacity: 0;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -414,11 +414,11 @@ onUnmounted(() => {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.wechat-modal-enter-active .wechat-modal-container {
 | 
			
		||||
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
 | 
			
		||||
  animation: scaleUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.wechat-modal-leave-active .wechat-modal-container {
 | 
			
		||||
  animation: scaleDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
 | 
			
		||||
  animation: scaleDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 响应式布局 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user