微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

vant area组件简单修改

可能需要的数据 省市数据

html

 <div class="area-Box" :class="showArea?'show':''">
      <div class="area-Box-sub" :class="showArea?'show':''">
        <van-area title="标题" :area-list="areaList" value="110101" @confirm="confirm" @cancel="cancle" />
      </div>
    </div>

style

.area-Box {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  top: 0;
  height: 100vh;
  /* height: 100vh; */
  overflow: hidden;
  width: 100%;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease-in;
  visibility: hidden;
  opacity: 0;
  /* ops */
}



.area-Box.show {
  visibility: visible;
  opacity: 1;
}

.area-Box-sub {
  transform: translate(0, 100%);
  transition: transform 0.2s ease-in;
}



.area-Box-sub.show {
  transform: translate(0, 0);
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