You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.1 KiB
59 lines
1.1 KiB
6 years ago
|
|
||
|
<cn>
|
||
|
#### 后缀图标
|
||
|
省市区级联。
|
||
|
</cn>
|
||
|
|
||
|
<us>
|
||
|
#### Suffix
|
||
|
Cascade selection box for selecting province/city/district.
|
||
|
</us>
|
||
|
|
||
|
```html
|
||
|
<template>
|
||
|
<div>
|
||
|
<a-cascader style="margin-top: 1rem" :options="options" @change="onChange" placeholder="Please select">
|
||
|
<a-icon type="smile" slot="suffixIcon" class="test"/>
|
||
|
</a-cascader>
|
||
|
<a-cascader suffixIcon="ab" style="margin-top: 1rem" :options="options" @change="onChange" placeholder="Please select" />
|
||
|
</div>
|
||
|
</template>
|
||
|
<script>
|
||
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
```
|
||
|
|