首页
Preview

antdv 怎么隐藏Drawer title

你可以通过设置title属性为null或者空字符串''来隐藏Drawer的标题,例如:

<template>
  <div>
    <a-button type="primary" @click="showDrawer">
      打开抽屉
    </a-button>
    <a-drawer
      title=""
      :visible="visible"
      @close="closeDrawer"
    >
      <!-- Drawer 的内容 -->
    </a-drawer>
  </div>
</template>

<script>
export default {
  data() {
    return {
      visible: false
    };
  },
  methods: {
    showDrawer() {
      this.visible = true;
    },
    closeDrawer() {
      this.visible = false;
    }
  }
};
</script>

在上面的代码中,我们把title设置为空字符串'',这样Drawer的标题就被隐藏了。

版权声明:本文内容由TeHub注册用户自发贡献,版权归原作者所有,TeHub社区不拥有其著作权,亦不承担相应法律责任。 如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

点赞(0)
收藏(0)
小虎牙
暂无描述

评论(0)

添加评论