riku
9 小时以前 8e3f3890e93d097df4be744648b9ac404d20a558
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,
};