style: format demo

pull/1255/head
tanjinzhou 2019-10-09 18:32:23 +08:00
parent d18944d8eb
commit b5d4dfd30f
398 changed files with 400 additions and 398 deletions

View File

@ -8,7 +8,7 @@
The simplest usage.
</us>
```html
```tpl
<template>
<div>
<a-affix :offsetTop="this.top">

View File

@ -8,7 +8,7 @@
Callback with affixed state.
</us>
```html
```tpl
<template>
<a-affix :offsetTop="120" @change="change">
<a-button>120px to affix top</a-button>

View File

@ -8,7 +8,7 @@
Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`).
</us>
```html
```tpl
<template>
<div id="components-affix-demo-target" class="scrollable-container" ref="container">
<div class="background">

View File

@ -8,7 +8,7 @@
Display Alert as a banner at top of page.
</us>
```html
```tpl
<template>
<div>
<a-alert message="Warning text" banner />

View File

@ -8,7 +8,7 @@
The simplest usage for short messages.
</us>
```html
```tpl
<template>
<a-alert message="Success Text" type="success" />
</template>

View File

@ -8,7 +8,7 @@
To show close button.
</us>
```html
```tpl
<template>
<div>
<a-alert

View File

@ -8,7 +8,7 @@
Replace the default icon with customized text.
</us>
```html
```tpl
<template>
<a-alert message="Info Text" type="info" closeText="Close Now" />
</template>

View File

@ -8,7 +8,7 @@
Decent icon make information more clear and more friendly.
</us>
```html
```tpl
<template>
<div>
<a-alert message="showIcon = false" type="success">

View File

@ -8,7 +8,7 @@
Additional description for alert message.
</us>
```html
```tpl
<template>
<div>
<a-alert message="Success Text" type="success">

View File

@ -8,7 +8,7 @@
Decent icon make information more clear and more friendly.
</us>
```html
```tpl
<template>
<div>
<a-alert message="Success Tips" type="success" showIcon />

View File

@ -8,7 +8,7 @@
Smoothly and unaffectedly unmount Alert.
</us>
```html
```tpl
<template>
<div>
<a-alert

View File

@ -8,7 +8,7 @@
There are 4 types of Alert: `success`, `info`, `warning`, `error`.
</us>
```html
```tpl
<template>
<div>
<a-alert message="Success Text" type="success" />

View File

@ -8,7 +8,7 @@
The simplest usage.
</us>
```html
```tpl
<template>
<a-anchor>
<a-anchor-link href="#components-anchor-demo-basic" title="Basic demo" />

View File

@ -8,7 +8,7 @@
Clicking on an anchor does not record history.
</us>
```html
```tpl
<template>
<a-anchor :affix="false" @click="handleClick">
<a-anchor-link href="#components-anchor-demo-basic" title="Basic demo" />

View File

@ -8,7 +8,7 @@
Do not change state when page is scrolling.
</us>
```html
```tpl
<template>
<a-anchor :affix="false">
<a-anchor-link href="#components-anchor-demo-basic" title="Basic demo" />

View File

@ -8,7 +8,7 @@
Basic Usage, set datasource of autocomplete with `dataSource` property.
</us>
```html
```tpl
<template>
<a-auto-complete
:dataSource="dataSource"

View File

@ -8,7 +8,7 @@
Lookup-Patterns - Certain Category
</us>
```html
```tpl
<template>
<div class="certain-category-search-wrapper" style="width: 250px">
<a-auto-complete

View File

@ -8,7 +8,7 @@
Customize Input Component
</us>
```html
```tpl
<template>
<a-auto-complete
:dataSource="dataSource"

View File

@ -8,7 +8,7 @@
A non-case-sensitive AutoComplete
</us>
```html
```tpl
<template>
<a-auto-complete
:dataSource="dataSource"

View File

@ -8,7 +8,7 @@
You could pass `slot="dataSource` as children of `AutoComplete`, instead of using `dataSource`
</us>
```html
```tpl
<template>
<a-auto-complete style="width: 200px" @search="handleSearch" placeholder="input here">
<template slot="dataSource">

View File

