[feat] better store saving logic + more launch options
This commit is contained in:
@@ -37,6 +37,17 @@ export const setPowerPlan = (plan: number) => {
|
||||
toolStore.state.powerPlan = plan
|
||||
}
|
||||
|
||||
export const addLaunchOption = (option: string) => {
|
||||
// 限制最高10个
|
||||
if (toolStore.state.launchOptions.length >= 10) {
|
||||
return
|
||||
}
|
||||
toolStore.state.launchOptions = [
|
||||
...toolStore.state.launchOptions,
|
||||
option,
|
||||
]
|
||||
}
|
||||
|
||||
export const resetToolStore = () => {
|
||||
toolStore.state.launchOptions = defaultValue.launchOptions
|
||||
toolStore.state.launchIndex = defaultValue.launchIndex
|
||||
|
||||
Reference in New Issue
Block a user