mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Panel: add icon prop (#1942)
This commit is contained in:
parent
9c5fa8a9d4
commit
fcd5a53cf7
@ -33,6 +33,7 @@ Vue.use(Panel);
|
|||||||
|
|
||||||
| Attribute | Description | Type | Default |
|
| Attribute | Description | Type | Default |
|
||||||
|-----------|-----------|-----------|-------------|
|
|-----------|-----------|-----------|-------------|
|
||||||
|
| icon | Left Icon | `String` | - |
|
||||||
| title | Title | `String` | - |
|
| title | Title | `String` | - |
|
||||||
| desc | Description | `String` | - |
|
| desc | Description | `String` | - |
|
||||||
| status | Status | `String` | - |
|
| status | Status | `String` | - |
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<cell-group :class="b()">
|
<cell-group :class="b()">
|
||||||
<slot name="header">
|
<slot name="header">
|
||||||
<cell :class="b('header')" :title="title" :label="desc" :value="status" />
|
<cell
|
||||||
|
:class="b('header')"
|
||||||
|
:icon="icon"
|
||||||
|
:label="desc"
|
||||||
|
:title="title"
|
||||||
|
:value="status"
|
||||||
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
<div :class="b('content')">
|
<div :class="b('content')">
|
||||||
<slot />
|
<slot />
|
||||||
@ -18,6 +24,7 @@ import create from '../utils/create';
|
|||||||
export default create({
|
export default create({
|
||||||
name: 'panel',
|
name: 'panel',
|
||||||
props: {
|
props: {
|
||||||
|
icon: String,
|
||||||
desc: String,
|
desc: String,
|
||||||
title: String,
|
title: String,
|
||||||
status: String
|
status: String
|
||||||
|
@ -38,6 +38,7 @@ Vue.use(Panel);
|
|||||||
| title | 标题 | `String` | - |
|
| title | 标题 | `String` | - |
|
||||||
| desc | 描述 | `String` | - |
|
| desc | 描述 | `String` | - |
|
||||||
| status | 状态 | `String` | - |
|
| status | 状态 | `String` | - |
|
||||||
|
| icon | 标题左侧图标,可选值见 Icon 组件 | `String` | - |
|
||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user