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