2023-01-29 15:26:45 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="fs-theme" @click="show()">
|
|
|
|
|
<fs-iconify icon="ion:sparkles-outline" />
|
2024-06-15 18:32:36 +00:00
|
|
|
<a-drawer v-model:open="visible" title="主题设置" placement="right" width="350px" :closable="false" @after-open-change="afterVisibleChange">
|
|
|
|
|
<fs-theme-color-picker :primary-color="setting.themeConfig?.colorPrimary" @change="setting.setPrimaryColor"></fs-theme-color-picker>
|
2023-01-29 15:26:45 +08:00
|
|
|
</a-drawer>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2023-03-16 19:24:01 +00:00
|
|
|
<script lang="ts">
|
2023-01-29 15:26:45 +08:00
|
|
|
import { ref, defineComponent } from "vue";
|
|
|
|
|
import FsThemeColorPicker from "./color-picker.vue";
|
|
|
|
|
import { useSettingStore } from "/@/store/modules/settings";
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: "FsTheme",
|
|
|
|
|
components: { FsThemeColorPicker },
|
|
|
|
|
setup() {
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
function afterVisibleChange() {}
|
|
|
|
|
function show() {
|
|
|
|
|
visible.value = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setting = useSettingStore();
|
|
|
|
|
return {
|
|
|
|
|
visible,
|
|
|
|
|
show,
|
|
|
|
|
afterVisibleChange,
|
|
|
|
|
setting
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.fs-theme {
|
|
|
|
|
}
|
|
|
|
|
.fs-theme-drawer {
|
|
|
|
|
}
|
|
|
|
|
</style>
|