ddei-editor/plugins/core/dialogs/choosecontroldialog.ts
2024-11-18 17:52:02 +08:00

46 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {DDeiPluginBase} from "ddei-framework";
import ChooseControlDialog from './ChooseControlDialog.vue';
class DDeiCoreChooseControlDialog extends DDeiPluginBase{
name: string = ChooseControlDialog.name
/**
* 缺省实例
*/
static defaultIns: DDeiCoreChooseControlDialog = new DDeiCoreChooseControlDialog(null);
plugins: object[] = [ChooseControlDialog]
getDialogs(editor){
return this.plugins;
}
static configuration(options, fullConfig: boolean = false) {
//解析options只使用自己相关的
if (options) {
let newOptions = {}
if (fullConfig) {
if (fullConfig) {
if (options[ChooseControlDialog.name]) {
for (let i in options[ChooseControlDialog.name]) {
newOptions[i] = options[ChooseControlDialog.name][i]
}
}
}
} else {
newOptions = options
}
if (newOptions && Object.keys(newOptions).length !== 0) {
let panels = new DDeiCoreChooseControlDialog(newOptions);
return panels;
}
}
return DDeiCoreChooseControlDialog;
}
static modify(fn) {
return DDeiCoreChooseControlDialog.defaultIns.modify(fn)
}
}
export default DDeiCoreChooseControlDialog