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)
基础教程推荐
猜你喜欢
- 使用ajax跨域调用springboot框架的api传输文件 2023-02-23
- JS滚动到顶部踩坑解决记录 2023-07-10
- Ajax发送和接收请求 2022-12-15
- Ajax+smarty技术实现无刷新分页 2022-12-15
- HTML clearfix清除浮动讲解 2022-11-20
- 关于Ajax跨域问题及解决方案详析 2023-02-23
- cocos creator游戏实现loading加载页面,游戏启动加载动画 2022-10-29
- 在实战中可能碰到的几种ajax请求方法详解 2023-02-01
- uniapp开发微信小程序自定义顶部导航栏功能实例 2022-10-21
- Javascript Bootstrap的网格系统,导航栏和轮播详解 2023-08-11