mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-04-12 14:40:47 +08:00
refactor(avatar): icon input manner
This commit is contained in:
parent
109a2edc79
commit
b002dc06cf
@ -95,7 +95,7 @@ export default {
|
||||
name: 'Common Components',
|
||||
childItems: [
|
||||
{
|
||||
name: 'Avatar (in progress)',
|
||||
name: 'Avatar',
|
||||
path: `/${this.lang}/${this.theme}` + '/n-avatar'
|
||||
},
|
||||
{
|
||||
|
@ -1,11 +1,9 @@
|
||||
# Icon
|
||||
```html
|
||||
<n-avatar>
|
||||
<template v-slot:icon>
|
||||
<n-icon>
|
||||
<md-cash />
|
||||
</n-icon>
|
||||
</template>
|
||||
<n-icon>
|
||||
<md-cash />
|
||||
</n-icon>
|
||||
</n-avatar>
|
||||
```
|
||||
```js
|
||||
|
@ -12,9 +12,7 @@
|
||||
line-height: 1.25;
|
||||
}
|
||||
@include b(icon) {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
font-size: $width - 8px;
|
||||
font-size: $width;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -27,6 +25,7 @@
|
||||
@include b(icon) {
|
||||
transition: fill .3s $default-cubic-bezier;
|
||||
fill: white;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
color: white;
|
||||
transition: background-color .3s $default-cubic-bezier, color .3s $default-cubic-bezier;
|
||||
|
Loading…
x
Reference in New Issue
Block a user