templatediva-select size=large placeholder=请选择图标 style=width: 200px @change=handleChangea-select-optionv-for=i in seleiconlist:key=i.keya-icon :type=i.value style=font-siz...
<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>
沃梦达教程
本文标题为:Select 选择器显示内容为icon图标选项(Ant Design of Vue)
猜你喜欢
- vue keep-alive 2023-10-08
- 关于 html:如何从 css 表中删除边距和填充 2022-09-21
- 1 Vue - 简介 2023-10-08
- ajax实现输入提示效果 2023-02-14
- javascript 判断当前浏览器版本并判断ie版本 2023-08-08
- 基于CORS实现WebApi Ajax 跨域请求解决方法 2023-02-14
- layui数据表格以及传数据方式 2022-12-13
- 深入浅析AjaxFileUpload实现单个文件的 Ajax 文件上传库 2022-12-15
- JS实现左侧菜单工具栏 2022-08-31
- jsPlumb+vue创建字段映射关系 2023-10-08