Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Vant Panel panel


May 07, 2021 Vant


Table of contents


Introduced

import Vue from 'vue';
import { Panel } from 'vant';

Vue.use(Panel);

Code demo

Basic usage

The panel is just a container where you can put custom content in it

<van-panel title="标题" desc="描述信息" status="状态">
  <div>内容</div>
</van-panel>

Advanced usage

Use slot to customize the content

<van-panel title="标题" desc="描述信息" status="状态">
  <div>内容</div>
  <div slot="footer">
    <van-button size="small">按钮</van-button>
    <van-button size="small" type="danger">按钮</van-button>
  </div>
</van-panel>

Api

Props

Parameters Description Type The default
title Title string -
desc Describe string -
status State string -
icon On the left side of the title Icon name or picture link string -

Slots

Name Description
default Custom content
header Customize header
footer Custom footer


Example demonstration