ddei-editor/plugins/quickcontrol/quickcontrolpanel.ts
2024-06-14 18:33:53 +08:00

46 lines
1.1 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 QuickControlPanel from './QuickControlPanel.vue';
class DDeiExtQuickControlPanel extends DDeiPluginBase{
name: string = QuickControlPanel.name
/**
* 缺省实例
*/
static defaultIns: DDeiExtQuickControlPanel = new DDeiExtQuickControlPanel(null);
plugins: object[] = [QuickControlPanel]
getPanels(editor){
return this.plugins;
}
static configuration(options, fullConfig: boolean = false) {
//解析options只使用自己相关的
if (options) {
let newOptions = {}
if (fullConfig) {
if (fullConfig) {
if (options[ChangeRatio.name]) {
for (let i in options[ChangeRatio.name]) {
newOptions[i] = options[ChangeRatio.name][i]
}
}
}
} else {
newOptions = options
}
if (newOptions && Object.keys(newOptions).length !== 0) {
let panels = new DDeiExtQuickControlPanel(newOptions);
return panels;
}
}
return DDeiExtQuickControlPanel;
}
}
export default DDeiExtQuickControlPanel