Closed transtone closed 7 months ago
Thanks for noticing this issue, the main color is the sixth in palette with index 5 not 6 😅
Thanks for noticing this issue, the main color is the sixth in palette with index 5 not 6 😅
how to set the sixth color?
set primary
get primaryHover
, it's weird and confused.
================
we can use themeOverrides
just in n-config-provider
.
App.vue
:
<template>
<div class="vue-app min-h-full">
<n-config-provider :locale="zhCN" :date-locale="dateZhCN" :theme-overrides="themeOverrides" abstract>
<n-dialog-provider>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</n-dialog-provider>
</n-config-provider>
</div>
</template>
<script setup>
import { generate } from '@ant-design/colors'
import { zhCN, dateZhCN, NConfigProvider } from 'naive-ui'
const themeOverrides = computed(() => {
// const colors = generate('#1890ff', { theme: 'dark', backgroundColor: '#141414', });
const primary = generate('#0064c8')
return {
common: {
primaryColor: primary[5],
primaryColorHover: primary[4],
primaryColorPressed: primary[6],
primaryColorSuppl: primary[7],
// fontSize: '12px',
// fontSizeSmall: '12px',
// fontSizeMedium: '12px',
// borderRadius: '2px',
// heightMedium: '32px',
// heightTiny: '24px',
},
}
})
</script>
how to set the sixth color?
Fixed on v1.12.2
v1.12.1
the primary color is not primary, but primaryHover.