@ -8,7 +8,7 @@
Lookup-Patterns - Uncertain Category
</us>
```html
```tpl
<template>
<div class="global-search-wrapper" style="width: 300px">
<a-auto-complete

View File

@ -8,7 +8,7 @@
Usually used for messages remind.
</us>
```html
```tpl
<template>
<div>
<span style="margin-right:24px">

View File

@ -8,7 +8,7 @@
Three sizes and two shapes are available.
</us>
```html
```tpl
<template>
<div>
<div>

View File

@ -8,7 +8,7 @@
For letter type Avatar, when the letters are too long to display, the font size can be automatically adjusted according to the width of the Avatar.
</us>
```html
```tpl
<template>
<div>
<a-avatar shape="square" size="large" :style="{backgroundColor: color, verticalAlign: 'middle'}"

View File

@ -8,7 +8,7 @@
Image, Icon and letter are supported, and the latter two kinds avatar can have custom colors and background colors.
</us>
```html
```tpl
<template>
<div>
<a-avatar icon="user" />

View File

@ -8,7 +8,7 @@
The most basic usage.
</us>
```html
```tpl
<template>
<div>
<a-back-top />

View File

@ -8,7 +8,7 @@
You can customize the style of the button, just note the size limit: no more than `40px * 40px`.
</us>
```html
```tpl
<template>
<div id="components-back-top-demo-custom">
<a-back-top>

View File

@ -8,7 +8,7 @@
Simplest Usage. Badge will be hidden when `count` is `0`, but we can use `showZero` to show it.
</us>
```html
```tpl
<template>
<div>
<a-badge count="5">

View File

@ -8,7 +8,7 @@
The count will be animated as it changes.
</us>
```html
```tpl
<template>
<div>
<div>

View File

@ -9,7 +9,7 @@ This will simply display a red badge, without a specific count.
If count equals 0, it won't display the dot.
</us>
```html
```tpl
<template>
<div id="components-badge-demo-dot">
<a-badge dot>

View File

@ -8,7 +8,7 @@
The badge can be wrapped with `a` tag to make it linkable.
</us>
```html
```tpl
<template>
<a href="#">
<a-badge count="5">

View File

@ -9,7 +9,7 @@
Used in standalone when children is empty.
</us>
```html
```tpl
<template>
<div>
<a-badge count="25" />

View File

@ -8,7 +8,7 @@
`${overflowCount}+` is displayed when count is larger than `overflowCount`. The default value of `overflowCount` is `99`.
</us>
```html
```tpl
<template>
<div>
<a-badge :count="99">

View File

@ -8,7 +8,7 @@
Standalone badge with status.
</us>
```html
```tpl
<template>
<div>
<a-badge status="success" />

View File

@ -8,7 +8,7 @@
The badge will display `title` when hovered over, instead of `count`.
</us>
```html
```tpl
<template>
<div id="components-badge-demo-title">
<a-badge :count="5" title="Custom hover text">

View File

@ -8,7 +8,7 @@
The simplest use
</us>
```html
```tpl
<template>
<a-breadcrumb>
<a-breadcrumb-item>Home</a-breadcrumb-item>

View File

@ -8,7 +8,7 @@
Used together with `vue-router`
</us>
```html
```tpl
<template>
<div>
<a-breadcrumb :routes="routes">

View File

@ -9,7 +9,7 @@
slot="separator"
</us>
```html
```tpl
<template>
<div>
<a-breadcrumb separator=">">

View File

@ -8,7 +8,7 @@
The icon should be placed in front of the text
</us>
```html
```tpl
<template>
<a-breadcrumb>
<a-breadcrumb-item href="">

View File

@ -8,7 +8,7 @@
There are `primary` button, `default` button, `dashed` button and `danger` button and `link` button in antd.
</us>
```html
```tpl
<template>
<div>
<a-button type="primary">Primary</a-button>

View File

@ -8,7 +8,7 @@
`block` property will make the button fit to its parent width.
</us>
```html
```tpl
<template>
<div>
<a-button type="primary" block>Primary</a-button>

View File

