ddei-editor/plugins/core/dialogs/selectfontdialog.ts
2024-05-11 17:09:46 +08:00

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