@tmagic/editor 1.2.0-beta.16 → 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
|
};
|
|
@@ -3163,17 +3172,16 @@
|
|
|
3163
3172
|
return (_ctx, _cache) => {
|
|
3164
3173
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
3165
3174
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
3166
|
-
|
|
3175
|
+
vue.createVNode(vue.unref(form.MForm), {
|
|
3167
3176
|
ref_key: "configForm",
|
|
3168
3177
|
ref: configForm,
|
|
3169
|
-
key: vue.unref(node)?.type,
|
|
3170
3178
|
class: vue.normalizeClass(`m-editor-props-panel ${vue.unref(propsPanelSize)}`),
|
|
3171
3179
|
"popper-class": `m-editor-props-panel-popper ${vue.unref(propsPanelSize)}`,
|
|
3172
3180
|
size: vue.unref(propsPanelSize),
|
|
3173
3181
|
"init-values": values.value,
|
|
3174
3182
|
config: curFormConfig.value,
|
|
3175
3183
|
onChange: submit
|
|
3176
|
-
}, null, 8, ["class", "popper-class", "size", "init-values", "config"])
|
|
3184
|
+
}, null, 8, ["class", "popper-class", "size", "init-values", "config"])
|
|
3177
3185
|
]);
|
|
3178
3186
|
};
|
|
3179
3187
|
}
|