1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-05-01 22:59:01 +08:00
2024-09-06 14:46:07 +08:00

24 lines
599 B
Vue

<template>
<n-tooltip trigger="hover">
<template #trigger>
<n-color-picker
class="mr-16 h-32 w-32"
:value="appStore.primaryColor"
:swatches="primaryColors"
:on-update:value="(v) => appStore.setPrimaryColor(v)"
:render-label="() => ''"
/>
</template>
设置主题色
</n-tooltip>
</template>
<script setup>
import { useAppStore } from '@/store'
import { getPresetColors } from '@arco-design/color'
const appStore = useAppStore()
const primaryColors = Object.entries(getPresetColors()).map(([, value]) => value.primary)
</script>