ColorModeAvatar 组件扩展了 Avatar 组件,因此您可以传递任何属性,例如 size、icon 等。
使用 light 和 dark 属性来定义亮色模式和暗色模式的来源。
<template>
<UColorModeAvatar light="https://github.com/vuejs.png" dark="https://github.com/nuxt.png" />
</template>
| 属性 | 默认值 | 类型 |
|---|---|---|
as |
|
此组件应渲染为的元素或组件。 |
亮色 |
| |
暗色 |
| |
alt |
| |
图标 |
| |
文本 |
| |
尺寸 |
|
|
chip |
| |
ui |
|
5cb65— 特性:导入 @nuxt/ui-pro 组件