neverland d8b6ad7d54
[new feature] add i18n support (#310)
* fix: Tabbar icon line-height

* [new feature] progress add showPivot prop

* [new feature] TabItem support vue-router

* [new feature] update document header style

* [Doc] add toast english ducoment

* [new feature] add i18n support

* feat: Extract demos from markdown

* feat: Base components demos

* [new feature] complete demo extract & translate

* [fix] text cases

* fix: add deepAssign test cases

* fix: changelog detail

* [new feature] AddressEdit support i18n
2017-11-15 20:08:51 -06:00

2.1 KiB

Cell

Install

import { Cell, CellGroup } from 'vant';

Vue.component(Cell.name, Cell);
Vue.component(CellGroup.name, CellGroup);

Usage

Basic Usage

<van-cell-group>
  <van-cell title="Cell title" value="Content"></van-cell>
  <van-cell title="Cell title" value="Content" label="Description"></van-cell>
</van-cell-group>

Value only

<van-cell-group>
  <van-cell value="Content"></van-cell>
</van-cell-group>

Left Icon

<van-cell-group>
  <van-cell title="Cell title" icon="location"></van-cell>
</van-cell-group>
<van-cell-group>
  <van-cell title="Cell title" is-link></van-cell>
  <van-cell title="Cell title" is-link value="Content"></van-cell>
</van-cell-group>

Advanced Usage

<van-cell-group>
  <van-cell value="Content" icon="shop" is-link>
    <template slot="title">
      <span class="van-cell-text">Cell title</span>
      <van-tag type="danger">Tag</van-tag>
    </template>
  </van-cell>
  <van-cell title="Cell title" icon="location" is-link></van-cell>
  <van-cell title="Cell title">
    <template slot="right-icon">
      <van-icon name="search" class="van-cell__right-icon"></van-icon>
    </template>
  </van-cell>
</van-cell-group>

API

Attribute Description Type Default Accepted Values
icon Left Icon String - -
title Title String - -
value Right text String - -
label Description below the title String - -
url Link String - -
to Target route of the link, same as to of vue-router `String Object` -
replace If true, the navigation will not leave a history record String false -
isLink Whether to show link icon Boolean false -
required Whether to show required mark Boolean false -

Slot

name Description
- Default slot
icon Custom icon
title Custom title
right-icon Custom right icon