欧美三级国产三级日韩三级_亚洲熟妇丰满大屁股熟妇_欧美亚洲成人一区二区三区_国产精品久久久久久模特

支付寶小程序?qū)崿F(xiàn)自定義底部彈窗popup組件 - 新聞資訊 - 云南小程序開發(fā)|云南軟件開發(fā)|云南網(wǎng)站建設(shè)-昆明葵宇信息科技有限公司

159-8711-8523

云南網(wǎng)建設(shè)/小程序開發(fā)/軟件開發(fā)

知識

不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價值,我們在追求其視覺表現(xiàn)的同時,更側(cè)重于功能的便捷,營銷的便利,運(yùn)營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實(shí)提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序?yàn)楹笃谏壧峁┍憬莸闹С郑?

您當(dāng)前位置>首頁 » 新聞資訊 » 小程序相關(guān) >

支付寶小程序?qū)崿F(xiàn)自定義底部彈窗popup組件

發(fā)表時間:2020-9-21

發(fā)布人:葵宇科技

瀏覽次數(shù):123

支付寶小程序?qū)崿F(xiàn)自定義底部彈窗popup組件

view

<view class="am-popup {{className}} {{show ? 'am-popup-show' : ''}} {{ animation ? 'animation': '' }}" disable-scroll="{{disableScroll}}">
  <view class="am-popup-mask" a:if="{{mask}}" onTap="onMaskTap" style="z-index: {{zIndex}}"></view>
  <view class="am-popup-content am-popup-{{position}}" style="z-index: {{zIndex}}"><slot /></view>
</view>

js

Component({
  mixins: [],
  data: {
    
  },
  props: {
    className: '',
    show: false,
    position: 'bottom',
    mask: true,
    animation: true,
    disableScroll: true,
  },
  didMount() {},
  didUpdate() {},
  didUnmount() {},
  methods: {
    onMaskTap() {
      const { onClose, animation } = this.props;

      if (onClose) {
        if (animation) {
          onClose();
        } else {
          setTimeout(() => {
            onClose();
          }, 200);
        }
      }
    },
  },
});

css

.am-popup-content {
  position: fixed;
  z-index: 9999
}

.am-popup-mask {
  visibility: hidden;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.75);
  opacity: 0;
   z-index: 9999;
}

.am-popup-left {
  transform: translateX(-100%);
  left: 0;
  top: 0;
  bottom: 0;
}

.am-popup-right {
  transform: translateX(100%);
  right: 0;
  top: 0;
  bottom: 0;
}

.am-popup-top {
  top: 0;
  width: 100vw;
  transform: translateY(-100%);
}

.am-popup-bottom {
  bottom: 0;
  width: 100vw;
  transform: translateY(100%);
}

.am-popup-show .am-popup-content {
  transform: none;
  background: white;
}

.am-popup-show .am-popup-mask {
  visibility: visible;
  opacity: 1;
}

.am-popup.animation .am-popup-content {
  transition: all 200ms linear;
}

.am-popup.animation .am-popup-mask {
  transition: all 200ms linear;
}

相關(guān)案例查看更多