用法
ColorModeAvatar 组件扩展了 Avatar 组件,因此你可以传递任意属性,例如 size
、icon
等。
使用 light
和 dark
属性来定义亮色和暗色模式下的源。

<template>
<UColorModeAvatar light="https://github.com/vuejs.png" dark="https://github.com/nuxt.png" />
</template>
在亮色和暗色模式之间切换,查看不同的图片
API
属性
属性 | 默认值 | 类型 |
---|---|---|
as |
|
该组件应渲染为的元素或组件。 |
亮色模式 |
| |
暗色模式 |
| |
icon |
| |
size |
|
|
alt |
| |
text |
| |
ui |
|