ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 别名 设置别名,可以针对 ## 示例 设置别名组件,并添加默认值 ``` // src/plugins/vuetify.js import { createVuetify } from 'vuetify' import { VBtn } from 'vuetify/components/VBtn' export default createVuetify({ aliases: { MyButton: VBtn, }, defaults: { VBtn: { variant: 'flat' }, MyButton: { variant: 'tonal' }, }, }) ``` 可嵌套默认值 ``` import { createVuetify } from 'vuetify' import { VBtn } from 'vuetify/components/VBtn' export default createVuetify({ aliases: { MyButton: VBtn, }, defaults: { MyButton: { color: 'primary', variant: 'tonal', }, VBtn: { color: 'secondary', variant: 'flat', }, VCard: { MyButton: { color: 'secondary' }, VBtn: { color: 'primary' }, }, }, }) ```