From adf2b291b939d9d3a8f0df2d7ee7ea86cb4ff2b2 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sat, 15 May 2021 16:49:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/{index.ts => slides.ts} | 0 src/mocks/theme.ts | 8 ++++++++ src/store/state.ts | 14 ++++---------- 3 files changed, 12 insertions(+), 10 deletions(-) rename src/mocks/{index.ts => slides.ts} (100%) create mode 100644 src/mocks/theme.ts diff --git a/src/mocks/index.ts b/src/mocks/slides.ts similarity index 100% rename from src/mocks/index.ts rename to src/mocks/slides.ts diff --git a/src/mocks/theme.ts b/src/mocks/theme.ts new file mode 100644 index 00000000..72f7da33 --- /dev/null +++ b/src/mocks/theme.ts @@ -0,0 +1,8 @@ +import { SlideTheme } from '@/types/slides' + +export const theme: SlideTheme = { + themeColor: '#5b9bd5', + fontColor: '#333', + fontName: '微软雅黑', + backgroundColor: '#fff', +} \ No newline at end of file diff --git a/src/store/state.ts b/src/store/state.ts index 35d1285c..3d98cadf 100644 --- a/src/store/state.ts +++ b/src/store/state.ts @@ -1,7 +1,8 @@ import { Slide, SlideTheme } from '@/types/slides' import { CreatingElement } from '@/types/edit' import { ToolbarState } from '@/types/toolbar' -import { slides } from '@/mocks/index' +import { slides } from '@/mocks/slides' +import { theme } from '@/mocks/theme' import { SYS_FONTS } from '@/configs/font' export interface State { @@ -42,6 +43,7 @@ export const state: State = { availableFonts: [], // 当前环境可用字体 toolbarState: 'slideStyle', // 右侧工具栏状态 viewportRatio: 0.5625, // 可是区域比例,默认16:9 + theme: theme, // 主题样式 slides: slides, // 幻灯片页面数据 slideIndex: 0, // 当前页面索引 selectedSlidesIndex: [], // 当前被选中的页面索引集合 @@ -50,13 +52,5 @@ export const state: State = { ctrlKeyState: false, // ctrl键按下状态 shiftKeyState: false, // shift键按下状态 screening: false, // 是否进入放映状态 - clipingImageElementId: '', // 当前正在裁剪的图片ID - - // 主题样式 - theme: { - themeColor: '#5b9bd5', - fontColor: '#333', - fontName: '微软雅黑', - backgroundColor: '#fff', - }, + clipingImageElementId: '', // 当前正在裁剪的图片ID } \ No newline at end of file