u
This commit is contained in:
1 parent
c280cbf961
commit
b24015fbae
12 files changed
+760
-133
No files matched your search
@@ -11,7 +11,8 @@ export default defineComponent({
|
||||
color: { type: String, default: 'currentColor' },
|
||||
spin: { type: Boolean, default: false },
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
emits: ['click'],
|
||||
setup(props, { slots, emit }) {
|
||||
const prefixCls = getPrefixCls('icon')
|
||||
const fontStyle = {
|
||||
...(props.size ? { fontSize: `${props.size}px` } : {}), // size 存在才设置
|
||||
@@ -21,6 +22,7 @@ export default defineComponent({
|
||||
<i
|
||||
class={[prefixCls, props.spin && `${prefixCls}-spin`]}
|
||||
style={fontStyle}
|
||||
onClick={e => emit('click', e)}
|
||||
>
|
||||
{slots.default
|
||||
? (
|
||||
|
||||
Reference in new issue
Block a user