最近使用ant-design-vue,在使用select的时候遇到一些特殊情况,特此做一下整理汇总。
首先实例中的下拉选中为:
const options = [
{
name: '北京',
id: '00001',
spell: 'beijing',
simpleSpell: 'bj'
},
{
name: '上海',
id: '00002',
spell: 'shanghai',
simpleSpell: 'sh'
},
{
name: '广东',
id: '00003',
spell: 'guangdong',
simpleSpell: 'gd'
},
{
name: '深圳',
id: '00004',
spell: 'shenzhen',
simpleSpell: 'sz'
},
{
name: '重庆',
id: '00005',
spell: 'chongqing',
simpleSpell: 'cq'
},
{
name: '西安',
id: '00006',
spell: 'xian',
simpleSpell: 'xa'
}
]
原创大约 2 分钟