1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-13 21:29:01 +08:00

22 lines
565 B
Vue

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