import './index.scss' import { NDrawer, NDrawerContent, NDivider, NSpace, NSwitch, NColorPicker, NDescriptions, NDescriptionsItem, } from 'naive-ui' import ThemeSwitch from '@/layout/components/SiderBar/components/SettingDrawer/components/ThemeSwitch/index' import { useSwatchesColorOptions } from './hook' import { useSetting } from '@/store' import type { PropType } from 'vue' const SettingDrawer = defineComponent({ name: 'SettingDrawer', props: { show: { type: Boolean, default: false, }, placement: { type: String as PropType, default: 'right', }, width: { type: Number, default: 280, }, }, emits: ['update:show'], setup(props, { emit }) { const { t } = useI18n() const settingStore = useSetting() const { changePrimaryColor, changeSwitcher } = settingStore const { themeValue, primaryColorOverride, menuTagSwitch, breadcrumbSwitch, } = storeToRefs(settingStore) const modelShow = computed({ get: () => props.show, set: (bool) => { emit('update:show', bool) }, }) const handleRailStyle = () => ({ backgroundColor: '#000000', }) return { modelShow, t, handleRailStyle, changePrimaryColor, themeValue, primaryColorOverride, menuTagSwitch, changeSwitcher, breadcrumbSwitch, } }, render() { const { t } = this return ( {t('LayoutHeaderSettingOptions.ThemeOptions.Title')} {t('LayoutHeaderSettingOptions.ThemeOptions.PrimaryColorConfig')} 界面显示 this.changeSwitcher(bool, 'menuTagSwitch') } /> this.changeSwitcher(bool, 'breadcrumbSwitch') } /> ) }, }) export default SettingDrawer