From 8e3f3890e93d097df4be744648b9ac404d20a558 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 23 四月 2026 17:58:50 +0800
Subject: [PATCH] 2026.4.23
---
miniprogram_npm/tdesign-miniprogram/popup/popup.wxs | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/miniprogram_npm/tdesign-miniprogram/popup/popup.wxs b/miniprogram_npm/tdesign-miniprogram/popup/popup.wxs
index 2486a86..d83e258 100644
--- a/miniprogram_npm/tdesign-miniprogram/popup/popup.wxs
+++ b/miniprogram_npm/tdesign-miniprogram/popup/popup.wxs
@@ -1,18 +1,21 @@
-function getPopupStyles(zIndex, distanceTop, placement) {
+function getPopupStyles(zIndex, distanceTop, placement, duration) {
var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : '';
if ((placement === 'top' || placement === 'left' || placement === 'right') && distanceTop) {
- zIndexStyle = zIndexStyle + 'top:' + distanceTop + 'px;'
+ zIndexStyle = zIndexStyle + 'top:' + distanceTop + 'px;' + '--td-popup-distance-top:' + distanceTop + 'px;';
+ }
+ if (duration) {
+ zIndexStyle = zIndexStyle + '--td-popup-transition:all ' + duration + 'ms ease;';
}
return zIndexStyle;
}
-function onContentTouchMove (e) {
- if (e.target.dataset.prevention) {
+function onContentTouchMove(e) {
+ if (e.target && e.target.dataset.prevention) {
return false;
- };
+ }
}
module.exports = {
getPopupStyles: getPopupStyles,
- onContentTouchMove: onContentTouchMove
+ onContentTouchMove: onContentTouchMove,
};
--
Gitblit v1.9.3