Select 选择器显示内容为icon图标选项(Ant Design of Vue)
作者:互联网
<template>
<div>
<a-select size="large" placeholder="请选择图标" style="width: 200px" @change="handleChange">
<a-select-option
v-for="i in seleiconlist"
:key="i.key"
><a-icon :type="i.value" style="font-size: 18px;"/></a-select-option>
</a-select>
</div>
</template>
<script>
export default {
data() {
return {
seleiconlist:[
{key:"account-book",value:"account-book"},
{key:"appstore",value:"appstore"},
{key:"bank",value:"bank"},
{key:"book",value:"book"},
{key:"clock-circle",value:"clock-circle"},
{key:"snippets",value:"snippets"}
]
};
},
mounted() {},
methods: {
handleChange(value) {
console.log(`Selected: ${value}`);
},
}
};
</script>
<style scoped>
</style>
标签:Vue,clock,value,Ant,book,key,circle,选择器,snippets 来源: https://blog.csdn.net/qq_45432996/article/details/115235147