@tmagic/editor 1.5.12 → 1.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/tmagic-editor.js +219 -166
  2. package/dist/tmagic-editor.umd.cjs +225 -266
  3. package/package.json +7 -7
  4. package/src/Editor.vue +4 -20
  5. package/src/components/CodeBlockEditor.vue +14 -2
  6. package/src/components/ContentMenu.vue +2 -2
  7. package/src/components/FloatingBox.vue +1 -1
  8. package/src/components/ScrollBar.vue +9 -3
  9. package/src/components/SearchInput.vue +1 -1
  10. package/src/components/Tree.vue +3 -3
  11. package/src/components/TreeNode.vue +3 -3
  12. package/src/fields/CodeSelect.vue +5 -7
  13. package/src/fields/CodeSelectCol.vue +9 -5
  14. package/src/fields/DataSourceFields.vue +4 -2
  15. package/src/fields/DataSourceInput.vue +7 -3
  16. package/src/fields/DataSourceMethodSelect.vue +17 -6
  17. package/src/fields/DataSourceMethods.vue +3 -3
  18. package/src/fields/EventSelect.vue +3 -2
  19. package/src/fields/UISelect.vue +2 -2
  20. package/src/hooks/use-code-block-edit.ts +1 -1
  21. package/src/index.ts +0 -1
  22. package/src/initService.ts +75 -65
  23. package/src/layouts/Framework.vue +1 -1
  24. package/src/layouts/NavMenu.vue +1 -1
  25. package/src/layouts/page-bar/PageBar.vue +1 -1
  26. package/src/layouts/props-panel/FormPanel.vue +2 -2
  27. package/src/layouts/props-panel/PropsPanel.vue +1 -1
  28. package/src/layouts/sidebar/ComponentListPanel.vue +1 -1
  29. package/src/layouts/sidebar/code-block/CodeBlockList.vue +2 -1
  30. package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +20 -3
  31. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +13 -1
  32. package/src/layouts/sidebar/data-source/DataSourceList.vue +1 -0
  33. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +20 -3
  34. package/src/layouts/workspace/viewer/Stage.vue +1 -1
  35. package/src/services/BaseService.ts +1 -0
  36. package/src/services/editor.ts +4 -3
  37. package/src/type.ts +9 -0
  38. package/src/utils/props.ts +9 -7
  39. package/types/index.d.ts +945 -9788
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.12",
2
+ "version": "1.5.14",
3
3
  "name": "@tmagic/editor",
4
4
  "type": "module",