@ -10,7 +10,7 @@ Buttons can be grouped by placing multiple `Button` components into a `Button.Gr
The `size` can be set to `large`, `small` or left unset resulting in a default size.
</us>
```html
```tpl
<template>
<div id="components-button-demo-button-group">
<h4>Basic</h4>

View File

@ -8,7 +8,7 @@
To mark a button as disabled, add the `disabled` property to the `Button`.
</us>
```html
```tpl
<template>
<div>
<a-button type="primary">Primary</a-button>

View File

@ -8,7 +8,7 @@
`ghost` property will make button's background transparent, it is common used in colored background.
</us>
```html
```tpl
<template>
<div :style="{ background: 'rgb(190, 200, 200)', padding: '26px 16px 16px' }">
<a-button type="primary" ghost>Primary</a-button>

View File

@ -10,7 +10,7 @@
If you want specific control over the positioning and placement of the `Icon`, then that should be done by placing the `Icon` component within the `Button` rather than using the `icon` property.
</us>
```html
```tpl
<template>
<div>
<a-button type="primary" shape="circle" icon="search"></a-button>

View File

@ -8,7 +8,7 @@
A loading indicator can be added to a button by setting the `loading` property on the `Button`.
</us>
```html
```tpl
<template>
<div>
<a-button type="primary" loading>

View File

@ -8,7 +8,7 @@
If you need several buttons, we recommend that you use 1 primary button + n secondary buttons, and if there are more than three operations, you can group some of them into `Dropdown.Button`.
</us>
```html
```tpl
<template>
<div>
<a-button type="primary">Primary</a-button>

View File

@ -10,7 +10,7 @@ Ant Design supports a default button size as well as a large and small size.
If a large or small button is desired, set the `size` property to either `large` or `small` respectively. Omit the `size` property for a button with the default size.
</us>
```html
```tpl
<template>
<div>
<a-radio-group :value="size" @change="handleSizeChange">

View File

@ -8,7 +8,7 @@
A basic calendar component with Year/Month switch.
</us>
```html
```tpl
<template>
<a-calendar @panelChange="onPanelChange" />
</template>

View File

@ -8,7 +8,7 @@
Nested inside a container element for rendering in limited space.
</us>
```html
```tpl
<template>
<div :style="{ width: '300px', border: '1px solid #d9d9d9', borderRadius: '4px' }">
<a-calendar :fullscreen="false" @panelChange="onPanelChange" />

View File

@ -8,7 +8,7 @@
This component can be rendered by using `dateCellRender` and `monthCellRender` with the data you need.
</us>
```html
```tpl
<template>
<a-calendar>
<ul class="events" slot="dateCellRender" slot-scope="value">

View File

@ -8,7 +8,7 @@
A basic calendar component with Year/Month switch.
</us>
```html
```tpl
<template>
<div>
<a-alert

View File

@ -10,7 +10,7 @@ A basic card containing a title, content and an extra corner content.
Supports two sizes: `default` and `small`.
</us>
```html
```tpl
<template>
<div>
<a-card title="Default size card" style="width: 300px">

View File

@ -8,7 +8,7 @@
A borderless card on a gray background.
</us>
```html
```tpl
<template>
<div style="background:#ECECEC; padding:30px">
<a-card title="Card title" :bordered="false" style="width: 300px">

View File

@ -8,7 +8,7 @@
You can use `Card.Meta` to support more flexible content.
</us>
```html
```tpl
<template>
<a-card hoverable style="width: 240px">
<img

View File

@ -8,7 +8,7 @@
Grid style card content.
</us>
```html
```tpl
<template>
<a-card title="Card Title">
<a-card-grid style="width:25%;textAlign:'center'">Content</a-card-grid>

View File

@ -8,7 +8,7 @@
Cards usually cooperate with grid column layout in overview page.
</us>
```html
```tpl
<template>
<div style="background-color: #ececec; padding: 20px;">
<a-row :gutter="16">

View File

@ -8,7 +8,7 @@
It can be placed inside the ordinary card to display the information of the multilevel structure
</us>
```html
```tpl
<template>
<a-card title="Card title">
<p style="fontSize: 14px;color: rgba(0, 0, 0, 0.85); marginBottom: 16px;fontWeight: 500">

View File

@ -8,7 +8,7 @@
Shows a loading indirector while the contents of the card is being featched
</us>
```html
```tpl
<template>
<div>
<a-card :loading="loading" title="Card title">

View File

@ -8,7 +8,7 @@
A Card that supports `cover`, `avatar`, `title` and `description`.
</us>
```html
```tpl
<template>
<a-card hoverable style="width: 300px">
<img

View File

@ -8,7 +8,7 @@
A simple card only containing a content area.
</us>
```html
```tpl
<template>
<a-card style="width: 300px">
<p>Card content</p>

View File

@ -8,7 +8,7 @@
More content can be hosted
</us>
```html
```tpl
<template>
<div>
<a-card

View File

@ -8,7 +8,7 @@
Timing of scrolling to the next card/picture.
</us>
```html
```tpl
<template>
<a-carousel autoplay>
<div><h3>1</h3></div>

View File

@ -8,7 +8,7 @@
Basic usage.
</us>
```html
```tpl
<template>
<a-carousel :afterChange="onChange">
<div><h3>1</h3></div>

View File

@ -8,7 +8,7 @@
Custom arrows display
</us>
```html
```tpl
<template>
<a-carousel arrows>
<div

View File

@ -8,7 +8,7 @@
Custom paging display
</us>
```html
```tpl
<template>
<a-carousel arrows dotsClass="slick-dots slick-thumb">
<a slot="customPaging" slot-scope="props">

View File

@ -8,7 +8,7 @@
Slides use fade for transition.
</us>
```html
```tpl
<template>
<a-carousel effect="fade">
<div><h3>1</h3></div>

View File

@ -8,7 +8,7 @@
Vertical pagination.
</us>
```html
```tpl
<template>
<a-carousel vertical>
<div><h3>1</h3></div>

View File

@ -8,7 +8,7 @@
Cascade selection box for selecting province/city/district.
</us>
```html
```tpl
<template>
<a-cascader :options="options" @change="onChange" placeholder="Please select" />
</template>

View File

@ -8,7 +8,7 @@
Allow only select parent options.
</us>
```html
```tpl
<template>
<a-cascader :options="options" @change="onChange" changeOnSelect />
</template>

View File

@ -8,7 +8,7 @@
For instance, add an external link after the selected value.
</us>
```html
```tpl
<template>
<a-cascader
:options="options"

View File

@ -8,7 +8,7 @@
Separate trigger button and result.
</us>
```html
```tpl
<template>
<span>
{{text}} &nbsp;

View File

@ -8,7 +8,7 @@
Specifies default value by an array.
</us>
```html
```tpl
<template>
<a-cascader
:options="options"

View File

@ -8,7 +8,7 @@
Disable option by specifying the `disabled` property in `options`.
</us>
```html
```tpl
<template>
<a-cascader :options="options" @change="onChange" />
</template>

View File

@ -8,7 +8,7 @@
Custom Field Names.
</us>
```html
```tpl
<template>
<a-cascader
:fieldNames="{ label: 'name', value: 'code', children: 'items' }"

View File

@ -8,7 +8,7 @@
Hover to expand sub menu, click to select option.
</us>
```html
```tpl
<template>
<a-cascader
:options="options"

View File

@ -10,7 +10,7 @@ Load options lazily with `loadData`.
> Note: `loadData` cannot work with `showSearch`.
</us>
```html
```tpl
<template>
<a-cascader
:options="options"

View File

@ -10,7 +10,7 @@ Search and select options directly.
> Now, `Cascader[showSearch]` doesn't support search on server, more info [#5547](https://github.com/ant-design/ant-design/issues/5547)
</us>
```html
```tpl
<template>
<a-cascader
:options="options"

View File

@ -8,7 +8,7 @@
Cascade selection box of different sizes.
</us>
```html
```tpl
<template>
<div>
<a-cascader size="large" :options="options" @change="onChange" /><br /><br />

View File

@ -8,7 +8,7 @@
Cascade selection box for selecting province/city/district.
</us>
```html
```tpl
<template>
<div>
<a-cascader

View File

@ -8,7 +8,7 @@
Basic usage of checkbox
</us>
```html
```tpl
<template>
<a-checkbox @change="onChange">Checkbox</a-checkbox>
</template>

View File

@ -8,7 +8,7 @@
The `indeterminate` property can help you to achieve a 'check all' effect.
</us>
```html
```tpl
<template>
<div>
<div :style="{ borderBottom: '1px solid #E9E9E9' }">

View File

@ -8,7 +8,7 @@
Communicated with other components
</us>
```html
```tpl
<template>
<div>
<p :style="{ marginBottom: '20px' }">

View File

@ -8,7 +8,7 @@ checkbox 不可用
Disabled checkbox
</us>
```html
```tpl
<template>
<div>
<a-checkbox :defaultChecked="false" disabled />

View File

@ -8,7 +8,7 @@
Generate a group of checkboxes from an array
</us>
```html
```tpl
<template>
<div>
<a-checkbox-group :options="plainOptions" v-model="value" @change="onChange" />

View File

@ -8,7 +8,7 @@ Checkbox.Group内嵌Checkbox并与Grid组件一起使用可以实现灵活的
We can use Checkbox and Grid Checkbox.group, to implement complex layout
</us>
```html
```tpl
<template>
<a-checkbox-group @change="onChange">
<a-row>

View File

@ -8,7 +8,7 @@
Accordion mode, only one panel can be expanded at a time. The first panel will be expanded by default.
</us>
```html
```tpl
<template>
<div>
<a-collapse accordion>

View File

@ -8,7 +8,7 @@
More than one panel can be expanded at a time, the first panel is initialized to be active in this case.
</us>
```html
```tpl
<template>
<div>
<a-collapse v-model="activeKey">

View File

@ -8,7 +8,7 @@
A borderless style of Collapse.
</us>
```html
```tpl
<template>
<div>
<a-collapse defaultActiveKey="1" :bordered="false">

View File

@ -8,7 +8,7 @@
Customize the background, border and margin styles and icon for each panel.
</us>
```html
```tpl
<template>
<div>
<a-collapse defaultActiveKey="1" :bordered="false">

View File

@ -8,7 +8,7 @@
`Collapse` is nested inside the `Collapse`.
</us>
```html
```tpl
<template>
<div>
<a-collapse @change="changeActivekey">

View File

@ -8,7 +8,7 @@
You can disable showing arrow icon by passing `:showArrow="false"` to `a-collapse-panel` component.
</us>
```html
```tpl
<template>
<div>
<a-collapse defaultActiveKey="1" @change="changeActivekey">

View File

@ -8,7 +8,7 @@
A basic comment with author, avatar, time and actions.
</us>
```html
```tpl
<template>
<a-comment>
<template slot="actions">

View File

@ -8,7 +8,7 @@
Comment can be used as editor, user can customize the editor component.
</us>
```html
```tpl
<template>
<div>
<a-list

View File

@ -8,7 +8,7 @@
Displaying a series of comments using the `antd` List Component.
</us>
```html
```tpl
<template>
<a-list
class="comment-list"

View File

@ -8,7 +8,7 @@
Comments can be nested.
</us>
```html
```tpl
<template>
<a-comment>
<span slot="actions">Reply to</span>

View File

@ -8,7 +8,7 @@
Basic use case. Users can select or input a date in panel.
</us>
```html
```tpl
<template>
<div>
<a-date-picker @change="onChange" />

View File

@ -8,7 +8,7 @@
We can customize the rendering of date cells in the calendar by providing a `dateRender` function to `DatePicker`.
</us>
```html
```tpl
<template>
<div>
<a-date-picker>

View File

@ -8,7 +8,7 @@
Disabled part of dates and time by `disabledDate` and `disabledTime` respectively, and `disabledTime` only works with `showTime`.
</us>
```html
```tpl
<template>
<div>
<a-date-picker

View File

@ -8,7 +8,7 @@
A disabled state of the `DatePicker`.
</us>
```html
```tpl
<template>
<div>
<a-date-picker :defaultValue="moment('2015-06-06', dateFormat)" disabled />

Some files were not shown because too many files have changed in this diff Show More