popup.wxs 510 B

123456789101112131415161718
  1. function getPopupStyles(zIndex, distanceTop, placement) {
  2. var zIndexStyle = zIndex ? 'z-index:' + zIndex + ';' : '';
  3. if ((placement === 'top' || placement === 'left' || placement === 'right') && distanceTop) {
  4. zIndexStyle = zIndexStyle + 'top:' + distanceTop + 'px;';
  5. }
  6. return zIndexStyle;
  7. }
  8. function onContentTouchMove(e) {
  9. if (e.target && e.target.dataset.prevention) {
  10. return false;
  11. }
  12. }
  13. module.exports = {
  14. getPopupStyles: getPopupStyles,
  15. onContentTouchMove: onContentTouchMove,
  16. };