5
5
  "sideEffects": [
@@ -58,11 +58,11 @@
58
58
  "moveable": "^0.53.0",
59
59
  "serialize-javascript": "^6.0.0",
60
60
  "sortablejs": "^1.15.2",
61
- "@tmagic/design": "1.5.12",
62
- "@tmagic/form": "1.5.12",
63
- "@tmagic/stage": "1.5.12",
64
- "@tmagic/table": "1.5.12",
65
- "@tmagic/utils": "1.5.12"
61
+ "@tmagic/design": "1.5.14",
62
+ "@tmagic/form": "1.5.14",
63
+ "@tmagic/table": "1.5.14",
64
+ "@tmagic/stage": "1.5.14",
65
+ "@tmagic/utils": "1.5.14"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/events": "^3.0.0",
@@ -76,7 +76,7 @@
76
76
  "monaco-editor": "^0.48.0",
77
77
  "typescript": "*",
78
78
  "vue": ">=3.5.0",
79
- "@tmagic/core": "1.5.12"
79
+ "@tmagic/core": "1.5.14"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "typescript": {
package/src/Editor.vue CHANGED
@@ -142,7 +142,7 @@ import codeBlockService from './services/codeBlock';
142
142
  import componentListService from './services/componentList';
143
143
  import dataSourceService from './services/dataSource';
144
144
  import depService from './services/dep';
145
- import editorService, { type EditorService } from './services/editor';
145
+ import editorService from './services/editor';
146
146
  import eventsService from './services/events';
147
147
  import historyService from './services/history';
148
148
  import keybindingService from './services/keybinding';
@@ -153,25 +153,9 @@ import uiService from './services/ui';
153
153
  import keybindingConfig from './utils/keybinding-config';
154
154
  import { defaultEditorProps, EditorProps } from './editorProps';
155
155
  import { initServiceEvents, initServiceState } from './initService';
156
- import type {
157
- EventBus,
158
- FrameworkSlots,
159
- PropsPanelSlots,
160
- Services,
161
- SidebarSlots,
162
- StageOptions,
163
- WorkspaceSlots,
164
- } from './type';
165
-
166
- defineSlots<
167
- FrameworkSlots &
168
- WorkspaceSlots &
169
- SidebarSlots &
170
- PropsPanelSlots & {
171
- workspace(props: { editorService: EditorService }): any;
172
- 'workspace-content'(props: { editorService: EditorService }): any;
173
- }
174
- >();
156
+ import type { EditorSlots, EventBus, Services, StageOptions } from './type';
157
+
158
+ defineSlots<EditorSlots>();
175
159
 
176
160
  defineOptions({
177
161
  name: 'MEditor',
@@ -59,7 +59,7 @@
59
59
  </template>
60
60
 
61
61
  <script lang="ts" setup>
62
- import { computed, inject, Ref, ref, useTemplateRef } from 'vue';
62
+ import { computed, inject, nextTick, Ref, ref, useTemplateRef, watch } from 'vue';
63
63
 
64
64
  import type { CodeBlockContent } from '@tmagic/core';
65
65
  import { TMagicButton, TMagicDialog, tMagicMessage, tMagicMessageBox, TMagicTag } from '@tmagic/design';
@@ -95,6 +95,8 @@ const props = defineProps<{
95
95
 
96
96
  const emit = defineEmits<{
97
97
  submit: [values: CodeBlockContent, eventData: ContainerChangeEventData];
98
+ close: [];
99
+ open: [];
98
100
  }>();
99
101
 
100
102
  const { codeBlockService, uiService } = useServices();
@@ -231,7 +233,7 @@ const changeHandler = (values: CodeBlockContent) => {
231
233
  changedValue.value = values;
232
234
  };
233
235
 
234
- const beforeClose = (done: (cancel?: boolean) => void) => {
236
+ const beforeClose = (done: (_cancel?: boolean) => void) => {
235
237
  if (!changedValue.value) {
236
238
  done();
237
239
  return;
@@ -261,6 +263,16 @@ const closedHandler = () => {
261
263
  const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
262
264
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
263
265
 
266
+ watch(boxVisible, (visible) => {
267
+ nextTick(() => {
268
+ if (!visible) {
269
+ emit('close');
270
+ } else {
271
+ emit('open');
272
+ }
273
+ });
274
+ });
275
+
264
276
  defineExpose({
265
277
  async show() {
266
278
  calcBoxPosition();
@@ -37,7 +37,7 @@
37
37
  </template>
38
38
 
39
39
  <script lang="ts" setup>
40
- import { computed, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef } from 'vue';
40
+ import { computed, nextTick, onBeforeUnmount, onMounted, type Ref, ref, useTemplateRef } from 'vue';
41
41
 
42
42
  import { useZIndex } from '@tmagic/design';
43
43
 
@@ -73,7 +73,7 @@ const menuEl = useTemplateRef<HTMLDivElement>('menu');
73
73
  const buttonRefs = useTemplateRef<InstanceType<typeof ToolButton>[]>('buttons');
74
74
  const subMenuRef = useTemplateRef<any>('subMenu');
75
75
  const visible = ref(false);
76
- const subMenuData = ref<(MenuButton | MenuComponent)[]>([]);
76
+ const subMenuData: Ref<(MenuButton | MenuComponent)[]> = ref<(MenuButton | MenuComponent)[]>([]);
77
77
  const zIndex = useZIndex();
78
78
  const curZIndex = ref<number>(0);
79
79
 
@@ -39,7 +39,7 @@ const props = withDefaults(
39
39
  defineProps<{
40
40
  position?: Position;
41
41
  title?: string;
42
- beforeClose?: (done: (cancel?: boolean) => void) => void;
42
+ beforeClose?: (_done: (_cancel?: boolean) => void) => void;
43
43
  }>(),
44
44
  {
45
45
  title: '',
@@ -93,7 +93,9 @@ const scrollBy = (delta: number) => {
93
93
  position: absolute;
94
94
  background-color: transparent;
95
95
  opacity: 0.3;
96
- transition: background-color 0.2s linear, opacity 0.2s linear;
96
+ transition:
97
+ background-color 0.2s linear,
98
+ opacity 0.2s linear;
97
99
 
98
100
  .m-editor-scroll-bar-thumb {
99
101
  background-color: #aaa;
@@ -108,7 +110,9 @@ const scrollBy = (delta: number) => {
108
110
 
109
111
  .m-editor-scroll-bar-thumb {
110
112
  height: 6px;
111
- transition: background-color 0.2s linear, height 0.2s ease-in-out;
113
+ transition:
114
+ background-color 0.2s linear,
115
+ height 0.2s ease-in-out;
112
116
  bottom: 2px;
113
117
  }
114
118
  }
@@ -120,7 +124,9 @@ const scrollBy = (delta: number) => {
120
124
 
121
125
  .m-editor-scroll-bar-thumb {
122
126
  width: 6px;
123
- transition: background-color 0.2s linear, width 0.2s ease-in-out;
127
+ transition:
128
+ background-color 0.2s linear,
129
+ width 0.2s ease-in-out;
124
130
  right: 2px;
125
131
  }
126
132
  }
@@ -27,7 +27,7 @@ const emit = defineEmits(['search']);
27
27
 
28
28
  const filterText = ref('');
29
29
 
30
- let timer: NodeJS.Timeout | null = null;
30
+ let timer: ReturnType<typeof setTimeout> | null = null;
31
31
  const filterTextChangeHandler = () => {
32
32
  timer && clearTimeout(timer);
33
33
  timer = setTimeout(() => {
@@ -38,9 +38,9 @@ import type { LayerNodeStatus, TreeNodeData } from '@editor/type';
38
38
  import TreeNode from './TreeNode.vue';
39
39
 
40
40
  defineSlots<{
41
- 'tree-node-content'(props: { data: TreeNodeData }): any;
42
- 'tree-node-label'(props: { data: TreeNodeData }): any;
43
- 'tree-node-tool'(props: { data: TreeNodeData }): any;
41
+ 'tree-node-content'(_props: { data: TreeNodeData }): any;
42
+ 'tree-node-label'(_props: { data: TreeNodeData }): any;
43
+ 'tree-node-tool'(_props: { data: TreeNodeData }): any;
44
44
  }>();
45
45
 
46
46
  defineOptions({
@@ -72,9 +72,9 @@ import type { LayerNodeStatus, TreeNodeData } from '@editor/type';
72
72
  import { updateStatus } from '@editor/utils/tree';
73
73
 
74
74
  defineSlots<{
75
- 'tree-node-label'(props: { data: TreeNodeData }): any;
76
- 'tree-node-tool'(props: { data: TreeNodeData }): any;
77
- 'tree-node-content'(props: { data: TreeNodeData }): any;
75
+ 'tree-node-label'(_props: { data: TreeNodeData }): any;
76
+ 'tree-node-tool'(_props: { data: TreeNodeData }): any;
77
+ 'tree-node-content'(_props: { data: TreeNodeData }): any;
78
78
  }>();
79
79
 
80
80
  defineOptions({
@@ -80,13 +80,11 @@ const codeConfig = computed<GroupListConfig>(() => ({
80
80
  { value: HookCodeType.DATA_SOURCE_METHOD, text: '数据源方法' },
81
81
  ],
82
82
  defaultValue: 'code',
83
- onChange: (mForm, v: HookCodeType, { model, prop, changeRecords }) => {
83
+ onChange: (_mForm, v: HookCodeType, { setModel }) => {
84
84
  if (v === HookCodeType.DATA_SOURCE_METHOD) {
85
- model.codeId = [];
86
- changeRecords.push({ propPath: prop.replace('codeType', 'codeId'), value: [] });
85
+ setModel('codeId', []);
87
86
  } else {
88
- model.codeId = '';
89
- changeRecords.push({ propPath: prop.replace('codeType', 'codeId'), value: '' });
87
+ setModel('codeId', '');
90
88
  }
91
89
 
92
90
  return v;
@@ -97,7 +95,7 @@ const codeConfig = computed<GroupListConfig>(() => ({
97
95
  name: 'codeId',
98
96
  span: 18,
99
97
  labelWidth: 0,
100
- display: (mForm, { model }) => model.codeType !== HookCodeType.DATA_SOURCE_METHOD,
98
+ display: (_mForm, { model }) => model.codeType !== HookCodeType.DATA_SOURCE_METHOD,
101
99
  notEditable: () => !codeBlockService.getEditStatus(),
102
100
  },
103
101
  {
@@ -105,7 +103,7 @@ const codeConfig = computed<GroupListConfig>(() => ({
105
103
  name: 'codeId',
106
104
  span: 18,
107
105
  labelWidth: 0,
108
- display: (mForm, { model }) => model.codeType === HookCodeType.DATA_SOURCE_METHOD,
106
+ display: (_mForm, { model }) => model.codeType === HookCodeType.DATA_SOURCE_METHOD,
109
107
  notEditable: () => !dataSourceService.get('editable'),
110
108
  },
111
109
  ],
@@ -121,24 +121,28 @@ const selectConfig = {
121
121
  }
122
122
  return [];
123
123
  },
124
- onChange: (formState: any, codeId: Id, { model }: any) => {
124
+ onChange: (formState: any, codeId: Id, { setModel, model }: any) => {
125
125
  // 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
126
126
  paramsConfig.value = getParamItemsConfig(codeId);
127
127
 
128
128
  if (paramsConfig.value.length) {
129
- model.params = createValues(formState, paramsConfig.value, {}, model.params);
129
+ setModel('params', createValues(formState, paramsConfig.value, {}, model.params));
130
130
  } else {
131
- model.params = {};
131
+ setModel('params', {});
132
132
  }
133
133
 
134
134
  return codeId;
135
135
  },
136
136
  };
137
137
 
138
- const onCodeIdChangeHandler = (value: any) => {
138
+ const onCodeIdChangeHandler = (value: any, eventData: ContainerChangeEventData) => {
139
139
  props.model.params = value.params;
140
+
140
141
  emit('change', props.model, {
141
- changeRecords: [
142
+ changeRecords: eventData.changeRecords?.map((item) => ({
143
+ prop: `${props.prop.replace(props.name, '')}${item.propPath}`,
144
+ value: item.value,
145
+ })) || [
142
146
  {
143
147
  propPath: props.prop,
144
148
  value: value[props.name],
@@ -65,6 +65,7 @@ import FloatingBox from '@editor/components/FloatingBox.vue';
65
65
  import { useEditorContentHeight } from '@editor/hooks';
66
66
  import { useNextFloatBoxPosition } from '@editor/hooks/use-next-float-box-position';
67
67
  import { useServices } from '@editor/hooks/use-services';
68
+ import { error } from '@editor/utils/logger';
68
69
 
69
70
  defineOptions({
70
71
  name: 'MFieldsDataSourceFields',
@@ -144,6 +145,7 @@ const fieldColumns: ColumnConfig[] = [
144
145
  try {
145
146
  return JSON.stringify(row.defaultValue);
146
147
  } catch (e) {
148
+ error(e);
147
149
  return row.defaultValue;
148
150
  }
149
151
  },
@@ -193,9 +195,9 @@ const dataSourceFieldsConfig: FormConfig = [
193
195
  { text: 'null', value: 'null' },
194
196
  { text: 'any', value: 'any' },
195
197
  ],
196
- onChange: (formState, v: string, { model }) => {
198
+ onChange: (_formState, v: string, { setModel }) => {
197
199
  if (!['any', 'array', 'object'].includes(v)) {
198
- model.fields = [];
200
+ setModel('fields', []);
199
201
  }
200
202
  return v;
201
203
  },
@@ -179,7 +179,11 @@ const curCharIsDot = (dotIndex: number) => dotIndex > -1 && dotIndex === getSele
179
179
  * @param leftCurlyBracketIndex 左大括号字符索引
180
180
  * @param cb 建议的方法
181
181
  */
182
- const dsQuerySearch = (queryString: string, leftCurlyBracketIndex: number, cb: (data: { value: string }[]) => void) => {
182
+ const dsQuerySearch = (
183
+ queryString: string,
184
+ leftCurlyBracketIndex: number,
185
+ cb: (_data: { value: string }[]) => void,
186
+ ) => {
183
187
  let result: DataSourceSchema[] = [];
184
188
 
185
189
  if (curCharIsLeftCurlyBracket(leftCurlyBracketIndex)) {
@@ -211,7 +215,7 @@ const fieldQuerySearch = (
211
215
  queryString: string,
212
216
  leftAngleIndex: number,
213
217
  dotIndex: number,
214
- cb: (data: { value: string }[]) => void,
218
+ cb: (_data: { value: string }[]) => void,
215
219
  ) => {
216
220
  let result: DataSchema[] = [];
217
221
 
@@ -272,7 +276,7 @@ const fieldQuerySearch = (
272
276
  * @param queryString 当前输入框内的字符串
273
277
  * @param cb 建议回调
274
278
  */
275
- const querySearch = (queryString: string, cb: (data: { value: string }[]) => void) => {
279
+ const querySearch = (queryString: string, cb: (_data: { value: string }[]) => void) => {
276
280
  inputText = queryString;
277
281
 
278
282
  const selectionStart = getSelectionStart();
@@ -37,7 +37,14 @@ import { Edit, View } from '@element-plus/icons-vue';
37
37
 
38
38
  import type { Id } from '@tmagic/core';
39
39
  import { TMagicButton, TMagicTooltip } from '@tmagic/design';
40
- import { createValues, type FieldProps, filterFunction, type FormState, MContainer } from '@tmagic/form';
40
+ import {
41
+ createValues,
42
+ type FieldProps,
43
+ filterFunction,
44
+ type FormState,
45
+ MContainer,
46
+ type OnChangeHandlerData,
47
+ } from '@tmagic/form';
41
48
 
42
49
  import CodeParams from '@editor/components/CodeParams.vue';
43
50
  import MIcon from '@editor/components/Icon.vue';
@@ -92,14 +99,18 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', '']
92
99
 
93
100
  const paramsConfig = ref<CodeParamStatement[]>(getParamItemsConfig(props.model[props.name || 'dataSourceMethod']));
94
101
 
95
- const setParamsConfig = (dataSourceMethod: [Id, string], formState: any = {}) => {
102
+ const setParamsConfig = (
103
+ dataSourceMethod: [Id, string],
104
+ formState: any = {},
105
+ setModel: OnChangeHandlerData['setModel'],
106
+ ) => {
96
107
  // 通过下拉框选择的codeId变化后修正model的值,避免写入其他codeId的params
97
108
  paramsConfig.value = dataSourceMethod ? getParamItemsConfig(dataSourceMethod) : [];
98
109
 
99
110
  if (paramsConfig.value.length) {
100
- props.model.params = createValues(formState, paramsConfig.value, {}, props.model.params);
111
+ setModel('params', createValues(formState, paramsConfig.value, {}, props.model.params));
101
112
  } else {
102
- props.model.params = {};
113
+ setModel('params', {});
103
114
  }
104
115
  };
105
116
 
@@ -125,8 +136,8 @@ const cascaderConfig = computed(() => ({
125
136
  name: props.name,
126
137
  options: methodsOptions.value,
127
138
  disable: props.disabled,
128
- onChange: (formState: any, dataSourceMethod: [Id, string]) => {
129
- setParamsConfig(dataSourceMethod, formState);
139
+ onChange: (formState: any, dataSourceMethod: [Id, string], { setModel }: OnChangeHandlerData) => {
140
+ setParamsConfig(dataSourceMethod, formState, setModel);
130
141
 
131
142
  return dataSourceMethod;
132
143
  },
@@ -80,7 +80,7 @@ const methodColumns: ColumnConfig[] = [
80
80
  {
81
81
  text: '编辑',
82
82
  handler: (method: CodeBlockContent, index: number) => {
83
- let codeContent = method.content || `({ params, dataSource, app }) => {\n // place your code here\n}`;
83
+ let codeContent = method.content || '({ params, dataSource, app }) => {\n // place your code here\n}';
84
84
 
85
85
  if (typeof codeContent !== 'string') {
86
86
  codeContent = codeContent.toString();
@@ -114,7 +114,7 @@ const methodColumns: ColumnConfig[] = [
114
114
  const createCodeHandler = () => {
115
115
  codeConfig.value = {
116
116
  name: '',
117
- content: `({ params, dataSource, app, flowState }) => {\n // place your code here\n}`,
117
+ content: '({ params, dataSource, app, flowState }) => {\n // place your code here\n}',
118
118
  params: [],
119
119
  };
120
120
 
@@ -130,7 +130,7 @@ const submitCodeHandler = (value: CodeBlockContent, data: ContainerChangeEventDa
130
130
  // 在保存的时候转换代码内容
131
131
  const parseDSL = getEditorConfig('parseDSL');
132
132
  if (typeof value.content === 'string') {
133
- value.content = parseDSL<(...args: any[]) => any>(value.content);
133
+ value.content = parseDSL<(..._args: any[]) => any>(value.content);
134
134
  }
135
135
  }
136
136
  if (editIndex > -1) {
@@ -63,6 +63,7 @@ import type {
63
63
  ContainerChangeEventData,
64
64
  FieldProps,
65
65
  FormState,
66
+ OnChangeHandlerData,
66
67
  PanelConfig,
67
68
  } from '@tmagic/form';
68
69
  import { MContainer as MFormContainer, MPanel } from '@tmagic/form';
@@ -202,8 +203,8 @@ const targetCompConfig = computed(() => {
202
203
  text: '联动组件',
203
204
  type: 'ui-select',
204
205
  display: (mForm: FormState, { model }: { model: Record<any, any> }) => model.actionType === ActionType.COMP,
205
- onChange: (MForm: FormState, v: string, { model }: any) => {
206
- model.method = '';
206
+ onChange: (MForm: FormState, v: string, { setModel }: OnChangeHandlerData) => {
207
+ setModel('method', '');
207
208
  return v;
208
209
  },
209
210
  };
@@ -70,7 +70,7 @@ const uiSelectMode = ref(false);
70
70
  const cancelHandler = () => {
71
71
  uiService.set('uiSelectMode', false);
72
72
  uiSelectMode.value = false;
73
- globalThis.document.removeEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as EventListener);
73
+ globalThis.document.removeEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as any);
74
74
  };
75
75
 
76
76
  const clickHandler = ({ detail }: Event & { detail: HTMLElement | MNode }) => {
@@ -97,7 +97,7 @@ const toName = computed(() => {
97
97
  const startSelect = () => {
98
98
  uiService.set('uiSelectMode', true);
99
99
  uiSelectMode.value = true;
100
- globalThis.document.addEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as EventListener);
100
+ globalThis.document.addEventListener(UI_SELECT_MODE_EVENT_NAME, clickHandler as any);
101
101
  };
102
102
 
103
103
  const deleteHandler = () => {
@@ -16,7 +16,7 @@ export const useCodeBlockEdit = (codeBlockService: Services['codeBlockService'])
16
16
  const createCodeBlock = async () => {
17
17
  codeConfig.value = {
18
18
  name: '',
19
- content: `({app, params, flowState}) => {\n // place your code here\n}`,
19
+ content: '({app, params, flowState}) => {\n // place your code here\n}',
20
20
  params: [],
21
21
  };
22
22
 
package/src/index.ts CHANGED
@@ -122,7 +122,6 @@ export default {
122
122
  app.use(formPlugin, opt || {});
123
123
  app.use(tablePlugin);
124
124
 
125
- // eslint-disable-next-line no-param-reassign
126
125
  app.config.globalProperties.$TMAGIC_EDITOR = option;
127
126
  setEditorConfig(option);
128
127