ant-design-vue/components/cascader/demo/suffix.md

79 lines
1.5 KiB
Markdown
Raw Normal View History

2018-11-29 14:20:17 +00:00
<cn>
#### 后缀图标
省市区级联。
</cn>
<us>
#### Suffix
Cascade selection box for selecting province/city/district.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2018-11-29 14:20:17 +00:00
<template>
<div>
2019-09-28 12:45:07 +00:00
<a-cascader
style="margin-top: 1rem"
:options="options"
@change="onChange"
placeholder="Please select"
>
<a-icon type="smile" slot="suffixIcon" class="test" />
2018-11-29 14:20:17 +00:00
</a-cascader>
2019-09-28 12:45:07 +00:00
<a-cascader
suffixIcon="ab"
style="margin-top: 1rem"
:options="options"
@change="onChange"
placeholder="Please select"
/>
2018-11-29 14:20:17 +00:00
</div>
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
data() {
return {
options: [
{
value: 'zhejiang',
label: 'Zhejiang',
children: [
{
value: 'hangzhou',
label: 'Hangzhou',
children: [
{
value: 'xihu',
label: 'West Lake',
},
],
},
],
},
{
value: 'jiangsu',
label: 'Jiangsu',
children: [
{
value: 'nanjing',
label: 'Nanjing',
children: [
{
value: 'zhonghuamen',
label: 'Zhong Hua Men',
},
],
},
],
},
],
};
},
methods: {
onChange(value) {
console.log(value);
},
},
};
2018-11-29 14:20:17 +00:00
</script>
```