赞
踩
图标button,官方文档需要局部引用icon,在结合v-bind才能使用,非常的繁琐
-
- <el-button :icon="Search" circle />
- <el-button type="primary" :icon="Edit" circle />
- <el-button type="success" :icon="Check" circle />
- <el-button type="info" :icon="Message" circle />
- <el-button type="warning" :icon="Star" circle />
- <el-button type="danger" :icon="Delete" circle />
-
- import {
- Check,
- Delete,
- Edit,
- Message,
- Search,
- Star,
- } from '@element-plus/icons-vue'
然而直接去掉v-bind,就可以省略局部引入的步骤,非常的方便
- <el-button icon="Search" circle />
- <el-button type="primary" icon="Edit" circle />
- <el-button type="success" icon="Check" circle />
- <el-button type="info" icon="Message" circle />
- <el-button type="warning" icon="Star" circle />
- <el-button type="danger" icon="Delete" circle />
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。