我启用了自定义属性:
Vue.use(Vuetify, {
options: {
customProperties: true
}
});
并尝试通过CSS变量使用:
<style>
.custom{
color:var(--v-primary-base);
}
</style>
这是我设置主题的 vuetify.js
文件:
export default new Vuetify({
icons: {
iconfont: 'mdi',
},
theme: {
themes: {
light: {
background: '#FFFFFF',
primary: '#25316A',
secondary: '#b0bec5',
accent: '#25316A',
error: '#E86674',
orange: '#FF7A0D',
golden: '#A68C59',
badge: '#F5528C',
customPrimary: '#085294',
},
dark: {
primary: '#085294',
}
},
},
})
没有主题颜色可以通过变量访问。我尝试了多种方法,但都没有成功,也没有报错。请问有人可以帮帮我吗?