chore: 目录结构调整

This commit is contained in:
pipipi-pikachu 2021-05-15 16:49:37 +08:00
parent 72334b421f
commit adf2b291b9
3 changed files with 12 additions and 10 deletions

8
src/mocks/theme.ts Normal file
View File

@ -0,0 +1,8 @@
import { SlideTheme } from '@/types/slides'
export const theme: SlideTheme = {
themeColor: '#5b9bd5',
fontColor: '#333',
fontName: '微软雅黑',
backgroundColor: '#fff',
}

View File

@ -1,7 +1,8 @@
import { Slide, SlideTheme } from '@/types/slides' import { Slide, SlideTheme } from '@/types/slides'
import { CreatingElement } from '@/types/edit' import { CreatingElement } from '@/types/edit'
import { ToolbarState } from '@/types/toolbar' 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' import { SYS_FONTS } from '@/configs/font'
export interface State { export interface State {
@ -42,6 +43,7 @@ export const state: State = {
availableFonts: [], // 当前环境可用字体 availableFonts: [], // 当前环境可用字体
toolbarState: 'slideStyle', // 右侧工具栏状态 toolbarState: 'slideStyle', // 右侧工具栏状态
viewportRatio: 0.5625, // 可是区域比例默认16:9 viewportRatio: 0.5625, // 可是区域比例默认16:9
theme: theme, // 主题样式
slides: slides, // 幻灯片页面数据 slides: slides, // 幻灯片页面数据
slideIndex: 0, // 当前页面索引 slideIndex: 0, // 当前页面索引
selectedSlidesIndex: [], // 当前被选中的页面索引集合 selectedSlidesIndex: [], // 当前被选中的页面索引集合
@ -50,13 +52,5 @@ export const state: State = {
ctrlKeyState: false, // ctrl键按下状态 ctrlKeyState: false, // ctrl键按下状态
shiftKeyState: false, // shift键按下状态 shiftKeyState: false, // shift键按下状态
screening: false, // 是否进入放映状态 screening: false, // 是否进入放映状态
clipingImageElementId: '', // 当前正在裁剪的图片ID clipingImageElementId: '', // 当前正在裁剪的图片ID
// 主题样式
theme: {
themeColor: '#5b9bd5',
fontColor: '#333',
fontName: '微软雅黑',
backgroundColor: '#fff',
},
} }