feat: 新增主题色选项

This commit is contained in:
MTrun
2022-02-06 01:04:05 +08:00
parent 7b24b90fbc
commit 314daede24
51 changed files with 698 additions and 174 deletions
@@ -1,7 +1,7 @@
<template>
<div
class="go-edit-range"
:style="useSizeStyle(size)"
:style="style"
@mousedown="mousedownHandleUnStop($event, undefined)"
>
<slot></slot>
@@ -9,21 +9,37 @@
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
import { useSizeStyle } from '../../hooks/useStyle.hook'
import { mousedownHandleUnStop } from '../../hooks/useDrop.hook'
const size = {
w: 1920,
h: 1080
}
const chartEditStoreStore = useChartEditStoreStore()
const canvasConfig = ref(chartEditStoreStore.getEditCanvasConfig)
const size = computed(() => {
return {
w: canvasConfig.value.width,
h: canvasConfig.value.height
}
})
const background = computed(() => {
const background = canvasConfig.value.background
return background ? background : '#232324'
})
const style = computed(() => {
// @ts-ignore
return { ...useSizeStyle(size.value), background: background.value }
})
</script>
<style lang="scss" scoped>
@include go(edit-range) {
position: relative;
border: 1px solid;
background-color: #333;
border-radius: 15px;
@include filter-bg-color('background-color2');
@include fetch-theme('box-shadow');
@@ -17,9 +17,6 @@
@click="handleClick"
>
<span class="btn-text">历史记录</span>
<!-- <n-icon class="lock-icon" size="18" :depth="2">
<TimeOutlineIcon />
</n-icon> -->
</n-button>
</n-dropdown>
@@ -48,7 +45,6 @@ import {
} from '@/store/modules/chartHistoryStore/chartHistoryStore.d'
const {
TimeOutlineIcon,
DesktopOutlineIcon,
PencilIcon,
TrashIcon,