@tmagic/editor 1.2.0-beta.17 → 1.2.0-beta.18
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('serialize-javascript'), require('lodash-es'), require('@tmagic/schema'), require('@element-plus/icons-vue'), require('@tmagic/design'), require('monaco-editor'), require('@tmagic/stage'), require('gesto'), require('@tmagic/utils'), require('events'), require('@tmagic/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'serialize-javascript', 'lodash-es', '@tmagic/schema', '@element-plus/icons-vue', '@tmagic/design', 'monaco-editor', '@tmagic/stage', 'gesto', '@tmagic/utils', 'events', '@tmagic/core', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.Vue, global.serialize, global.lodashEs, global.schema, global.iconsVue, global.design, global.monaco, global.StageCore, global.Gesto, global.utils, global.events, global.core, global.
|
|
5
|
-
})(this, (function (exports, vue, serialize, lodashEs, schema, iconsVue, design, monaco, StageCore, Gesto, utils, events, core,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('serialize-javascript'), require('lodash-es'), require('@tmagic/form'), require('@tmagic/schema'), require('@element-plus/icons-vue'), require('@tmagic/design'), require('monaco-editor'), require('@tmagic/stage'), require('gesto'), require('@tmagic/utils'), require('events'), require('@tmagic/core'), require('keycon')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'serialize-javascript', 'lodash-es', '@tmagic/form', '@tmagic/schema', '@element-plus/icons-vue', '@tmagic/design', 'monaco-editor', '@tmagic/stage', 'gesto', '@tmagic/utils', 'events', '@tmagic/core', 'keycon'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.Vue, global.serialize, global.lodashEs, global.form, global.schema, global.iconsVue, global.design, global.monaco, global.StageCore, global.Gesto, global.utils, global.events, global.core, global.KeyController));
|
|
5
|
+
})(this, (function (exports, vue, serialize, lodashEs, form, schema, iconsVue, design, monaco, StageCore, Gesto, utils, events, core, KeyController) { 'use strict';
|
|
6
6
|
|
|
7
7
|
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
8
8
|
|
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
setup(__props, { emit }) {
|
|
154
154
|
const props = __props;
|
|
155
155
|
const services = vue.inject("services");
|
|
156
|
+
const mForm = vue.inject("mForm");
|
|
156
157
|
const codeDsl = vue.computed(() => services?.codeBlockService.getCodeDslSync());
|
|
157
158
|
const tableConfig = vue.computed(() => {
|
|
158
159
|
const defaultConfig = {
|
|
@@ -183,7 +184,15 @@
|
|
|
183
184
|
name: "params",
|
|
184
185
|
label: "\u53C2\u6570",
|
|
185
186
|
defaultValue: {},
|
|
186
|
-
itemsFunction: (row) =>
|
|
187
|
+
itemsFunction: (row) => {
|
|
188
|
+
const paramsConfig = getParamsConfig(row.codeId);
|
|
189
|
+
if (!row.params)
|
|
190
|
+
row.params = {};
|
|
191
|
+
if (lodashEs.isEmpty(row.params)) {
|
|
192
|
+
form.createValues(mForm, paramsConfig, {}, row.params);
|
|
193
|
+
}
|
|
194
|
+
return paramsConfig;
|
|
195
|
+
}
|
|
187
196
|
}
|
|
188
197
|
]
|
|
189
198
|
};
|