mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-31 05:19:53 +00:00
New settings API (#1292)
* Add settings API * Add playwright test * Update README
This commit is contained in:
@@ -169,6 +169,23 @@ export class ComfySettingsDialog extends ComfyDialog<HTMLDialogElement> {
|
||||
this.#dispatchChange(id, value)
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated for external callers/extensions. Use `ComfyExtension.settings` field instead.
|
||||
* Example:
|
||||
* ```ts
|
||||
* app.registerExtension({
|
||||
* name: 'My Extension',
|
||||
* settings: [
|
||||
* {
|
||||
* id: 'My.Setting',
|
||||
* name: 'My Setting',
|
||||
* type: 'text',
|
||||
* defaultValue: 'Hello, world!'
|
||||
* }
|
||||
* ]
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
addSetting(params: SettingParams) {
|
||||
const {
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user