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 |
|
||||
|-----------|-----------|-----------|-------------|
|
||||
| icon | Left Icon | `String` | - |
|
||||
| title | Title | `String` | - |
|
||||
| desc | Description | `String` | - |
|
||||
| status | Status | `String` | - |
|
||||
|
@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<cell-group :class="b()">
|
||||
<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>
|
||||
<div :class="b('content')">
|
||||
<slot />
|
||||
@ -18,6 +24,7 @@ import create from '../utils/create';
|
||||
export default create({
|
||||
name: 'panel',
|
||||
props: {
|
||||
icon: String,
|
||||
desc: String,
|
||||
title: String,
|
||||
status: String
|
||||
|
@ -38,6 +38,7 @@ Vue.use(Panel);
|
||||
| title | 标题 | `String` | - |
|
||||
| desc | 描述 | `String` | - |
|
||||
| status | 状态 | `String` | - |
|
||||
| icon | 标题左侧图标,可选值见 Icon 组件 | `String` | - |
|
||||
|
||||
### Slot
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user