vant状态页组件van-empty - 使用篇

vant状态页组件van-empty - 使用篇


代码示下:

<van-empty
  class="custom-image"
  image="https://img.yzcdn.cn/vant/custom-empty-image.png"
  description="暂无数据"
/>

截图示下:

在这里插入图片描述


demo案例:

  1. 案例截图:
    在这里插入图片描述

  2. 案例代码:

<template>
  <div class="hello">
    <!-- 主体区域 -->
    <div class="view-container pdt70">
      <section>
        <!-- 缺省图 · 状态 -->
        <!-- <van-image
            width="10rem"
            height="10rem"
            fit="cover"
            lazy-load
            src="https://img.yzcdn.cn/vant/cat.jpeg"
            alt="缺省图"
          />
          <p class="status_tips">支付成功!</p> -->
        <van-empty
          class="iconpic"
          image="../../../static/images/icon_pay_success.jpg"
          description="支付成功!"
        >          
          <div class="btnbox">
            <van-button class="h44" size="small" color="linear-gradient(to right, #2FB1E7, #0048A9)">继续买菜</van-button>
            <van-button class="h44" size="small" color="#CECECE" to="/" plain>我的篮子</van-button>
          </div>
        </van-empty>
      </section>
    </div>


  </div>
</template>
<script>
import Vue from 'vue';
// import { Lazyload } from 'vant';
// Vue.use(Lazyload);
import { Empty } from 'vant';
Vue.use(Empty);

  export default {
    name: "VIPStatus",
    data () {
      return {

      }
    },
    mounted () {

    },
    methods: {

    }
  }
</script>
<style scoped>
.status_tips{font-size: 30px;color: #333333;font-weight: 600;}
.btnbox{text-align: center;padding-top: 70px;}
.btnbox .van-button{margin: 10px 12px;border-radius: 5px;}
.btnbox .van-button.h44{font-size: 18px!important;min-width: 147px!important;}


</style>
<style>
/* 缺省图 · 状态 */
.custom-status-image .van-empty__image {
    width: 230px;
    height: auto;
}
.custom-status-image .van-empty__description{font-size: 30px;color: #0048A9;font-weight: 600;}

</style>

以上就是关于“vant状态页组件van-empty - 使用篇”的全部内容。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值