🎨 Style(custom): format with prettier

This commit is contained in:
Kuingsmile
2024-06-15 19:37:50 +08:00
parent 096f564c31
commit 5af8a6b529
157 changed files with 21365 additions and 22952 deletions

View File

@@ -2,17 +2,21 @@ import { ipcRenderer } from 'electron'
import { getRawData } from '@/utils/common'
import { PICLIST_MANAGE_GET_CONFIG, PICLIST_MANAGE_SAVE_CONFIG, PICLIST_MANAGE_REMOVE_CONFIG } from '~/manage/events/constants'
import {
PICLIST_MANAGE_GET_CONFIG,
PICLIST_MANAGE_SAVE_CONFIG,
PICLIST_MANAGE_REMOVE_CONFIG
} from '~/manage/events/constants'
export function saveConfig (config: IObj | string, value?: any) {
export function saveConfig(config: IObj | string, value?: any) {
const configObj = typeof config === 'string' ? { [config]: value } : getRawData(config)
ipcRenderer.send(PICLIST_MANAGE_SAVE_CONFIG, configObj)
}
export async function getConfig<T> (key?: string): Promise<T | undefined> {
export async function getConfig<T>(key?: string): Promise<T | undefined> {
return await ipcRenderer.invoke(PICLIST_MANAGE_GET_CONFIG, key)
}
export function removeConfig (key: string, propName: string) {
export function removeConfig(key: string, propName: string) {
ipcRenderer.send(PICLIST_MANAGE_REMOVE_CONFIG, key, propName)
}