2018-03-04 09:11:32 +00:00
|
|
|
|
<script>
|
|
|
|
|
import Basic from './basic'
|
|
|
|
|
import ChangeOnSelect from './change-on-select'
|
|
|
|
|
import CustomRender from './custom-render'
|
|
|
|
|
import CustomTrigger from './custom-trigger'
|
|
|
|
|
import DefaultValue from './default-value'
|
|
|
|
|
import DisabledOption from './disabled-option'
|
|
|
|
|
import Hover from './hover'
|
|
|
|
|
import Lazy from './lazy'
|
|
|
|
|
import Search from './search'
|
|
|
|
|
import Size from './size'
|
2018-09-05 13:28:54 +00:00
|
|
|
|
import FieldsName from './fields-name'
|
2018-03-04 09:11:32 +00:00
|
|
|
|
|
|
|
|
|
import CN from '../index.zh-CN.md'
|
|
|
|
|
import US from '../index.en-US.md'
|
|
|
|
|
const md = {
|
|
|
|
|
cn: `# Cascader 级联选择
|
|
|
|
|
级联选择框。
|
|
|
|
|
## 何时使用
|
|
|
|
|
- 需要从一组相关联的数据集合进行选择,例如省市区,公司层级,事物分类等。
|
|
|
|
|
- 从一个较大的数据集合中进行选择时,用多级分类进行分隔,方便选择。
|
|
|
|
|
- 比起 Select 组件,可以在同一个浮层中完成选择,有较好的体验。
|
|
|
|
|
## 代码演示`,
|
|
|
|
|
us: `# Cascader
|
|
|
|
|
Cascade selection box.
|
|
|
|
|
## When To Use
|
|
|
|
|
- When you need to select from a set of associated data set. Such as province/city/district, company level, things classification.
|
|
|
|
|
- When selecting from a large data set, with multi-stage classification separated for easy selection.
|
|
|
|
|
- Chooses cascade items in one float layer for better user experience.
|
2018-09-05 13:28:54 +00:00
|
|
|
|
## Examples
|
2018-03-04 09:11:32 +00:00
|
|
|
|
`,
|
|
|
|
|
}
|
|
|
|
|
export default {
|
2018-03-20 13:48:01 +00:00
|
|
|
|
category: 'Components',
|
|
|
|
|
type: 'Data Entry',
|
|
|
|
|
title: 'Cascader',
|
|
|
|
|
subtitle: '级联选择',
|
2018-03-04 09:11:32 +00:00
|
|
|
|
render () {
|
|
|
|
|
return (
|
2018-03-11 07:27:34 +00:00
|
|
|
|
<div id='components-cascader-demo'>
|
2018-03-04 09:11:32 +00:00
|
|
|
|
<md cn={md.cn} us={md.us}/>
|
|
|
|
|
<Basic />
|
|
|
|
|
<ChangeOnSelect/>
|
|
|
|
|
<CustomRender/>
|
|
|
|
|
<CustomTrigger/>
|
|
|
|
|
<DefaultValue/>
|
|
|
|
|
<DisabledOption/>
|
|
|
|
|
<Hover/>
|
|
|
|
|
<Lazy/>
|
|
|
|
|
<Search/>
|
|
|
|
|
<Size/>
|
2018-09-05 13:28:54 +00:00
|
|
|
|
<FieldsName />
|
2018-03-04 09:11:32 +00:00
|
|
|
|
<api>
|
|
|
|
|
<CN slot='cn' />
|
|
|
|
|
<US/>
|
|
|
|
|
</api>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
2018-03-11 07:27:34 +00:00
|
|
|
|
#components-cascader-demo .ant-cascader-picker {
|
2018-03-04 09:11:32 +00:00
|
|
|
|
width: 300px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|