This commit is contained in:
frostime 2023-10-27 22:12:43 +08:00
parent c580fb7a00
commit 3343eb7e5c

View file

@ -3,7 +3,7 @@
* @Author : frostime * @Author : frostime
* @Date : 2023-09-16 18:05:00 * @Date : 2023-09-16 18:05:00
* @FilePath : /src/libs/setting-utils.ts * @FilePath : /src/libs/setting-utils.ts
* @LastEditTime : 2023-09-16 18:17:03 * @LastEditTime : 2023-10-27 22:12:37
* @Description : A utility for siyuan plugin settings * @Description : A utility for siyuan plugin settings
*/ */
@ -17,7 +17,7 @@ export class SettingUtils {
settings: Map<string, ISettingItem> = new Map(); settings: Map<string, ISettingItem> = new Map();
elements: Map<string, HTMLElement> = new Map(); elements: Map<string, HTMLElement> = new Map();
constructor(plugin: Plugin, name?: string, width?: string, height?: string, callback?: (data: any) => void) { constructor(plugin: Plugin, name?: string, callback?: (data: any) => void, width?: string, height?: string) {
this.name = name ?? 'settings'; this.name = name ?? 'settings';
this.plugin = plugin; this.plugin = plugin;
this.file = this.name.endsWith('.json') ? this.name : `${this.name}.json`; this.file = this.name.endsWith('.json') ? this.name : `${this.name}.json`;