优化导出

This commit is contained in:
IndieKKY
2024-10-10 09:23:42 +08:00
parent b481b8a55a
commit 5a0a123af9
8 changed files with 76 additions and 12 deletions

View File

@@ -32,7 +32,8 @@ interface EnvState {
segments?: Segment[]
url?: string
title?: string
ctime?: number | null
author?: string
taskIds?: string[]
transResults: { [key: number]: TransResult }
lastTransTime?: number
@@ -271,6 +272,12 @@ export const slice = createSlice({
setTitle: (state, action: PayloadAction<string | undefined>) => {
state.title = action.payload
},
setCtime: (state, action: PayloadAction<number | null | undefined>) => {
state.ctime = action.payload
},
setAuthor: (state, action: PayloadAction<string | undefined>) => {
state.author = action.payload
},
setInfos: (state, action: PayloadAction<any[]>) => {
state.infos = action.payload
},
@@ -342,6 +349,8 @@ export const {
addAskInfo,
delAskInfo,
mergeAskInfo,
setCtime,
setAuthor,
} = slice.actions
export default slice.reducer