@tmagic/editor 1.8.0-beta.12 → 1.8.0-beta.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.
- package/dist/es/Editor.vue_vue_type_script_setup_true_lang.js +15 -3
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +13 -121
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +11 -4
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +7 -2
- package/dist/es/components/ViewForm.js +5 -0
- package/dist/es/components/ViewForm.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +80 -55
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +4 -1
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +99 -64
- package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/Center.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +50 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +50 -0
- package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +6 -6
- package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +5 -2
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +28 -5
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +31 -5
- package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +10 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +10 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +10 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +10 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +16 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +18 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +18 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +36 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +32 -2
- package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +47 -25
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/hooks/use-compare-form.js +119 -0
- package/dist/es/icons/DatasourceIcon.js +17 -0
- package/dist/es/index.js +6 -4
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +14 -10
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +10 -1
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/plugin.js +2 -1
- package/dist/es/services/codeBlock.js +1 -1
- package/dist/es/services/editor.js +54 -13
- package/dist/es/services/history.js +1 -1
- package/dist/es/services/props.js +1 -1
- package/dist/es/services/storage.js +1 -1
- package/dist/es/services/ui.js +5 -3
- package/dist/es/style.css +303 -40
- package/dist/es/utils/config.js +4 -1
- package/dist/es/utils/const.js +2 -2
- package/dist/es/utils/props.js +69 -30
- package/dist/style.css +303 -40
- package/dist/themes/magic-admin.css +3000 -0
- package/dist/tmagic-editor.umd.cjs +1748 -1079
- package/package.json +7 -7
- package/src/Editor.vue +22 -1
- package/src/components/CompareForm.vue +15 -202
- package/src/components/ContentMenu.vue +10 -2
- package/src/components/FloatingBox.vue +8 -2
- package/src/components/ViewForm.vue +55 -0
- package/src/editorProps.ts +4 -0
- package/src/fields/CodeSelect.vue +54 -43
- package/src/fields/CodeSelectCol.vue +1 -0
- package/src/fields/DataSourceFieldSelect/Index.vue +14 -5
- package/src/fields/DisplayConds.vue +4 -1
- package/src/fields/EventSelect.vue +56 -32
- package/src/fields/StyleSetter/Index.vue +1 -4
- package/src/fields/StyleSetter/components/Border.vue +1 -1
- package/src/fields/StyleSetter/icons/align-items/Center.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/FlexEnd.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/FlexStart.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/SpaceAround.vue +34 -0
- package/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue +34 -0
- package/src/fields/StyleSetter/icons/align-items/index.ts +5 -0
- package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +20 -4
- package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +10 -28
- package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +4 -5
- package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +4 -5
- package/src/fields/StyleSetter/icons/flex-direction/Column.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/Row.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +4 -3
- package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -2
- package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +15 -2
- package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +15 -2
- package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +28 -3
- package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +28 -2
- package/src/fields/StyleSetter/pro/Background.vue +7 -2
- package/src/fields/StyleSetter/pro/Font.vue +3 -3
- package/src/fields/StyleSetter/pro/Layout.vue +98 -28
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-compare-form.ts +187 -0
- package/src/icons/DatasourceIcon.vue +7 -0
- package/src/index.ts +4 -0
- package/src/layouts/Framework.vue +7 -1
- package/src/layouts/props-panel/PropsPanel.vue +19 -1
- package/src/layouts/sidebar/Sidebar.vue +3 -3
- package/src/plugin.ts +3 -2
- package/src/services/editor.ts +54 -11
- package/src/services/ui.ts +20 -5
- package/src/theme/code-block.scss +37 -0
- package/src/theme/common/var.scss +1 -1
- package/src/theme/component-list-panel.scss +2 -2
- package/src/theme/data-source-field.scss +4 -0
- package/src/theme/display-conds.scss +11 -0
- package/src/theme/event.scss +58 -4
- package/src/theme/framework.scss +4 -1
- package/src/theme/history-list-panel.scss +9 -9
- package/src/theme/nav-menu.scss +5 -1
- package/src/theme/props-panel.scss +2 -1
- package/src/theme/style-setter/border.scss +14 -5
- package/src/theme/theme.scss +1 -0
- package/src/theme/themes/magic-admin/index.scss +214 -0
- package/src/theme/ui-select.scss +1 -1
- package/src/type.ts +79 -6
- package/src/utils/config.ts +9 -1
- package/src/utils/const.ts +3 -2
- package/src/utils/props.ts +51 -9
- package/types/index.d.ts +314 -203
|
@@ -5052,6 +5052,561 @@
|
|
|
5052
5052
|
};
|
|
5053
5053
|
};
|
|
5054
5054
|
//#endregion
|
|
5055
|
+
//#region packages/editor/src/utils/config.ts
|
|
5056
|
+
var $TMAGIC_EDITOR, isGlobalFlat, setEditorConfig, getEditorConfig;
|
|
5057
|
+
var init_config = __esmMin((() => {
|
|
5058
|
+
$TMAGIC_EDITOR = {};
|
|
5059
|
+
isGlobalFlat = (0, vue.ref)(false);
|
|
5060
|
+
setEditorConfig = (option) => {
|
|
5061
|
+
$TMAGIC_EDITOR = option;
|
|
5062
|
+
isGlobalFlat.value = option.flat ?? false;
|
|
5063
|
+
};
|
|
5064
|
+
getEditorConfig = (key) => $TMAGIC_EDITOR[key];
|
|
5065
|
+
}));
|
|
5066
|
+
//#endregion
|
|
5067
|
+
//#region packages/editor/src/utils/code-block.ts
|
|
5068
|
+
var defaultParamColConfig, getCodeBlockFormConfig;
|
|
5069
|
+
var init_code_block = __esmMin((() => {
|
|
5070
|
+
init_config();
|
|
5071
|
+
defaultParamColConfig = () => (0, _tmagic_form.defineFormItem)({
|
|
5072
|
+
type: "row",
|
|
5073
|
+
label: "参数类型",
|
|
5074
|
+
items: [{
|
|
5075
|
+
text: "参数类型",
|
|
5076
|
+
labelWidth: "70px",
|
|
5077
|
+
type: "select",
|
|
5078
|
+
name: "type",
|
|
5079
|
+
options: [
|
|
5080
|
+
{
|
|
5081
|
+
text: "数字",
|
|
5082
|
+
label: "数字",
|
|
5083
|
+
value: "number"
|
|
5084
|
+
},
|
|
5085
|
+
{
|
|
5086
|
+
text: "字符串",
|
|
5087
|
+
label: "字符串",
|
|
5088
|
+
value: "text"
|
|
5089
|
+
},
|
|
5090
|
+
{
|
|
5091
|
+
text: "组件",
|
|
5092
|
+
label: "组件",
|
|
5093
|
+
value: "ui-select"
|
|
5094
|
+
}
|
|
5095
|
+
]
|
|
5096
|
+
}]
|
|
5097
|
+
});
|
|
5098
|
+
getCodeBlockFormConfig = (options = {}) => {
|
|
5099
|
+
const { paramColConfig, isDataSource, dataSourceType, codeOptions = {}, editable = true } = options;
|
|
5100
|
+
return (0, _tmagic_form.defineFormConfig)([
|
|
5101
|
+
{
|
|
5102
|
+
text: "名称",
|
|
5103
|
+
name: "name",
|
|
5104
|
+
...editable ? { rules: [{
|
|
5105
|
+
required: true,
|
|
5106
|
+
message: "请输入名称",
|
|
5107
|
+
trigger: "blur"
|
|
5108
|
+
}] } : {}
|
|
5109
|
+
},
|
|
5110
|
+
{
|
|
5111
|
+
text: "描述",
|
|
5112
|
+
name: "desc"
|
|
5113
|
+
},
|
|
5114
|
+
{
|
|
5115
|
+
text: "执行时机",
|
|
5116
|
+
name: "timing",
|
|
5117
|
+
type: "select",
|
|
5118
|
+
options: () => {
|
|
5119
|
+
const list = [{
|
|
5120
|
+
text: "初始化前",
|
|
5121
|
+
value: "beforeInit"
|
|
5122
|
+
}, {
|
|
5123
|
+
text: "初始化后",
|
|
5124
|
+
value: "afterInit"
|
|
5125
|
+
}];
|
|
5126
|
+
if (dataSourceType?.() !== "base") {
|
|
5127
|
+
list.push({
|
|
5128
|
+
text: "请求前",
|
|
5129
|
+
value: "beforeRequest"
|
|
5130
|
+
});
|
|
5131
|
+
list.push({
|
|
5132
|
+
text: "请求后",
|
|
5133
|
+
value: "afterRequest"
|
|
5134
|
+
});
|
|
5135
|
+
}
|
|
5136
|
+
return list;
|
|
5137
|
+
},
|
|
5138
|
+
display: () => Boolean(isDataSource?.())
|
|
5139
|
+
},
|
|
5140
|
+
{
|
|
5141
|
+
type: "table",
|
|
5142
|
+
border: true,
|
|
5143
|
+
text: "参数",
|
|
5144
|
+
enableFullscreen: false,
|
|
5145
|
+
enableToggleMode: false,
|
|
5146
|
+
name: "params",
|
|
5147
|
+
dropSort: false,
|
|
5148
|
+
items: [
|
|
5149
|
+
{
|
|
5150
|
+
type: "text",
|
|
5151
|
+
label: "参数名",
|
|
5152
|
+
name: "name"
|
|
5153
|
+
},
|
|
5154
|
+
{
|
|
5155
|
+
type: "text",
|
|
5156
|
+
label: "描述",
|
|
5157
|
+
name: "extra"
|
|
5158
|
+
},
|
|
5159
|
+
paramColConfig || defaultParamColConfig()
|
|
5160
|
+
]
|
|
5161
|
+
},
|
|
5162
|
+
{
|
|
5163
|
+
name: "content",
|
|
5164
|
+
type: "vs-code",
|
|
5165
|
+
options: codeOptions,
|
|
5166
|
+
autosize: {
|
|
5167
|
+
minRows: 10,
|
|
5168
|
+
maxRows: 30
|
|
5169
|
+
},
|
|
5170
|
+
...editable ? { onChange: (_formState, code) => {
|
|
5171
|
+
try {
|
|
5172
|
+
getEditorConfig("parseDSL")(code);
|
|
5173
|
+
return code;
|
|
5174
|
+
} catch (error) {
|
|
5175
|
+
_tmagic_design.tMagicMessage.error(error.message);
|
|
5176
|
+
throw error;
|
|
5177
|
+
}
|
|
5178
|
+
} } : {}
|
|
5179
|
+
}
|
|
5180
|
+
]);
|
|
5181
|
+
};
|
|
5182
|
+
}));
|
|
5183
|
+
//#endregion
|
|
5184
|
+
//#region packages/editor/src/utils/props.ts
|
|
5185
|
+
var arrayOptions, eqOptions, numberOptions, booleanOptions, getCondOpOptionsByFieldType, styleTabConfig, eventTabConfig, advancedTabConfig, displayTabConfig, fillConfig, removeStyleDisplayConfig, validatePropsForm;
|
|
5186
|
+
var init_props = __esmMin((() => {
|
|
5187
|
+
arrayOptions = [{
|
|
5188
|
+
text: "包含",
|
|
5189
|
+
value: "include"
|
|
5190
|
+
}, {
|
|
5191
|
+
text: "不包含",
|
|
5192
|
+
value: "not_include"
|
|
5193
|
+
}];
|
|
5194
|
+
eqOptions = [{
|
|
5195
|
+
text: "等于",
|
|
5196
|
+
value: "="
|
|
5197
|
+
}, {
|
|
5198
|
+
text: "不等于",
|
|
5199
|
+
value: "!="
|
|
5200
|
+
}];
|
|
5201
|
+
numberOptions = [
|
|
5202
|
+
{
|
|
5203
|
+
text: "大于",
|
|
5204
|
+
value: ">"
|
|
5205
|
+
},
|
|
5206
|
+
{
|
|
5207
|
+
text: "大于等于",
|
|
5208
|
+
value: ">="
|
|
5209
|
+
},
|
|
5210
|
+
{
|
|
5211
|
+
text: "小于",
|
|
5212
|
+
value: "<"
|
|
5213
|
+
},
|
|
5214
|
+
{
|
|
5215
|
+
text: "小于等于",
|
|
5216
|
+
value: "<="
|
|
5217
|
+
},
|
|
5218
|
+
{
|
|
5219
|
+
text: "在范围内",
|
|
5220
|
+
value: "between"
|
|
5221
|
+
},
|
|
5222
|
+
{
|
|
5223
|
+
text: "不在范围内",
|
|
5224
|
+
value: "not_between"
|
|
5225
|
+
}
|
|
5226
|
+
];
|
|
5227
|
+
booleanOptions = [{
|
|
5228
|
+
text: "是",
|
|
5229
|
+
value: "is"
|
|
5230
|
+
}, {
|
|
5231
|
+
text: "不是",
|
|
5232
|
+
value: "not"
|
|
5233
|
+
}];
|
|
5234
|
+
getCondOpOptionsByFieldType = (type) => {
|
|
5235
|
+
if (type === "array") return arrayOptions;
|
|
5236
|
+
if (type === "boolean" || type === "null") return booleanOptions;
|
|
5237
|
+
if (type === "number") return [...eqOptions, ...numberOptions];
|
|
5238
|
+
if (type === "string") return [...arrayOptions, ...eqOptions];
|
|
5239
|
+
return [
|
|
5240
|
+
...arrayOptions,
|
|
5241
|
+
...eqOptions,
|
|
5242
|
+
...numberOptions
|
|
5243
|
+
];
|
|
5244
|
+
};
|
|
5245
|
+
styleTabConfig = {
|
|
5246
|
+
title: "样式",
|
|
5247
|
+
lazy: true,
|
|
5248
|
+
display: ({ services }) => !(services?.uiService?.get("showStylePanel") ?? true),
|
|
5249
|
+
items: [{
|
|
5250
|
+
name: "style",
|
|
5251
|
+
labelWidth: "100px",
|
|
5252
|
+
type: "style-setter",
|
|
5253
|
+
items: [{ names: [
|
|
5254
|
+
"display",
|
|
5255
|
+
"flexDirection",
|
|
5256
|
+
"justifyContent",
|
|
5257
|
+
"alignItems",
|
|
5258
|
+
"flexWrap",
|
|
5259
|
+
"marginTop",
|
|
5260
|
+
"marginRight",
|
|
5261
|
+
"marginBottom",
|
|
5262
|
+
"marginLeft",
|
|
5263
|
+
"paddingTop",
|
|
5264
|
+
"paddingRight",
|
|
5265
|
+
"paddingBottom",
|
|
5266
|
+
"paddingLeft",
|
|
5267
|
+
"width",
|
|
5268
|
+
"height",
|
|
5269
|
+
"overflow",
|
|
5270
|
+
"fontSize",
|
|
5271
|
+
"lineHeight",
|
|
5272
|
+
"fontWeight",
|
|
5273
|
+
"color",
|
|
5274
|
+
"textAlign",
|
|
5275
|
+
"backgroundColor",
|
|
5276
|
+
"backgroundImage",
|
|
5277
|
+
"backgroundSize",
|
|
5278
|
+
"backgroundPosition",
|
|
5279
|
+
"backgroundRepeat",
|
|
5280
|
+
"position",
|
|
5281
|
+
"zIndex",
|
|
5282
|
+
"top",
|
|
5283
|
+
"right",
|
|
5284
|
+
"bottom",
|
|
5285
|
+
"left",
|
|
5286
|
+
"borderRadius",
|
|
5287
|
+
"borderTopWidth",
|
|
5288
|
+
"borderTopStyle",
|
|
5289
|
+
"borderTopColor",
|
|
5290
|
+
"borderRightColor",
|
|
5291
|
+
"borderRightWidth",
|
|
5292
|
+
"borderRightStyle",
|
|
5293
|
+
"borderRightColor",
|
|
5294
|
+
"borderBottomWidth",
|
|
5295
|
+
"borderBottomStyle",
|
|
5296
|
+
"borderBottomColor",
|
|
5297
|
+
"borderLeftStyle",
|
|
5298
|
+
"borderLeftWidth",
|
|
5299
|
+
"borderLeftColor",
|
|
5300
|
+
"borderWidth",
|
|
5301
|
+
"borderStyle",
|
|
5302
|
+
"borderColor",
|
|
5303
|
+
"opacity"
|
|
5304
|
+
] }, {
|
|
5305
|
+
name: "transform",
|
|
5306
|
+
defaultValue: () => ({})
|
|
5307
|
+
}]
|
|
5308
|
+
}]
|
|
5309
|
+
};
|
|
5310
|
+
eventTabConfig = {
|
|
5311
|
+
title: "事件",
|
|
5312
|
+
lazy: true,
|
|
5313
|
+
items: [{
|
|
5314
|
+
name: "events",
|
|
5315
|
+
src: "component",
|
|
5316
|
+
labelWidth: "100px",
|
|
5317
|
+
type: "event-select",
|
|
5318
|
+
rules: [{ typeMatch: true }]
|
|
5319
|
+
}]
|
|
5320
|
+
};
|
|
5321
|
+
advancedTabConfig = {
|
|
5322
|
+
title: "高级",
|
|
5323
|
+
lazy: true,
|
|
5324
|
+
items: [
|
|
5325
|
+
{
|
|
5326
|
+
name: _tmagic_core.NODE_DISABLE_CODE_BLOCK_KEY,
|
|
5327
|
+
text: "禁用代码块",
|
|
5328
|
+
type: "switch",
|
|
5329
|
+
labelPosition: "left",
|
|
5330
|
+
defaultValue: false,
|
|
5331
|
+
extra: "开启后,配置的代码块将不会被执行"
|
|
5332
|
+
},
|
|
5333
|
+
{
|
|
5334
|
+
name: _tmagic_core.NODE_DISABLE_DATA_SOURCE_KEY,
|
|
5335
|
+
text: "禁用数据源",
|
|
5336
|
+
type: "switch",
|
|
5337
|
+
labelPosition: "left",
|
|
5338
|
+
defaultValue: false,
|
|
5339
|
+
extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
|
|
5340
|
+
},
|
|
5341
|
+
{
|
|
5342
|
+
name: "created",
|
|
5343
|
+
text: "Created",
|
|
5344
|
+
labelPosition: "top",
|
|
5345
|
+
type: "code-select",
|
|
5346
|
+
titleExtra: "组件初始化时执行",
|
|
5347
|
+
rules: [{
|
|
5348
|
+
typeMatch: true,
|
|
5349
|
+
trigger: "change"
|
|
5350
|
+
}, { validator: ({ value, callback }) => {
|
|
5351
|
+
if (value && value.hookType !== _tmagic_core.HookType.CODE) return callback("hookType 必须是 code");
|
|
5352
|
+
callback();
|
|
5353
|
+
} }]
|
|
5354
|
+
},
|
|
5355
|
+
{
|
|
5356
|
+
name: "mounted",
|
|
5357
|
+
text: "Mounted",
|
|
5358
|
+
labelPosition: "top",
|
|
5359
|
+
type: "code-select",
|
|
5360
|
+
titleExtra: "组件挂载到dom时执行",
|
|
5361
|
+
rules: [{
|
|
5362
|
+
typeMatch: true,
|
|
5363
|
+
trigger: "change"
|
|
5364
|
+
}, { validator: ({ value, callback }) => {
|
|
5365
|
+
if (value && value.hookType !== _tmagic_core.HookType.CODE) return callback("hookType 必须是 code");
|
|
5366
|
+
callback();
|
|
5367
|
+
} }]
|
|
5368
|
+
},
|
|
5369
|
+
{
|
|
5370
|
+
name: "display",
|
|
5371
|
+
text: "Display",
|
|
5372
|
+
titleExtra: "控制组件是否渲染,关系的代码块返回值为false时不渲染",
|
|
5373
|
+
labelPosition: "top",
|
|
5374
|
+
type: "code-select",
|
|
5375
|
+
rules: [{
|
|
5376
|
+
typeMatch: true,
|
|
5377
|
+
trigger: "change"
|
|
5378
|
+
}, { validator: ({ value, callback }) => {
|
|
5379
|
+
if (value && value.hookType !== _tmagic_core.HookType.CODE) return callback("hookType 必须是 code");
|
|
5380
|
+
callback();
|
|
5381
|
+
} }]
|
|
5382
|
+
}
|
|
5383
|
+
]
|
|
5384
|
+
};
|
|
5385
|
+
displayTabConfig = {
|
|
5386
|
+
title: "显示条件",
|
|
5387
|
+
display: (_state, { model }) => model.type !== "page",
|
|
5388
|
+
items: [
|
|
5389
|
+
{
|
|
5390
|
+
name: _tmagic_core.NODE_CONDS_RESULT_KEY,
|
|
5391
|
+
type: "select",
|
|
5392
|
+
text: "条件成立时",
|
|
5393
|
+
defaultValue: false,
|
|
5394
|
+
options: [{
|
|
5395
|
+
text: "显示",
|
|
5396
|
+
value: false
|
|
5397
|
+
}, {
|
|
5398
|
+
text: "隐藏",
|
|
5399
|
+
value: true
|
|
5400
|
+
}],
|
|
5401
|
+
extra: (_state, { model }) => `条件成立时${model[_tmagic_core.NODE_CONDS_RESULT_KEY] ? "隐藏" : "显示"},不成立时${model[_tmagic_core.NODE_CONDS_RESULT_KEY] ? "显示" : "隐藏"};<br />同一条件组内的所有条件配置同时成立时表示该条件组成立,任意一个条件组成立时表示条件成立(条件组内为且的关系,条件组间为或的关系);<br />条件为空时表示成立;`
|
|
5402
|
+
},
|
|
5403
|
+
{
|
|
5404
|
+
text: "条件组配置",
|
|
5405
|
+
static: true,
|
|
5406
|
+
className: "display-conds-title"
|
|
5407
|
+
},
|
|
5408
|
+
{
|
|
5409
|
+
type: "display-conds",
|
|
5410
|
+
name: _tmagic_core.NODE_CONDS_KEY,
|
|
5411
|
+
titlePrefix: "条件组",
|
|
5412
|
+
fixed: "right",
|
|
5413
|
+
operateColWidth: 112,
|
|
5414
|
+
defaultValue: [],
|
|
5415
|
+
rules: [{ typeMatch: true }]
|
|
5416
|
+
}
|
|
5417
|
+
]
|
|
5418
|
+
};
|
|
5419
|
+
fillConfig = (config = [], { labelWidth = "80px", disabledDataSource = false, disabledCodeBlock = false } = {}) => {
|
|
5420
|
+
const propsConfig = [];
|
|
5421
|
+
if (!config.find((item) => "name" in item && item.name === "type")) propsConfig.push({
|
|
5422
|
+
text: "type",
|
|
5423
|
+
name: "type",
|
|
5424
|
+
type: "hidden"
|
|
5425
|
+
});
|
|
5426
|
+
if (!config.find((item) => "name" in item && item.name === "id")) propsConfig.push({
|
|
5427
|
+
name: "id",
|
|
5428
|
+
text: "ID",
|
|
5429
|
+
type: "text",
|
|
5430
|
+
static: true,
|
|
5431
|
+
append: {
|
|
5432
|
+
type: "icon",
|
|
5433
|
+
text: "https://vip.image.video.qpic.cn/vupload/20260615/36cf7e1781493669935.svg",
|
|
5434
|
+
extra: "复制",
|
|
5435
|
+
handler: (vm, { model }) => {
|
|
5436
|
+
navigator.clipboard.writeText(`${model.id}`).then(() => {
|
|
5437
|
+
_tmagic_design.tMagicMessage.success("已复制");
|
|
5438
|
+
}).catch(() => {
|
|
5439
|
+
_tmagic_design.tMagicMessage.error("复制失败");
|
|
5440
|
+
});
|
|
5441
|
+
}
|
|
5442
|
+
}
|
|
5443
|
+
});
|
|
5444
|
+
if (!config.find((item) => "name" in item && item.name === "name")) propsConfig.push({
|
|
5445
|
+
name: "name",
|
|
5446
|
+
text: "组件名称"
|
|
5447
|
+
});
|
|
5448
|
+
const noCodeAdvancedTabItems = advancedTabConfig.items.filter((item) => "type" in item && item.type !== "code-select");
|
|
5449
|
+
if (noCodeAdvancedTabItems.length > 0 && disabledCodeBlock) advancedTabConfig.items = noCodeAdvancedTabItems;
|
|
5450
|
+
const tabConfig = {
|
|
5451
|
+
type: "tab",
|
|
5452
|
+
labelWidth,
|
|
5453
|
+
className: "magic-right-panel-tabs-top",
|
|
5454
|
+
items: [
|
|
5455
|
+
{
|
|
5456
|
+
title: "属性",
|
|
5457
|
+
items: [...propsConfig, ...config]
|
|
5458
|
+
},
|
|
5459
|
+
{ ...styleTabConfig },
|
|
5460
|
+
{ ...eventTabConfig }
|
|
5461
|
+
]
|
|
5462
|
+
};
|
|
5463
|
+
if (!disabledCodeBlock) tabConfig.items.push({ ...advancedTabConfig });
|
|
5464
|
+
else if (noCodeAdvancedTabItems.length > 0) tabConfig.items.push({ ...advancedTabConfig });
|
|
5465
|
+
if (!disabledDataSource) tabConfig.items.push({ ...displayTabConfig });
|
|
5466
|
+
return [tabConfig];
|
|
5467
|
+
};
|
|
5468
|
+
removeStyleDisplayConfig = (formConfig) => formConfig.map((item) => {
|
|
5469
|
+
if (!("type" in item)) return item;
|
|
5470
|
+
if (item?.type !== "tab" || !Array.isArray(item.items)) return item;
|
|
5471
|
+
return {
|
|
5472
|
+
...item,
|
|
5473
|
+
items: item.items.map((tabPane) => {
|
|
5474
|
+
if (tabPane?.title !== "样式" || !Array.isArray(tabPane.items)) return tabPane;
|
|
5475
|
+
return {
|
|
5476
|
+
...tabPane,
|
|
5477
|
+
display: true
|
|
5478
|
+
};
|
|
5479
|
+
})
|
|
5480
|
+
};
|
|
5481
|
+
});
|
|
5482
|
+
validatePropsForm = ({ config, values, appContext = null, services, stage, extendState, debug, typeMatchValid }) => (0, _tmagic_form.validateForm)({
|
|
5483
|
+
config,
|
|
5484
|
+
debug,
|
|
5485
|
+
typeMatchValid,
|
|
5486
|
+
initValues: values,
|
|
5487
|
+
appContext: appContext ? {
|
|
5488
|
+
...appContext,
|
|
5489
|
+
provides: { services }
|
|
5490
|
+
} : null,
|
|
5491
|
+
extendState: async (state) => ({
|
|
5492
|
+
...await extendState?.(state) || {},
|
|
5493
|
+
stage,
|
|
5494
|
+
services
|
|
5495
|
+
})
|
|
5496
|
+
});
|
|
5497
|
+
}));
|
|
5498
|
+
//#endregion
|
|
5499
|
+
//#region packages/editor/src/hooks/use-compare-form.ts
|
|
5500
|
+
var useCompareForm;
|
|
5501
|
+
var init_use_compare_form = __esmMin((() => {
|
|
5502
|
+
init_code_block();
|
|
5503
|
+
init_props();
|
|
5504
|
+
useCompareForm = (props) => {
|
|
5505
|
+
(0, vue.provide)("services", props.services);
|
|
5506
|
+
const config = (0, vue.ref)([]);
|
|
5507
|
+
/** vs-code 编辑器的 monaco 配置项,沿用 Editor 顶层 provide('codeOptions', ...) 的注入。 */
|
|
5508
|
+
const codeOptions = (0, vue.inject)("codeOptions", {});
|
|
5509
|
+
/** 将代码块的 content 字段统一成字符串,便于在表单 / 对比中展示 */
|
|
5510
|
+
const normalizeCodeBlockValue = (v) => {
|
|
5511
|
+
if (!v) return {};
|
|
5512
|
+
const next = { ...v };
|
|
5513
|
+
if (next.content && typeof next.content !== "string") try {
|
|
5514
|
+
next.content = next.content.toString();
|
|
5515
|
+
} catch {
|
|
5516
|
+
next.content = "";
|
|
5517
|
+
}
|
|
5518
|
+
return next;
|
|
5519
|
+
};
|
|
5520
|
+
const currentValues = (0, vue.computed)(() => {
|
|
5521
|
+
if (props.category === "code-block") return normalizeCodeBlockValue(props.value);
|
|
5522
|
+
return props.value || {};
|
|
5523
|
+
});
|
|
5524
|
+
/**
|
|
5525
|
+
* 外层包裹层的样式:当传入 `height` 时启用固定高度 + 内部滚动,
|
|
5526
|
+
* 这样滚动条会出现在组件内部,避免父容器(如 Dialog)自身也产生滚动。
|
|
5527
|
+
*/
|
|
5528
|
+
const wrapperStyle = (0, vue.computed)(() => {
|
|
5529
|
+
if (!props.height) return void 0;
|
|
5530
|
+
return {
|
|
5531
|
+
height: props.height,
|
|
5532
|
+
overflow: "auto"
|
|
5533
|
+
};
|
|
5534
|
+
});
|
|
5535
|
+
const mergedExtendState = (state) => {
|
|
5536
|
+
return (props.extendState ?? ((s) => s))(props.baseFormState || state);
|
|
5537
|
+
};
|
|
5538
|
+
/**
|
|
5539
|
+
* 内置的默认 FormConfig 加载逻辑:按 `category` 从对应 service / 工具取配置。
|
|
5540
|
+
* 作为 ctx.defaultLoadConfig 透传给自定义 `loadConfig`,方便复用与二次加工。
|
|
5541
|
+
*/
|
|
5542
|
+
const defaultLoadConfig = async () => {
|
|
5543
|
+
if (!props.services) return [];
|
|
5544
|
+
switch (props.category) {
|
|
5545
|
+
case "node":
|
|
5546
|
+
if (!props.type) return [];
|
|
5547
|
+
return removeStyleDisplayConfig(await props.services.propsService.getPropsConfig(props.type, { node: props.value }));
|
|
5548
|
+
case "data-source": return props.services.dataSourceService.getFormConfig(props.type || "base").map((item) => "type" in item && item.type === "tab" ? {
|
|
5549
|
+
...item,
|
|
5550
|
+
active: "fields"
|
|
5551
|
+
} : item);
|
|
5552
|
+
case "code-block": return getCodeBlockFormConfig({
|
|
5553
|
+
paramColConfig: props.services.codeBlockService.getParamsColConfig(),
|
|
5554
|
+
isDataSource: () => Boolean(props.dataSourceType),
|
|
5555
|
+
dataSourceType: () => props.dataSourceType,
|
|
5556
|
+
codeOptions,
|
|
5557
|
+
editable: false
|
|
5558
|
+
});
|
|
5559
|
+
default: return [];
|
|
5560
|
+
}
|
|
5561
|
+
};
|
|
5562
|
+
const loadConfig = async () => {
|
|
5563
|
+
if (props.loadConfig) {
|
|
5564
|
+
config.value = await props.loadConfig({
|
|
5565
|
+
category: props.category,
|
|
5566
|
+
type: props.type,
|
|
5567
|
+
dataSourceType: props.dataSourceType,
|
|
5568
|
+
defaultLoadConfig
|
|
5569
|
+
});
|
|
5570
|
+
return;
|
|
5571
|
+
}
|
|
5572
|
+
config.value = await defaultLoadConfig();
|
|
5573
|
+
};
|
|
5574
|
+
(0, vue.watch)([
|
|
5575
|
+
() => props.category,
|
|
5576
|
+
() => props.type,
|
|
5577
|
+
() => props.dataSourceType,
|
|
5578
|
+
() => props.loadConfig
|
|
5579
|
+
], () => {
|
|
5580
|
+
loadConfig();
|
|
5581
|
+
}, { immediate: true });
|
|
5582
|
+
const formRef = (0, vue.useTemplateRef)("form");
|
|
5583
|
+
/**
|
|
5584
|
+
* 把 services / stage 注入 MForm 的 formState,避免 propsService 注入的表单配置中
|
|
5585
|
+
* 形如 `display: ({ services }) => services.uiService.get(...)` 的 filterFunction
|
|
5586
|
+
* 在执行时拿不到 `formState.services` 而报错。
|
|
5587
|
+
*
|
|
5588
|
+
* 与 props-panel/FormPanel.vue 中的注入方式保持一致:
|
|
5589
|
+
* - services:整个 useServices() 返回的服务集合;
|
|
5590
|
+
* - stage:当前 editorService.get('stage') 的最新值。
|
|
5591
|
+
*/
|
|
5592
|
+
(0, vue.watchEffect)(() => {
|
|
5593
|
+
if (formRef.value && props.services) {
|
|
5594
|
+
formRef.value.formState.stage = props.services.editorService.get("stage");
|
|
5595
|
+
formRef.value.formState.services = props.services;
|
|
5596
|
+
}
|
|
5597
|
+
});
|
|
5598
|
+
return {
|
|
5599
|
+
config,
|
|
5600
|
+
currentValues,
|
|
5601
|
+
wrapperStyle,
|
|
5602
|
+
mergedExtendState,
|
|
5603
|
+
loadConfig,
|
|
5604
|
+
formRef,
|
|
5605
|
+
normalizeCodeBlockValue
|
|
5606
|
+
};
|
|
5607
|
+
};
|
|
5608
|
+
}));
|
|
5609
|
+
//#endregion
|
|
5055
5610
|
//#region packages/editor/src/services/BaseService.ts
|
|
5056
5611
|
var methodName = (prefix, name) => `${prefix}${name[0].toUpperCase()}${name.substring(1)}`;
|
|
5057
5612
|
var isError = (error) => Object.prototype.toString.call(error) === "[object Error]";
|
|
@@ -5140,347 +5695,30 @@
|
|
|
5140
5695
|
return promise;
|
|
5141
5696
|
} : (...args) => doAction(args, scope, sourceMethod, beforeMethodName, afterMethodName) });
|
|
5142
5697
|
});
|
|
5143
|
-
}
|
|
5144
|
-
usePlugin(options) {
|
|
5145
|
-
for (const [methodName, method] of Object.entries(options)) if (typeof method === "function" && !this.pluginOptionsList[methodName].includes(method)) this.pluginOptionsList[methodName].push(method);
|
|
5146
|
-
}
|
|
5147
|
-
removePlugin(options) {
|
|
5148
|
-
for (const [methodName, method] of Object.entries(options)) if (Array.isArray(this.pluginOptionsList[methodName])) this.pluginOptionsList[methodName] = this.pluginOptionsList[methodName].filter((item) => item !== method);
|
|
5149
|
-
}
|
|
5150
|
-
removeAllPlugins() {
|
|
5151
|
-
for (const key of Object.keys(this.pluginOptionsList)) this.pluginOptionsList[key] = [];
|
|
5152
|
-
}
|
|
5153
|
-
async doTask() {
|
|
5154
|
-
this.doingTask = true;
|
|
5155
|
-
let task = this.taskList.shift();
|
|
5156
|
-
while (task) {
|
|
5157
|
-
await task();
|
|
5158
|
-
task = this.taskList.shift();
|
|
5159
|
-
}
|
|
5160
|
-
this.doingTask = false;
|
|
5161
|
-
}
|
|
5162
|
-
};
|
|
5163
|
-
//#endregion
|
|
5164
|
-
//#region packages/editor/src/utils/props.ts
|
|
5165
|
-
var arrayOptions = [{
|
|
5166
|
-
text: "包含",
|
|
5167
|
-
value: "include"
|
|
5168
|
-
}, {
|
|
5169
|
-
text: "不包含",
|
|
5170
|
-
value: "not_include"
|
|
5171
|
-
}];
|
|
5172
|
-
var eqOptions = [{
|
|
5173
|
-
text: "等于",
|
|
5174
|
-
value: "="
|
|
5175
|
-
}, {
|
|
5176
|
-
text: "不等于",
|
|
5177
|
-
value: "!="
|
|
5178
|
-
}];
|
|
5179
|
-
var numberOptions = [
|
|
5180
|
-
{
|
|
5181
|
-
text: "大于",
|
|
5182
|
-
value: ">"
|
|
5183
|
-
},
|
|
5184
|
-
{
|
|
5185
|
-
text: "大于等于",
|
|
5186
|
-
value: ">="
|
|
5187
|
-
},
|
|
5188
|
-
{
|
|
5189
|
-
text: "小于",
|
|
5190
|
-
value: "<"
|
|
5191
|
-
},
|
|
5192
|
-
{
|
|
5193
|
-
text: "小于等于",
|
|
5194
|
-
value: "<="
|
|
5195
|
-
},
|
|
5196
|
-
{
|
|
5197
|
-
text: "在范围内",
|
|
5198
|
-
value: "between"
|
|
5199
|
-
},
|
|
5200
|
-
{
|
|
5201
|
-
text: "不在范围内",
|
|
5202
|
-
value: "not_between"
|
|
5203
|
-
}
|
|
5204
|
-
];
|
|
5205
|
-
var booleanOptions = [{
|
|
5206
|
-
text: "是",
|
|
5207
|
-
value: "is"
|
|
5208
|
-
}, {
|
|
5209
|
-
text: "不是",
|
|
5210
|
-
value: "not"
|
|
5211
|
-
}];
|
|
5212
|
-
/** 按字段类型返回条件运算符选项(UI 与 typeMatch 校验共用) */
|
|
5213
|
-
var getCondOpOptionsByFieldType = (type) => {
|
|
5214
|
-
if (type === "array") return arrayOptions;
|
|
5215
|
-
if (type === "boolean" || type === "null") return booleanOptions;
|
|
5216
|
-
if (type === "number") return [...eqOptions, ...numberOptions];
|
|
5217
|
-
if (type === "string") return [...arrayOptions, ...eqOptions];
|
|
5218
|
-
return [
|
|
5219
|
-
...arrayOptions,
|
|
5220
|
-
...eqOptions,
|
|
5221
|
-
...numberOptions
|
|
5222
|
-
];
|
|
5223
|
-
};
|
|
5224
|
-
var styleTabConfig = {
|
|
5225
|
-
title: "样式",
|
|
5226
|
-
lazy: true,
|
|
5227
|
-
display: ({ services }) => !(services?.uiService?.get("showStylePanel") ?? true),
|
|
5228
|
-
items: [{
|
|
5229
|
-
name: "style",
|
|
5230
|
-
labelWidth: "100px",
|
|
5231
|
-
type: "style-setter",
|
|
5232
|
-
items: [{ names: [
|
|
5233
|
-
"display",
|
|
5234
|
-
"flexDirection",
|
|
5235
|
-
"justifyContent",
|
|
5236
|
-
"alignItems",
|
|
5237
|
-
"flexWrap",
|
|
5238
|
-
"marginTop",
|
|
5239
|
-
"marginRight",
|
|
5240
|
-
"marginBottom",
|
|
5241
|
-
"marginLeft",
|
|
5242
|
-
"paddingTop",
|
|
5243
|
-
"paddingRight",
|
|
5244
|
-
"paddingBottom",
|
|
5245
|
-
"paddingLeft",
|
|
5246
|
-
"width",
|
|
5247
|
-
"height",
|
|
5248
|
-
"overflow",
|
|
5249
|
-
"fontSize",
|
|
5250
|
-
"lineHeight",
|
|
5251
|
-
"fontWeight",
|
|
5252
|
-
"color",
|
|
5253
|
-
"textAlign",
|
|
5254
|
-
"backgroundColor",
|
|
5255
|
-
"backgroundImage",
|
|
5256
|
-
"backgroundSize",
|
|
5257
|
-
"backgroundPosition",
|
|
5258
|
-
"backgroundRepeat",
|
|
5259
|
-
"position",
|
|
5260
|
-
"zIndex",
|
|
5261
|
-
"top",
|
|
5262
|
-
"right",
|
|
5263
|
-
"bottom",
|
|
5264
|
-
"left",
|
|
5265
|
-
"borderRadius",
|
|
5266
|
-
"borderTopWidth",
|
|
5267
|
-
"borderTopStyle",
|
|
5268
|
-
"borderTopColor",
|
|
5269
|
-
"borderRightColor",
|
|
5270
|
-
"borderRightWidth",
|
|
5271
|
-
"borderRightStyle",
|
|
5272
|
-
"borderRightColor",
|
|
5273
|
-
"borderBottomWidth",
|
|
5274
|
-
"borderBottomStyle",
|
|
5275
|
-
"borderBottomColor",
|
|
5276
|
-
"borderLeftStyle",
|
|
5277
|
-
"borderLeftWidth",
|
|
5278
|
-
"borderLeftColor",
|
|
5279
|
-
"borderWidth",
|
|
5280
|
-
"borderStyle",
|
|
5281
|
-
"borderColor",
|
|
5282
|
-
"opacity"
|
|
5283
|
-
] }, {
|
|
5284
|
-
name: "transform",
|
|
5285
|
-
defaultValue: () => ({})
|
|
5286
|
-
}]
|
|
5287
|
-
}]
|
|
5288
|
-
};
|
|
5289
|
-
var eventTabConfig = {
|
|
5290
|
-
title: "事件",
|
|
5291
|
-
lazy: true,
|
|
5292
|
-
items: [{
|
|
5293
|
-
name: "events",
|
|
5294
|
-
src: "component",
|
|
5295
|
-
labelWidth: "100px",
|
|
5296
|
-
type: "event-select",
|
|
5297
|
-
rules: [{ typeMatch: true }]
|
|
5298
|
-
}]
|
|
5299
|
-
};
|
|
5300
|
-
var advancedTabConfig = {
|
|
5301
|
-
title: "高级",
|
|
5302
|
-
lazy: true,
|
|
5303
|
-
items: [
|
|
5304
|
-
{
|
|
5305
|
-
name: _tmagic_core.NODE_DISABLE_CODE_BLOCK_KEY,
|
|
5306
|
-
text: "禁用代码块",
|
|
5307
|
-
type: "switch",
|
|
5308
|
-
defaultValue: false,
|
|
5309
|
-
extra: "开启后,配置的代码块将不会被执行"
|
|
5310
|
-
},
|
|
5311
|
-
{
|
|
5312
|
-
name: _tmagic_core.NODE_DISABLE_DATA_SOURCE_KEY,
|
|
5313
|
-
text: "禁用数据源",
|
|
5314
|
-
type: "switch",
|
|
5315
|
-
defaultValue: false,
|
|
5316
|
-
extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
|
|
5317
|
-
},
|
|
5318
|
-
{
|
|
5319
|
-
name: "created",
|
|
5320
|
-
text: "created",
|
|
5321
|
-
labelPosition: "top",
|
|
5322
|
-
type: "code-select",
|
|
5323
|
-
extra: "组件初始化时执行",
|
|
5324
|
-
rules: [{
|
|
5325
|
-
typeMatch: true,
|
|
5326
|
-
trigger: "change"
|
|
5327
|
-
}, { validator: ({ value, callback }) => {
|
|
5328
|
-
if (value && value.hookType !== _tmagic_core.HookType.CODE) return callback("hookType 必须是 code");
|
|
5329
|
-
callback();
|
|
5330
|
-
} }]
|
|
5331
|
-
},
|
|
5332
|
-
{
|
|
5333
|
-
name: "mounted",
|
|
5334
|
-
text: "mounted",
|
|
5335
|
-
labelPosition: "top",
|
|
5336
|
-
type: "code-select",
|
|
5337
|
-
extra: "组件挂载到dom时执行",
|
|
5338
|
-
rules: [{
|
|
5339
|
-
typeMatch: true,
|
|
5340
|
-
trigger: "change"
|
|
5341
|
-
}, { validator: ({ value, callback }) => {
|
|
5342
|
-
if (value && value.hookType !== _tmagic_core.HookType.CODE) return callback("hookType 必须是 code");
|
|
5343
|
-
callback();
|
|
5344
|
-
} }]
|
|
5345
|
-
},
|
|
5346
|
-
{
|
|
5347
|
-
name: "display",
|
|
5348
|
-
text: "display",
|
|
5349
|
-
extra: "控制组件是否渲染,关系的代码块返回值为false时不渲染",
|
|
5350
|
-
labelPosition: "top",
|
|
5351
|
-
type: "code-select",
|
|
5352
|
-
rules: [{
|
|
5353
|
-
typeMatch: true,
|
|
5354
|
-
trigger: "change"
|
|
5355
|
-
}, { validator: ({ value, callback }) => {
|
|
5356
|
-
if (value && value.hookType !== _tmagic_core.HookType.CODE) return callback("hookType 必须是 code");
|
|
5357
|
-
callback();
|
|
5358
|
-
} }]
|
|
5359
|
-
}
|
|
5360
|
-
]
|
|
5361
|
-
};
|
|
5362
|
-
var displayTabConfig = {
|
|
5363
|
-
title: "显示条件",
|
|
5364
|
-
display: (_state, { model }) => model.type !== "page",
|
|
5365
|
-
items: [{
|
|
5366
|
-
name: _tmagic_core.NODE_CONDS_RESULT_KEY,
|
|
5367
|
-
type: "select",
|
|
5368
|
-
text: "条件成立时",
|
|
5369
|
-
defaultValue: false,
|
|
5370
|
-
options: [{
|
|
5371
|
-
text: "显示",
|
|
5372
|
-
value: false
|
|
5373
|
-
}, {
|
|
5374
|
-
text: "隐藏",
|
|
5375
|
-
value: true
|
|
5376
|
-
}],
|
|
5377
|
-
extra: (_state, { model }) => `条件成立时${model[_tmagic_core.NODE_CONDS_RESULT_KEY] ? "隐藏" : "显示"},不成立时${model[_tmagic_core.NODE_CONDS_RESULT_KEY] ? "显示" : "隐藏"};<br />同一条件组内的所有条件配置同时成立时表示该条件组成立,任意一个条件组成立时表示条件成立(条件组内为且的关系,条件组间为或的关系);<br />条件为空时表示成立;`
|
|
5378
|
-
}, {
|
|
5379
|
-
type: "display-conds",
|
|
5380
|
-
name: _tmagic_core.NODE_CONDS_KEY,
|
|
5381
|
-
titlePrefix: "条件组",
|
|
5382
|
-
defaultValue: [],
|
|
5383
|
-
rules: [{ typeMatch: true }]
|
|
5384
|
-
}]
|
|
5385
|
-
};
|
|
5386
|
-
/**
|
|
5387
|
-
* 统一为组件属性表单加上事件、高级、样式配置
|
|
5388
|
-
* @param config 组件属性配置
|
|
5389
|
-
* @returns Object
|
|
5390
|
-
*/
|
|
5391
|
-
var fillConfig = (config = [], { labelWidth = "80px", disabledDataSource = false, disabledCodeBlock = false } = {}) => {
|
|
5392
|
-
const propsConfig = [];
|
|
5393
|
-
if (!config.find((item) => "name" in item && item.name === "type")) propsConfig.push({
|
|
5394
|
-
text: "type",
|
|
5395
|
-
name: "type",
|
|
5396
|
-
type: "hidden"
|
|
5397
|
-
});
|
|
5398
|
-
if (!config.find((item) => "name" in item && item.name === "id")) propsConfig.push({
|
|
5399
|
-
name: "id",
|
|
5400
|
-
text: "ID",
|
|
5401
|
-
type: "text",
|
|
5402
|
-
disabled: true,
|
|
5403
|
-
append: {
|
|
5404
|
-
type: "button",
|
|
5405
|
-
text: "复制",
|
|
5406
|
-
handler: (vm, { model }) => {
|
|
5407
|
-
navigator.clipboard.writeText(`${model.id}`).then(() => {
|
|
5408
|
-
_tmagic_design.tMagicMessage.success("已复制");
|
|
5409
|
-
}).catch(() => {
|
|
5410
|
-
_tmagic_design.tMagicMessage.error("复制失败");
|
|
5411
|
-
});
|
|
5412
|
-
}
|
|
5698
|
+
}
|
|
5699
|
+
usePlugin(options) {
|
|
5700
|
+
for (const [methodName, method] of Object.entries(options)) if (typeof method === "function" && !this.pluginOptionsList[methodName].includes(method)) this.pluginOptionsList[methodName].push(method);
|
|
5701
|
+
}
|
|
5702
|
+
removePlugin(options) {
|
|
5703
|
+
for (const [methodName, method] of Object.entries(options)) if (Array.isArray(this.pluginOptionsList[methodName])) this.pluginOptionsList[methodName] = this.pluginOptionsList[methodName].filter((item) => item !== method);
|
|
5704
|
+
}
|
|
5705
|
+
removeAllPlugins() {
|
|
5706
|
+
for (const key of Object.keys(this.pluginOptionsList)) this.pluginOptionsList[key] = [];
|
|
5707
|
+
}
|
|
5708
|
+
async doTask() {
|
|
5709
|
+
this.doingTask = true;
|
|
5710
|
+
let task = this.taskList.shift();
|
|
5711
|
+
while (task) {
|
|
5712
|
+
await task();
|
|
5713
|
+
task = this.taskList.shift();
|
|
5413
5714
|
}
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
name: "name",
|
|
5417
|
-
text: "组件名称"
|
|
5418
|
-
});
|
|
5419
|
-
const noCodeAdvancedTabItems = advancedTabConfig.items.filter((item) => "type" in item && item.type !== "code-select");
|
|
5420
|
-
if (noCodeAdvancedTabItems.length > 0 && disabledCodeBlock) advancedTabConfig.items = noCodeAdvancedTabItems;
|
|
5421
|
-
const tabConfig = {
|
|
5422
|
-
type: "tab",
|
|
5423
|
-
labelWidth,
|
|
5424
|
-
items: [
|
|
5425
|
-
{
|
|
5426
|
-
title: "属性",
|
|
5427
|
-
items: [...propsConfig, ...config]
|
|
5428
|
-
},
|
|
5429
|
-
{ ...styleTabConfig },
|
|
5430
|
-
{ ...eventTabConfig }
|
|
5431
|
-
]
|
|
5432
|
-
};
|
|
5433
|
-
if (!disabledCodeBlock) tabConfig.items.push({ ...advancedTabConfig });
|
|
5434
|
-
else if (noCodeAdvancedTabItems.length > 0) tabConfig.items.push({ ...advancedTabConfig });
|
|
5435
|
-
if (!disabledDataSource) tabConfig.items.push({ ...displayTabConfig });
|
|
5436
|
-
return [tabConfig];
|
|
5715
|
+
this.doingTask = false;
|
|
5716
|
+
}
|
|
5437
5717
|
};
|
|
5438
|
-
/**
|
|
5439
|
-
* 对一份「组件属性表单配置 + 值」做一次独立的校验,**不复用也不污染页面上正在展示的表单**。
|
|
5440
|
-
*
|
|
5441
|
-
* 内部基于 `@tmagic/form` 的 `validateForm` 另建一个独立的 MForm 实例完成校验,并统一处理
|
|
5442
|
-
* 编辑器场景所需的上下文注入:将当前组件实例的 provides 合入 appContext,并向 formState 注入
|
|
5443
|
-
* stage / services 及外部扩展状态,保证校验规则依赖的上下文可用。
|
|
5444
|
-
*
|
|
5445
|
-
* 常用于源码编辑器保存后,对最新配置做一次校验,并将校验结果(错误信息)随提交一并抛给上层记录,
|
|
5446
|
-
* 使源码保存的错误状态与表单编辑保持一致。
|
|
5447
|
-
*
|
|
5448
|
-
* @returns 校验通过返回空字符串 `''`,否则返回以 `<br>` 拼接的错误文案。
|
|
5449
|
-
* 仅在初始化超时或挂载失败等异常情况下才会 reject。
|
|
5450
|
-
*
|
|
5451
|
-
* @example
|
|
5452
|
-
* ```ts
|
|
5453
|
-
* const error = await validatePropsForm({
|
|
5454
|
-
* config,
|
|
5455
|
-
* values,
|
|
5456
|
-
* appContext: getCurrentInstance()?.appContext,
|
|
5457
|
-
* services,
|
|
5458
|
-
* stage: editorService.get('stage'),
|
|
5459
|
-
* extendState,
|
|
5460
|
-
* });
|
|
5461
|
-
* if (error) {
|
|
5462
|
-
* // 配置不合法,error 为错误文案
|
|
5463
|
-
* }
|
|
5464
|
-
* ```
|
|
5465
|
-
*/
|
|
5466
|
-
var validatePropsForm = ({ config, values, appContext = null, services, stage, extendState, debug, typeMatchValid }) => (0, _tmagic_form.validateForm)({
|
|
5467
|
-
config,
|
|
5468
|
-
debug,
|
|
5469
|
-
typeMatchValid,
|
|
5470
|
-
initValues: values,
|
|
5471
|
-
appContext: appContext ? {
|
|
5472
|
-
...appContext,
|
|
5473
|
-
provides: { services }
|
|
5474
|
-
} : null,
|
|
5475
|
-
extendState: async (state) => ({
|
|
5476
|
-
...await extendState?.(state) || {},
|
|
5477
|
-
stage,
|
|
5478
|
-
services
|
|
5479
|
-
})
|
|
5480
|
-
});
|
|
5481
5718
|
//#endregion
|
|
5482
5719
|
//#region packages/editor/src/services/props.ts
|
|
5483
5720
|
init_lodash();
|
|
5721
|
+
init_props();
|
|
5484
5722
|
var canUsePluginMethods$8 = {
|
|
5485
5723
|
async: [
|
|
5486
5724
|
"setPropsConfig",
|
|
@@ -5703,18 +5941,7 @@
|
|
|
5703
5941
|
};
|
|
5704
5942
|
var props_default = new Props();
|
|
5705
5943
|
//#endregion
|
|
5706
|
-
//#region packages/editor/src/utils/config.ts
|
|
5707
|
-
var $TMAGIC_EDITOR, setEditorConfig, getEditorConfig;
|
|
5708
|
-
var init_config = __esmMin((() => {
|
|
5709
|
-
$TMAGIC_EDITOR = {};
|
|
5710
|
-
setEditorConfig = (option) => {
|
|
5711
|
-
$TMAGIC_EDITOR = option;
|
|
5712
|
-
};
|
|
5713
|
-
getEditorConfig = (key) => $TMAGIC_EDITOR[key];
|
|
5714
|
-
}));
|
|
5715
|
-
//#endregion
|
|
5716
5944
|
//#region packages/editor/src/utils/undo-redo.ts
|
|
5717
|
-
init_config();
|
|
5718
5945
|
init_lodash();
|
|
5719
5946
|
var UndoRedo = class UndoRedo {
|
|
5720
5947
|
/**
|
|
@@ -6140,6 +6367,7 @@
|
|
|
6140
6367
|
};
|
|
6141
6368
|
//#endregion
|
|
6142
6369
|
//#region packages/editor/src/services/history.ts
|
|
6370
|
+
init_config();
|
|
6143
6371
|
var canUsePluginMethods$7 = { sync: [
|
|
6144
6372
|
"push",
|
|
6145
6373
|
"undo",
|
|
@@ -7469,7 +7697,9 @@
|
|
|
7469
7697
|
data: newNodes.map((node) => ({
|
|
7470
7698
|
node,
|
|
7471
7699
|
page: this.getPageOfNode(node.id)
|
|
7472
|
-
}))
|
|
7700
|
+
})),
|
|
7701
|
+
historySource,
|
|
7702
|
+
doNotPushHistory
|
|
7473
7703
|
});
|
|
7474
7704
|
return Array.isArray(addNode) ? newNodes : newNodes[0];
|
|
7475
7705
|
}
|
|
@@ -7570,7 +7800,9 @@
|
|
|
7570
7800
|
this.emit("remove", nodes);
|
|
7571
7801
|
this.emit("change", {
|
|
7572
7802
|
type: "remove",
|
|
7573
|
-
data: changeItems
|
|
7803
|
+
data: changeItems,
|
|
7804
|
+
historySource,
|
|
7805
|
+
doNotPushHistory
|
|
7574
7806
|
});
|
|
7575
7807
|
}
|
|
7576
7808
|
async doUpdate(config, { changeRecords = [], historySource } = {}) {
|
|
@@ -7663,7 +7895,9 @@
|
|
|
7663
7895
|
data: updateData.map((node) => ({
|
|
7664
7896
|
node,
|
|
7665
7897
|
page: this.getPageOfNode(node.newNode.id)
|
|
7666
|
-
}))
|
|
7898
|
+
})),
|
|
7899
|
+
historySource,
|
|
7900
|
+
doNotPushHistory
|
|
7667
7901
|
});
|
|
7668
7902
|
return Array.isArray(config) ? updateData.map((item) => item.newNode) : updateData[0].newNode;
|
|
7669
7903
|
}
|
|
@@ -7836,7 +8070,9 @@
|
|
|
7836
8070
|
node,
|
|
7837
8071
|
page: this.getPageOfNode(node.id)
|
|
7838
8072
|
}],
|
|
7839
|
-
offset
|
|
8073
|
+
offset,
|
|
8074
|
+
historySource,
|
|
8075
|
+
doNotPushHistory
|
|
7840
8076
|
});
|
|
7841
8077
|
}
|
|
7842
8078
|
/**
|
|
@@ -7974,7 +8210,9 @@
|
|
|
7974
8210
|
page: this.getPageOfNode(node.id)
|
|
7975
8211
|
})),
|
|
7976
8212
|
targetIndex,
|
|
7977
|
-
targetParent
|
|
8213
|
+
targetParent,
|
|
8214
|
+
historySource,
|
|
8215
|
+
doNotPushHistory
|
|
7978
8216
|
});
|
|
7979
8217
|
}
|
|
7980
8218
|
/**
|
|
@@ -8423,10 +8661,12 @@
|
|
|
8423
8661
|
/**
|
|
8424
8662
|
* 应用历史操作(撤销 / 重做)
|
|
8425
8663
|
*
|
|
8426
|
-
*
|
|
8427
|
-
* `doNotSelect / doNotSwitchPage`
|
|
8664
|
+
* 删除 / 更新类修改走 `editor.remove / update`,并通过 `doNotPushHistory` 阻止再次入栈、
|
|
8665
|
+
* `doNotSelect / doNotSwitchPage` 让选区由方法末尾的统一逻辑兜底;
|
|
8666
|
+
* 「重新插回节点」(撤销 remove / 重做 add)需按 step 记录的 parentId / index 精确还原,
|
|
8667
|
+
* 不走 this.add,由手工 splice + stage.add 完成后补发等价的 add / change 事件(见 emitHistoryInsertEvents)。
|
|
8428
8668
|
*
|
|
8429
|
-
*
|
|
8669
|
+
* 注意:这些路径都会发出 add / remove / update / change 事件,业务侧若需要区分"用户操作"与"撤销重做触发",
|
|
8430
8670
|
* 请监听 `history-change` 事件配合判断。
|
|
8431
8671
|
*
|
|
8432
8672
|
* @param step 操作记录
|
|
@@ -8440,7 +8680,8 @@
|
|
|
8440
8680
|
const commonOpts = {
|
|
8441
8681
|
doNotSelect: true,
|
|
8442
8682
|
doNotSwitchPage: true,
|
|
8443
|
-
doNotPushHistory: true
|
|
8683
|
+
doNotPushHistory: true,
|
|
8684
|
+
historySource: step.source
|
|
8444
8685
|
};
|
|
8445
8686
|
switch (step.opType) {
|
|
8446
8687
|
case "add": {
|
|
@@ -8452,12 +8693,15 @@
|
|
|
8452
8693
|
}
|
|
8453
8694
|
else {
|
|
8454
8695
|
const sorted = [...items].sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
|
|
8696
|
+
const addedNodes = [];
|
|
8455
8697
|
for (const { newSchema, parentId, index } of sorted) {
|
|
8456
8698
|
if (!newSchema || parentId === void 0) continue;
|
|
8457
8699
|
const parent = this.getNodeById(parentId, false);
|
|
8458
8700
|
if (parent?.items) {
|
|
8459
|
-
|
|
8460
|
-
|
|
8701
|
+
const addedNode = cloneDeep$1(newSchema);
|
|
8702
|
+
if (typeof index === "number" && index >= 0 && index < parent.items.length) parent.items.splice(index, 0, addedNode);
|
|
8703
|
+
else parent.items.push(addedNode);
|
|
8704
|
+
addedNodes.push(addedNode);
|
|
8461
8705
|
await stage?.add({
|
|
8462
8706
|
config: cloneDeep$1(newSchema),
|
|
8463
8707
|
parent: cloneDeep$1(parent),
|
|
@@ -8466,6 +8710,7 @@
|
|
|
8466
8710
|
});
|
|
8467
8711
|
}
|
|
8468
8712
|
}
|
|
8713
|
+
this.emitHistoryInsertEvents(addedNodes, step.source);
|
|
8469
8714
|
}
|
|
8470
8715
|
break;
|
|
8471
8716
|
}
|
|
@@ -8473,11 +8718,14 @@
|
|
|
8473
8718
|
const items = step.diff ?? [];
|
|
8474
8719
|
if (reverse) {
|
|
8475
8720
|
const sorted = [...items].sort((a, b) => (a.index ?? 0) - (b.index ?? 0));
|
|
8721
|
+
const addedNodes = [];
|
|
8476
8722
|
for (const { oldSchema, parentId, index } of sorted) {
|
|
8477
8723
|
if (!oldSchema || parentId === void 0) continue;
|
|
8478
8724
|
const parent = this.getNodeById(parentId, false);
|
|
8479
8725
|
if (parent?.items) {
|
|
8480
|
-
|
|
8726
|
+
const addedNode = cloneDeep$1(oldSchema);
|
|
8727
|
+
parent.items.splice(index ?? parent.items.length, 0, addedNode);
|
|
8728
|
+
addedNodes.push(addedNode);
|
|
8481
8729
|
await stage?.add({
|
|
8482
8730
|
config: cloneDeep$1(oldSchema),
|
|
8483
8731
|
parent: cloneDeep$1(parent),
|
|
@@ -8486,6 +8734,7 @@
|
|
|
8486
8734
|
});
|
|
8487
8735
|
}
|
|
8488
8736
|
}
|
|
8737
|
+
this.emitHistoryInsertEvents(addedNodes, step.source);
|
|
8489
8738
|
} else for (const { oldSchema } of items) {
|
|
8490
8739
|
if (!oldSchema) continue;
|
|
8491
8740
|
const existing = this.getNodeById(oldSchema.id, false);
|
|
@@ -8512,7 +8761,10 @@
|
|
|
8512
8761
|
}
|
|
8513
8762
|
return cloneDeep$1(reverse ? oldNode : newNode);
|
|
8514
8763
|
});
|
|
8515
|
-
if (configs.length) await this.update(configs, {
|
|
8764
|
+
if (configs.length) await this.update(configs, {
|
|
8765
|
+
doNotPushHistory: true,
|
|
8766
|
+
historySource: step.source
|
|
8767
|
+
});
|
|
8516
8768
|
break;
|
|
8517
8769
|
}
|
|
8518
8770
|
}
|
|
@@ -8536,6 +8788,23 @@
|
|
|
8536
8788
|
selectedConfigExceptionHandler(config) {
|
|
8537
8789
|
return resolveSelectedNode(config, (id) => this.getNodeInfo(id), this.state.root?.id);
|
|
8538
8790
|
}
|
|
8791
|
+
/**
|
|
8792
|
+
* 撤销 remove / 重做 add 通过手工 splice 按 step 记录的 parentId / index 精确还原节点(不走 this.add,原因见调用处注释),
|
|
8793
|
+
* 这里补齐与 this.add 等价的 add / change 事件,保证撤销/重做路径的事件行为与正向操作一致。
|
|
8794
|
+
*/
|
|
8795
|
+
emitHistoryInsertEvents(nodes, source) {
|
|
8796
|
+
if (!nodes.length) return;
|
|
8797
|
+
this.emit("add", nodes);
|
|
8798
|
+
this.emit("change", {
|
|
8799
|
+
type: "add",
|
|
8800
|
+
data: nodes.map((node) => ({
|
|
8801
|
+
node,
|
|
8802
|
+
page: this.getPageOfNode(node.id)
|
|
8803
|
+
})),
|
|
8804
|
+
historySource: source,
|
|
8805
|
+
doNotPushHistory: true
|
|
8806
|
+
});
|
|
8807
|
+
}
|
|
8539
8808
|
};
|
|
8540
8809
|
var editor_default = new Editor();
|
|
8541
8810
|
//#endregion
|
|
@@ -8545,9 +8814,9 @@
|
|
|
8545
8814
|
var LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
8546
8815
|
var RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
8547
8816
|
var PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
|
|
8548
|
-
var DEFAULT_LEFT_COLUMN_WIDTH =
|
|
8817
|
+
var DEFAULT_LEFT_COLUMN_WIDTH = 345;
|
|
8549
8818
|
var DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
8550
|
-
var MIN_LEFT_COLUMN_WIDTH =
|
|
8819
|
+
var MIN_LEFT_COLUMN_WIDTH = 345;
|
|
8551
8820
|
var MIN_CENTER_COLUMN_WIDTH = 400;
|
|
8552
8821
|
var MIN_RIGHT_COLUMN_WIDTH = 300;
|
|
8553
8822
|
var H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
@@ -8568,11 +8837,11 @@
|
|
|
8568
8837
|
height: 817
|
|
8569
8838
|
},
|
|
8570
8839
|
columnWidth: {
|
|
8571
|
-
left:
|
|
8840
|
+
left: 0,
|
|
8572
8841
|
center: 0,
|
|
8573
|
-
right:
|
|
8842
|
+
right: 0
|
|
8574
8843
|
},
|
|
8575
|
-
minLeftColumnWidth:
|
|
8844
|
+
minLeftColumnWidth: 345,
|
|
8576
8845
|
minCenterColumnWidth: 400,
|
|
8577
8846
|
minRightColumnWidth: 300,
|
|
8578
8847
|
showGuides: true,
|
|
@@ -8597,6 +8866,8 @@
|
|
|
8597
8866
|
top: 0
|
|
8598
8867
|
}
|
|
8599
8868
|
});
|
|
8869
|
+
state.columnWidth.left = Math.max(storage_default.getItem("$MagicEditorLeftColumnWidthData", { protocol: Protocol.NUMBER }) || 345, state.minLeftColumnWidth);
|
|
8870
|
+
state.columnWidth.right = Math.max(storage_default.getItem("$MagicEditorRightColumnWidthData", { protocol: Protocol.NUMBER }) || 480, state.minRightColumnWidth);
|
|
8600
8871
|
var canUsePluginMethods$5 = {
|
|
8601
8872
|
async: ["zoom", "calcZoom"],
|
|
8602
8873
|
sync: []
|
|
@@ -8937,202 +9208,84 @@
|
|
|
8937
9208
|
filter(text);
|
|
8938
9209
|
}
|
|
8939
9210
|
};
|
|
8940
|
-
};
|
|
8941
|
-
//#endregion
|
|
8942
|
-
//#region packages/editor/src/hooks/use-getso.ts
|
|
8943
|
-
var useGetSo = (target, emit) => {
|
|
8944
|
-
let getso;
|
|
8945
|
-
const isDragging = (0, vue.ref)(false);
|
|
8946
|
-
(0, vue.onMounted)(() => {
|
|
8947
|
-
if (!target.value) return;
|
|
8948
|
-
getso = new gesto.default(target.value, {
|
|
8949
|
-
container: window,
|
|
8950
|
-
pinchOutside: true
|
|
8951
|
-
}).on("drag", (e) => {
|
|
8952
|
-
if (!target.value) return;
|
|
8953
|
-
emit("change", e);
|
|
8954
|
-
}).on("dragStart", () => {
|
|
8955
|
-
isDragging.value = true;
|
|
8956
|
-
}).on("dragEnd", () => {
|
|
8957
|
-
isDragging.value = false;
|
|
8958
|
-
});
|
|
8959
|
-
});
|
|
8960
|
-
(0, vue.onBeforeUnmount)(() => {
|
|
8961
|
-
getso?.unset();
|
|
8962
|
-
isDragging.value = false;
|
|
8963
|
-
});
|
|
8964
|
-
return { isDragging };
|
|
8965
|
-
};
|
|
8966
|
-
//#endregion
|
|
8967
|
-
//#region packages/editor/src/hooks/use-next-float-box-position.ts
|
|
8968
|
-
var useNextFloatBoxPosition = (uiService, parent) => {
|
|
8969
|
-
const boxPosition = (0, vue.ref)({
|
|
8970
|
-
left: 0,
|
|
8971
|
-
top: 0
|
|
8972
|
-
});
|
|
8973
|
-
const calcBoxPosition = () => {
|
|
8974
|
-
const columnWidth = uiService.get("columnWidth");
|
|
8975
|
-
const navMenuRect = uiService.get("navMenuRect");
|
|
8976
|
-
let left = columnWidth.left ?? 0;
|
|
8977
|
-
if (parent?.value) {
|
|
8978
|
-
const rect = parent.value.getBoundingClientRect();
|
|
8979
|
-
left = rect.left + rect.width;
|
|
8980
|
-
}
|
|
8981
|
-
boxPosition.value = {
|
|
8982
|
-
left,
|
|
8983
|
-
top: navMenuRect.top + navMenuRect.height
|
|
8984
|
-
};
|
|
8985
|
-
};
|
|
8986
|
-
return {
|
|
8987
|
-
boxPosition,
|
|
8988
|
-
calcBoxPosition
|
|
8989
|
-
};
|
|
8990
|
-
};
|
|
8991
|
-
//#endregion
|
|
8992
|
-
//#region packages/editor/src/hooks/use-node-status.ts
|
|
8993
|
-
var createPageNodeStatus$1 = (nodeData, initialLayerNodeStatus) => {
|
|
8994
|
-
const map = /* @__PURE__ */ new Map();
|
|
8995
|
-
nodeData.forEach((node) => (0, _tmagic_utils.traverseNode)(node, (node) => {
|
|
8996
|
-
map.set(node.id, initialLayerNodeStatus?.get(node.id) || {
|
|
8997
|
-
visible: true,
|
|
8998
|
-
expand: false,
|
|
8999
|
-
selected: false,
|
|
9000
|
-
draggable: false
|
|
9001
|
-
});
|
|
9002
|
-
}));
|
|
9003
|
-
return map;
|
|
9004
|
-
};
|
|
9005
|
-
var useNodeStatus = (nodeData) => {
|
|
9006
|
-
/** 所有页面的节点状态 */
|
|
9007
|
-
const nodeStatusMap = (0, vue.ref)(/* @__PURE__ */ new Map());
|
|
9008
|
-
(0, vue.watch)(nodeData, (nodeData) => {
|
|
9009
|
-
nodeStatusMap.value = createPageNodeStatus$1(nodeData, nodeStatusMap.value);
|
|
9010
|
-
}, {
|
|
9011
|
-
immediate: true,
|
|
9012
|
-
deep: true
|
|
9013
|
-
});
|
|
9014
|
-
return { nodeStatusMap };
|
|
9015
|
-
};
|
|
9016
|
-
//#endregion
|
|
9017
|
-
//#region packages/editor/src/utils/code-block.ts
|
|
9018
|
-
var defaultParamColConfig, getCodeBlockFormConfig;
|
|
9019
|
-
var init_code_block = __esmMin((() => {
|
|
9020
|
-
init_config();
|
|
9021
|
-
defaultParamColConfig = () => (0, _tmagic_form.defineFormItem)({
|
|
9022
|
-
type: "row",
|
|
9023
|
-
label: "参数类型",
|
|
9024
|
-
items: [{
|
|
9025
|
-
text: "参数类型",
|
|
9026
|
-
labelWidth: "70px",
|
|
9027
|
-
type: "select",
|
|
9028
|
-
name: "type",
|
|
9029
|
-
options: [
|
|
9030
|
-
{
|
|
9031
|
-
text: "数字",
|
|
9032
|
-
label: "数字",
|
|
9033
|
-
value: "number"
|
|
9034
|
-
},
|
|
9035
|
-
{
|
|
9036
|
-
text: "字符串",
|
|
9037
|
-
label: "字符串",
|
|
9038
|
-
value: "text"
|
|
9039
|
-
},
|
|
9040
|
-
{
|
|
9041
|
-
text: "组件",
|
|
9042
|
-
label: "组件",
|
|
9043
|
-
value: "ui-select"
|
|
9044
|
-
}
|
|
9045
|
-
]
|
|
9046
|
-
}]
|
|
9047
|
-
});
|
|
9048
|
-
getCodeBlockFormConfig = (options = {}) => {
|
|
9049
|
-
const { paramColConfig, isDataSource, dataSourceType, codeOptions = {}, editable = true } = options;
|
|
9050
|
-
return (0, _tmagic_form.defineFormConfig)([
|
|
9051
|
-
{
|
|
9052
|
-
text: "名称",
|
|
9053
|
-
name: "name",
|
|
9054
|
-
...editable ? { rules: [{
|
|
9055
|
-
required: true,
|
|
9056
|
-
message: "请输入名称",
|
|
9057
|
-
trigger: "blur"
|
|
9058
|
-
}] } : {}
|
|
9059
|
-
},
|
|
9060
|
-
{
|
|
9061
|
-
text: "描述",
|
|
9062
|
-
name: "desc"
|
|
9063
|
-
},
|
|
9064
|
-
{
|
|
9065
|
-
text: "执行时机",
|
|
9066
|
-
name: "timing",
|
|
9067
|
-
type: "select",
|
|
9068
|
-
options: () => {
|
|
9069
|
-
const list = [{
|
|
9070
|
-
text: "初始化前",
|
|
9071
|
-
value: "beforeInit"
|
|
9072
|
-
}, {
|
|
9073
|
-
text: "初始化后",
|
|
9074
|
-
value: "afterInit"
|
|
9075
|
-
}];
|
|
9076
|
-
if (dataSourceType?.() !== "base") {
|
|
9077
|
-
list.push({
|
|
9078
|
-
text: "请求前",
|
|
9079
|
-
value: "beforeRequest"
|
|
9080
|
-
});
|
|
9081
|
-
list.push({
|
|
9082
|
-
text: "请求后",
|
|
9083
|
-
value: "afterRequest"
|
|
9084
|
-
});
|
|
9085
|
-
}
|
|
9086
|
-
return list;
|
|
9087
|
-
},
|
|
9088
|
-
display: () => Boolean(isDataSource?.())
|
|
9089
|
-
},
|
|
9090
|
-
{
|
|
9091
|
-
type: "table",
|
|
9092
|
-
border: true,
|
|
9093
|
-
text: "参数",
|
|
9094
|
-
enableFullscreen: false,
|
|
9095
|
-
enableToggleMode: false,
|
|
9096
|
-
name: "params",
|
|
9097
|
-
dropSort: false,
|
|
9098
|
-
items: [
|
|
9099
|
-
{
|
|
9100
|
-
type: "text",
|
|
9101
|
-
label: "参数名",
|
|
9102
|
-
name: "name"
|
|
9103
|
-
},
|
|
9104
|
-
{
|
|
9105
|
-
type: "text",
|
|
9106
|
-
label: "描述",
|
|
9107
|
-
name: "extra"
|
|
9108
|
-
},
|
|
9109
|
-
paramColConfig || defaultParamColConfig()
|
|
9110
|
-
]
|
|
9111
|
-
},
|
|
9112
|
-
{
|
|
9113
|
-
name: "content",
|
|
9114
|
-
type: "vs-code",
|
|
9115
|
-
options: codeOptions,
|
|
9116
|
-
autosize: {
|
|
9117
|
-
minRows: 10,
|
|
9118
|
-
maxRows: 30
|
|
9119
|
-
},
|
|
9120
|
-
...editable ? { onChange: (_formState, code) => {
|
|
9121
|
-
try {
|
|
9122
|
-
getEditorConfig("parseDSL")(code);
|
|
9123
|
-
return code;
|
|
9124
|
-
} catch (error) {
|
|
9125
|
-
_tmagic_design.tMagicMessage.error(error.message);
|
|
9126
|
-
throw error;
|
|
9127
|
-
}
|
|
9128
|
-
} } : {}
|
|
9129
|
-
}
|
|
9130
|
-
]);
|
|
9131
|
-
};
|
|
9132
|
-
}));
|
|
9211
|
+
};
|
|
9212
|
+
//#endregion
|
|
9213
|
+
//#region packages/editor/src/hooks/use-getso.ts
|
|
9214
|
+
var useGetSo = (target, emit) => {
|
|
9215
|
+
let getso;
|
|
9216
|
+
const isDragging = (0, vue.ref)(false);
|
|
9217
|
+
(0, vue.onMounted)(() => {
|
|
9218
|
+
if (!target.value) return;
|
|
9219
|
+
getso = new gesto.default(target.value, {
|
|
9220
|
+
container: window,
|
|
9221
|
+
pinchOutside: true
|
|
9222
|
+
}).on("drag", (e) => {
|
|
9223
|
+
if (!target.value) return;
|
|
9224
|
+
emit("change", e);
|
|
9225
|
+
}).on("dragStart", () => {
|
|
9226
|
+
isDragging.value = true;
|
|
9227
|
+
}).on("dragEnd", () => {
|
|
9228
|
+
isDragging.value = false;
|
|
9229
|
+
});
|
|
9230
|
+
});
|
|
9231
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
9232
|
+
getso?.unset();
|
|
9233
|
+
isDragging.value = false;
|
|
9234
|
+
});
|
|
9235
|
+
return { isDragging };
|
|
9236
|
+
};
|
|
9237
|
+
//#endregion
|
|
9238
|
+
//#region packages/editor/src/hooks/use-next-float-box-position.ts
|
|
9239
|
+
var useNextFloatBoxPosition = (uiService, parent) => {
|
|
9240
|
+
const boxPosition = (0, vue.ref)({
|
|
9241
|
+
left: 0,
|
|
9242
|
+
top: 0
|
|
9243
|
+
});
|
|
9244
|
+
const calcBoxPosition = () => {
|
|
9245
|
+
const columnWidth = uiService.get("columnWidth");
|
|
9246
|
+
const navMenuRect = uiService.get("navMenuRect");
|
|
9247
|
+
let left = columnWidth.left ?? 0;
|
|
9248
|
+
if (parent?.value) {
|
|
9249
|
+
const rect = parent.value.getBoundingClientRect();
|
|
9250
|
+
left = rect.left + rect.width;
|
|
9251
|
+
}
|
|
9252
|
+
boxPosition.value = {
|
|
9253
|
+
left,
|
|
9254
|
+
top: navMenuRect.top + navMenuRect.height
|
|
9255
|
+
};
|
|
9256
|
+
};
|
|
9257
|
+
return {
|
|
9258
|
+
boxPosition,
|
|
9259
|
+
calcBoxPosition
|
|
9260
|
+
};
|
|
9261
|
+
};
|
|
9262
|
+
//#endregion
|
|
9263
|
+
//#region packages/editor/src/hooks/use-node-status.ts
|
|
9264
|
+
var createPageNodeStatus$1 = (nodeData, initialLayerNodeStatus) => {
|
|
9265
|
+
const map = /* @__PURE__ */ new Map();
|
|
9266
|
+
nodeData.forEach((node) => (0, _tmagic_utils.traverseNode)(node, (node) => {
|
|
9267
|
+
map.set(node.id, initialLayerNodeStatus?.get(node.id) || {
|
|
9268
|
+
visible: true,
|
|
9269
|
+
expand: false,
|
|
9270
|
+
selected: false,
|
|
9271
|
+
draggable: false
|
|
9272
|
+
});
|
|
9273
|
+
}));
|
|
9274
|
+
return map;
|
|
9275
|
+
};
|
|
9276
|
+
var useNodeStatus = (nodeData) => {
|
|
9277
|
+
/** 所有页面的节点状态 */
|
|
9278
|
+
const nodeStatusMap = (0, vue.ref)(/* @__PURE__ */ new Map());
|
|
9279
|
+
(0, vue.watch)(nodeData, (nodeData) => {
|
|
9280
|
+
nodeStatusMap.value = createPageNodeStatus$1(nodeData, nodeStatusMap.value);
|
|
9281
|
+
}, {
|
|
9282
|
+
immediate: true,
|
|
9283
|
+
deep: true
|
|
9284
|
+
});
|
|
9285
|
+
return { nodeStatusMap };
|
|
9286
|
+
};
|
|
9133
9287
|
//#endregion
|
|
9134
9288
|
//#region packages/editor/src/utils/logger.ts
|
|
9135
|
-
init_code_block();
|
|
9136
9289
|
var log = (...args) => {
|
|
9137
9290
|
if (process.env.NODE_ENV === "development") console.log("magic editor: ", ...args);
|
|
9138
9291
|
};
|
|
@@ -10600,6 +10753,8 @@
|
|
|
10600
10753
|
var dataSource_default = new DataSource();
|
|
10601
10754
|
//#endregion
|
|
10602
10755
|
//#region packages/editor/src/utils/type-match-rules.ts
|
|
10756
|
+
init_use_compare_form();
|
|
10757
|
+
init_props();
|
|
10603
10758
|
/**
|
|
10604
10759
|
* 将值格式化为可读的参考示例字符串。
|
|
10605
10760
|
*/
|
|
@@ -11313,9 +11468,9 @@
|
|
|
11313
11468
|
var SplitView_default = SplitView_vue_vue_type_script_setup_true_lang_default;
|
|
11314
11469
|
//#endregion
|
|
11315
11470
|
//#region packages/editor/src/components/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
11316
|
-
var _hoisted_1$
|
|
11471
|
+
var _hoisted_1$76, Icon_vue_vue_type_script_setup_true_lang_default;
|
|
11317
11472
|
var init_Icon_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
11318
|
-
_hoisted_1$
|
|
11473
|
+
_hoisted_1$76 = ["src"];
|
|
11319
11474
|
Icon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
11320
11475
|
name: "MEditorIcon",
|
|
11321
11476
|
__name: "Icon",
|
|
@@ -11333,7 +11488,7 @@
|
|
|
11333
11488
|
key: 1,
|
|
11334
11489
|
class: "magic-editor-icon"
|
|
11335
11490
|
}, {
|
|
11336
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("img", { src: __props.icon }, null, 8, _hoisted_1$
|
|
11491
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("img", { src: __props.icon }, null, 8, _hoisted_1$76)]),
|
|
11337
11492
|
_: 1
|
|
11338
11493
|
})) : typeof __props.icon === "string" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("i", {
|
|
11339
11494
|
key: 2,
|
|
@@ -11360,7 +11515,7 @@
|
|
|
11360
11515
|
//#endregion
|
|
11361
11516
|
//#region packages/editor/src/components/ToolButton.vue?vue&type=script&setup=true&lang.ts
|
|
11362
11517
|
init_Icon();
|
|
11363
|
-
var _hoisted_1$
|
|
11518
|
+
var _hoisted_1$75 = {
|
|
11364
11519
|
key: 1,
|
|
11365
11520
|
class: "menu-item-text"
|
|
11366
11521
|
};
|
|
@@ -11423,7 +11578,7 @@
|
|
|
11423
11578
|
}, [__props.data.type === "divider" ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicDivider), {
|
|
11424
11579
|
key: 0,
|
|
11425
11580
|
direction: __props.data.direction || "vertical"
|
|
11426
|
-
}, null, 8, ["direction"])) : __props.data.type === "text" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11581
|
+
}, null, 8, ["direction"])) : __props.data.type === "text" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$75, (0, vue.toDisplayString)(__props.data.text), 1)) : __props.data.type === "button" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [__props.data.tooltip ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicTooltip), {
|
|
11427
11582
|
key: 0,
|
|
11428
11583
|
effect: "dark",
|
|
11429
11584
|
placement: "bottom-start",
|
|
@@ -11494,7 +11649,7 @@
|
|
|
11494
11649
|
//#region packages/editor/src/layouts/page-bar/AddButton.vue?vue&type=script&setup=true&lang.ts
|
|
11495
11650
|
init_Icon();
|
|
11496
11651
|
init_editor();
|
|
11497
|
-
var _hoisted_1$
|
|
11652
|
+
var _hoisted_1$74 = {
|
|
11498
11653
|
key: 0,
|
|
11499
11654
|
id: "m-editor-page-bar-add-icon",
|
|
11500
11655
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
@@ -11520,7 +11675,7 @@
|
|
|
11520
11675
|
editorService.add(pageConfig);
|
|
11521
11676
|
};
|
|
11522
11677
|
return (_ctx, _cache) => {
|
|
11523
|
-
return showAddPageButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11678
|
+
return showAddPageButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$74, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
11524
11679
|
reference: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: (0, vue.unref)(_element_plus_icons_vue.Plus) }, null, 8, ["icon"])]),
|
|
11525
11680
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(ToolButton_default, { data: {
|
|
11526
11681
|
type: "button",
|
|
@@ -11546,7 +11701,7 @@
|
|
|
11546
11701
|
//#endregion
|
|
11547
11702
|
//#region packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue?vue&type=script&setup=true&lang.ts
|
|
11548
11703
|
init_Icon();
|
|
11549
|
-
var _hoisted_1$
|
|
11704
|
+
var _hoisted_1$73 = {
|
|
11550
11705
|
class: "m-editor-page-bar",
|
|
11551
11706
|
ref: "pageBar"
|
|
11552
11707
|
};
|
|
@@ -11640,7 +11795,7 @@
|
|
|
11640
11795
|
}
|
|
11641
11796
|
});
|
|
11642
11797
|
return (_ctx, _cache) => {
|
|
11643
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11798
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$73, [
|
|
11644
11799
|
(0, vue.renderSlot)(_ctx.$slots, "prepend"),
|
|
11645
11800
|
__props.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$29, [(0, vue.renderSlot)(_ctx.$slots, "default")], 512)) : (0, vue.createCommentVNode)("v-if", true),
|
|
11646
11801
|
canScroll.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -11662,13 +11817,13 @@
|
|
|
11662
11817
|
var PageBarScrollContainer_default = PageBarScrollContainer_vue_vue_type_script_setup_true_lang_default;
|
|
11663
11818
|
//#endregion
|
|
11664
11819
|
//#region packages/editor/src/layouts/page-bar/PageList.vue?vue&type=script&setup=true&lang.ts
|
|
11665
|
-
var _hoisted_1$
|
|
11820
|
+
var _hoisted_1$72 = {
|
|
11666
11821
|
key: 0,
|
|
11667
11822
|
id: "m-editor-page-bar-list-icon",
|
|
11668
11823
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
11669
11824
|
};
|
|
11670
11825
|
var _hoisted_2$28 = { class: "page-bar-popover-wrapper" };
|
|
11671
|
-
var _hoisted_3$
|
|
11826
|
+
var _hoisted_3$14 = { class: "page-bar-popover-inner" };
|
|
11672
11827
|
var PageList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
11673
11828
|
name: "MEditorPageList",
|
|
11674
11829
|
__name: "PageList",
|
|
@@ -11681,7 +11836,7 @@
|
|
|
11681
11836
|
await editorService.select(id);
|
|
11682
11837
|
};
|
|
11683
11838
|
return (_ctx, _cache) => {
|
|
11684
|
-
return showPageListButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11839
|
+
return showPageListButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$72, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicPopover), {
|
|
11685
11840
|
"popper-class": "page-bar-popover",
|
|
11686
11841
|
placement: "top",
|
|
11687
11842
|
trigger: "hover",
|
|
@@ -11692,7 +11847,7 @@
|
|
|
11692
11847
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_element_plus_icons_vue.Files))]),
|
|
11693
11848
|
_: 1
|
|
11694
11849
|
})]),
|
|
11695
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_2$28, [(0, vue.createElementVNode)("div", _hoisted_3$
|
|
11850
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_2$28, [(0, vue.createElementVNode)("div", _hoisted_3$14, [(0, vue.renderSlot)(_ctx.$slots, "page-list-popover", { list: __props.list }, () => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.list, (item, index) => {
|
|
11696
11851
|
return (0, vue.openBlock)(), (0, vue.createBlock)(ToolButton_default, {
|
|
11697
11852
|
data: {
|
|
11698
11853
|
type: "button",
|
|
@@ -11714,7 +11869,7 @@
|
|
|
11714
11869
|
//#endregion
|
|
11715
11870
|
//#region packages/editor/src/layouts/page-bar/Search.vue?vue&type=script&setup=true&lang.ts
|
|
11716
11871
|
init_Icon();
|
|
11717
|
-
var _hoisted_1$
|
|
11872
|
+
var _hoisted_1$71 = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
11718
11873
|
var Search_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
11719
11874
|
__name: "Search",
|
|
11720
11875
|
props: {
|
|
@@ -11747,7 +11902,7 @@
|
|
|
11747
11902
|
emit("search", values);
|
|
11748
11903
|
};
|
|
11749
11904
|
return (_ctx, _cache) => {
|
|
11750
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11905
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$71, [(0, vue.createVNode)(Icon_default, {
|
|
11751
11906
|
icon: (0, vue.unref)(_element_plus_icons_vue.Search),
|
|
11752
11907
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
11753
11908
|
class: (0, vue.normalizeClass)({ "icon-active": visible.value })
|
|
@@ -11771,10 +11926,10 @@
|
|
|
11771
11926
|
var Search_default = Search_vue_vue_type_script_setup_true_lang_default;
|
|
11772
11927
|
//#endregion
|
|
11773
11928
|
//#region packages/editor/src/layouts/page-bar/PageBar.vue?vue&type=script&setup=true&lang.ts
|
|
11774
|
-
var _hoisted_1$
|
|
11929
|
+
var _hoisted_1$70 = { class: "m-editor-page-bar-tabs" };
|
|
11775
11930
|
var _hoisted_2$27 = ["data-page-id", "onClick"];
|
|
11776
|
-
var _hoisted_3$
|
|
11777
|
-
var _hoisted_4$
|
|
11931
|
+
var _hoisted_3$13 = { class: "m-editor-page-bar-title" };
|
|
11932
|
+
var _hoisted_4$10 = ["title"];
|
|
11778
11933
|
var PageBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
11779
11934
|
name: "MEditorPageBar",
|
|
11780
11935
|
__name: "PageBar",
|
|
@@ -11840,7 +11995,7 @@
|
|
|
11840
11995
|
}
|
|
11841
11996
|
});
|
|
11842
11997
|
return (_ctx, _cache) => {
|
|
11843
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11998
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$70, [(0, vue.createVNode)(PageBarScrollContainer_default, {
|
|
11844
11999
|
ref: "pageBarScrollContainer",
|
|
11845
12000
|
"page-bar-sort-options": __props.pageBarSortOptions,
|
|
11846
12001
|
length: list.value.length
|
|
@@ -11864,7 +12019,7 @@
|
|
|
11864
12019
|
key: item.id,
|
|
11865
12020
|
"data-page-id": item.id,
|
|
11866
12021
|
onClick: ($event) => switchPage(item.id)
|
|
11867
|
-
}, [(0, vue.createElementVNode)("div", _hoisted_3$
|
|
12022
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_3$13, [(0, vue.renderSlot)(_ctx.$slots, "page-bar-title", { page: item }, () => [(0, vue.createElementVNode)("span", { title: item.name }, (0, vue.toDisplayString)(item.name || item.id), 9, _hoisted_4$10)])]), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicPopover), {
|
|
11868
12023
|
"popper-class": "page-bar-popover",
|
|
11869
12024
|
placement: "top",
|
|
11870
12025
|
trigger: "hover",
|
|
@@ -11902,7 +12057,7 @@
|
|
|
11902
12057
|
//#region packages/editor/src/layouts/AddPageBox.vue?vue&type=script&setup=true&lang.ts
|
|
11903
12058
|
init_Icon();
|
|
11904
12059
|
init_editor();
|
|
11905
|
-
var _hoisted_1$
|
|
12060
|
+
var _hoisted_1$69 = { class: "m-editor-empty-panel" };
|
|
11906
12061
|
var _hoisted_2$26 = { class: "m-editor-empty-content" };
|
|
11907
12062
|
var AddPageBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
11908
12063
|
name: "MEditorAddPageBox",
|
|
@@ -11920,7 +12075,7 @@
|
|
|
11920
12075
|
});
|
|
11921
12076
|
};
|
|
11922
12077
|
return (_ctx, _cache) => {
|
|
11923
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
12078
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$69, [(0, vue.createElementVNode)("div", _hoisted_2$26, [(0, vue.createElementVNode)("div", {
|
|
11924
12079
|
class: "m-editor-empty-button",
|
|
11925
12080
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler((0, vue.unref)(_tmagic_core.NodeType).PAGE))
|
|
11926
12081
|
}, [(0, vue.createElementVNode)("div", null, [(0, vue.createVNode)(Icon_default, { icon: (0, vue.unref)(_element_plus_icons_vue.Plus) }, null, 8, ["icon"])]), _cache[2] || (_cache[2] = (0, vue.createElementVNode)("p", null, "新增页面", -1))]), !__props.disabledPageFragment ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -11936,14 +12091,14 @@
|
|
|
11936
12091
|
var AddPageBox_default = AddPageBox_vue_vue_type_script_setup_true_lang_default;
|
|
11937
12092
|
//#endregion
|
|
11938
12093
|
//#region packages/editor/src/layouts/CodeEditor.vue?vue&type=script&setup=true&lang.ts
|
|
11939
|
-
var _hoisted_1$
|
|
12094
|
+
var _hoisted_1$68, _hoisted_2$25, CodeEditor_vue_vue_type_script_setup_true_lang_default;
|
|
11940
12095
|
var init_CodeEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
11941
12096
|
init_lodash();
|
|
11942
12097
|
init_Icon();
|
|
11943
12098
|
init_config();
|
|
11944
12099
|
init_editor();
|
|
11945
12100
|
init_monaco_editor();
|
|
11946
|
-
_hoisted_1$
|
|
12101
|
+
_hoisted_1$68 = { class: "magic-code-editor" };
|
|
11947
12102
|
_hoisted_2$25 = {
|
|
11948
12103
|
ref: "codeEditor",
|
|
11949
12104
|
class: "magic-code-editor-content"
|
|
@@ -12196,7 +12351,7 @@
|
|
|
12196
12351
|
}
|
|
12197
12352
|
});
|
|
12198
12353
|
return (_ctx, _cache) => {
|
|
12199
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
12354
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$68, [((0, vue.openBlock)(), (0, vue.createBlock)(vue.Teleport, {
|
|
12200
12355
|
to: "body",
|
|
12201
12356
|
disabled: !fullScreen.value
|
|
12202
12357
|
}, [(0, vue.createElementVNode)("div", {
|
|
@@ -12231,11 +12386,6 @@
|
|
|
12231
12386
|
//#region packages/editor/src/layouts/Framework.vue?vue&type=script&setup=true&lang.ts
|
|
12232
12387
|
init_config();
|
|
12233
12388
|
init_CodeEditor();
|
|
12234
|
-
var _hoisted_1$63 = {
|
|
12235
|
-
class: "m-editor",
|
|
12236
|
-
ref: "content",
|
|
12237
|
-
style: { "min-width": "900px" }
|
|
12238
|
-
};
|
|
12239
12389
|
var Framework_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
12240
12390
|
name: "MEditorFramework",
|
|
12241
12391
|
__name: "Framework",
|
|
@@ -12243,7 +12393,8 @@
|
|
|
12243
12393
|
disabledPageFragment: { type: Boolean },
|
|
12244
12394
|
pageBarSortOptions: {},
|
|
12245
12395
|
pageFilterFunction: { type: Function },
|
|
12246
|
-
hideSidebar: { type: Boolean }
|
|
12396
|
+
hideSidebar: { type: Boolean },
|
|
12397
|
+
theme: {}
|
|
12247
12398
|
},
|
|
12248
12399
|
setup(__props) {
|
|
12249
12400
|
const props = __props;
|
|
@@ -12265,7 +12416,7 @@
|
|
|
12265
12416
|
(0, vue.watch)(() => uiService.get("hideSlideBar"), (hideSlideBar) => {
|
|
12266
12417
|
uiService.set("columnWidth", {
|
|
12267
12418
|
...columnWidth.value,
|
|
12268
|
-
left: hideSlideBar ? 0 : storageService.getItem("$MagicEditorLeftColumnWidthData", { protocol: Protocol.NUMBER }) ||
|
|
12419
|
+
left: hideSlideBar ? 0 : storageService.getItem("$MagicEditorLeftColumnWidthData", { protocol: Protocol.NUMBER }) || 345
|
|
12269
12420
|
});
|
|
12270
12421
|
});
|
|
12271
12422
|
const columnWidthChange = (columnW) => {
|
|
@@ -12298,7 +12449,15 @@
|
|
|
12298
12449
|
}
|
|
12299
12450
|
};
|
|
12300
12451
|
return (_ctx, _cache) => {
|
|
12301
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
12452
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
12453
|
+
ref: "content",
|
|
12454
|
+
class: (0, vue.normalizeClass)([
|
|
12455
|
+
"m-editor",
|
|
12456
|
+
__props.theme ? `m-editor--${__props.theme}` : "",
|
|
12457
|
+
__props.theme ? `m-theme--${__props.theme}` : ""
|
|
12458
|
+
]),
|
|
12459
|
+
style: { "min-width": "900px" }
|
|
12460
|
+
}, [
|
|
12302
12461
|
(0, vue.renderSlot)(_ctx.$slots, "header"),
|
|
12303
12462
|
(0, vue.renderSlot)(_ctx.$slots, "nav"),
|
|
12304
12463
|
(0, vue.renderSlot)(_ctx.$slots, "content-before"),
|
|
@@ -12357,7 +12516,7 @@
|
|
|
12357
12516
|
]), [[vue.vShow, !showSrc.value]]),
|
|
12358
12517
|
(0, vue.renderSlot)(_ctx.$slots, "content-after"),
|
|
12359
12518
|
(0, vue.renderSlot)(_ctx.$slots, "footer")
|
|
12360
|
-
],
|
|
12519
|
+
], 2);
|
|
12361
12520
|
};
|
|
12362
12521
|
}
|
|
12363
12522
|
});
|
|
@@ -12547,15 +12706,15 @@
|
|
|
12547
12706
|
};
|
|
12548
12707
|
//#endregion
|
|
12549
12708
|
//#region packages/editor/src/layouts/history-list/GroupRow.vue?vue&type=script&setup=true&lang.ts
|
|
12550
|
-
var _hoisted_1$
|
|
12709
|
+
var _hoisted_1$67 = ["title"];
|
|
12551
12710
|
var _hoisted_2$24 = ["title"];
|
|
12552
|
-
var _hoisted_3$
|
|
12553
|
-
var _hoisted_4$
|
|
12711
|
+
var _hoisted_3$12 = { class: "m-editor-history-list-item-desc" };
|
|
12712
|
+
var _hoisted_4$9 = {
|
|
12554
12713
|
key: 0,
|
|
12555
12714
|
class: "m-editor-history-list-item-saved",
|
|
12556
12715
|
title: "该记录为最近一次保存的状态"
|
|
12557
12716
|
};
|
|
12558
|
-
var _hoisted_5$
|
|
12717
|
+
var _hoisted_5$5 = {
|
|
12559
12718
|
key: 1,
|
|
12560
12719
|
class: "m-editor-history-list-item-actions"
|
|
12561
12720
|
};
|
|
@@ -12715,9 +12874,9 @@
|
|
|
12715
12874
|
title: headIndexTitle.value
|
|
12716
12875
|
}, (0, vue.toDisplayString)(headIndexLabel.value), 9, _hoisted_2$24),
|
|
12717
12876
|
(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["m-editor-history-list-item-op", `op-${__props.group.opType}`]) }, (0, vue.toDisplayString)((0, vue.unref)(opLabel)(__props.group.opType)), 3),
|
|
12718
|
-
(0, vue.createElementVNode)("span", _hoisted_3$
|
|
12719
|
-
headSaved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$
|
|
12720
|
-
!merged.value && (headRevertable.value || headDiffable.value || canHeadGoto.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5$
|
|
12877
|
+
(0, vue.createElementVNode)("span", _hoisted_3$12, (0, vue.toDisplayString)(__props.group.desc), 1),
|
|
12878
|
+
headSaved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$9, "已保存")) : (0, vue.createCommentVNode)("v-if", true),
|
|
12879
|
+
!merged.value && (headRevertable.value || headDiffable.value || canHeadGoto.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5$5, [
|
|
12721
12880
|
headRevertable.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
12722
12881
|
key: 0,
|
|
12723
12882
|
class: "m-editor-history-list-item-revert",
|
|
@@ -12757,7 +12916,7 @@
|
|
|
12757
12916
|
key: 6,
|
|
12758
12917
|
class: (0, vue.normalizeClass)(["m-editor-history-list-group-toggle", { "is-expanded": __props.expanded }])
|
|
12759
12918
|
}, "▾", 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
12760
|
-
], 10, _hoisted_1$
|
|
12919
|
+
], 10, _hoisted_1$67), merged.value && __props.expanded ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("ul", _hoisted_10, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(subStepsDisplay.value, (s) => {
|
|
12761
12920
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
|
12762
12921
|
key: s.index,
|
|
12763
12922
|
class: (0, vue.normalizeClass)({
|
|
@@ -12816,18 +12975,18 @@
|
|
|
12816
12975
|
var GroupRow_default = GroupRow_vue_vue_type_script_setup_true_lang_default;
|
|
12817
12976
|
//#endregion
|
|
12818
12977
|
//#region packages/editor/src/layouts/history-list/InitialRow.vue?vue&type=script&setup=true&lang.ts
|
|
12819
|
-
var _hoisted_1$
|
|
12978
|
+
var _hoisted_1$66 = ["title"];
|
|
12820
12979
|
var _hoisted_2$23 = { class: "m-editor-history-list-item-desc" };
|
|
12821
|
-
var _hoisted_3$
|
|
12980
|
+
var _hoisted_3$11 = {
|
|
12822
12981
|
key: 0,
|
|
12823
12982
|
class: "m-editor-history-list-item-saved",
|
|
12824
12983
|
title: "该记录为最近一次保存的状态"
|
|
12825
12984
|
};
|
|
12826
|
-
var _hoisted_4$
|
|
12985
|
+
var _hoisted_4$8 = {
|
|
12827
12986
|
key: 1,
|
|
12828
12987
|
class: "m-editor-history-list-item-actions"
|
|
12829
12988
|
};
|
|
12830
|
-
var _hoisted_5$
|
|
12989
|
+
var _hoisted_5$4 = ["title"];
|
|
12831
12990
|
var InitialRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
12832
12991
|
name: "MEditorHistoryListInitialRow",
|
|
12833
12992
|
__name: "InitialRow",
|
|
@@ -12879,8 +13038,8 @@
|
|
|
12879
13038
|
}, "#0", -1)),
|
|
12880
13039
|
_cache[1] || (_cache[1] = (0, vue.createElementVNode)("span", { class: "m-editor-history-list-item-op op-initial" }, "初始", -1)),
|
|
12881
13040
|
(0, vue.createElementVNode)("span", _hoisted_2$23, (0, vue.toDisplayString)(desc.value), 1),
|
|
12882
|
-
saved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
12883
|
-
__props.gotoEnabled && !__props.isCurrent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$
|
|
13041
|
+
saved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$11, "已保存")) : (0, vue.createCommentVNode)("v-if", true),
|
|
13042
|
+
__props.gotoEnabled && !__props.isCurrent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$8, [(0, vue.createElementVNode)("span", {
|
|
12884
13043
|
class: "m-editor-history-list-item-goto",
|
|
12885
13044
|
title: "回到该记录",
|
|
12886
13045
|
onClick: (0, vue.withModifiers)(onClick, ["stop"])
|
|
@@ -12889,8 +13048,8 @@
|
|
|
12889
13048
|
key: 2,
|
|
12890
13049
|
class: "m-editor-history-list-item-time",
|
|
12891
13050
|
title: timeTitle.value
|
|
12892
|
-
}, (0, vue.toDisplayString)(time.value), 9, _hoisted_5$
|
|
12893
|
-
], 10, _hoisted_1$
|
|
13051
|
+
}, (0, vue.toDisplayString)(time.value), 9, _hoisted_5$4)) : (0, vue.createCommentVNode)("v-if", true)
|
|
13052
|
+
], 10, _hoisted_1$66);
|
|
12894
13053
|
};
|
|
12895
13054
|
}
|
|
12896
13055
|
});
|
|
@@ -12899,10 +13058,10 @@
|
|
|
12899
13058
|
var InitialRow_default = InitialRow_vue_vue_type_script_setup_true_lang_default;
|
|
12900
13059
|
//#endregion
|
|
12901
13060
|
//#region packages/editor/src/layouts/history-list/Bucket.vue?vue&type=script&setup=true&lang.ts
|
|
12902
|
-
var _hoisted_1$
|
|
13061
|
+
var _hoisted_1$65 = { class: "m-editor-history-list-bucket" };
|
|
12903
13062
|
var _hoisted_2$22 = { class: "m-editor-history-list-bucket-title" };
|
|
12904
|
-
var _hoisted_3$
|
|
12905
|
-
var _hoisted_4$
|
|
13063
|
+
var _hoisted_3$10 = { class: "m-editor-history-list-bucket-count" };
|
|
13064
|
+
var _hoisted_4$7 = { class: "m-editor-history-list-ul" };
|
|
12906
13065
|
var Bucket_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
12907
13066
|
name: "MEditorHistoryListBucket",
|
|
12908
13067
|
__name: "Bucket",
|
|
@@ -12931,11 +13090,11 @@
|
|
|
12931
13090
|
/** 该 bucket 是否处于初始状态(栈 cursor=0),等价于全部 group 都未 applied。 */
|
|
12932
13091
|
const isInitial = (0, vue.computed)(() => props.groups.length > 0 && props.groups.every((g) => !g.applied));
|
|
12933
13092
|
return (_ctx, _cache) => {
|
|
12934
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13093
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$65, [(0, vue.createElementVNode)("div", _hoisted_2$22, [
|
|
12935
13094
|
(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(__props.config.title), 1),
|
|
12936
13095
|
(0, vue.createElementVNode)("code", null, (0, vue.toDisplayString)(String(__props.bucketId)), 1),
|
|
12937
|
-
(0, vue.createElementVNode)("span", _hoisted_3$
|
|
12938
|
-
]), (0, vue.createElementVNode)("ul", _hoisted_4$
|
|
13096
|
+
(0, vue.createElementVNode)("span", _hoisted_3$10, (0, vue.toDisplayString)(__props.groups.length) + " 组", 1)
|
|
13097
|
+
]), (0, vue.createElementVNode)("ul", _hoisted_4$7, [
|
|
12939
13098
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.groups, (group) => {
|
|
12940
13099
|
return (0, vue.openBlock)(), (0, vue.createBlock)(GroupRow_default, {
|
|
12941
13100
|
key: rowKey(group),
|
|
@@ -12968,7 +13127,7 @@
|
|
|
12968
13127
|
var Bucket_default = Bucket_vue_vue_type_script_setup_true_lang_default;
|
|
12969
13128
|
//#endregion
|
|
12970
13129
|
//#region packages/editor/src/layouts/history-list/BucketTab.vue?vue&type=script&setup=true&lang.ts
|
|
12971
|
-
var _hoisted_1$
|
|
13130
|
+
var _hoisted_1$64 = {
|
|
12972
13131
|
key: 0,
|
|
12973
13132
|
class: "m-editor-history-list-empty"
|
|
12974
13133
|
};
|
|
@@ -12976,7 +13135,7 @@
|
|
|
12976
13135
|
key: 0,
|
|
12977
13136
|
class: "m-editor-history-list-toolbar"
|
|
12978
13137
|
};
|
|
12979
|
-
var _hoisted_3$
|
|
13138
|
+
var _hoisted_3$9 = ["title"];
|
|
12980
13139
|
var BucketTab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
12981
13140
|
name: "MEditorHistoryListBucketTab",
|
|
12982
13141
|
__name: "BucketTab",
|
|
@@ -12995,11 +13154,11 @@
|
|
|
12995
13154
|
],
|
|
12996
13155
|
setup(__props) {
|
|
12997
13156
|
return (_ctx, _cache) => {
|
|
12998
|
-
return !__props.buckets.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13157
|
+
return !__props.buckets.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$64, "暂无操作记录")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [__props.config.showClear !== false ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$21, [(0, vue.createElementVNode)("span", {
|
|
12999
13158
|
class: "m-editor-history-list-clear",
|
|
13000
13159
|
title: `清空${__props.config.title}的历史记录`,
|
|
13001
13160
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("clear"))
|
|
13002
|
-
}, "清空", 8, _hoisted_3$
|
|
13161
|
+
}, "清空", 8, _hoisted_3$9)])) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { "max-height": "360px" }, {
|
|
13003
13162
|
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.buckets, (bucket) => {
|
|
13004
13163
|
return (0, vue.openBlock)(), (0, vue.createBlock)(Bucket_default, {
|
|
13005
13164
|
key: `${__props.config.prefix}-${bucket.id}`,
|
|
@@ -13029,7 +13188,7 @@
|
|
|
13029
13188
|
var BucketTab_default = BucketTab_vue_vue_type_script_setup_true_lang_default;
|
|
13030
13189
|
//#endregion
|
|
13031
13190
|
//#region packages/editor/src/layouts/history-list/PageTab.vue?vue&type=script&setup=true&lang.ts
|
|
13032
|
-
var _hoisted_1$
|
|
13191
|
+
var _hoisted_1$63 = {
|
|
13033
13192
|
key: 0,
|
|
13034
13193
|
class: "m-editor-history-list-empty"
|
|
13035
13194
|
};
|
|
@@ -13037,7 +13196,7 @@
|
|
|
13037
13196
|
key: 0,
|
|
13038
13197
|
class: "m-editor-history-list-toolbar"
|
|
13039
13198
|
};
|
|
13040
|
-
var _hoisted_3$
|
|
13199
|
+
var _hoisted_3$8 = { class: "m-editor-history-list-ul" };
|
|
13041
13200
|
var PageTab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
13042
13201
|
name: "MEditorHistoryListPageTab",
|
|
13043
13202
|
__name: "PageTab",
|
|
@@ -13085,12 +13244,12 @@
|
|
|
13085
13244
|
*/
|
|
13086
13245
|
const isInitial = (0, vue.computed)(() => props.list.every((g) => !g.applied));
|
|
13087
13246
|
return (_ctx, _cache) => {
|
|
13088
|
-
return !__props.list.length && !__props.marker ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13247
|
+
return !__props.list.length && !__props.marker ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$63, "暂无操作记录")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [__props.list.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$20, [(0, vue.createElementVNode)("span", {
|
|
13089
13248
|
class: "m-editor-history-list-clear",
|
|
13090
13249
|
title: "清空当前页面的历史记录",
|
|
13091
13250
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("clear"))
|
|
13092
13251
|
}, "清空")])) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { "max-height": "360px" }, {
|
|
13093
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("ul", _hoisted_3$
|
|
13252
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("ul", _hoisted_3$8, [
|
|
13094
13253
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.list, (group) => {
|
|
13095
13254
|
return (0, vue.openBlock)(), (0, vue.createBlock)(GroupRow_default, {
|
|
13096
13255
|
key: rowKey(group),
|
|
@@ -13182,59 +13341,27 @@
|
|
|
13182
13341
|
__name: "CompareForm",
|
|
13183
13342
|
props: {
|
|
13184
13343
|
value: {},
|
|
13185
|
-
lastValue: {},
|
|
13186
13344
|
type: {},
|
|
13187
13345
|
category: { default: "node" },
|
|
13188
13346
|
dataSourceType: {},
|
|
13189
13347
|
labelWidth: { default: "120px" },
|
|
13190
13348
|
height: {},
|
|
13191
|
-
extendState: {
|
|
13192
|
-
type: Function,
|
|
13193
|
-
default: (state) => state
|
|
13194
|
-
},
|
|
13349
|
+
extendState: {},
|
|
13195
13350
|
baseFormState: {},
|
|
13196
|
-
selfDiffFieldTypes: {},
|
|
13197
13351
|
size: {},
|
|
13198
13352
|
loadConfig: {},
|
|
13199
|
-
services: {}
|
|
13353
|
+
services: {},
|
|
13354
|
+
lastValue: {},
|
|
13355
|
+
selfDiffFieldTypes: {}
|
|
13200
13356
|
},
|
|
13201
13357
|
setup(__props, { expose: __expose }) {
|
|
13202
13358
|
const props = __props;
|
|
13203
|
-
|
|
13204
|
-
const config = (0, vue.ref)([]);
|
|
13205
|
-
/** vs-code 编辑器的 monaco 配置项,沿用 Editor 顶层 provide('codeOptions', ...) 的注入。 */
|
|
13206
|
-
const codeOptions = (0, vue.inject)("codeOptions", {});
|
|
13207
|
-
/** 将代码块的 content 字段统一成字符串,便于在表单/对比中展示 */
|
|
13208
|
-
const normalizeCodeBlockValue = (v) => {
|
|
13209
|
-
if (!v) return {};
|
|
13210
|
-
const next = { ...v };
|
|
13211
|
-
if (next.content && typeof next.content !== "string") try {
|
|
13212
|
-
next.content = next.content.toString();
|
|
13213
|
-
} catch {
|
|
13214
|
-
next.content = "";
|
|
13215
|
-
}
|
|
13216
|
-
return next;
|
|
13217
|
-
};
|
|
13218
|
-
const currentValues = (0, vue.computed)(() => {
|
|
13219
|
-
if (props.category === "code-block") return normalizeCodeBlockValue(props.value);
|
|
13220
|
-
return props.value || {};
|
|
13221
|
-
});
|
|
13359
|
+
const { config, currentValues, wrapperStyle, mergedExtendState, loadConfig, formRef, normalizeCodeBlockValue } = useCompareForm(props);
|
|
13222
13360
|
const lastValuesProcessed = (0, vue.computed)(() => {
|
|
13223
13361
|
if (props.category === "code-block") return normalizeCodeBlockValue(props.lastValue);
|
|
13224
13362
|
return props.lastValue || {};
|
|
13225
13363
|
});
|
|
13226
13364
|
/**
|
|
13227
|
-
* 外层包裹层的样式:当传入 `height` 时启用固定高度 + 内部滚动,
|
|
13228
|
-
* 这样滚动条会出现在 CompareForm 内部,避免父容器(如 Dialog)自身也产生滚动。
|
|
13229
|
-
*/
|
|
13230
|
-
const wrapperStyle = (0, vue.computed)(() => {
|
|
13231
|
-
if (!props.height) return void 0;
|
|
13232
|
-
return {
|
|
13233
|
-
height: props.height,
|
|
13234
|
-
overflow: "auto"
|
|
13235
|
-
};
|
|
13236
|
-
});
|
|
13237
|
-
/**
|
|
13238
13365
|
* `code-select` 字段在历史数据中存在两种"语义为空"的形态:
|
|
13239
13366
|
* - 字符串 `''`(旧数据 / 用户从未配置过钩子);
|
|
13240
13367
|
* - `{ hookType: HookType.CODE, hookData: [] }`(CodeSelect.vue 在挂载时
|
|
@@ -13257,83 +13384,6 @@
|
|
|
13257
13384
|
}
|
|
13258
13385
|
return !isEqual(curValue, lastValue);
|
|
13259
13386
|
};
|
|
13260
|
-
const removeStyleDisplayConfig = (formConfig) => formConfig.map((item) => {
|
|
13261
|
-
if (!("type" in item)) return item;
|
|
13262
|
-
if (item?.type !== "tab" || !Array.isArray(item.items)) return item;
|
|
13263
|
-
return {
|
|
13264
|
-
...item,
|
|
13265
|
-
items: item.items.map((tabPane) => {
|
|
13266
|
-
if (tabPane?.title !== "样式" || !Array.isArray(tabPane.items)) return tabPane;
|
|
13267
|
-
return {
|
|
13268
|
-
...tabPane,
|
|
13269
|
-
display: true
|
|
13270
|
-
};
|
|
13271
|
-
})
|
|
13272
|
-
};
|
|
13273
|
-
});
|
|
13274
|
-
const mergedExtendState = (state) => {
|
|
13275
|
-
return props.extendState(props.baseFormState || state);
|
|
13276
|
-
};
|
|
13277
|
-
/**
|
|
13278
|
-
* 内置的默认 FormConfig 加载逻辑:按 `category` 从对应 service / 工具取配置。
|
|
13279
|
-
* 作为 ctx.defaultLoadConfig 透传给自定义 `loadConfig`,方便复用与二次加工。
|
|
13280
|
-
*/
|
|
13281
|
-
const defaultLoadConfig = async () => {
|
|
13282
|
-
if (!props.services) return [];
|
|
13283
|
-
switch (props.category) {
|
|
13284
|
-
case "node":
|
|
13285
|
-
if (!props.type) return [];
|
|
13286
|
-
return removeStyleDisplayConfig(await props.services.propsService.getPropsConfig(props.type, { node: props.value }));
|
|
13287
|
-
case "data-source": return props.services.dataSourceService.getFormConfig(props.type || "base").map((item) => "type" in item && item.type === "tab" ? {
|
|
13288
|
-
...item,
|
|
13289
|
-
active: "fields"
|
|
13290
|
-
} : item);
|
|
13291
|
-
case "code-block": return getCodeBlockFormConfig({
|
|
13292
|
-
paramColConfig: props.services.codeBlockService.getParamsColConfig(),
|
|
13293
|
-
isDataSource: () => Boolean(props.dataSourceType),
|
|
13294
|
-
dataSourceType: () => props.dataSourceType,
|
|
13295
|
-
codeOptions,
|
|
13296
|
-
editable: false
|
|
13297
|
-
});
|
|
13298
|
-
default: return [];
|
|
13299
|
-
}
|
|
13300
|
-
};
|
|
13301
|
-
const loadConfig = async () => {
|
|
13302
|
-
if (props.loadConfig) {
|
|
13303
|
-
config.value = await props.loadConfig({
|
|
13304
|
-
category: props.category,
|
|
13305
|
-
type: props.type,
|
|
13306
|
-
dataSourceType: props.dataSourceType,
|
|
13307
|
-
defaultLoadConfig
|
|
13308
|
-
});
|
|
13309
|
-
return;
|
|
13310
|
-
}
|
|
13311
|
-
config.value = await defaultLoadConfig();
|
|
13312
|
-
};
|
|
13313
|
-
(0, vue.watch)([
|
|
13314
|
-
() => props.category,
|
|
13315
|
-
() => props.type,
|
|
13316
|
-
() => props.dataSourceType,
|
|
13317
|
-
() => props.loadConfig
|
|
13318
|
-
], () => {
|
|
13319
|
-
loadConfig();
|
|
13320
|
-
}, { immediate: true });
|
|
13321
|
-
const formRef = (0, vue.useTemplateRef)("form");
|
|
13322
|
-
/**
|
|
13323
|
-
* 把 services / stage 注入 MForm 的 formState,避免 propsService 注入的表单配置中
|
|
13324
|
-
* 形如 `display: ({ services }) => services.uiService.get(...)` 的 filterFunction
|
|
13325
|
-
* 在执行时拿不到 `formState.services` 而报错。
|
|
13326
|
-
*
|
|
13327
|
-
* 与 props-panel/FormPanel.vue 中的注入方式保持一致:
|
|
13328
|
-
* - services:整个 useServices() 返回的服务集合;
|
|
13329
|
-
* - stage:当前 editorService.get('stage') 的最新值。
|
|
13330
|
-
*/
|
|
13331
|
-
(0, vue.watchEffect)(() => {
|
|
13332
|
-
if (formRef.value && props.services) {
|
|
13333
|
-
formRef.value.formState.stage = props.services.editorService.get("stage");
|
|
13334
|
-
formRef.value.formState.services = props.services;
|
|
13335
|
-
}
|
|
13336
|
-
});
|
|
13337
13387
|
__expose({
|
|
13338
13388
|
form: formRef,
|
|
13339
13389
|
config,
|
|
@@ -13342,18 +13392,18 @@
|
|
|
13342
13392
|
return (_ctx, _cache) => {
|
|
13343
13393
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
13344
13394
|
class: "m-editor-compare-form-wrapper",
|
|
13345
|
-
style: (0, vue.normalizeStyle)(
|
|
13346
|
-
}, [config.
|
|
13395
|
+
style: (0, vue.normalizeStyle)((0, vue.unref)(wrapperStyle))
|
|
13396
|
+
}, [(0, vue.unref)(config).length ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MForm), {
|
|
13347
13397
|
key: 0,
|
|
13348
13398
|
ref: "form",
|
|
13349
13399
|
class: "m-editor-compare-form",
|
|
13350
|
-
config: config
|
|
13351
|
-
"init-values": currentValues
|
|
13400
|
+
config: (0, vue.unref)(config),
|
|
13401
|
+
"init-values": (0, vue.unref)(currentValues),
|
|
13352
13402
|
"last-values": lastValuesProcessed.value,
|
|
13353
13403
|
"is-compare": true,
|
|
13354
13404
|
disabled: true,
|
|
13355
13405
|
"label-width": __props.labelWidth,
|
|
13356
|
-
"extend-state": mergedExtendState,
|
|
13406
|
+
"extend-state": (0, vue.unref)(mergedExtendState),
|
|
13357
13407
|
"show-diff": showDiff,
|
|
13358
13408
|
"self-diff-field-types": __props.selfDiffFieldTypes,
|
|
13359
13409
|
size: __props.size
|
|
@@ -13362,6 +13412,7 @@
|
|
|
13362
13412
|
"init-values",
|
|
13363
13413
|
"last-values",
|
|
13364
13414
|
"label-width",
|
|
13415
|
+
"extend-state",
|
|
13365
13416
|
"self-diff-field-types",
|
|
13366
13417
|
"size"
|
|
13367
13418
|
])) : (0, vue.createCommentVNode)("v-if", true)], 4);
|
|
@@ -13379,12 +13430,12 @@
|
|
|
13379
13430
|
}));
|
|
13380
13431
|
//#endregion
|
|
13381
13432
|
//#region packages/editor/src/layouts/history-list/HistoryDiffDialog.vue?vue&type=script&setup=true&lang.ts
|
|
13382
|
-
var _hoisted_1$
|
|
13433
|
+
var _hoisted_1$62, _hoisted_2$19, _hoisted_3$7, _hoisted_4$6, _hoisted_5$3, _hoisted_6$2, _hoisted_7, HistoryDiffDialog_vue_vue_type_script_setup_true_lang_default;
|
|
13383
13434
|
var init_HistoryDiffDialog_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
13384
13435
|
init_lodash();
|
|
13385
13436
|
init_CompareForm();
|
|
13386
13437
|
init_CodeEditor();
|
|
13387
|
-
_hoisted_1$
|
|
13438
|
+
_hoisted_1$62 = {
|
|
13388
13439
|
key: 0,
|
|
13389
13440
|
class: "m-editor-history-diff-dialog-body"
|
|
13390
13441
|
};
|
|
@@ -13392,9 +13443,9 @@
|
|
|
13392
13443
|
key: 0,
|
|
13393
13444
|
class: "m-editor-history-diff-dialog-notice"
|
|
13394
13445
|
};
|
|
13395
|
-
_hoisted_3$
|
|
13396
|
-
_hoisted_4$
|
|
13397
|
-
_hoisted_5$
|
|
13446
|
+
_hoisted_3$7 = { class: "m-editor-history-diff-dialog-header" };
|
|
13447
|
+
_hoisted_4$6 = { class: "m-editor-history-diff-dialog-target" };
|
|
13448
|
+
_hoisted_5$3 = { class: "m-editor-history-diff-dialog-controls" };
|
|
13398
13449
|
_hoisted_6$2 = { class: "m-editor-history-diff-dialog-legend" };
|
|
13399
13450
|
_hoisted_7 = {
|
|
13400
13451
|
key: 0,
|
|
@@ -13572,9 +13623,9 @@
|
|
|
13572
13623
|
default: (0, vue.withCtx)(() => [..._cache[12] || (_cache[12] = [(0, vue.createTextVNode)("关闭", -1)])]),
|
|
13573
13624
|
_: 1
|
|
13574
13625
|
}))]),
|
|
13575
|
-
default: (0, vue.withCtx)(() => [payload.value && visible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13626
|
+
default: (0, vue.withCtx)(() => [payload.value && visible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$62, [
|
|
13576
13627
|
__props.onConfirm ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$19, "仅回滚有差异的字段")) : (0, vue.createCommentVNode)("v-if", true),
|
|
13577
|
-
(0, vue.createElementVNode)("div", _hoisted_3$
|
|
13628
|
+
(0, vue.createElementVNode)("div", _hoisted_3$7, [(0, vue.createElementVNode)("span", _hoisted_4$6, (0, vue.toDisplayString)(targetText.value), 1), (0, vue.createElementVNode)("div", _hoisted_5$3, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicRadioGroup), {
|
|
13578
13629
|
modelValue: viewMode.value,
|
|
13579
13630
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => viewMode.value = $event),
|
|
13580
13631
|
size: "small",
|
|
@@ -13999,7 +14050,7 @@
|
|
|
13999
14050
|
//#endregion
|
|
14000
14051
|
//#region packages/editor/src/layouts/history-list/HistoryListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
14001
14052
|
init_Icon();
|
|
14002
|
-
var _hoisted_1$
|
|
14053
|
+
var _hoisted_1$61 = { class: "m-editor-history-list" };
|
|
14003
14054
|
var HistoryListPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
14004
14055
|
name: "MEditorHistoryListPanel",
|
|
14005
14056
|
__name: "HistoryListPanel",
|
|
@@ -14198,7 +14249,7 @@
|
|
|
14198
14249
|
})]),
|
|
14199
14250
|
_: 1
|
|
14200
14251
|
})]),
|
|
14201
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
14252
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$61, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicTooltip), {
|
|
14202
14253
|
effect: "dark",
|
|
14203
14254
|
placement: "top",
|
|
14204
14255
|
content: "关闭"
|
|
@@ -14318,7 +14369,7 @@
|
|
|
14318
14369
|
var HistoryListPanel_default = HistoryListPanel_vue_vue_type_script_setup_true_lang_default;
|
|
14319
14370
|
//#endregion
|
|
14320
14371
|
//#region packages/editor/src/layouts/NavMenuColumn.vue?vue&type=script&setup=true&lang.ts
|
|
14321
|
-
var _hoisted_1$
|
|
14372
|
+
var _hoisted_1$60 = { class: "m-editor-nav-menu-overflow-list" };
|
|
14322
14373
|
var NavMenuColumn_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
14323
14374
|
name: "MEditorNavMenuColumn",
|
|
14324
14375
|
__name: "NavMenuColumn",
|
|
@@ -14501,7 +14552,7 @@
|
|
|
14501
14552
|
"bg",
|
|
14502
14553
|
"type"
|
|
14503
14554
|
])], 512)]),
|
|
14504
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
14555
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$60, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(overflowItems.value, (item, index) => {
|
|
14505
14556
|
return (0, vue.openBlock)(), (0, vue.createBlock)(ToolButton_default, {
|
|
14506
14557
|
data: item,
|
|
14507
14558
|
key: `o-${index}`
|
|
@@ -14744,8 +14795,9 @@
|
|
|
14744
14795
|
//#endregion
|
|
14745
14796
|
//#region packages/editor/src/layouts/props-panel/FormPanel.vue?vue&type=script&setup=true&lang.ts
|
|
14746
14797
|
init_Icon();
|
|
14798
|
+
init_props();
|
|
14747
14799
|
init_CodeEditor();
|
|
14748
|
-
var _hoisted_1$
|
|
14800
|
+
var _hoisted_1$59 = { class: "m-editor-props-form-panel" };
|
|
14749
14801
|
var FormPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
14750
14802
|
name: "MEditorFormPanel",
|
|
14751
14803
|
__name: "FormPanel",
|
|
@@ -14842,7 +14894,7 @@
|
|
|
14842
14894
|
submit
|
|
14843
14895
|
});
|
|
14844
14896
|
return (_ctx, _cache) => {
|
|
14845
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
14897
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$59, [
|
|
14846
14898
|
(0, vue.renderSlot)(_ctx.$slots, "props-form-panel-header"),
|
|
14847
14899
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), null, {
|
|
14848
14900
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MForm), {
|
|
@@ -14942,7 +14994,8 @@
|
|
|
14942
14994
|
//#endregion
|
|
14943
14995
|
//#region packages/editor/src/layouts/props-panel/PropsPanel.vue?vue&type=script&setup=true&lang.ts
|
|
14944
14996
|
init_Icon();
|
|
14945
|
-
|
|
14997
|
+
init_props();
|
|
14998
|
+
var _hoisted_1$58 = {
|
|
14946
14999
|
ref: "propsPanel",
|
|
14947
15000
|
class: "m-editor-props-panel"
|
|
14948
15001
|
};
|
|
@@ -14972,18 +15025,27 @@
|
|
|
14972
15025
|
tabPosition: "right",
|
|
14973
15026
|
items: styleTabConfig.items
|
|
14974
15027
|
}];
|
|
15028
|
+
let initSeq = 0;
|
|
15029
|
+
let mounted = true;
|
|
14975
15030
|
const init = async () => {
|
|
15031
|
+
initSeq += 1;
|
|
15032
|
+
const seq = initSeq;
|
|
14976
15033
|
if (!node.value) {
|
|
15034
|
+
if (seq !== initSeq || !mounted) return;
|
|
14977
15035
|
curFormConfig.value = [];
|
|
14978
15036
|
return;
|
|
14979
15037
|
}
|
|
14980
15038
|
const type = node.value.type || (node.value.items ? "container" : "text");
|
|
14981
|
-
|
|
15039
|
+
const config = await propsService.getPropsConfig(type, { node: node.value });
|
|
15040
|
+
if (seq !== initSeq || !mounted) return;
|
|
15041
|
+
if (!node.value) return;
|
|
15042
|
+
curFormConfig.value = config;
|
|
14982
15043
|
values.value = node.value;
|
|
14983
15044
|
};
|
|
14984
15045
|
(0, vue.watchEffect)(init);
|
|
14985
15046
|
propsService.on("props-configs-change", init);
|
|
14986
15047
|
(0, vue.onBeforeUnmount)(() => {
|
|
15048
|
+
mounted = false;
|
|
14987
15049
|
propsService.off("props-configs-change", init);
|
|
14988
15050
|
});
|
|
14989
15051
|
const submit = async (v, eventData, error, source = "props") => {
|
|
@@ -15051,7 +15113,7 @@
|
|
|
15051
15113
|
submit
|
|
15052
15114
|
});
|
|
15053
15115
|
return (_ctx, _cache) => {
|
|
15054
|
-
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
15116
|
+
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$58, [
|
|
15055
15117
|
(0, vue.renderSlot)(_ctx.$slots, "props-panel-header"),
|
|
15056
15118
|
(0, vue.createVNode)(FormPanel_default, {
|
|
15057
15119
|
ref: "propertyFormPanel",
|
|
@@ -15122,7 +15184,7 @@
|
|
|
15122
15184
|
//#endregion
|
|
15123
15185
|
//#region packages/editor/src/components/FloatingBox.vue?vue&type=script&setup=true&lang.ts
|
|
15124
15186
|
init_Icon();
|
|
15125
|
-
var _hoisted_1$
|
|
15187
|
+
var _hoisted_1$57 = {
|
|
15126
15188
|
ref: "title",
|
|
15127
15189
|
class: "m-editor-float-box-title"
|
|
15128
15190
|
};
|
|
@@ -15161,6 +15223,11 @@
|
|
|
15161
15223
|
const props = __props;
|
|
15162
15224
|
const targetEl = (0, vue.useTemplateRef)("target");
|
|
15163
15225
|
const titleEl = (0, vue.useTemplateRef)("title");
|
|
15226
|
+
/**
|
|
15227
|
+
* 主题修饰类(来自最近的 `<MEditor>` / `<MForm>` 祖先 provide)。
|
|
15228
|
+
* 挂在 `Teleport` 出去的浮动面板根节点上,让主题级 CSS 变量在 portal 节点上也能命中。
|
|
15229
|
+
*/
|
|
15230
|
+
const themeClass = (0, _tmagic_design.useThemeClass)();
|
|
15164
15231
|
const zIndex = (0, _tmagic_design.useZIndex)();
|
|
15165
15232
|
const curZIndex = (0, vue.ref)(0);
|
|
15166
15233
|
const titleHeight = (0, vue.ref)(0);
|
|
@@ -15297,14 +15364,14 @@
|
|
|
15297
15364
|
to: "body"
|
|
15298
15365
|
}, [(0, vue.createElementVNode)("div", (0, vue.mergeProps)({
|
|
15299
15366
|
ref: "target",
|
|
15300
|
-
class: "m-editor-float-box"
|
|
15367
|
+
class: ["m-editor-float-box", (0, vue.unref)(themeClass)]
|
|
15301
15368
|
}, _ctx.$attrs, {
|
|
15302
15369
|
style: {
|
|
15303
15370
|
...style.value,
|
|
15304
15371
|
zIndex: curZIndex.value
|
|
15305
15372
|
},
|
|
15306
15373
|
onMousedown: nextZIndex
|
|
15307
|
-
}), [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
15374
|
+
}), [(0, vue.createElementVNode)("div", _hoisted_1$57, [(0, vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(__props.title), 1)]), (0, vue.createElementVNode)("div", null, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
15308
15375
|
link: "",
|
|
15309
15376
|
size: "small",
|
|
15310
15377
|
onClick: closeHandler
|
|
@@ -15329,13 +15396,13 @@
|
|
|
15329
15396
|
init_CodeEditor();
|
|
15330
15397
|
init_code_block();
|
|
15331
15398
|
init_config();
|
|
15332
|
-
var _hoisted_1$
|
|
15399
|
+
var _hoisted_1$56 = { style: {
|
|
15333
15400
|
"display": "flex",
|
|
15334
15401
|
"margin-bottom": "10px"
|
|
15335
15402
|
} };
|
|
15336
15403
|
var _hoisted_2$17 = { style: { "flex": "1" } };
|
|
15337
|
-
var _hoisted_3$
|
|
15338
|
-
var _hoisted_4$
|
|
15404
|
+
var _hoisted_3$6 = { style: { "flex": "1" } };
|
|
15405
|
+
var _hoisted_4$5 = { class: "dialog-footer" };
|
|
15339
15406
|
var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
15340
15407
|
name: "MEditorCodeBlockEditor",
|
|
15341
15408
|
__name: "CodeBlockEditor",
|
|
@@ -15519,7 +15586,7 @@
|
|
|
15519
15586
|
fullscreen: "",
|
|
15520
15587
|
"destroy-on-close": ""
|
|
15521
15588
|
}, {
|
|
15522
|
-
footer: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_4$
|
|
15589
|
+
footer: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_4$5, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
15523
15590
|
size: "small",
|
|
15524
15591
|
onClick: _cache[4] || (_cache[4] = ($event) => difVisible.value = false)
|
|
15525
15592
|
}, {
|
|
@@ -15533,13 +15600,13 @@
|
|
|
15533
15600
|
default: (0, vue.withCtx)(() => [..._cache[10] || (_cache[10] = [(0, vue.createTextVNode)("确定", -1)])]),
|
|
15534
15601
|
_: 1
|
|
15535
15602
|
})])]),
|
|
15536
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
15603
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$56, [(0, vue.createElementVNode)("div", _hoisted_2$17, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicTag), {
|
|
15537
15604
|
size: "small",
|
|
15538
15605
|
type: "danger"
|
|
15539
15606
|
}, {
|
|
15540
15607
|
default: (0, vue.withCtx)(() => [..._cache[7] || (_cache[7] = [(0, vue.createTextVNode)("修改前", -1)])]),
|
|
15541
15608
|
_: 1
|
|
15542
|
-
})]), (0, vue.createElementVNode)("div", _hoisted_3$
|
|
15609
|
+
})]), (0, vue.createElementVNode)("div", _hoisted_3$6, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicTag), {
|
|
15543
15610
|
size: "small",
|
|
15544
15611
|
type: "success"
|
|
15545
15612
|
}, {
|
|
@@ -15596,6 +15663,13 @@
|
|
|
15596
15663
|
const buttonRefs = (0, vue.useTemplateRef)("buttons");
|
|
15597
15664
|
const subMenuRef = (0, vue.useTemplateRef)("subMenu");
|
|
15598
15665
|
const visible = (0, vue.ref)(false);
|
|
15666
|
+
/**
|
|
15667
|
+
* 主题修饰类(来自最近的 `<MEditor>` / `<MForm>` 祖先 provide)。
|
|
15668
|
+
* - 顶层 `ContentMenu` 渲染在编辑器子树中,加上去是冗余但无害;
|
|
15669
|
+
* - 子菜单(递归 `<content-menu :is-sub-menu="true">` 被 `<teleport to="body">` 送到 body)
|
|
15670
|
+
* 不在编辑器子树中,必须显式挂上主题类,主题级 CSS 变量才能命中。
|
|
15671
|
+
*/
|
|
15672
|
+
const themeClass = (0, _tmagic_design.useThemeClass)();
|
|
15599
15673
|
const subMenuData = (0, vue.ref)([]);
|
|
15600
15674
|
const zIndex = (0, _tmagic_design.useZIndex)();
|
|
15601
15675
|
const curZIndex = (0, vue.ref)(0);
|
|
@@ -15685,8 +15759,8 @@
|
|
|
15685
15759
|
persisted: ""
|
|
15686
15760
|
}, {
|
|
15687
15761
|
default: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createElementVNode)("div", {
|
|
15688
|
-
class: "magic-editor-content-menu",
|
|
15689
15762
|
ref: "menu",
|
|
15763
|
+
class: (0, vue.normalizeClass)(["magic-editor-content-menu", (0, vue.unref)(themeClass)]),
|
|
15690
15764
|
style: (0, vue.normalizeStyle)(menuStyle.value),
|
|
15691
15765
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler()),
|
|
15692
15766
|
onContextmenu: _cache[1] || (_cache[1] = (0, vue.withModifiers)(() => {}, ["prevent"]))
|
|
@@ -15717,7 +15791,7 @@
|
|
|
15717
15791
|
"is-sub-menu": true,
|
|
15718
15792
|
onHide: hide
|
|
15719
15793
|
}, null, 8, ["active", "menu-data"])) : (0, vue.createCommentVNode)("v-if", true)]))
|
|
15720
|
-
],
|
|
15794
|
+
], 38), [[vue.vShow, visible.value]])]),
|
|
15721
15795
|
_: 3
|
|
15722
15796
|
});
|
|
15723
15797
|
};
|
|
@@ -15768,7 +15842,7 @@
|
|
|
15768
15842
|
//#endregion
|
|
15769
15843
|
//#region packages/editor/src/components/TreeNode.vue?vue&type=script&setup=true&lang.ts
|
|
15770
15844
|
init_Icon();
|
|
15771
|
-
var _hoisted_1$
|
|
15845
|
+
var _hoisted_1$55 = [
|
|
15772
15846
|
"draggable",
|
|
15773
15847
|
"data-node-id",
|
|
15774
15848
|
"data-parent-id",
|
|
@@ -15776,8 +15850,8 @@
|
|
|
15776
15850
|
"data-is-container"
|
|
15777
15851
|
];
|
|
15778
15852
|
var _hoisted_2$16 = { class: "tree-node-label" };
|
|
15779
|
-
var _hoisted_3$
|
|
15780
|
-
var _hoisted_4$
|
|
15853
|
+
var _hoisted_3$5 = { class: "tree-node-tool" };
|
|
15854
|
+
var _hoisted_4$4 = {
|
|
15781
15855
|
key: 0,
|
|
15782
15856
|
class: "m-editor-tree-node-children"
|
|
15783
15857
|
};
|
|
@@ -15871,7 +15945,7 @@
|
|
|
15871
15945
|
class: "tree-node-content",
|
|
15872
15946
|
onClick: nodeClickHandler,
|
|
15873
15947
|
onDblclick: nodeDblclickHandler
|
|
15874
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-content", { data: __props.data }, () => [(0, vue.createElementVNode)("div", _hoisted_2$16, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-label", { data: __props.data }, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(`${__props.data.name} (${__props.data.id})`), 1)])]), (0, vue.createElementVNode)("div", _hoisted_3$
|
|
15948
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-content", { data: __props.data }, () => [(0, vue.createElementVNode)("div", _hoisted_2$16, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-label", { data: __props.data }, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(`${__props.data.name} (${__props.data.id})`), 1)])]), (0, vue.createElementVNode)("div", _hoisted_3$5, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-tool", { data: __props.data })])])], 32)], 38), __props.isExpandable(__props.data, __props.nodeStatusMap) && expanded.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$4, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.data.items, (item) => {
|
|
15875
15949
|
return (0, vue.openBlock)(), (0, vue.createBlock)(_component_TreeNode, {
|
|
15876
15950
|
key: item.id,
|
|
15877
15951
|
data: item,
|
|
@@ -15893,7 +15967,7 @@
|
|
|
15893
15967
|
"indent",
|
|
15894
15968
|
"is-expandable"
|
|
15895
15969
|
]);
|
|
15896
|
-
}), 128))])) : (0, vue.createCommentVNode)("v-if", true)], 40, _hoisted_1$
|
|
15970
|
+
}), 128))])) : (0, vue.createCommentVNode)("v-if", true)], 40, _hoisted_1$55)), [[vue.vShow, visible.value]]);
|
|
15897
15971
|
};
|
|
15898
15972
|
}
|
|
15899
15973
|
});
|
|
@@ -15902,7 +15976,7 @@
|
|
|
15902
15976
|
var TreeNode_default = TreeNode_vue_vue_type_script_setup_true_lang_default;
|
|
15903
15977
|
//#endregion
|
|
15904
15978
|
//#region packages/editor/src/components/Tree.vue?vue&type=script&setup=true&lang.ts
|
|
15905
|
-
var _hoisted_1$
|
|
15979
|
+
var _hoisted_1$54 = {
|
|
15906
15980
|
key: 1,
|
|
15907
15981
|
class: "m-editor-tree-empty"
|
|
15908
15982
|
};
|
|
@@ -15957,7 +16031,7 @@
|
|
|
15957
16031
|
"node-status-map",
|
|
15958
16032
|
"is-expandable"
|
|
15959
16033
|
]);
|
|
15960
|
-
}), 128)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
16034
|
+
}), 128)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$54, [(0, vue.createElementVNode)("p", null, (0, vue.toDisplayString)(__props.emptyText), 1)]))], 32);
|
|
15961
16035
|
};
|
|
15962
16036
|
}
|
|
15963
16037
|
});
|
|
@@ -16193,7 +16267,7 @@
|
|
|
16193
16267
|
};
|
|
16194
16268
|
//#endregion
|
|
16195
16269
|
//#region packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
16196
|
-
var _hoisted_1$
|
|
16270
|
+
var _hoisted_1$53 = { class: "search-wrapper" };
|
|
16197
16271
|
var CodeBlockListPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
16198
16272
|
name: "MEditorCodeBlockListPanel",
|
|
16199
16273
|
__name: "CodeBlockListPanel",
|
|
@@ -16230,7 +16304,7 @@
|
|
|
16230
16304
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [
|
|
16231
16305
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
16232
16306
|
default: (0, vue.withCtx)(() => [
|
|
16233
|
-
(0, vue.renderSlot)(_ctx.$slots, "code-block-panel-header", {}, () => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
16307
|
+
(0, vue.renderSlot)(_ctx.$slots, "code-block-panel-header", {}, () => [(0, vue.createElementVNode)("div", _hoisted_1$53, [
|
|
16234
16308
|
(0, vue.createVNode)(SearchInput_default, { onSearch: filterTextChangeHandler }),
|
|
16235
16309
|
editable.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
16236
16310
|
key: 0,
|
|
@@ -16715,7 +16789,7 @@
|
|
|
16715
16789
|
//#endregion
|
|
16716
16790
|
//#region packages/editor/src/layouts/sidebar/data-source/DataSourceListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
16717
16791
|
init_lodash();
|
|
16718
|
-
var _hoisted_1$
|
|
16792
|
+
var _hoisted_1$52 = { class: "search-wrapper" };
|
|
16719
16793
|
var DataSourceListPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
16720
16794
|
name: "MEditorDataSourceListPanel",
|
|
16721
16795
|
__name: "DataSourceListPanel",
|
|
@@ -16796,7 +16870,7 @@
|
|
|
16796
16870
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [
|
|
16797
16871
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
16798
16872
|
default: (0, vue.withCtx)(() => [
|
|
16799
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
16873
|
+
(0, vue.createElementVNode)("div", _hoisted_1$52, [
|
|
16800
16874
|
(0, vue.createVNode)(SearchInput_default, { onSearch: filterTextChangeHandler }),
|
|
16801
16875
|
(0, vue.unref)(editable) ? ((0, vue.openBlock)(), (0, vue.createBlock)(DataSourceAddButton_default, {
|
|
16802
16876
|
key: 0,
|
|
@@ -16861,7 +16935,7 @@
|
|
|
16861
16935
|
var DataSourceListPanel_default = DataSourceListPanel_vue_vue_type_script_setup_true_lang_default;
|
|
16862
16936
|
//#endregion
|
|
16863
16937
|
//#region packages/editor/src/icons/FolderMinusIcon.vue?vue&type=script&setup=true&lang.ts
|
|
16864
|
-
var _hoisted_1$
|
|
16938
|
+
var _hoisted_1$51 = {
|
|
16865
16939
|
width: "1em",
|
|
16866
16940
|
height: "1em",
|
|
16867
16941
|
viewBox: "0 0 16 16",
|
|
@@ -16874,7 +16948,7 @@
|
|
|
16874
16948
|
__name: "FolderMinusIcon",
|
|
16875
16949
|
setup(__props) {
|
|
16876
16950
|
return (_ctx, _cache) => {
|
|
16877
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
16951
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$51, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", {
|
|
16878
16952
|
"fill-rule": "evenodd",
|
|
16879
16953
|
d: "M9.828 4H2.19a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91H9v1H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181L15.546 8H14.54l.265-2.91A1 1 0 0 0 13.81 4H9.828zm-2.95-1.707L7.587 3H2.19c-.24 0-.47.042-.684.12L1.5 2.98a1 1 0 0 1 1-.98h3.672a1 1 0 0 1 .707.293z"
|
|
16880
16954
|
}, null, -1), (0, vue.createElementVNode)("path", {
|
|
@@ -17053,7 +17127,7 @@
|
|
|
17053
17127
|
//#endregion
|
|
17054
17128
|
//#region packages/editor/src/layouts/sidebar/layer/LayerNodeContent.vue?vue&type=script&setup=true&lang.ts
|
|
17055
17129
|
init_Icon();
|
|
17056
|
-
var _hoisted_1$
|
|
17130
|
+
var _hoisted_1$50 = { class: "m-editor-layer-node-label" };
|
|
17057
17131
|
var _hoisted_2$15 = ["innerHTML"];
|
|
17058
17132
|
var LayerNodeContent_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
17059
17133
|
name: "MEditorLayerNodeContent",
|
|
@@ -17077,7 +17151,7 @@
|
|
|
17077
17151
|
/** 合并属性表单与样式表单的错误文案(去掉建议,本身可能仍是含 <br> 的 HTML) */
|
|
17078
17152
|
const errorMessage = (0, vue.computed)(() => [stripSuggestion(invalidInfo.value?.props), stripSuggestion(invalidInfo.value?.style)].filter(Boolean).join("<br>"));
|
|
17079
17153
|
return (_ctx, _cache) => {
|
|
17080
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", { class: (0, vue.normalizeClass)(["m-editor-layer-node-content", { "is-invalid": hasError.value }]) }, [(0, vue.createElementVNode)("span", _hoisted_1$
|
|
17154
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", { class: (0, vue.normalizeClass)(["m-editor-layer-node-content", { "is-invalid": hasError.value }]) }, [(0, vue.createElementVNode)("span", _hoisted_1$50, (0, vue.toDisplayString)(label.value), 1), hasError.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicTooltip), {
|
|
17081
17155
|
key: 0,
|
|
17082
17156
|
placement: "top"
|
|
17083
17157
|
}, {
|
|
@@ -17699,7 +17773,7 @@
|
|
|
17699
17773
|
//#region packages/editor/src/layouts/sidebar/ComponentListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
17700
17774
|
init_Icon();
|
|
17701
17775
|
init_type();
|
|
17702
|
-
var _hoisted_1$
|
|
17776
|
+
var _hoisted_1$49 = ["onClick", "onDragstart"];
|
|
17703
17777
|
var _hoisted_2$14 = ["title"];
|
|
17704
17778
|
var ComponentListPanel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
17705
17779
|
name: "MEditorComponentListPanel",
|
|
@@ -17795,7 +17869,7 @@
|
|
|
17795
17869
|
}, {
|
|
17796
17870
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: item.icon }, null, 8, ["icon"])]),
|
|
17797
17871
|
_: 2
|
|
17798
|
-
}, 1032, ["disabled", "content"]), (0, vue.createElementVNode)("span", { title: item.text }, (0, vue.toDisplayString)(item.text), 9, _hoisted_2$14)])], 40, _hoisted_1$
|
|
17872
|
+
}, 1032, ["disabled", "content"]), (0, vue.createElementVNode)("span", { title: item.text }, (0, vue.toDisplayString)(item.text), 9, _hoisted_2$14)])], 40, _hoisted_1$49);
|
|
17799
17873
|
}), 128))]),
|
|
17800
17874
|
_: 2
|
|
17801
17875
|
}, 1032, ["name"])) : (0, vue.createCommentVNode)("v-if", true)], 64);
|
|
@@ -17815,21 +17889,21 @@
|
|
|
17815
17889
|
//#region packages/editor/src/layouts/sidebar/Sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
17816
17890
|
init_Icon();
|
|
17817
17891
|
init_type();
|
|
17818
|
-
var _hoisted_1$
|
|
17892
|
+
var _hoisted_1$48 = {
|
|
17819
17893
|
key: 0,
|
|
17820
17894
|
class: "m-editor-sidebar"
|
|
17821
17895
|
};
|
|
17822
17896
|
var _hoisted_2$13 = { class: "m-editor-sidebar-header" };
|
|
17823
|
-
var _hoisted_3$
|
|
17897
|
+
var _hoisted_3$4 = [
|
|
17824
17898
|
"draggable",
|
|
17825
17899
|
"onClick",
|
|
17826
17900
|
"onDragend"
|
|
17827
17901
|
];
|
|
17828
|
-
var _hoisted_4$
|
|
17902
|
+
var _hoisted_4$3 = {
|
|
17829
17903
|
key: 1,
|
|
17830
17904
|
class: "magic-editor-tab-panel-title"
|
|
17831
17905
|
};
|
|
17832
|
-
var _hoisted_5$
|
|
17906
|
+
var _hoisted_5$2 = {
|
|
17833
17907
|
key: 0,
|
|
17834
17908
|
class: "m-editor-sidebar-tips"
|
|
17835
17909
|
};
|
|
@@ -17886,7 +17960,7 @@
|
|
|
17886
17960
|
[SideItemKey.COMPONENT_LIST]: {
|
|
17887
17961
|
$key: SideItemKey.COMPONENT_LIST,
|
|
17888
17962
|
type: "component",
|
|
17889
|
-
icon: _element_plus_icons_vue.
|
|
17963
|
+
icon: _element_plus_icons_vue.Box,
|
|
17890
17964
|
text: "组件",
|
|
17891
17965
|
component: ComponentListPanel_default,
|
|
17892
17966
|
slots: {}
|
|
@@ -17894,7 +17968,7 @@
|
|
|
17894
17968
|
layer: {
|
|
17895
17969
|
$key: SideItemKey.LAYER,
|
|
17896
17970
|
type: "component",
|
|
17897
|
-
icon: _element_plus_icons_vue.
|
|
17971
|
+
icon: _element_plus_icons_vue.Finished,
|
|
17898
17972
|
text: "已选组件",
|
|
17899
17973
|
props: {
|
|
17900
17974
|
layerContentMenu: props.layerContentMenu,
|
|
@@ -17969,7 +18043,7 @@
|
|
|
17969
18043
|
};
|
|
17970
18044
|
__expose({ activeTabName });
|
|
17971
18045
|
return (_ctx, _cache) => {
|
|
17972
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [__props.data.type === "tabs" && __props.data.items.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
18046
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [__props.data.type === "tabs" && __props.data.items.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$48, [
|
|
17973
18047
|
(0, vue.createElementVNode)("div", _hoisted_2$13, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sideBarItems.value, (config, index) => {
|
|
17974
18048
|
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
17975
18049
|
class: (0, vue.normalizeClass)(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
@@ -17982,7 +18056,7 @@
|
|
|
17982
18056
|
}, [config.icon ? ((0, vue.openBlock)(), (0, vue.createBlock)(Icon_default, {
|
|
17983
18057
|
key: 0,
|
|
17984
18058
|
icon: config.icon
|
|
17985
|
-
}, null, 8, ["icon"])) : (0, vue.createCommentVNode)("v-if", true), config.text ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$
|
|
18059
|
+
}, null, 8, ["icon"])) : (0, vue.createCommentVNode)("v-if", true), config.text ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$3, (0, vue.toDisplayString)(config.text), 1)) : (0, vue.createCommentVNode)("v-if", true)], 46, _hoisted_3$4)), [[vue.vShow, !(0, vue.unref)(floatBoxStates)[config.$key]?.status]]);
|
|
17986
18060
|
}), 128))]),
|
|
17987
18061
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sideBarItems.value, (config, index) => {
|
|
17988
18062
|
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -18073,7 +18147,7 @@
|
|
|
18073
18147
|
`${index}`
|
|
18074
18148
|
].includes(activeTabName.value)]]);
|
|
18075
18149
|
}), 128)),
|
|
18076
|
-
tipsBarVisible.value && collecting.value && taskLength.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$
|
|
18150
|
+
tipsBarVisible.value && collecting.value && taskLength.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$2, [(0, vue.createElementVNode)("span", null, "依赖收集中(剩余任务:" + (0, vue.toDisplayString)(taskLength.value) + ")", 1), (0, vue.createVNode)(Icon_default, {
|
|
18077
18151
|
icon: (0, vue.unref)(_element_plus_icons_vue.Close),
|
|
18078
18152
|
class: "close-icon",
|
|
18079
18153
|
onClick: _cache[1] || (_cache[1] = (0, vue.withModifiers)(($event) => tipsBarVisible.value = false, ["stop"]))
|
|
@@ -18188,7 +18262,7 @@
|
|
|
18188
18262
|
var ScrollBar_default = ScrollBar_vue_vue_type_script_setup_true_lang_default;
|
|
18189
18263
|
//#endregion
|
|
18190
18264
|
//#region packages/editor/src/components/ScrollViewer.vue?vue&type=script&setup=true&lang.ts
|
|
18191
|
-
var _hoisted_1$
|
|
18265
|
+
var _hoisted_1$47 = {
|
|
18192
18266
|
class: "m-editor-scroll-viewer-container",
|
|
18193
18267
|
ref: "container"
|
|
18194
18268
|
};
|
|
@@ -18252,7 +18326,7 @@
|
|
|
18252
18326
|
};
|
|
18253
18327
|
__expose({ container: containerEl });
|
|
18254
18328
|
return (_ctx, _cache) => {
|
|
18255
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
18329
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$47, [
|
|
18256
18330
|
(0, vue.createElementVNode)("div", {
|
|
18257
18331
|
ref: "target",
|
|
18258
18332
|
style: (0, vue.normalizeStyle)(style.value)
|
|
@@ -18378,7 +18452,7 @@
|
|
|
18378
18452
|
var NodeListMenu_default = NodeListMenu_vue_vue_type_script_setup_true_lang_default;
|
|
18379
18453
|
//#endregion
|
|
18380
18454
|
//#region packages/editor/src/layouts/workspace/viewer/StageOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
18381
|
-
var _hoisted_1$
|
|
18455
|
+
var _hoisted_1$46 = {
|
|
18382
18456
|
key: 0,
|
|
18383
18457
|
class: "m-editor-stage-overlay"
|
|
18384
18458
|
};
|
|
@@ -18424,7 +18498,7 @@
|
|
|
18424
18498
|
stageOverlayService.closeOverlay();
|
|
18425
18499
|
};
|
|
18426
18500
|
return (_ctx, _cache) => {
|
|
18427
|
-
return stageOverlayVisible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
18501
|
+
return stageOverlayVisible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$46, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicIcon), {
|
|
18428
18502
|
class: "m-editor-stage-overlay-close",
|
|
18429
18503
|
size: "30",
|
|
18430
18504
|
onClick: closeOverlayHandler
|
|
@@ -18460,7 +18534,7 @@
|
|
|
18460
18534
|
var StageOverlay_default = StageOverlay_vue_vue_type_script_setup_true_lang_default;
|
|
18461
18535
|
//#endregion
|
|
18462
18536
|
//#region packages/editor/src/icons/CenterIcon.vue?vue&type=script&setup=true&lang.ts
|
|
18463
|
-
var _hoisted_1$
|
|
18537
|
+
var _hoisted_1$45 = {
|
|
18464
18538
|
viewBox: "0 0 24 24",
|
|
18465
18539
|
fill: "none",
|
|
18466
18540
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -18470,7 +18544,7 @@
|
|
|
18470
18544
|
__name: "CenterIcon",
|
|
18471
18545
|
setup(__props) {
|
|
18472
18546
|
return (_ctx, _cache) => {
|
|
18473
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
18547
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$45, [..._cache[0] || (_cache[0] = [
|
|
18474
18548
|
(0, vue.createElementVNode)("path", {
|
|
18475
18549
|
"fill-rule": "evenodd",
|
|
18476
18550
|
"clip-rule": "evenodd",
|
|
@@ -18900,7 +18974,7 @@
|
|
|
18900
18974
|
var Stage_default = Stage_vue_vue_type_script_setup_true_lang_default;
|
|
18901
18975
|
//#endregion
|
|
18902
18976
|
//#region packages/editor/src/layouts/workspace/Breadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
18903
|
-
var _hoisted_1$
|
|
18977
|
+
var _hoisted_1$44 = {
|
|
18904
18978
|
key: 0,
|
|
18905
18979
|
class: "m-editor-breadcrumb-ellipsis"
|
|
18906
18980
|
};
|
|
@@ -18986,7 +19060,7 @@
|
|
|
18986
19060
|
ref: containerRef,
|
|
18987
19061
|
class: "m-editor-breadcrumb"
|
|
18988
19062
|
}, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(displayPath.value, (item, index) => {
|
|
18989
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: item.isEllipsis ? `ellipsis-${index}` : item.id }, [item.isEllipsis ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1$
|
|
19063
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: item.isEllipsis ? `ellipsis-${index}` : item.id }, [item.isEllipsis ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1$44, "...")) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicTooltip), {
|
|
18990
19064
|
key: 1,
|
|
18991
19065
|
content: item.name,
|
|
18992
19066
|
placement: "top",
|
|
@@ -19012,7 +19086,7 @@
|
|
|
19012
19086
|
var Breadcrumb_default = Breadcrumb_vue_vue_type_script_setup_true_lang_default;
|
|
19013
19087
|
//#endregion
|
|
19014
19088
|
//#region packages/editor/src/layouts/workspace/Workspace.vue?vue&type=script&setup=true&lang.ts
|
|
19015
|
-
var _hoisted_1$
|
|
19089
|
+
var _hoisted_1$43 = { class: "m-editor-workspace" };
|
|
19016
19090
|
var Workspace_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
19017
19091
|
name: "MEditorWorkspace",
|
|
19018
19092
|
__name: "Workspace",
|
|
@@ -19029,7 +19103,7 @@
|
|
|
19029
19103
|
const { editorService } = useServices();
|
|
19030
19104
|
const page = (0, vue.computed)(() => editorService.get("page"));
|
|
19031
19105
|
return (_ctx, _cache) => {
|
|
19032
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
19106
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$43, [
|
|
19033
19107
|
(0, vue.createVNode)(Breadcrumb_default),
|
|
19034
19108
|
(0, vue.renderSlot)(_ctx.$slots, "stage", {}, () => [page.value && ((0, vue.unref)(stageOptions)?.render || (0, vue.unref)(stageOptions)?.runtimeUrl) ? ((0, vue.openBlock)(), (0, vue.createBlock)(Stage_default, {
|
|
19035
19109
|
key: 0,
|
|
@@ -20003,6 +20077,8 @@
|
|
|
20003
20077
|
name: "MEditor",
|
|
20004
20078
|
__name: "Editor",
|
|
20005
20079
|
props: /*@__PURE__*/ (0, vue.mergeDefaults)({
|
|
20080
|
+
isLargeStageContainer: { type: Boolean },
|
|
20081
|
+
theme: {},
|
|
20006
20082
|
modelValue: {},
|
|
20007
20083
|
componentGroupList: {},
|
|
20008
20084
|
datasourceList: {},
|
|
@@ -20116,6 +20192,7 @@
|
|
|
20116
20192
|
* 与 PropsPanel 通过 `:extend-state` 显式传入的方式保持等价。
|
|
20117
20193
|
*/
|
|
20118
20194
|
(0, vue.provide)("extendFormState", props.extendFormState);
|
|
20195
|
+
(0, vue.provide)("isLargeStageContainer", (0, vue.computed)(() => props.isLargeStageContainer));
|
|
20119
20196
|
/**
|
|
20120
20197
|
* 提供 PropsPanel 主属性表单的 formState getter,供历史差异弹窗复用,
|
|
20121
20198
|
* 让 CompareForm 与 PropsPanel 的 filterFunction 上下文保持一致。
|
|
@@ -20128,6 +20205,12 @@
|
|
|
20128
20205
|
*/
|
|
20129
20206
|
(0, vue.provide)("historyListExtraTabs", props.historyListExtraTabs);
|
|
20130
20207
|
(0, vue.provide)("eventBus", new events.EventEmitter());
|
|
20208
|
+
/**
|
|
20209
|
+
* 把当前主题以响应式 ref 形式 provide 给后代,供包含 `Teleport` 的组件
|
|
20210
|
+
* (如 `TMagicPopover` / `FloatingBox` / `ContentMenu`)在传送目标上挂 `m-theme--<theme>`
|
|
20211
|
+
* 类,让主题级 CSS 变量在 portal 节点上也能命中。详见 `@tmagic/design/theme.ts`。
|
|
20212
|
+
*/
|
|
20213
|
+
(0, vue.provide)(_tmagic_design.M_THEME_KEY, (0, vue.computed)(() => props.theme ?? ""));
|
|
20131
20214
|
const propsPanelMountedHandler = (e) => {
|
|
20132
20215
|
propsPanelRef.value = e;
|
|
20133
20216
|
emit("props-panel-mounted", e);
|
|
@@ -20151,7 +20234,8 @@
|
|
|
20151
20234
|
"disabled-page-fragment": __props.disabledPageFragment,
|
|
20152
20235
|
"page-bar-sort-options": __props.pageBarSortOptions,
|
|
20153
20236
|
"page-filter-function": __props.pageFilterFunction,
|
|
20154
|
-
"hide-sidebar": __props.hideSidebar
|
|
20237
|
+
"hide-sidebar": __props.hideSidebar,
|
|
20238
|
+
theme: __props.theme
|
|
20155
20239
|
}, {
|
|
20156
20240
|
header: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "header")]),
|
|
20157
20241
|
nav: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "nav", { editorService: (0, vue.unref)(editor_default) }, () => [(0, vue.createVNode)(NavMenu_default, { data: __props.menu }, null, 8, ["data"])])]),
|
|
@@ -20232,7 +20316,8 @@
|
|
|
20232
20316
|
"disabled-page-fragment",
|
|
20233
20317
|
"page-bar-sort-options",
|
|
20234
20318
|
"page-filter-function",
|
|
20235
|
-
"hide-sidebar"
|
|
20319
|
+
"hide-sidebar",
|
|
20320
|
+
"theme"
|
|
20236
20321
|
]);
|
|
20237
20322
|
};
|
|
20238
20323
|
}
|
|
@@ -20256,7 +20341,10 @@
|
|
|
20256
20341
|
disabled: { type: Boolean },
|
|
20257
20342
|
size: {},
|
|
20258
20343
|
lastValues: {},
|
|
20259
|
-
isCompare: { type: Boolean }
|
|
20344
|
+
isCompare: { type: Boolean },
|
|
20345
|
+
text: {},
|
|
20346
|
+
labelWidth: {},
|
|
20347
|
+
labelPosition: {}
|
|
20260
20348
|
},
|
|
20261
20349
|
emits: ["change"],
|
|
20262
20350
|
setup(__props, { emit: __emit }) {
|
|
@@ -20277,11 +20365,21 @@
|
|
|
20277
20365
|
* 仅当存在历史值时才启用对比,避免 lastValues 缺失时退化为「全部新增」的空对比。
|
|
20278
20366
|
*/
|
|
20279
20367
|
const isCompareMode = (0, vue.computed)(() => Boolean(props.isCompare && props.lastValues));
|
|
20368
|
+
const newHandler = () => {
|
|
20369
|
+
const defaultCode = {
|
|
20370
|
+
codeType: _tmagic_core.HookCodeType.CODE,
|
|
20371
|
+
codeId: ""
|
|
20372
|
+
};
|
|
20373
|
+
const name = props.config.name || "";
|
|
20374
|
+
const hookData = props.model[name]?.hookData || [];
|
|
20375
|
+
emit("change", defaultCode, { modifyKey: `hookData.${hookData.length}` });
|
|
20376
|
+
};
|
|
20280
20377
|
const codeConfig = (0, vue.computed)(() => ({
|
|
20281
20378
|
type: "group-list",
|
|
20282
20379
|
name: "hookData",
|
|
20283
20380
|
enableToggleMode: false,
|
|
20284
20381
|
expandAll: true,
|
|
20382
|
+
addable: () => false,
|
|
20285
20383
|
title: (mForm, { model, index }) => {
|
|
20286
20384
|
if (model.codeType === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD) {
|
|
20287
20385
|
if (Array.isArray(model.codeId)) {
|
|
@@ -20294,57 +20392,54 @@
|
|
|
20294
20392
|
if (codeContent) return codeContent.name;
|
|
20295
20393
|
return model.codeId || index;
|
|
20296
20394
|
},
|
|
20297
|
-
|
|
20298
|
-
|
|
20299
|
-
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20316
|
-
|
|
20317
|
-
|
|
20318
|
-
|
|
20319
|
-
|
|
20320
|
-
}
|
|
20321
|
-
},
|
|
20322
|
-
{
|
|
20323
|
-
type: "code-select-col",
|
|
20324
|
-
name: "codeId",
|
|
20325
|
-
span: 18,
|
|
20326
|
-
labelWidth: 0,
|
|
20327
|
-
display: (_mForm, { model }) => model.codeType !== _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
20328
|
-
notEditable: () => !codeBlockService.getEditStatus(),
|
|
20329
|
-
rules: [{
|
|
20330
|
-
typeMatch: true,
|
|
20331
|
-
trigger: "change"
|
|
20332
|
-
}]
|
|
20333
|
-
},
|
|
20334
|
-
{
|
|
20335
|
-
type: "data-source-method-select",
|
|
20336
|
-
name: "codeId",
|
|
20337
|
-
span: 18,
|
|
20338
|
-
labelWidth: 0,
|
|
20339
|
-
display: (_mForm, { model }) => model.codeType === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
20340
|
-
notEditable: () => !dataSourceService.get("editable"),
|
|
20341
|
-
rules: [{
|
|
20342
|
-
typeMatch: true,
|
|
20343
|
-
trigger: "change"
|
|
20344
|
-
}]
|
|
20395
|
+
titlePrefix: props.config.name === void 0 ? void 0 : String(props.config.name),
|
|
20396
|
+
items: [
|
|
20397
|
+
{
|
|
20398
|
+
text: "代码类型",
|
|
20399
|
+
type: "select",
|
|
20400
|
+
name: "codeType",
|
|
20401
|
+
labelPosition: "right",
|
|
20402
|
+
rules: [{
|
|
20403
|
+
typeMatch: true,
|
|
20404
|
+
trigger: "change"
|
|
20405
|
+
}],
|
|
20406
|
+
options: [{
|
|
20407
|
+
value: _tmagic_core.HookCodeType.CODE,
|
|
20408
|
+
text: "代码块"
|
|
20409
|
+
}, {
|
|
20410
|
+
value: _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
20411
|
+
text: "数据源方法"
|
|
20412
|
+
}],
|
|
20413
|
+
defaultValue: _tmagic_core.HookCodeType.CODE,
|
|
20414
|
+
onChange: (_mForm, v, { setModel }) => {
|
|
20415
|
+
if (v === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD) setModel("codeId", []);
|
|
20416
|
+
else setModel("codeId", "");
|
|
20417
|
+
return v;
|
|
20345
20418
|
}
|
|
20346
|
-
|
|
20347
|
-
|
|
20419
|
+
},
|
|
20420
|
+
{
|
|
20421
|
+
type: "code-select-col",
|
|
20422
|
+
name: "codeId",
|
|
20423
|
+
text: "代码块",
|
|
20424
|
+
rules: [{
|
|
20425
|
+
typeMatch: true,
|
|
20426
|
+
trigger: "change"
|
|
20427
|
+
}],
|
|
20428
|
+
display: (_mForm, { model }) => model.codeType !== _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
20429
|
+
notEditable: () => !codeBlockService.getEditStatus()
|
|
20430
|
+
},
|
|
20431
|
+
{
|
|
20432
|
+
type: "data-source-method-select",
|
|
20433
|
+
name: "codeId",
|
|
20434
|
+
text: "数据源字段",
|
|
20435
|
+
rules: [{
|
|
20436
|
+
typeMatch: true,
|
|
20437
|
+
trigger: "change"
|
|
20438
|
+
}],
|
|
20439
|
+
display: (_mForm, { model }) => model.codeType === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
20440
|
+
notEditable: () => !dataSourceService.get("editable")
|
|
20441
|
+
}
|
|
20442
|
+
]
|
|
20348
20443
|
}));
|
|
20349
20444
|
(0, vue.watch)(() => props.model[props.name], (value) => {
|
|
20350
20445
|
if (isEmpty(value)) props.model[props.name] = {
|
|
@@ -20354,10 +20449,11 @@
|
|
|
20354
20449
|
}, { immediate: true });
|
|
20355
20450
|
const changeHandler = (v, eventData) => emit("change", v, eventData);
|
|
20356
20451
|
return (_ctx, _cache) => {
|
|
20357
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", { class: (0, vue.normalizeClass)(["m-fields-code-select", __props.config.className]) }, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicCard),
|
|
20452
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", { class: (0, vue.normalizeClass)(["m-fields-code-select", __props.config.className]) }, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicCard), { flat: __props.config.flat }, {
|
|
20358
20453
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MContainer), {
|
|
20359
20454
|
config: codeConfig.value,
|
|
20360
20455
|
size: __props.size,
|
|
20456
|
+
class: "code-select-content",
|
|
20361
20457
|
prop: __props.prop,
|
|
20362
20458
|
disabled: __props.disabled,
|
|
20363
20459
|
"is-compare": isCompareMode.value,
|
|
@@ -20372,9 +20468,22 @@
|
|
|
20372
20468
|
"is-compare",
|
|
20373
20469
|
"last-values",
|
|
20374
20470
|
"model"
|
|
20471
|
+
]), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
20472
|
+
class: "create-button fullWidth",
|
|
20473
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Plus),
|
|
20474
|
+
size: __props.size,
|
|
20475
|
+
disabled: __props.disabled,
|
|
20476
|
+
onClick: _cache[0] || (_cache[0] = ($event) => newHandler())
|
|
20477
|
+
}, {
|
|
20478
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)("添加" + (0, vue.toDisplayString)(__props.config.text), 1)]),
|
|
20479
|
+
_: 1
|
|
20480
|
+
}, 8, [
|
|
20481
|
+
"icon",
|
|
20482
|
+
"size",
|
|
20483
|
+
"disabled"
|
|
20375
20484
|
])]),
|
|
20376
20485
|
_: 1
|
|
20377
|
-
})], 2);
|
|
20486
|
+
}, 8, ["flat"])], 2);
|
|
20378
20487
|
};
|
|
20379
20488
|
}
|
|
20380
20489
|
});
|
|
@@ -20465,7 +20574,7 @@
|
|
|
20465
20574
|
init_lodash();
|
|
20466
20575
|
init_Icon();
|
|
20467
20576
|
init_type();
|
|
20468
|
-
var _hoisted_1$
|
|
20577
|
+
var _hoisted_1$42 = { class: "m-fields-code-select-col" };
|
|
20469
20578
|
var _hoisted_2$11 = { class: "code-select-container" };
|
|
20470
20579
|
var CodeSelectCol_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
20471
20580
|
name: "MFieldsCodeSelectCol",
|
|
@@ -20483,7 +20592,10 @@
|
|
|
20483
20592
|
},
|
|
20484
20593
|
size: {},
|
|
20485
20594
|
lastValues: {},
|
|
20486
|
-
isCompare: { type: Boolean }
|
|
20595
|
+
isCompare: { type: Boolean },
|
|
20596
|
+
text: {},
|
|
20597
|
+
labelWidth: {},
|
|
20598
|
+
labelPosition: {}
|
|
20487
20599
|
},
|
|
20488
20600
|
emits: ["change"],
|
|
20489
20601
|
setup(__props, { emit: __emit }) {
|
|
@@ -20529,6 +20641,7 @@
|
|
|
20529
20641
|
type: "select",
|
|
20530
20642
|
name: props.name,
|
|
20531
20643
|
disabled: props.disabled,
|
|
20644
|
+
text: props.config.text,
|
|
20532
20645
|
options: () => {
|
|
20533
20646
|
if (codeDsl.value) return map(codeDsl.value, (value, key) => ({
|
|
20534
20647
|
text: `${value.name}(${key})`,
|
|
@@ -20565,7 +20678,7 @@
|
|
|
20565
20678
|
eventBus?.emit("edit-code", id);
|
|
20566
20679
|
};
|
|
20567
20680
|
return (_ctx, _cache) => {
|
|
20568
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
20681
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$42, [
|
|
20569
20682
|
(0, vue.createElementVNode)("div", _hoisted_2$11, [
|
|
20570
20683
|
(0, vue.createCommentVNode)(" 代码块下拉框 "),
|
|
20571
20684
|
(0, vue.createCommentVNode)(" 对比模式下交由 MFormContainer 展示下拉框的前后差异(codeId 变化时高亮新旧代码块名),\n 普通模式仍直接渲染 MSelect 以保留选择 / 写值逻辑 "),
|
|
@@ -20637,7 +20750,7 @@
|
|
|
20637
20750
|
var CodeSelectCol_default = CodeSelectCol_vue_vue_type_script_setup_true_lang_default;
|
|
20638
20751
|
//#endregion
|
|
20639
20752
|
//#region packages/editor/src/fields/DataSourceFields.vue?vue&type=script&setup=true&lang.ts
|
|
20640
|
-
var _hoisted_1$
|
|
20753
|
+
var _hoisted_1$41 = { class: "m-editor-data-source-fields" };
|
|
20641
20754
|
var _hoisted_2$10 = {
|
|
20642
20755
|
key: 0,
|
|
20643
20756
|
class: "m-editor-data-source-fields-footer"
|
|
@@ -20658,7 +20771,10 @@
|
|
|
20658
20771
|
},
|
|
20659
20772
|
size: {},
|
|
20660
20773
|
lastValues: {},
|
|
20661
|
-
isCompare: { type: Boolean }
|
|
20774
|
+
isCompare: { type: Boolean },
|
|
20775
|
+
text: {},
|
|
20776
|
+
labelWidth: {},
|
|
20777
|
+
labelPosition: {}
|
|
20662
20778
|
}, {
|
|
20663
20779
|
"width": { default: 670 },
|
|
20664
20780
|
"widthModifiers": {},
|
|
@@ -20957,7 +21073,7 @@
|
|
|
20957
21073
|
editField(fields[index], index);
|
|
20958
21074
|
});
|
|
20959
21075
|
return (_ctx, _cache) => {
|
|
20960
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21076
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$41, [
|
|
20961
21077
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_table.MagicTable), {
|
|
20962
21078
|
data: __props.model[__props.name],
|
|
20963
21079
|
columns: displayColumns.value,
|
|
@@ -21052,7 +21168,7 @@
|
|
|
21052
21168
|
//#endregion
|
|
21053
21169
|
//#region packages/editor/src/fields/DataSourceMocks.vue?vue&type=script&setup=true&lang.ts
|
|
21054
21170
|
init_CodeEditor();
|
|
21055
|
-
var _hoisted_1$
|
|
21171
|
+
var _hoisted_1$40 = { class: "m-editor-data-source-fields" };
|
|
21056
21172
|
var _hoisted_2$9 = {
|
|
21057
21173
|
key: 0,
|
|
21058
21174
|
class: "m-editor-data-source-fields-footer"
|
|
@@ -21073,7 +21189,10 @@
|
|
|
21073
21189
|
},
|
|
21074
21190
|
size: {},
|
|
21075
21191
|
lastValues: {},
|
|
21076
|
-
isCompare: { type: Boolean }
|
|
21192
|
+
isCompare: { type: Boolean },
|
|
21193
|
+
text: {},
|
|
21194
|
+
labelWidth: {},
|
|
21195
|
+
labelPosition: {}
|
|
21077
21196
|
}, {
|
|
21078
21197
|
"width": { default: 670 },
|
|
21079
21198
|
"widthModifiers": {},
|
|
@@ -21258,7 +21377,7 @@
|
|
|
21258
21377
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, (0, vue.inject)("parentFloating", (0, vue.ref)(null)));
|
|
21259
21378
|
const frameworkWidth = (0, vue.computed)(() => uiService.get("frameworkRect")?.width || 0);
|
|
21260
21379
|
return (_ctx, _cache) => {
|
|
21261
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21380
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$40, [
|
|
21262
21381
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_table.MagicTable), {
|
|
21263
21382
|
data: __props.model[__props.name],
|
|
21264
21383
|
columns: displayColumns.value
|
|
@@ -21316,7 +21435,7 @@
|
|
|
21316
21435
|
//#endregion
|
|
21317
21436
|
//#region packages/editor/src/fields/DataSourceMethods.vue?vue&type=script&setup=true&lang.ts
|
|
21318
21437
|
init_lodash();
|
|
21319
|
-
var _hoisted_1$
|
|
21438
|
+
var _hoisted_1$39 = { class: "m-editor-data-source-methods" };
|
|
21320
21439
|
var _hoisted_2$8 = {
|
|
21321
21440
|
key: 0,
|
|
21322
21441
|
class: "m-editor-data-source-methods-footer"
|
|
@@ -21337,7 +21456,10 @@
|
|
|
21337
21456
|
},
|
|
21338
21457
|
size: {},
|
|
21339
21458
|
lastValues: {},
|
|
21340
|
-
isCompare: { type: Boolean }
|
|
21459
|
+
isCompare: { type: Boolean },
|
|
21460
|
+
text: {},
|
|
21461
|
+
labelWidth: {},
|
|
21462
|
+
labelPosition: {}
|
|
21341
21463
|
},
|
|
21342
21464
|
emits: ["change"],
|
|
21343
21465
|
setup(__props, { emit: __emit }) {
|
|
@@ -21445,7 +21567,7 @@
|
|
|
21445
21567
|
editMethod(methods[index], index);
|
|
21446
21568
|
});
|
|
21447
21569
|
return (_ctx, _cache) => {
|
|
21448
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21570
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$39, [
|
|
21449
21571
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_table.MagicTable), {
|
|
21450
21572
|
data: __props.model[__props.name],
|
|
21451
21573
|
columns: displayColumns.value,
|
|
@@ -21484,7 +21606,7 @@
|
|
|
21484
21606
|
//#endregion
|
|
21485
21607
|
//#region packages/editor/src/fields/DataSourceInput.vue?vue&type=script&setup=true&lang.ts
|
|
21486
21608
|
init_Icon();
|
|
21487
|
-
var _hoisted_1$
|
|
21609
|
+
var _hoisted_1$38 = { style: {
|
|
21488
21610
|
"display": "flex",
|
|
21489
21611
|
"flex-direction": "column",
|
|
21490
21612
|
"line-height": "1.2em"
|
|
@@ -21509,7 +21631,10 @@
|
|
|
21509
21631
|
},
|
|
21510
21632
|
size: {},
|
|
21511
21633
|
lastValues: {},
|
|
21512
|
-
isCompare: { type: Boolean }
|
|
21634
|
+
isCompare: { type: Boolean },
|
|
21635
|
+
text: {},
|
|
21636
|
+
labelWidth: {},
|
|
21637
|
+
labelPosition: {}
|
|
21513
21638
|
},
|
|
21514
21639
|
emits: ["change"],
|
|
21515
21640
|
setup(__props, { emit: __emit }) {
|
|
@@ -21693,7 +21818,7 @@
|
|
|
21693
21818
|
onSelect: selectHandler
|
|
21694
21819
|
}), {
|
|
21695
21820
|
suffix: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: (0, vue.unref)(_element_plus_icons_vue.Coin) }, null, 8, ["icon"])]),
|
|
21696
|
-
default: (0, vue.withCtx)((slotProps) => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
21821
|
+
default: (0, vue.withCtx)((slotProps) => [(0, vue.createElementVNode)("div", _hoisted_1$38, [(0, vue.createElementVNode)("div", null, (0, vue.toDisplayString)(slotProps?.item?.text || ""), 1), (0, vue.createElementVNode)("span", _hoisted_2$7, (0, vue.toDisplayString)(slotProps?.item?.value || ""), 1)])]),
|
|
21697
21822
|
_: 1
|
|
21698
21823
|
}, 16, ["modelValue"])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
21699
21824
|
key: 2,
|
|
@@ -21737,7 +21862,7 @@
|
|
|
21737
21862
|
//#region packages/editor/src/fields/DataSourceSelect.vue?vue&type=script&setup=true&lang.ts
|
|
21738
21863
|
init_Icon();
|
|
21739
21864
|
init_type();
|
|
21740
|
-
var _hoisted_1$
|
|
21865
|
+
var _hoisted_1$37 = { class: "m-fields-data-source-select" };
|
|
21741
21866
|
var DataSourceSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
21742
21867
|
name: "MFieldsDataSourceSelect",
|
|
21743
21868
|
__name: "DataSourceSelect",
|
|
@@ -21754,7 +21879,10 @@
|
|
|
21754
21879
|
},
|
|
21755
21880
|
size: {},
|
|
21756
21881
|
lastValues: {},
|
|
21757
|
-
isCompare: { type: Boolean }
|
|
21882
|
+
isCompare: { type: Boolean },
|
|
21883
|
+
text: {},
|
|
21884
|
+
labelWidth: {},
|
|
21885
|
+
labelPosition: {}
|
|
21758
21886
|
},
|
|
21759
21887
|
emits: ["change"],
|
|
21760
21888
|
setup(__props, { emit: __emit }) {
|
|
@@ -21796,7 +21924,7 @@
|
|
|
21796
21924
|
eventBus?.emit("edit-data-source", id);
|
|
21797
21925
|
};
|
|
21798
21926
|
return (_ctx, _cache) => {
|
|
21799
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21927
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$37, [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MSelect), {
|
|
21800
21928
|
model: __props.model,
|
|
21801
21929
|
name: __props.name,
|
|
21802
21930
|
size: __props.size,
|
|
@@ -21837,7 +21965,7 @@
|
|
|
21837
21965
|
//#region packages/editor/src/fields/DataSourceMethodSelect.vue?vue&type=script&setup=true&name=true&lang.ts
|
|
21838
21966
|
init_Icon();
|
|
21839
21967
|
init_type();
|
|
21840
|
-
var _hoisted_1$
|
|
21968
|
+
var _hoisted_1$36 = { class: "m-fields-data-source-method-select" };
|
|
21841
21969
|
var _hoisted_2$6 = { class: "data-source-method-select-container" };
|
|
21842
21970
|
var DataSourceMethodSelect_vue_vue_type_script_setup_true_name_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
21843
21971
|
name: "MFieldsDataSourceMethodSelect",
|
|
@@ -21855,7 +21983,10 @@
|
|
|
21855
21983
|
},
|
|
21856
21984
|
size: {},
|
|
21857
21985
|
lastValues: {},
|
|
21858
|
-
isCompare: { type: Boolean }
|
|
21986
|
+
isCompare: { type: Boolean },
|
|
21987
|
+
text: {},
|
|
21988
|
+
labelWidth: {},
|
|
21989
|
+
labelPosition: {}
|
|
21859
21990
|
},
|
|
21860
21991
|
emits: ["change"],
|
|
21861
21992
|
setup(__props, { emit: __emit }) {
|
|
@@ -21959,7 +22090,7 @@
|
|
|
21959
22090
|
eventBus?.emit("edit-data-source-method", id, methodName);
|
|
21960
22091
|
};
|
|
21961
22092
|
return (_ctx, _cache) => {
|
|
21962
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22093
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$36, [(0, vue.createElementVNode)("div", _hoisted_2$6, [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MCascader), {
|
|
21963
22094
|
class: "select",
|
|
21964
22095
|
config: cascaderConfig.value,
|
|
21965
22096
|
model: __props.model,
|
|
@@ -22009,10 +22140,31 @@
|
|
|
22009
22140
|
//#region packages/editor/src/fields/DataSourceMethodSelect.vue
|
|
22010
22141
|
var DataSourceMethodSelect_default = DataSourceMethodSelect_vue_vue_type_script_setup_true_name_true_lang_default;
|
|
22011
22142
|
//#endregion
|
|
22143
|
+
//#region \0plugin-vue:export-helper
|
|
22144
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
22145
|
+
const target = sfc.__vccOpts || sfc;
|
|
22146
|
+
for (const [key, val] of props) target[key] = val;
|
|
22147
|
+
return target;
|
|
22148
|
+
};
|
|
22149
|
+
//#endregion
|
|
22150
|
+
//#region packages/editor/src/icons/DatasourceIcon.vue
|
|
22151
|
+
var _sfc_main$26 = {};
|
|
22152
|
+
var _hoisted_1$35 = {
|
|
22153
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22154
|
+
width: "16",
|
|
22155
|
+
height: "16",
|
|
22156
|
+
viewBox: "0 0 16 16",
|
|
22157
|
+
fill: "currentColor"
|
|
22158
|
+
};
|
|
22159
|
+
function _sfc_render$26(_ctx, _cache) {
|
|
22160
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$35, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M6.25 9.723C4.392 9.6095 2.804 9.137 1.875 8.4775V9.7495C1.875 10.6165 3.7665 11.3365 6.25 11.4745V12.348C4.392 12.2345 2.804 11.763 1.875 11.102V12.3745H1V4.0625C1 2.371 3.742 1 7.125 1C10.507 1 13.249 2.371 13.249 4.0625V6.8255H12.374V5.6405C11.3025 6.5295 9.352 7.1245 7.1245 7.1245C4.897 7.1245 2.947 6.5295 1.8745 5.6405V7.1245C1.8745 7.9915 3.7665 8.712 6.2495 8.85L6.25 9.723ZM7.125 14.999C3.742 14.999 1 13.8245 1 12.3745H1.875C1.875 13.3415 4.225 14.124 7.125 14.124V14.999ZM7.125 6.2495C10.024 6.2495 12.3745 5.2695 12.3745 4.0625C12.3745 2.855 10.0245 1.875 7.1245 1.875C4.225 1.875 1.8745 2.855 1.8745 4.0625C1.8745 5.2695 4.2255 6.2495 7.125 6.2495ZM14.7385 11.9895L14.1295 11.6345C14.1635 11.4485 14.1855 11.2585 14.1855 11.062C14.1843 10.8697 14.1655 10.6779 14.1295 10.489L14.7385 10.134C14.988 9.987 15.073 9.667 14.929 9.416L14.409 8.507C14.3752 8.44726 14.3299 8.39483 14.2757 8.35275C14.2215 8.31066 14.1595 8.27977 14.0933 8.26186C14.027 8.24395 13.9579 8.23938 13.8898 8.24842C13.8218 8.25745 13.7563 8.27992 13.697 8.3145L13.081 8.6735C12.7931 8.42269 12.4616 8.22694 12.103 8.096V7.6495C12.103 7.36 11.8705 7.1245 11.5825 7.1245H10.5415C10.4728 7.12476 10.4049 7.13855 10.3415 7.16507C10.2782 7.1916 10.2206 7.23034 10.1723 7.2791C10.1239 7.32785 10.0856 7.38565 10.0595 7.4492C10.0335 7.51276 10.0202 7.58082 10.0205 7.6495V8.096C9.66186 8.22694 9.33035 8.42269 9.0425 8.6735L8.4265 8.3145C8.36725 8.27999 8.30174 8.2576 8.23377 8.2486C8.1658 8.23961 8.09672 8.24419 8.03053 8.2621C7.96435 8.28001 7.90238 8.31088 7.84821 8.35292C7.79405 8.39495 7.74877 8.44733 7.715 8.507L7.195 9.417C7.12576 9.53751 7.10688 9.68047 7.14246 9.81482C7.17804 9.94917 7.2652 10.0641 7.385 10.1345L7.9945 10.489C7.9585 10.6775 7.9395 10.8695 7.9385 11.062C7.9385 11.2585 7.96 11.4485 7.9945 11.635L7.3855 11.99C7.1355 12.1365 7.0505 12.4565 7.1945 12.7075L7.715 13.6165C7.74877 13.6762 7.79405 13.7285 7.84821 13.7706C7.90238 13.8126 7.96435 13.8435 8.03053 13.8614C8.09672 13.8793 8.1658 13.8839 8.23377 13.8749C8.30174 13.8659 8.36725 13.8435 8.4265 13.809L9.0425 13.4505C9.33023 13.7015 9.66178 13.8972 10.0205 14.028V14.474C10.0205 14.764 10.2535 14.999 10.5415 14.999H11.5825C11.7211 14.9983 11.8538 14.9427 11.9514 14.8442C12.049 14.7458 12.1035 14.6126 12.103 14.474V14.028C12.4616 13.8971 12.7931 13.7013 13.081 13.4505L13.697 13.809C13.7563 13.8434 13.8218 13.8657 13.8897 13.8746C13.9577 13.8835 14.0267 13.8789 14.0929 13.861C14.159 13.8431 14.221 13.8123 14.2751 13.7703C14.3293 13.7283 14.3746 13.6761 14.4085 13.6165L14.929 12.7065C14.998 12.586 15.0168 12.4431 14.9811 12.3089C14.9454 12.1746 14.8583 12.0599 14.7385 11.9895ZM14.092 12.5065L13.852 12.915C13.8193 12.9693 13.7667 13.0086 13.7054 13.0246C13.6441 13.0406 13.579 13.0319 13.524 13.0005L12.8575 12.623C12.5109 13.0069 12.0497 13.2688 11.5425 13.37V13.889C11.5425 14.0185 11.4345 14.124 11.3015 14.124H10.822C10.7907 14.1243 10.7597 14.1184 10.7308 14.1067C10.7018 14.0949 10.6754 14.0776 10.6531 14.0557C10.6308 14.0338 10.6131 14.0077 10.6009 13.9789C10.5887 13.9502 10.5823 13.9193 10.582 13.888V13.37C10.0746 13.2689 9.61328 13.007 9.2665 12.623L8.6 13C8.54495 13.0316 8.47971 13.0403 8.4183 13.0243C8.35688 13.0083 8.30418 12.9689 8.2715 12.9145L8.0315 12.506C8.01582 12.4792 8.00564 12.4496 8.00158 12.4189C7.99752 12.3881 7.99965 12.3569 8.00785 12.327C8.01605 12.297 8.03016 12.2691 8.04933 12.2447C8.0685 12.2203 8.09236 12.2 8.1195 12.185L8.789 11.805C8.70604 11.5658 8.66313 11.3146 8.662 11.0615C8.662 10.8005 8.709 10.552 8.7895 10.3175L8.1195 9.9375C8.09247 9.92244 8.06872 9.90213 8.04964 9.87777C8.03056 9.85341 8.01654 9.82549 8.00839 9.79564C8.00024 9.76579 7.99813 9.73461 8.00218 9.70394C8.00624 9.67326 8.01637 9.64371 8.032 9.617L8.272 9.208C8.30467 9.15373 8.35729 9.1144 8.41858 9.09843C8.47988 9.08245 8.54499 9.09109 8.6 9.1225L9.2665 9.5005C9.61315 9.11663 10.0743 8.85468 10.5815 8.7535V8.235C10.5815 8.105 10.689 8 10.822 8H11.302C11.4345 8 11.542 8.105 11.542 8.236V8.754C12.0492 8.85518 12.5104 9.11713 12.857 9.501L13.524 9.123C13.579 9.09159 13.6441 9.08295 13.7054 9.09893C13.7667 9.1149 13.8193 9.15423 13.852 9.2085L14.092 9.6175C14.1077 9.64423 14.1179 9.67383 14.122 9.70455C14.1261 9.73528 14.124 9.76652 14.1159 9.79643C14.1077 9.82634 14.0937 9.85431 14.0745 9.87871C14.0554 9.90311 14.0316 9.92344 14.0045 9.9385L13.335 10.3185C13.4135 10.5525 13.462 10.801 13.462 11.062C13.462 11.3225 13.4145 11.571 13.335 11.8055L14.0045 12.1855C14.0316 12.2006 14.0554 12.2209 14.0745 12.2453C14.0937 12.2697 14.1077 12.2977 14.1159 12.3276C14.124 12.3575 14.1261 12.3887 14.122 12.4194C14.1179 12.4502 14.1077 12.4798 14.092 12.5065ZM11.062 9.7495C10.7139 9.7495 10.3801 9.88778 10.1339 10.1339C9.88778 10.3801 9.7495 10.7139 9.7495 11.062C9.7495 11.4101 9.88778 11.7439 10.1339 11.9901C10.3801 12.2362 10.7139 12.3745 11.062 12.3745C11.4101 12.3745 11.7439 12.2362 11.9901 11.9901C12.2362 11.7439 12.3745 11.4101 12.3745 11.062C12.3745 10.7139 12.2362 10.3801 11.9901 10.1339C11.7439 9.88778 11.4101 9.7495 11.062 9.7495ZM11.062 11.4995C10.946 11.4995 10.8347 11.4534 10.7526 11.3714C10.6706 11.2893 10.6245 11.178 10.6245 11.062C10.6245 10.946 10.6706 10.8347 10.7526 10.7526C10.8347 10.6706 10.946 10.6245 11.062 10.6245C11.178 10.6245 11.2893 10.6706 11.3714 10.7526C11.4534 10.8347 11.4995 10.946 11.4995 11.062C11.4995 11.178 11.4534 11.2893 11.3714 11.3714C11.2893 11.4534 11.178 11.4995 11.062 11.4995Z" }, null, -1)])]);
|
|
22161
|
+
}
|
|
22162
|
+
var DatasourceIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$26, [["render", _sfc_render$26]]);
|
|
22163
|
+
//#endregion
|
|
22012
22164
|
//#region packages/editor/src/fields/DataSourceFieldSelect/FieldSelect.vue?vue&type=script&setup=true&lang.ts
|
|
22013
22165
|
init_Icon();
|
|
22014
22166
|
init_type();
|
|
22015
|
-
var _hoisted_1$
|
|
22167
|
+
var _hoisted_1$34 = { class: "m-editor-data-source-field-select" };
|
|
22016
22168
|
var FieldSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
22017
22169
|
__name: "FieldSelect",
|
|
22018
22170
|
props: /*@__PURE__*/ (0, vue.mergeModels)({
|
|
@@ -22105,7 +22257,7 @@
|
|
|
22105
22257
|
else eventBus?.emit("edit-data-source", dataSourceId);
|
|
22106
22258
|
};
|
|
22107
22259
|
return (_ctx, _cache) => {
|
|
22108
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22260
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$34, [__props.dataSourceId ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicCascader), {
|
|
22109
22261
|
key: 0,
|
|
22110
22262
|
"model-value": selectFieldsId.value,
|
|
22111
22263
|
clearable: "",
|
|
@@ -22202,7 +22354,6 @@
|
|
|
22202
22354
|
//#endregion
|
|
22203
22355
|
//#region packages/editor/src/fields/DataSourceFieldSelect/Index.vue?vue&type=script&setup=true&lang.ts
|
|
22204
22356
|
init_Icon();
|
|
22205
|
-
var _hoisted_1$29 = { class: "m-fields-data-source-field-select" };
|
|
22206
22357
|
var Index_vue_vue_type_script_setup_true_lang_default$1 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
22207
22358
|
name: "MFieldsDataSourceFieldSelect",
|
|
22208
22359
|
__name: "Index",
|
|
@@ -22219,13 +22370,17 @@
|
|
|
22219
22370
|
},
|
|
22220
22371
|
size: {},
|
|
22221
22372
|
lastValues: {},
|
|
22222
|
-
isCompare: { type: Boolean }
|
|
22373
|
+
isCompare: { type: Boolean },
|
|
22374
|
+
text: {},
|
|
22375
|
+
labelWidth: {},
|
|
22376
|
+
labelPosition: {}
|
|
22223
22377
|
},
|
|
22224
22378
|
emits: ["change"],
|
|
22225
22379
|
setup(__props, { emit: __emit }) {
|
|
22226
22380
|
const emit = __emit;
|
|
22227
22381
|
const props = __props;
|
|
22228
22382
|
const showDataSourceFieldSelect = (0, vue.ref)(false);
|
|
22383
|
+
const isSelectValid = (0, vue.computed)(() => !disabledDataSource.value && (showDataSourceFieldSelect.value || !props.config.fieldConfig));
|
|
22229
22384
|
(0, vue.watch)(() => props.model[props.name], (value) => {
|
|
22230
22385
|
if (Array.isArray(value) && typeof value[0] === "string" && value[0].startsWith(_tmagic_utils.DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX)) showDataSourceFieldSelect.value = true;
|
|
22231
22386
|
else showDataSourceFieldSelect.value = false;
|
|
@@ -22295,7 +22450,7 @@
|
|
|
22295
22450
|
showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value;
|
|
22296
22451
|
};
|
|
22297
22452
|
return (_ctx, _cache) => {
|
|
22298
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
22453
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", { class: (0, vue.normalizeClass)(["m-fields-data-source-field-select", { [`data-source-field-${type.value}`]: !isSelectValid.value }]) }, [isSelectValid.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(FieldSelect_default, {
|
|
22299
22454
|
key: 0,
|
|
22300
22455
|
"model-value": __props.model[__props.name],
|
|
22301
22456
|
disabled: __props.disabled,
|
|
@@ -22346,7 +22501,7 @@
|
|
|
22346
22501
|
disabled: __props.disabled,
|
|
22347
22502
|
onClick: onToggleDataSourceFieldSelectHandler
|
|
22348
22503
|
}, {
|
|
22349
|
-
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon:
|
|
22504
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: DatasourceIcon_default })]),
|
|
22350
22505
|
_: 1
|
|
22351
22506
|
}, 8, [
|
|
22352
22507
|
"type",
|
|
@@ -22354,7 +22509,7 @@
|
|
|
22354
22509
|
"disabled"
|
|
22355
22510
|
])]),
|
|
22356
22511
|
_: 1
|
|
22357
|
-
}, 8, ["disabled"])) : (0, vue.createCommentVNode)("v-if", true)]);
|
|
22512
|
+
}, 8, ["disabled"])) : (0, vue.createCommentVNode)("v-if", true)], 2);
|
|
22358
22513
|
};
|
|
22359
22514
|
}
|
|
22360
22515
|
});
|
|
@@ -22364,11 +22519,14 @@
|
|
|
22364
22519
|
//#endregion
|
|
22365
22520
|
//#region packages/editor/src/fields/EventSelect.vue?vue&type=script&setup=true&lang.ts
|
|
22366
22521
|
init_lodash();
|
|
22367
|
-
var _hoisted_1$
|
|
22522
|
+
var _hoisted_1$33 = { class: "m-fields-event-select" };
|
|
22368
22523
|
var _hoisted_2$5 = {
|
|
22369
22524
|
key: 1,
|
|
22370
|
-
class: "fullWidth"
|
|
22525
|
+
class: "fullWidth event-select-container"
|
|
22371
22526
|
};
|
|
22527
|
+
var _hoisted_3$3 = { class: "event-select-header" };
|
|
22528
|
+
var _hoisted_4$2 = { class: "event-item-header" };
|
|
22529
|
+
var _hoisted_5$1 = { class: "event-item-title" };
|
|
22372
22530
|
var EventSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
22373
22531
|
name: "MFieldsEventSelect",
|
|
22374
22532
|
__name: "EventSelect",
|
|
@@ -22382,7 +22540,10 @@
|
|
|
22382
22540
|
disabled: { type: Boolean },
|
|
22383
22541
|
size: {},
|
|
22384
22542
|
lastValues: {},
|
|
22385
|
-
isCompare: { type: Boolean }
|
|
22543
|
+
isCompare: { type: Boolean },
|
|
22544
|
+
text: {},
|
|
22545
|
+
labelWidth: {},
|
|
22546
|
+
labelPosition: {}
|
|
22386
22547
|
},
|
|
22387
22548
|
emits: ["change"],
|
|
22388
22549
|
setup(__props, { emit: __emit }) {
|
|
@@ -22392,12 +22553,12 @@
|
|
|
22392
22553
|
const eventNameConfig = (0, vue.computed)(() => {
|
|
22393
22554
|
return {
|
|
22394
22555
|
name: "name",
|
|
22395
|
-
text: "
|
|
22556
|
+
text: "事件类型",
|
|
22396
22557
|
type: (mForm, { formValue }) => {
|
|
22397
22558
|
if (props.config.src !== "component" || formValue.type === "page-fragment-container" && formValue.pageFragmentId) return "cascader";
|
|
22398
22559
|
return "select";
|
|
22399
22560
|
},
|
|
22400
|
-
labelWidth: "
|
|
22561
|
+
labelWidth: "70px",
|
|
22401
22562
|
checkStrictly: () => props.config.src !== "component",
|
|
22402
22563
|
valueSeparator: ".",
|
|
22403
22564
|
options: (_mForm, { formValue }) => getEventNameOptions(props.config.src, formValue),
|
|
@@ -22436,6 +22597,7 @@
|
|
|
22436
22597
|
name: "actionType",
|
|
22437
22598
|
text: "联动类型",
|
|
22438
22599
|
type: "select",
|
|
22600
|
+
labelPosition: "left",
|
|
22439
22601
|
defaultValue: _tmagic_core.ActionType.COMP,
|
|
22440
22602
|
options: actionTypeOptions.value,
|
|
22441
22603
|
rules: [{
|
|
@@ -22453,6 +22615,7 @@
|
|
|
22453
22615
|
name: "to",
|
|
22454
22616
|
text: "联动组件",
|
|
22455
22617
|
type: "ui-select",
|
|
22618
|
+
labelPosition: "left",
|
|
22456
22619
|
display: (_mForm, { model }) => model.actionType === _tmagic_core.ActionType.COMP,
|
|
22457
22620
|
onChange: (_MForm, _v, { setModel }) => {
|
|
22458
22621
|
setModel("method", "");
|
|
@@ -22468,6 +22631,7 @@
|
|
|
22468
22631
|
return {
|
|
22469
22632
|
name: "method",
|
|
22470
22633
|
text: "动作",
|
|
22634
|
+
labelPosition: "left",
|
|
22471
22635
|
type: (mForm, { model }) => {
|
|
22472
22636
|
const to = editorService.getNodeById(model.to);
|
|
22473
22637
|
if (to && to.type === "page-fragment-container" && to.pageFragmentId) return "cascader";
|
|
@@ -22543,12 +22707,14 @@
|
|
|
22543
22707
|
}));
|
|
22544
22708
|
const actionsConfig = (0, vue.computed)(() => (0, _tmagic_form.defineFormItem)({
|
|
22545
22709
|
type: "panel",
|
|
22710
|
+
labelPosition: "left",
|
|
22546
22711
|
items: [{
|
|
22547
22712
|
type: "group-list",
|
|
22548
22713
|
name: "actions",
|
|
22549
22714
|
expandAll: true,
|
|
22550
22715
|
enableToggleMode: false,
|
|
22551
22716
|
titlePrefix: "动作",
|
|
22717
|
+
labelPosition: "left",
|
|
22552
22718
|
items: [
|
|
22553
22719
|
actionTypeConfig.value,
|
|
22554
22720
|
targetCompConfig.value,
|
|
@@ -22613,7 +22779,7 @@
|
|
|
22613
22779
|
};
|
|
22614
22780
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
22615
22781
|
return (_ctx, _cache) => {
|
|
22616
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22782
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$33, [isOldVersion.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MTable), {
|
|
22617
22783
|
key: 0,
|
|
22618
22784
|
name: "events",
|
|
22619
22785
|
size: __props.size,
|
|
@@ -22630,73 +22796,97 @@
|
|
|
22630
22796
|
"last-values",
|
|
22631
22797
|
"is-compare",
|
|
22632
22798
|
"config"
|
|
22633
|
-
])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$5, [
|
|
22634
|
-
|
|
22635
|
-
|
|
22636
|
-
|
|
22637
|
-
|
|
22638
|
-
|
|
22639
|
-
|
|
22640
|
-
}, {
|
|
22641
|
-
default: (0, vue.withCtx)(() => [..._cache[1] || (_cache[1] = [(0, vue.createTextVNode)("添加事件", -1)])]),
|
|
22642
|
-
_: 1
|
|
22643
|
-
}, 8, ["size", "disabled"])) : (0, vue.createCommentVNode)("v-if", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(displayList.value, (entry) => {
|
|
22644
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MPanel), {
|
|
22645
|
-
key: entry.index,
|
|
22646
|
-
disabled: __props.disabled,
|
|
22799
|
+
])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$5, [
|
|
22800
|
+
(0, vue.createElementVNode)("div", _hoisted_3$3, [_cache[3] || (_cache[3] = (0, vue.createElementVNode)("div", { class: "event-select-title" }, "事件配置", -1)), !isCompareMode.value && displayList.value.length > 0 ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
22801
|
+
key: 0,
|
|
22802
|
+
class: "create-button",
|
|
22803
|
+
text: "",
|
|
22804
|
+
type: "primary",
|
|
22805
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Plus),
|
|
22647
22806
|
size: __props.size,
|
|
22648
|
-
|
|
22649
|
-
|
|
22650
|
-
model: entry.cardItem,
|
|
22651
|
-
"last-values": entry.lastCardItem,
|
|
22652
|
-
"is-compare": isCompareMode.value,
|
|
22653
|
-
"label-width": __props.config.labelWidth || "100px",
|
|
22654
|
-
onChange: onChangeHandler
|
|
22807
|
+
disabled: __props.disabled,
|
|
22808
|
+
onClick: _cache[0] || (_cache[0] = ($event) => addEvent())
|
|
22655
22809
|
}, {
|
|
22656
|
-
|
|
22657
|
-
|
|
22658
|
-
|
|
22659
|
-
|
|
22660
|
-
|
|
22661
|
-
|
|
22810
|
+
default: (0, vue.withCtx)(() => [..._cache[2] || (_cache[2] = [(0, vue.createTextVNode)("添加事件", -1)])]),
|
|
22811
|
+
_: 1
|
|
22812
|
+
}, 8, [
|
|
22813
|
+
"icon",
|
|
22814
|
+
"size",
|
|
22815
|
+
"disabled"
|
|
22816
|
+
])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
22817
|
+
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(displayList.value, (entry) => {
|
|
22818
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MPanel), {
|
|
22819
|
+
key: entry.index,
|
|
22662
22820
|
disabled: __props.disabled,
|
|
22663
22821
|
size: __props.size,
|
|
22664
22822
|
prop: `${__props.prop}.${entry.index}`,
|
|
22665
|
-
|
|
22666
|
-
|
|
22823
|
+
config: actionsConfig.value,
|
|
22824
|
+
model: entry.cardItem,
|
|
22825
|
+
"last-values": entry.lastCardItem,
|
|
22826
|
+
"is-compare": isCompareMode.value,
|
|
22827
|
+
"hide-expand": true,
|
|
22828
|
+
"label-width": __props.config.labelWidth || "100px",
|
|
22829
|
+
onChange: onChangeHandler
|
|
22830
|
+
}, {
|
|
22831
|
+
header: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_4$2, [
|
|
22832
|
+
(0, vue.createElementVNode)("div", _hoisted_5$1, "事件" + (0, vue.toDisplayString)(Number(entry.index) + 1), 1),
|
|
22833
|
+
(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MContainer), {
|
|
22834
|
+
class: "fullWidth",
|
|
22835
|
+
config: eventNameConfig.value,
|
|
22836
|
+
model: entry.cardItem,
|
|
22837
|
+
"last-values": entry.lastCardItem,
|
|
22838
|
+
"is-compare": isCompareMode.value,
|
|
22839
|
+
disabled: __props.disabled,
|
|
22840
|
+
size: __props.size,
|
|
22841
|
+
prop: `${__props.prop}.${entry.index}`,
|
|
22842
|
+
onChange: eventNameChangeHandler
|
|
22843
|
+
}, null, 8, [
|
|
22844
|
+
"config",
|
|
22845
|
+
"model",
|
|
22846
|
+
"last-values",
|
|
22847
|
+
"is-compare",
|
|
22848
|
+
"disabled",
|
|
22849
|
+
"size",
|
|
22850
|
+
"prop"
|
|
22851
|
+
]),
|
|
22852
|
+
!isCompareMode.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
22853
|
+
key: 0,
|
|
22854
|
+
class: "event-item-delete-button",
|
|
22855
|
+
link: "",
|
|
22856
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Delete),
|
|
22857
|
+
disabled: __props.disabled,
|
|
22858
|
+
size: __props.size,
|
|
22859
|
+
onClick: ($event) => removeEvent(Number(entry.index))
|
|
22860
|
+
}, null, 8, [
|
|
22861
|
+
"icon",
|
|
22862
|
+
"disabled",
|
|
22863
|
+
"size",
|
|
22864
|
+
"onClick"
|
|
22865
|
+
])) : (0, vue.createCommentVNode)("v-if", true)
|
|
22866
|
+
])]),
|
|
22867
|
+
_: 2
|
|
22868
|
+
}, 1032, [
|
|
22869
|
+
"disabled",
|
|
22870
|
+
"size",
|
|
22871
|
+
"prop",
|
|
22667
22872
|
"config",
|
|
22668
22873
|
"model",
|
|
22669
22874
|
"last-values",
|
|
22670
22875
|
"is-compare",
|
|
22671
|
-
"
|
|
22672
|
-
|
|
22673
|
-
|
|
22674
|
-
|
|
22675
|
-
|
|
22676
|
-
|
|
22677
|
-
|
|
22678
|
-
|
|
22679
|
-
|
|
22680
|
-
|
|
22681
|
-
|
|
22682
|
-
|
|
22683
|
-
|
|
22684
|
-
|
|
22685
|
-
"size",
|
|
22686
|
-
"onClick"
|
|
22687
|
-
])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
22688
|
-
_: 2
|
|
22689
|
-
}, 1032, [
|
|
22690
|
-
"disabled",
|
|
22691
|
-
"size",
|
|
22692
|
-
"prop",
|
|
22693
|
-
"config",
|
|
22694
|
-
"model",
|
|
22695
|
-
"last-values",
|
|
22696
|
-
"is-compare",
|
|
22697
|
-
"label-width"
|
|
22698
|
-
]);
|
|
22699
|
-
}), 128))]))]);
|
|
22876
|
+
"label-width"
|
|
22877
|
+
]);
|
|
22878
|
+
}), 128)),
|
|
22879
|
+
!isCompareMode.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
22880
|
+
key: 0,
|
|
22881
|
+
class: "create-button fullWidth",
|
|
22882
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Plus),
|
|
22883
|
+
disabled: __props.disabled,
|
|
22884
|
+
onClick: _cache[1] || (_cache[1] = ($event) => addEvent())
|
|
22885
|
+
}, {
|
|
22886
|
+
default: (0, vue.withCtx)(() => [..._cache[4] || (_cache[4] = [(0, vue.createTextVNode)("添加事件", -1)])]),
|
|
22887
|
+
_: 1
|
|
22888
|
+
}, 8, ["icon", "disabled"])) : (0, vue.createCommentVNode)("v-if", true)
|
|
22889
|
+
]))]);
|
|
22700
22890
|
};
|
|
22701
22891
|
}
|
|
22702
22892
|
});
|
|
@@ -22705,7 +22895,7 @@
|
|
|
22705
22895
|
var EventSelect_default = EventSelect_vue_vue_type_script_setup_true_lang_default;
|
|
22706
22896
|
//#endregion
|
|
22707
22897
|
//#region packages/editor/src/icons/CodeIcon.vue?vue&type=script&setup=true&lang.ts
|
|
22708
|
-
var _hoisted_1$
|
|
22898
|
+
var _hoisted_1$32 = {
|
|
22709
22899
|
viewBox: "0 0 32 32",
|
|
22710
22900
|
version: "1.1",
|
|
22711
22901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -22716,7 +22906,7 @@
|
|
|
22716
22906
|
__name: "CodeIcon",
|
|
22717
22907
|
setup(__props) {
|
|
22718
22908
|
return (_ctx, _cache) => {
|
|
22719
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22909
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$32, [..._cache[0] || (_cache[0] = [(0, vue.createStaticVNode)("<defs><rect id=\"path-1\" x=\"0\" y=\"0\" width=\"32\" height=\"32\"></rect></defs><g id=\"组件规范\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"03图标\" transform=\"translate(-561.000000, -2356.000000)\"><g id=\"icon/line/Universal/code\" transform=\"translate(561.000000, 2356.000000)\"><g id=\"路径\"><mask id=\"mask-2\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><use id=\"蒙版\" fill=\"#D8D8D8\" opacity=\"0\" xlink:href=\"#path-1\"></use><path d=\"M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z\" id=\"形状\" fill=\"#1D1F24\" mask=\"url(#mask-2)\"></path></g></g><g id=\"icon切图\" transform=\"translate(226.000000, 1782.000000)\"></g></g></g>", 2)])]);
|
|
22720
22910
|
};
|
|
22721
22911
|
}
|
|
22722
22912
|
});
|
|
@@ -22726,7 +22916,7 @@
|
|
|
22726
22916
|
//#endregion
|
|
22727
22917
|
//#region packages/editor/src/fields/KeyValue.vue?vue&type=script&setup=true&lang.ts
|
|
22728
22918
|
init_CodeEditor();
|
|
22729
|
-
var _hoisted_1$
|
|
22919
|
+
var _hoisted_1$31 = { class: "m-fields-key-value" };
|
|
22730
22920
|
var _hoisted_2$4 = { key: 0 };
|
|
22731
22921
|
var KeyValue_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
22732
22922
|
name: "MFieldsKeyValue",
|
|
@@ -22744,7 +22934,10 @@
|
|
|
22744
22934
|
},
|
|
22745
22935
|
size: {},
|
|
22746
22936
|
lastValues: {},
|
|
22747
|
-
isCompare: { type: Boolean }
|
|
22937
|
+
isCompare: { type: Boolean },
|
|
22938
|
+
text: {},
|
|
22939
|
+
labelWidth: {},
|
|
22940
|
+
labelPosition: {}
|
|
22748
22941
|
},
|
|
22749
22942
|
emits: ["change"],
|
|
22750
22943
|
setup(__props, { emit: __emit }) {
|
|
@@ -22790,7 +22983,7 @@
|
|
|
22790
22983
|
emit("change", v);
|
|
22791
22984
|
};
|
|
22792
22985
|
return (_ctx, _cache) => {
|
|
22793
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22986
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$31, [
|
|
22794
22987
|
!showCode.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$4, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(records.value, (item, index) => {
|
|
22795
22988
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
22796
22989
|
class: "m-fields-key-value-item",
|
|
@@ -22885,10 +23078,68 @@
|
|
|
22885
23078
|
//#region packages/editor/src/fields/KeyValue.vue
|
|
22886
23079
|
var KeyValue_default = KeyValue_vue_vue_type_script_setup_true_lang_default;
|
|
22887
23080
|
//#endregion
|
|
23081
|
+
//#region packages/editor/src/components/ViewForm.vue?vue&type=script&setup=true&lang.ts
|
|
23082
|
+
init_use_compare_form();
|
|
23083
|
+
var ViewForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
23084
|
+
name: "MEditorViewForm",
|
|
23085
|
+
__name: "ViewForm",
|
|
23086
|
+
props: {
|
|
23087
|
+
value: {},
|
|
23088
|
+
type: {},
|
|
23089
|
+
category: { default: "node" },
|
|
23090
|
+
dataSourceType: {},
|
|
23091
|
+
labelWidth: { default: "120px" },
|
|
23092
|
+
height: {},
|
|
23093
|
+
extendState: {},
|
|
23094
|
+
baseFormState: {},
|
|
23095
|
+
size: {},
|
|
23096
|
+
loadConfig: {},
|
|
23097
|
+
services: {},
|
|
23098
|
+
disabled: {
|
|
23099
|
+
type: Boolean,
|
|
23100
|
+
default: true
|
|
23101
|
+
}
|
|
23102
|
+
},
|
|
23103
|
+
setup(__props, { expose: __expose }) {
|
|
23104
|
+
const { config, currentValues, wrapperStyle, mergedExtendState, loadConfig, formRef } = useCompareForm(__props);
|
|
23105
|
+
__expose({
|
|
23106
|
+
form: formRef,
|
|
23107
|
+
config,
|
|
23108
|
+
reload: loadConfig
|
|
23109
|
+
});
|
|
23110
|
+
return (_ctx, _cache) => {
|
|
23111
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
23112
|
+
class: "m-editor-view-form-wrapper",
|
|
23113
|
+
style: (0, vue.normalizeStyle)((0, vue.unref)(wrapperStyle))
|
|
23114
|
+
}, [(0, vue.unref)(config).length ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MForm), {
|
|
23115
|
+
key: 0,
|
|
23116
|
+
ref: "form",
|
|
23117
|
+
class: "m-editor-view-form",
|
|
23118
|
+
config: (0, vue.unref)(config),
|
|
23119
|
+
"init-values": (0, vue.unref)(currentValues),
|
|
23120
|
+
disabled: __props.disabled,
|
|
23121
|
+
"label-width": __props.labelWidth,
|
|
23122
|
+
"extend-state": (0, vue.unref)(mergedExtendState),
|
|
23123
|
+
size: __props.size
|
|
23124
|
+
}, null, 8, [
|
|
23125
|
+
"config",
|
|
23126
|
+
"init-values",
|
|
23127
|
+
"disabled",
|
|
23128
|
+
"label-width",
|
|
23129
|
+
"extend-state",
|
|
23130
|
+
"size"
|
|
23131
|
+
])) : (0, vue.createCommentVNode)("v-if", true)], 4);
|
|
23132
|
+
};
|
|
23133
|
+
}
|
|
23134
|
+
});
|
|
23135
|
+
//#endregion
|
|
23136
|
+
//#region packages/editor/src/components/ViewForm.vue
|
|
23137
|
+
var ViewForm_default = ViewForm_vue_vue_type_script_setup_true_lang_default;
|
|
23138
|
+
//#endregion
|
|
22888
23139
|
//#region packages/editor/src/fields/PageFragmentSelect.vue?vue&type=script&setup=true&lang.ts
|
|
22889
23140
|
init_HistoryDiffDialog();
|
|
22890
23141
|
init_Icon();
|
|
22891
|
-
var _hoisted_1$
|
|
23142
|
+
var _hoisted_1$30 = { class: "m-fields-page-fragment-select" };
|
|
22892
23143
|
var _hoisted_2$3 = { class: "page-fragment-select-container" };
|
|
22893
23144
|
var PageFragmentSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
22894
23145
|
name: "MFieldsPageFragmentSelect",
|
|
@@ -22906,7 +23157,10 @@
|
|
|
22906
23157
|
},
|
|
22907
23158
|
size: {},
|
|
22908
23159
|
lastValues: {},
|
|
22909
|
-
isCompare: { type: Boolean }
|
|
23160
|
+
isCompare: { type: Boolean },
|
|
23161
|
+
text: {},
|
|
23162
|
+
labelWidth: {},
|
|
23163
|
+
labelPosition: {}
|
|
22910
23164
|
},
|
|
22911
23165
|
emits: ["change"],
|
|
22912
23166
|
setup(__props, { emit: __emit }) {
|
|
@@ -22931,7 +23185,7 @@
|
|
|
22931
23185
|
editorService.select(id);
|
|
22932
23186
|
};
|
|
22933
23187
|
return (_ctx, _cache) => {
|
|
22934
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
23188
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$30, [(0, vue.createElementVNode)("div", _hoisted_2$3, [
|
|
22935
23189
|
(0, vue.createCommentVNode)(" 页面片下拉框 "),
|
|
22936
23190
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MSelect), {
|
|
22937
23191
|
class: "select",
|
|
@@ -22981,7 +23235,10 @@
|
|
|
22981
23235
|
},
|
|
22982
23236
|
size: {},
|
|
22983
23237
|
lastValues: {},
|
|
22984
|
-
isCompare: { type: Boolean }
|
|
23238
|
+
isCompare: { type: Boolean },
|
|
23239
|
+
text: {},
|
|
23240
|
+
labelWidth: {},
|
|
23241
|
+
labelPosition: {}
|
|
22985
23242
|
},
|
|
22986
23243
|
emits: ["change"],
|
|
22987
23244
|
setup(__props, { emit: __emit }) {
|
|
@@ -23005,11 +23262,14 @@
|
|
|
23005
23262
|
titlePrefix: props.config.titlePrefix,
|
|
23006
23263
|
expandAll: true,
|
|
23007
23264
|
enableToggleMode: false,
|
|
23265
|
+
flat: props.config.flat,
|
|
23008
23266
|
items: [{
|
|
23009
23267
|
type: "table",
|
|
23010
23268
|
name: "cond",
|
|
23011
|
-
operateColWidth:
|
|
23269
|
+
operateColWidth: props.config.operateColWidth,
|
|
23012
23270
|
enableToggleMode: false,
|
|
23271
|
+
fixed: props.config.fixed,
|
|
23272
|
+
flat: props.config.flat,
|
|
23013
23273
|
items: [
|
|
23014
23274
|
parentFields.value.length ? {
|
|
23015
23275
|
type: "cascader",
|
|
@@ -23146,6 +23406,7 @@
|
|
|
23146
23406
|
var DisplayConds_default = DisplayConds_vue_vue_type_script_setup_true_lang_default;
|
|
23147
23407
|
//#endregion
|
|
23148
23408
|
//#region packages/editor/src/fields/CondOpSelect.vue?vue&type=script&setup=true&lang.ts
|
|
23409
|
+
init_props();
|
|
23149
23410
|
var CondOpSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
23150
23411
|
name: "MFieldsCondOpSelect",
|
|
23151
23412
|
__name: "CondOpSelect",
|
|
@@ -23159,7 +23420,10 @@
|
|
|
23159
23420
|
disabled: { type: Boolean },
|
|
23160
23421
|
size: {},
|
|
23161
23422
|
lastValues: {},
|
|
23162
|
-
isCompare: { type: Boolean }
|
|
23423
|
+
isCompare: { type: Boolean },
|
|
23424
|
+
text: {},
|
|
23425
|
+
labelWidth: {},
|
|
23426
|
+
labelPosition: {}
|
|
23163
23427
|
},
|
|
23164
23428
|
emits: ["change"],
|
|
23165
23429
|
setup(__props, { emit: __emit }) {
|
|
@@ -23209,7 +23473,7 @@
|
|
|
23209
23473
|
var CondOpSelect_default = CondOpSelect_vue_vue_type_script_setup_true_lang_default;
|
|
23210
23474
|
//#endregion
|
|
23211
23475
|
//#region packages/editor/src/fields/StyleSetter/components/BackgroundPosition.vue?vue&type=script&setup=true&lang.ts
|
|
23212
|
-
var _hoisted_1$
|
|
23476
|
+
var _hoisted_1$29 = { class: "background-position-container" };
|
|
23213
23477
|
var _hoisted_2$2 = { class: "presets-value-list" };
|
|
23214
23478
|
var _hoisted_3$2 = { class: "custom-value" };
|
|
23215
23479
|
var BackgroundPosition_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
@@ -23224,7 +23488,10 @@
|
|
|
23224
23488
|
disabled: { type: Boolean },
|
|
23225
23489
|
size: {},
|
|
23226
23490
|
lastValues: {},
|
|
23227
|
-
isCompare: { type: Boolean }
|
|
23491
|
+
isCompare: { type: Boolean },
|
|
23492
|
+
text: {},
|
|
23493
|
+
labelWidth: {},
|
|
23494
|
+
labelPosition: {}
|
|
23228
23495
|
},
|
|
23229
23496
|
emits: ["change"],
|
|
23230
23497
|
setup(__props, { emit: __emit }) {
|
|
@@ -23265,7 +23532,7 @@
|
|
|
23265
23532
|
emit("change", v);
|
|
23266
23533
|
};
|
|
23267
23534
|
return (_ctx, _cache) => {
|
|
23268
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
23535
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$29, [(0, vue.createElementVNode)("div", _hoisted_2$2, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)((0, vue.unref)(list), (item, index) => {
|
|
23269
23536
|
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
23270
23537
|
key: index,
|
|
23271
23538
|
link: "",
|
|
@@ -23304,65 +23571,110 @@
|
|
|
23304
23571
|
//#region packages/editor/src/fields/StyleSetter/components/BackgroundPosition.vue
|
|
23305
23572
|
var BackgroundPosition_default = BackgroundPosition_vue_vue_type_script_setup_true_lang_default;
|
|
23306
23573
|
//#endregion
|
|
23307
|
-
//#region \0plugin-vue:export-helper
|
|
23308
|
-
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
23309
|
-
const target = sfc.__vccOpts || sfc;
|
|
23310
|
-
for (const [key, val] of props) target[key] = val;
|
|
23311
|
-
return target;
|
|
23312
|
-
};
|
|
23313
|
-
//#endregion
|
|
23314
23574
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/Repeat.vue
|
|
23315
|
-
var _sfc_main$
|
|
23316
|
-
var _hoisted_1$
|
|
23575
|
+
var _sfc_main$25 = {};
|
|
23576
|
+
var _hoisted_1$28 = {
|
|
23317
23577
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23318
|
-
|
|
23578
|
+
width: "16",
|
|
23579
|
+
height: "16",
|
|
23580
|
+
viewBox: "0 0 16 16",
|
|
23581
|
+
fill: "currentColor"
|
|
23319
23582
|
};
|
|
23320
|
-
function _sfc_render$
|
|
23321
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23583
|
+
function _sfc_render$25(_ctx, _cache) {
|
|
23584
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$28, [..._cache[0] || (_cache[0] = [(0, vue.createStaticVNode)("<rect x=\"13\" y=\"3\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 13 3)\" fill-opacity=\"0.3\"></rect><rect x=\"13\" y=\"7\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 13 7)\" fill-opacity=\"0.3\"></rect><rect x=\"13\" y=\"11\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 13 11)\" fill-opacity=\"0.3\"></rect><rect x=\"9\" y=\"3\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 9 3)\"></rect><rect x=\"9\" y=\"7\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 9 7)\"></rect><rect x=\"9\" y=\"11\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 9 11)\" fill-opacity=\"0.3\"></rect><rect x=\"5\" y=\"3\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 5 3)\"></rect><rect x=\"5\" y=\"7\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 5 7)\"></rect><rect x=\"5\" y=\"11\" width=\"2\" height=\"2\" rx=\"0.5\" transform=\"rotate(90 5 11)\" fill-opacity=\"0.3\"></rect>", 9)])]);
|
|
23322
23585
|
}
|
|
23323
|
-
var Repeat_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$
|
|
23586
|
+
var Repeat_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$25, [["render", _sfc_render$25]]);
|
|
23324
23587
|
//#endregion
|
|
23325
23588
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue
|
|
23326
|
-
var _sfc_main$
|
|
23327
|
-
var _hoisted_1$
|
|
23589
|
+
var _sfc_main$24 = {};
|
|
23590
|
+
var _hoisted_1$27 = {
|
|
23328
23591
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23329
|
-
|
|
23592
|
+
width: "16",
|
|
23593
|
+
height: "16",
|
|
23594
|
+
viewBox: "0 0 16 16",
|
|
23595
|
+
fill: "currentColor"
|
|
23330
23596
|
};
|
|
23331
|
-
function _sfc_render$
|
|
23332
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23333
|
-
|
|
23334
|
-
|
|
23335
|
-
|
|
23597
|
+
function _sfc_render$24(_ctx, _cache) {
|
|
23598
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$27, [..._cache[0] || (_cache[0] = [
|
|
23599
|
+
(0, vue.createElementVNode)("rect", {
|
|
23600
|
+
x: "3",
|
|
23601
|
+
y: "3",
|
|
23602
|
+
width: "2",
|
|
23603
|
+
height: "10",
|
|
23604
|
+
rx: "1"
|
|
23605
|
+
}, null, -1),
|
|
23606
|
+
(0, vue.createElementVNode)("rect", {
|
|
23607
|
+
x: "7",
|
|
23608
|
+
y: "3",
|
|
23609
|
+
width: "2",
|
|
23610
|
+
height: "10",
|
|
23611
|
+
rx: "1"
|
|
23612
|
+
}, null, -1),
|
|
23613
|
+
(0, vue.createElementVNode)("rect", {
|
|
23614
|
+
x: "11",
|
|
23615
|
+
y: "3",
|
|
23616
|
+
width: "2",
|
|
23617
|
+
height: "10",
|
|
23618
|
+
rx: "1",
|
|
23619
|
+
"fill-opacity": "0.3"
|
|
23620
|
+
}, null, -1)
|
|
23621
|
+
])]);
|
|
23336
23622
|
}
|
|
23337
|
-
var RepeatX_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$
|
|
23623
|
+
var RepeatX_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$24, [["render", _sfc_render$24]]);
|
|
23338
23624
|
//#endregion
|
|
23339
23625
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue
|
|
23340
|
-
var _sfc_main$
|
|
23341
|
-
var _hoisted_1$
|
|
23626
|
+
var _sfc_main$23 = {};
|
|
23627
|
+
var _hoisted_1$26 = {
|
|
23342
23628
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23343
|
-
|
|
23629
|
+
width: "16",
|
|
23630
|
+
height: "16",
|
|
23631
|
+
viewBox: "0 0 16 16",
|
|
23632
|
+
fill: "currentColor"
|
|
23344
23633
|
};
|
|
23345
|
-
function _sfc_render$
|
|
23346
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23634
|
+
function _sfc_render$23(_ctx, _cache) {
|
|
23635
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$26, [..._cache[0] || (_cache[0] = [
|
|
23636
|
+
(0, vue.createElementVNode)("rect", {
|
|
23637
|
+
x: "13",
|
|
23638
|
+
y: "3",
|
|
23639
|
+
width: "2",
|
|
23640
|
+
height: "10",
|
|
23641
|
+
rx: "1",
|
|
23642
|
+
transform: "rotate(90 13 3)"
|
|
23643
|
+
}, null, -1),
|
|
23644
|
+
(0, vue.createElementVNode)("rect", {
|
|
23645
|
+
x: "13",
|
|
23646
|
+
y: "7",
|
|
23647
|
+
width: "2",
|
|
23648
|
+
height: "10",
|
|
23649
|
+
rx: "1",
|
|
23650
|
+
transform: "rotate(90 13 7)"
|
|
23651
|
+
}, null, -1),
|
|
23652
|
+
(0, vue.createElementVNode)("rect", {
|
|
23653
|
+
x: "13",
|
|
23654
|
+
y: "11",
|
|
23655
|
+
width: "2",
|
|
23656
|
+
height: "10",
|
|
23657
|
+
rx: "1",
|
|
23658
|
+
transform: "rotate(90 13 11)",
|
|
23659
|
+
"fill-opacity": "0.3"
|
|
23660
|
+
}, null, -1)
|
|
23661
|
+
])]);
|
|
23350
23662
|
}
|
|
23351
|
-
var RepeatY_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$
|
|
23663
|
+
var RepeatY_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$23, [["render", _sfc_render$23]]);
|
|
23352
23664
|
//#endregion
|
|
23353
23665
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue
|
|
23354
|
-
var _sfc_main$
|
|
23355
|
-
var _hoisted_1$
|
|
23666
|
+
var _sfc_main$22 = {};
|
|
23667
|
+
var _hoisted_1$25 = {
|
|
23356
23668
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23357
|
-
|
|
23669
|
+
width: "10",
|
|
23670
|
+
height: "10",
|
|
23671
|
+
viewBox: "0 0 10 10",
|
|
23672
|
+
fill: "currentColor"
|
|
23358
23673
|
};
|
|
23359
|
-
function _sfc_render$
|
|
23360
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23361
|
-
d: "M912.526651 867.741144 555.540144 510.712681l356.986507-357.000833c11.171434-11.18576 11.171434-29.257348 0-40.443108-11.20111-11.18576-29.272697-11.18576-40.444131 0L515.096013 470.267527 158.096203 113.267716c-11.187807-11.159154-29.258371-11.159154-40.444131 0-11.186783 11.186783-11.186783 29.286 0 40.47176L474.623229 510.712681 117.623419 867.741144c-11.159154 11.172457-11.159154 29.216415 0 40.443108 11.18576 11.17348 29.284977 11.17348 40.47176 0l357.000833-357.027439 356.985484 357.027439c11.171434 11.17348 29.243021 11.17348 40.444131 0C923.698085 896.957559 923.725714 878.913601 912.526651 867.741144z",
|
|
23362
|
-
fill: "#5D5D5D"
|
|
23363
|
-
}, null, -1)])]);
|
|
23674
|
+
function _sfc_render$22(_ctx, _cache) {
|
|
23675
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$25, [..._cache[0] || (_cache[0] = [(0, vue.createStaticVNode)("<path d=\"M0 0.625C0 0.279822 0.248731 0 0.555556 0H9.44444C9.75127 0 10 0.279822 10 0.625C10 0.970178 9.75127 1.25 9.44444 1.25H0.555556C0.248731 1.25 0 0.970178 0 0.625Z\" fill-opacity=\"0.3\"></path><path d=\"M0 9.375C0 9.02982 0.248731 8.75 0.555556 8.75H9.44444C9.75127 8.75 10 9.02982 10 9.375C10 9.72018 9.75127 10 9.44444 10H0.555556C0.248731 10 0 9.72018 0 9.375Z\" fill-opacity=\"0.3\"></path><path d=\"M0.555556 4.375C0.248731 4.375 0 4.65482 0 5C0 5.34518 0.248731 5.625 0.555556 5.625H2.87307L3.42868 4.99994L2.87318 4.375H0.555556Z\" fill-opacity=\"0.3\"></path><path d=\"M9.44444 5.625H7.12699L6.57138 4.99994L7.12688 4.375H9.44444C9.75127 4.375 10 4.65482 10 5C10 5.34518 9.75127 5.625 9.44444 5.625Z\" fill-opacity=\"0.3\"></path><path transform=\"translate(0 2.6072)\" d=\"M3.30542 0.183058C3.52237 -0.0610194 3.87413 -0.0610194 4.09109 0.183058C4.30805 0.427136 4.30805 0.822864 4.09109 1.06694L2.91256 2.39279L4.0911 3.71865C4.30806 3.96273 4.30806 4.35846 4.0911 4.60253C3.87414 4.84661 3.52239 4.84661 3.30543 4.60253L2.12688 3.27667L0.948393 4.60248C0.731435 4.84655 0.379676 4.84655 0.162719 4.60248C-0.0542395 4.3584 -0.0542395 3.96267 0.162719 3.71859L1.34121 2.39279L0.162731 1.067C-0.0542269 0.822922 -0.0542268 0.427194 0.162731 0.183116C0.379689 -0.0609612 0.731447 -0.0609612 0.948405 0.183116L2.12688 1.50891L3.30542 0.183058Z\"></path>", 5)])]);
|
|
23364
23676
|
}
|
|
23365
|
-
var NoRepeat_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$
|
|
23677
|
+
var NoRepeat_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$22, [["render", _sfc_render$22]]);
|
|
23366
23678
|
//#endregion
|
|
23367
23679
|
//#region packages/editor/src/fields/StyleSetter/pro/Background.vue?vue&type=script&setup=true&lang.ts
|
|
23368
23680
|
var Background_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
@@ -23373,6 +23685,7 @@
|
|
|
23373
23685
|
isCompare: { type: Boolean },
|
|
23374
23686
|
disabled: { type: Boolean },
|
|
23375
23687
|
size: {},
|
|
23688
|
+
theme: {},
|
|
23376
23689
|
prop: {}
|
|
23377
23690
|
},
|
|
23378
23691
|
emits: ["change", "addDiffCount"],
|
|
@@ -23444,9 +23757,9 @@
|
|
|
23444
23757
|
labelWidth: "68px",
|
|
23445
23758
|
options: [
|
|
23446
23759
|
{
|
|
23447
|
-
value: "repeat",
|
|
23448
|
-
icon: (0, vue.markRaw)(
|
|
23449
|
-
tooltip: "
|
|
23760
|
+
value: "no-repeat",
|
|
23761
|
+
icon: (0, vue.markRaw)(NoRepeat_default),
|
|
23762
|
+
tooltip: "不重复 no-repeat"
|
|
23450
23763
|
},
|
|
23451
23764
|
{
|
|
23452
23765
|
value: "repeat-x",
|
|
@@ -23459,9 +23772,9 @@
|
|
|
23459
23772
|
tooltip: "垂直方向重复 repeat-y"
|
|
23460
23773
|
},
|
|
23461
23774
|
{
|
|
23462
|
-
value: "
|
|
23463
|
-
icon: (0, vue.markRaw)(
|
|
23464
|
-
tooltip: "
|
|
23775
|
+
value: "repeat",
|
|
23776
|
+
icon: (0, vue.markRaw)(Repeat_default),
|
|
23777
|
+
tooltip: "垂直和水平方向重复 repeat"
|
|
23465
23778
|
}
|
|
23466
23779
|
]
|
|
23467
23780
|
},
|
|
@@ -23508,37 +23821,37 @@
|
|
|
23508
23821
|
var Background_default = Background_vue_vue_type_script_setup_true_lang_default;
|
|
23509
23822
|
//#endregion
|
|
23510
23823
|
//#region packages/editor/src/fields/StyleSetter/icons/text-align/Left.vue
|
|
23511
|
-
var _sfc_main$
|
|
23512
|
-
var _hoisted_1$
|
|
23824
|
+
var _sfc_main$21 = {};
|
|
23825
|
+
var _hoisted_1$24 = {
|
|
23513
23826
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23514
23827
|
viewBox: "0 0 1024 1024"
|
|
23515
23828
|
};
|
|
23516
|
-
function _sfc_render$
|
|
23517
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23829
|
+
function _sfc_render$21(_ctx, _cache) {
|
|
23830
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$24, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M128 810.666667h768v85.333333H128z m0-170.666667h512v85.333333H128z m0-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m0 170.666667h512v85.333333H128z" }, null, -1)])]);
|
|
23518
23831
|
}
|
|
23519
|
-
var Left_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$
|
|
23832
|
+
var Left_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$21, [["render", _sfc_render$21]]);
|
|
23520
23833
|
//#endregion
|
|
23521
23834
|
//#region packages/editor/src/fields/StyleSetter/icons/text-align/Center.vue
|
|
23522
|
-
var _sfc_main$
|
|
23523
|
-
var _hoisted_1$
|
|
23835
|
+
var _sfc_main$20 = {};
|
|
23836
|
+
var _hoisted_1$23 = {
|
|
23524
23837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23525
23838
|
viewBox: "0 0 1024 1024"
|
|
23526
23839
|
};
|
|
23527
|
-
function _sfc_render$
|
|
23528
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23840
|
+
function _sfc_render$20(_ctx, _cache) {
|
|
23841
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$23, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M128 810.666667h768v85.333333H128z m128-170.666667h512v85.333333H256z m-128-170.666667h768v85.333334H128z m0-341.333333h768v85.333333H128z m128 170.666667h512v85.333333H256z" }, null, -1)])]);
|
|
23529
23842
|
}
|
|
23530
|
-
var Center_default$
|
|
23843
|
+
var Center_default$2 = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$20, [["render", _sfc_render$20]]);
|
|
23531
23844
|
//#endregion
|
|
23532
23845
|
//#region packages/editor/src/fields/StyleSetter/icons/text-align/Right.vue
|
|
23533
|
-
var _sfc_main$
|
|
23534
|
-
var _hoisted_1$
|
|
23846
|
+
var _sfc_main$19 = {};
|
|
23847
|
+
var _hoisted_1$22 = {
|
|
23535
23848
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23536
23849
|
viewBox: "0 0 1024 1024"
|
|
23537
23850
|
};
|
|
23538
|
-
function _sfc_render$
|
|
23539
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
23851
|
+
function _sfc_render$19(_ctx, _cache) {
|
|
23852
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$22, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M128 128h768v85.333333H128z m0 682.666667h768v85.333333H128z m213.333333-170.666667h554.666667v85.333333H341.333333z m-213.333333-170.666667h768v85.333334H128z m213.333333-170.666666h554.666667v85.333333H341.333333z" }, null, -1)])]);
|
|
23540
23853
|
}
|
|
23541
|
-
var Right_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$
|
|
23854
|
+
var Right_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$19, [["render", _sfc_render$19]]);
|
|
23542
23855
|
//#endregion
|
|
23543
23856
|
//#region packages/editor/src/fields/StyleSetter/pro/Font.vue?vue&type=script&setup=true&lang.ts
|
|
23544
23857
|
var Font_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
@@ -23601,17 +23914,20 @@
|
|
|
23601
23914
|
{
|
|
23602
23915
|
value: "left",
|
|
23603
23916
|
icon: (0, vue.markRaw)(Left_default),
|
|
23604
|
-
tooltip: "左对齐 row"
|
|
23917
|
+
tooltip: "左对齐 row",
|
|
23918
|
+
text: "左对齐"
|
|
23605
23919
|
},
|
|
23606
23920
|
{
|
|
23607
23921
|
value: "center",
|
|
23608
|
-
icon: (0, vue.markRaw)(Center_default$
|
|
23609
|
-
tooltip: "居中对齐 center"
|
|
23922
|
+
icon: (0, vue.markRaw)(Center_default$2),
|
|
23923
|
+
tooltip: "居中对齐 center",
|
|
23924
|
+
text: "居中对齐"
|
|
23610
23925
|
},
|
|
23611
23926
|
{
|
|
23612
23927
|
value: "right",
|
|
23613
23928
|
icon: (0, vue.markRaw)(Right_default),
|
|
23614
|
-
tooltip: "右对齐 right"
|
|
23929
|
+
tooltip: "右对齐 right",
|
|
23930
|
+
text: "右对齐"
|
|
23615
23931
|
}
|
|
23616
23932
|
]
|
|
23617
23933
|
}
|
|
@@ -23651,7 +23967,7 @@
|
|
|
23651
23967
|
var Font_default = Font_vue_vue_type_script_setup_true_lang_default;
|
|
23652
23968
|
//#endregion
|
|
23653
23969
|
//#region packages/editor/src/fields/StyleSetter/components/Box.vue?vue&type=script&setup=true&lang.ts
|
|
23654
|
-
var _hoisted_1$
|
|
23970
|
+
var _hoisted_1$21 = { class: "layout-box-container" };
|
|
23655
23971
|
var _hoisted_2$1 = {
|
|
23656
23972
|
key: 0,
|
|
23657
23973
|
class: "help-txt"
|
|
@@ -23715,7 +24031,7 @@
|
|
|
23715
24031
|
emit("change", event.target.value, { modifyKey: name });
|
|
23716
24032
|
};
|
|
23717
24033
|
return (_ctx, _cache) => {
|
|
23718
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
24034
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$21, [((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(list, (item, index) => {
|
|
23719
24035
|
return (0, vue.createElementVNode)("div", {
|
|
23720
24036
|
key: index,
|
|
23721
24037
|
class: (0, vue.normalizeClass)(item.class)
|
|
@@ -23734,6 +24050,184 @@
|
|
|
23734
24050
|
//#region packages/editor/src/fields/StyleSetter/components/Box.vue
|
|
23735
24051
|
var Box_default = Box_vue_vue_type_script_setup_true_lang_default;
|
|
23736
24052
|
//#endregion
|
|
24053
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/Center.vue
|
|
24054
|
+
var _sfc_main$18 = {};
|
|
24055
|
+
var _hoisted_1$20 = {
|
|
24056
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24057
|
+
width: "16",
|
|
24058
|
+
height: "16",
|
|
24059
|
+
viewBox: "0 0 16 16",
|
|
24060
|
+
fill: "currentColor"
|
|
24061
|
+
};
|
|
24062
|
+
function _sfc_render$18(_ctx, _cache) {
|
|
24063
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$20, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M12 4C12.5523 4 13 4.44772 13 5V11C13 11.5523 12.5523 12 12 12H4C3.44772 12 3 11.5523 3 11V5C3 4.44772 3.44772 4 4 4H12ZM4.5 5C4.22386 5 4 5.22386 4 5.5V10.5C4 10.7761 4.22386 11 4.5 11H11.5C11.7761 11 12 10.7761 12 10.5V5.5C12 5.22386 11.7761 5 11.5 5H4.5Z" }, null, -1), (0, vue.createElementVNode)("rect", {
|
|
24064
|
+
x: "13.75",
|
|
24065
|
+
y: "7.75",
|
|
24066
|
+
width: "0.5",
|
|
24067
|
+
height: "11.5",
|
|
24068
|
+
rx: "0.25",
|
|
24069
|
+
transform: "rotate(90 13.75 7.75)",
|
|
24070
|
+
stroke: "black",
|
|
24071
|
+
"stroke-opacity": "0.3",
|
|
24072
|
+
style: {
|
|
24073
|
+
"stroke": "black",
|
|
24074
|
+
"stroke-opacity": "0.3"
|
|
24075
|
+
},
|
|
24076
|
+
"stroke-width": "0.5"
|
|
24077
|
+
}, null, -1)])]);
|
|
24078
|
+
}
|
|
24079
|
+
var Center_default$1 = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$18, [["render", _sfc_render$18]]);
|
|
24080
|
+
//#endregion
|
|
24081
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/FlexEnd.vue
|
|
24082
|
+
var _sfc_main$17 = {};
|
|
24083
|
+
var _hoisted_1$19 = {
|
|
24084
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24085
|
+
width: "16",
|
|
24086
|
+
height: "16",
|
|
24087
|
+
viewBox: "0 0 16 16",
|
|
24088
|
+
fill: "currentColor"
|
|
24089
|
+
};
|
|
24090
|
+
function _sfc_render$17(_ctx, _cache) {
|
|
24091
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$19, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M12 3C12.5523 3 13 3.44772 13 4V10C13 10.5523 12.5523 11 12 11H4C3.44772 11 3 10.5523 3 10V4C3 3.44772 3.44772 3 4 3H12ZM4.5 4C4.22386 4 4 4.22386 4 4.5V9.5C4 9.77614 4.22386 10 4.5 10H11.5C11.7761 10 12 9.77614 12 9.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5Z" }, null, -1), (0, vue.createElementVNode)("rect", {
|
|
24092
|
+
x: "13.75",
|
|
24093
|
+
y: "12.25",
|
|
24094
|
+
width: "0.5",
|
|
24095
|
+
height: "11.5",
|
|
24096
|
+
rx: "0.25",
|
|
24097
|
+
transform: "rotate(90 13.75 12.25)",
|
|
24098
|
+
stroke: "black",
|
|
24099
|
+
"stroke-opacity": "0.3",
|
|
24100
|
+
style: {
|
|
24101
|
+
"stroke": "black",
|
|
24102
|
+
"stroke-opacity": "0.3"
|
|
24103
|
+
},
|
|
24104
|
+
"stroke-width": "0.5"
|
|
24105
|
+
}, null, -1)])]);
|
|
24106
|
+
}
|
|
24107
|
+
var FlexEnd_default$1 = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$17, [["render", _sfc_render$17]]);
|
|
24108
|
+
//#endregion
|
|
24109
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/FlexStart.vue
|
|
24110
|
+
var _sfc_main$16 = {};
|
|
24111
|
+
var _hoisted_1$18 = {
|
|
24112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24113
|
+
width: "16",
|
|
24114
|
+
height: "16",
|
|
24115
|
+
viewBox: "0 0 16 16",
|
|
24116
|
+
fill: "currentColor"
|
|
24117
|
+
};
|
|
24118
|
+
function _sfc_render$16(_ctx, _cache) {
|
|
24119
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$18, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M12 5C12.5523 5 13 5.44772 13 6V12C13 12.5523 12.5523 13 12 13H4C3.44772 13 3 12.5523 3 12V6C3 5.44772 3.44772 5 4 5H12ZM4.5 6C4.22386 6 4 6.22386 4 6.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V6.5C12 6.22386 11.7761 6 11.5 6H4.5Z" }, null, -1), (0, vue.createElementVNode)("rect", {
|
|
24120
|
+
x: "13.75",
|
|
24121
|
+
y: "3.25",
|
|
24122
|
+
width: "0.5",
|
|
24123
|
+
height: "11.5",
|
|
24124
|
+
rx: "0.25",
|
|
24125
|
+
transform: "rotate(90 13.75 3.25)",
|
|
24126
|
+
stroke: "white",
|
|
24127
|
+
"stroke-opacity": "0.3",
|
|
24128
|
+
style: {
|
|
24129
|
+
"stroke": "white",
|
|
24130
|
+
"stroke-opacity": "0.3"
|
|
24131
|
+
},
|
|
24132
|
+
"stroke-width": "0.5"
|
|
24133
|
+
}, null, -1)])]);
|
|
24134
|
+
}
|
|
24135
|
+
var FlexStart_default$1 = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$16, [["render", _sfc_render$16]]);
|
|
24136
|
+
//#endregion
|
|
24137
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/SpaceAround.vue
|
|
24138
|
+
var _sfc_main$15 = {};
|
|
24139
|
+
var _hoisted_1$17 = {
|
|
24140
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24141
|
+
width: "16",
|
|
24142
|
+
height: "16",
|
|
24143
|
+
viewBox: "0 0 16 16",
|
|
24144
|
+
fill: "currentColor"
|
|
24145
|
+
};
|
|
24146
|
+
function _sfc_render$15(_ctx, _cache) {
|
|
24147
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$17, [..._cache[0] || (_cache[0] = [
|
|
24148
|
+
(0, vue.createElementVNode)("path", { d: "M12 8C12.5523 8 13 8.44772 13 9V12C13 12.5523 12.5523 13 12 13H4C3.44772 13 3 12.5523 3 12V9C3 8.44772 3.44772 8 4 8H12ZM4.5 9C4.22386 9 4 9.22386 4 9.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V9.5C12 9.22386 11.7761 9 11.5 9H4.5Z" }, null, -1),
|
|
24149
|
+
(0, vue.createElementVNode)("path", { d: "M12 2C12.5523 2 13 2.44772 13 3V6C13 6.55228 12.5523 7 12 7H4C3.44772 7 3 6.55228 3 6V3C3 2.44772 3.44772 2 4 2H12ZM4.5 3C4.22386 3 4 3.22386 4 3.5V5.5C4 5.77614 4.22386 6 4.5 6H11.5C11.7761 6 12 5.77614 12 5.5V3.5C12 3.22386 11.7761 3 11.5 3H4.5Z" }, null, -1),
|
|
24150
|
+
(0, vue.createElementVNode)("rect", {
|
|
24151
|
+
x: "13.75",
|
|
24152
|
+
y: "10.25",
|
|
24153
|
+
width: "0.5",
|
|
24154
|
+
height: "11.5",
|
|
24155
|
+
rx: "0.25",
|
|
24156
|
+
transform: "rotate(90 13.75 10.25)",
|
|
24157
|
+
stroke: "black",
|
|
24158
|
+
"stroke-opacity": "0.3",
|
|
24159
|
+
style: {
|
|
24160
|
+
"stroke": "black",
|
|
24161
|
+
"stroke-opacity": "0.3"
|
|
24162
|
+
},
|
|
24163
|
+
"stroke-width": "0.5"
|
|
24164
|
+
}, null, -1),
|
|
24165
|
+
(0, vue.createElementVNode)("rect", {
|
|
24166
|
+
x: "13.75",
|
|
24167
|
+
y: "4.25",
|
|
24168
|
+
width: "0.5",
|
|
24169
|
+
height: "11.5",
|
|
24170
|
+
rx: "0.25",
|
|
24171
|
+
transform: "rotate(90 13.75 4.25)",
|
|
24172
|
+
stroke: "black",
|
|
24173
|
+
"stroke-opacity": "0.3",
|
|
24174
|
+
style: {
|
|
24175
|
+
"stroke": "black",
|
|
24176
|
+
"stroke-opacity": "0.3"
|
|
24177
|
+
},
|
|
24178
|
+
"stroke-width": "0.5"
|
|
24179
|
+
}, null, -1)
|
|
24180
|
+
])]);
|
|
24181
|
+
}
|
|
24182
|
+
var SpaceAround_default$1 = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$15, [["render", _sfc_render$15]]);
|
|
24183
|
+
//#endregion
|
|
24184
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue
|
|
24185
|
+
var _sfc_main$14 = {};
|
|
24186
|
+
var _hoisted_1$16 = {
|
|
24187
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24188
|
+
width: "16",
|
|
24189
|
+
height: "16",
|
|
24190
|
+
viewBox: "0 0 16 16",
|
|
24191
|
+
fill: "currentColor"
|
|
24192
|
+
};
|
|
24193
|
+
function _sfc_render$14(_ctx, _cache) {
|
|
24194
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$16, [..._cache[0] || (_cache[0] = [
|
|
24195
|
+
(0, vue.createElementVNode)("path", { d: "M12 9C12.5523 9 13 9.44772 13 10V12C13 12.5523 12.5523 13 12 13H4C3.44772 13 3 12.5523 3 12V10C3 9.44772 3.44772 9 4 9H12ZM4.5 10C4.22386 10 4 10.2239 4 10.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V10.5C12 10.2239 11.7761 10 11.5 10H4.5Z" }, null, -1),
|
|
24196
|
+
(0, vue.createElementVNode)("path", { d: "M12 3C12.5523 3 13 3.44772 13 4V6C13 6.55228 12.5523 7 12 7H4C3.44772 7 3 6.55228 3 6V4C3 3.44772 3.44772 3 4 3H12ZM4.5 4C4.22386 4 4 4.22386 4 4.5V5.5C4 5.77614 4.22386 6 4.5 6H11.5C11.7761 6 12 5.77614 12 5.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5Z" }, null, -1),
|
|
24197
|
+
(0, vue.createElementVNode)("rect", {
|
|
24198
|
+
x: "13.75",
|
|
24199
|
+
y: "14.25",
|
|
24200
|
+
width: "0.5",
|
|
24201
|
+
height: "11.5",
|
|
24202
|
+
rx: "0.25",
|
|
24203
|
+
transform: "rotate(90 13.75 14.25)",
|
|
24204
|
+
stroke: "black",
|
|
24205
|
+
"stroke-opacity": "0.3",
|
|
24206
|
+
style: {
|
|
24207
|
+
"stroke": "black",
|
|
24208
|
+
"stroke-opacity": "0.3"
|
|
24209
|
+
},
|
|
24210
|
+
"stroke-width": "0.5"
|
|
24211
|
+
}, null, -1),
|
|
24212
|
+
(0, vue.createElementVNode)("rect", {
|
|
24213
|
+
x: "13.75",
|
|
24214
|
+
y: "1.25",
|
|
24215
|
+
width: "0.5",
|
|
24216
|
+
height: "11.5",
|
|
24217
|
+
rx: "0.25",
|
|
24218
|
+
transform: "rotate(90 13.75 1.25)",
|
|
24219
|
+
stroke: "black",
|
|
24220
|
+
"stroke-opacity": "0.3",
|
|
24221
|
+
style: {
|
|
24222
|
+
"stroke": "black",
|
|
24223
|
+
"stroke-opacity": "0.3"
|
|
24224
|
+
},
|
|
24225
|
+
"stroke-width": "0.5"
|
|
24226
|
+
}, null, -1)
|
|
24227
|
+
])]);
|
|
24228
|
+
}
|
|
24229
|
+
var SpaceBetween_default$1 = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$14, [["render", _sfc_render$14]]);
|
|
24230
|
+
//#endregion
|
|
23737
24231
|
//#region packages/editor/src/fields/StyleSetter/icons/display/Block.vue
|
|
23738
24232
|
var _sfc_main$13 = {};
|
|
23739
24233
|
var _hoisted_1$15 = {
|
|
@@ -23793,10 +24287,18 @@
|
|
|
23793
24287
|
var _sfc_main$8 = {};
|
|
23794
24288
|
var _hoisted_1$10 = {
|
|
23795
24289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23796
|
-
|
|
24290
|
+
width: "16",
|
|
24291
|
+
height: "16",
|
|
24292
|
+
viewBox: "0 0 16 16",
|
|
24293
|
+
fill: "currentColor"
|
|
23797
24294
|
};
|
|
23798
24295
|
function _sfc_render$8(_ctx, _cache) {
|
|
23799
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$10, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24296
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$10, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M12 3C12.5523 3 13 3.44772 13 4V10C13 10.5523 12.5523 11 12 11H4C3.44772 11 3 10.5523 3 10V4C3 3.44772 3.44772 3 4 3H12ZM4.5 4C4.22386 4 4 4.22386 4 4.5V9.5C4 9.77614 4.22386 10 4.5 10H11.5C11.7761 10 12 9.77614 12 9.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5Z" }, null, -1), (0, vue.createElementVNode)("path", {
|
|
24297
|
+
"fill-rule": "evenodd",
|
|
24298
|
+
"clip-rule": "evenodd",
|
|
24299
|
+
d: "M11 12L8 15L5 12L11 12Z",
|
|
24300
|
+
"fill-opacity": "0.3"
|
|
24301
|
+
}, null, -1)])]);
|
|
23800
24302
|
}
|
|
23801
24303
|
var Column_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$8, [["render", _sfc_render$8]]);
|
|
23802
24304
|
//#endregion
|
|
@@ -23804,10 +24306,18 @@
|
|
|
23804
24306
|
var _sfc_main$7 = {};
|
|
23805
24307
|
var _hoisted_1$9 = {
|
|
23806
24308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23807
|
-
|
|
24309
|
+
width: "16",
|
|
24310
|
+
height: "16",
|
|
24311
|
+
viewBox: "0 0 16 16",
|
|
24312
|
+
fill: "currentColor"
|
|
23808
24313
|
};
|
|
23809
24314
|
function _sfc_render$7(_ctx, _cache) {
|
|
23810
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24315
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M12 5C12.5523 5 13 5.44772 13 6V12C13 12.5523 12.5523 13 12 13H4C3.44772 13 3 12.5523 3 12V6C3 5.44772 3.44772 5 4 5H12ZM4.5 6C4.22386 6 4 6.22386 4 6.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V6.5C12 6.22386 11.7761 6 11.5 6H4.5Z" }, null, -1), (0, vue.createElementVNode)("path", {
|
|
24316
|
+
"fill-rule": "evenodd",
|
|
24317
|
+
"clip-rule": "evenodd",
|
|
24318
|
+
d: "M5 4L8 1L11 4L5 4Z",
|
|
24319
|
+
"fill-opacity": "0.3"
|
|
24320
|
+
}, null, -1)])]);
|
|
23811
24321
|
}
|
|
23812
24322
|
var ColumnReverse_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
23813
24323
|
//#endregion
|
|
@@ -23815,10 +24325,18 @@
|
|
|
23815
24325
|
var _sfc_main$6 = {};
|
|
23816
24326
|
var _hoisted_1$8 = {
|
|
23817
24327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23818
|
-
|
|
24328
|
+
width: "16",
|
|
24329
|
+
height: "16",
|
|
24330
|
+
viewBox: "0 0 16 16",
|
|
24331
|
+
fill: "currentColor"
|
|
23819
24332
|
};
|
|
23820
24333
|
function _sfc_render$6(_ctx, _cache) {
|
|
23821
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24334
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M10 4C10.5523 4 11 4.44772 11 5V11C11 11.5523 10.5523 12 10 12H2C1.44772 12 1 11.5523 1 11V5C1 4.44772 1.44772 4 2 4H10ZM2.5 5C2.22386 5 2 5.22386 2 5.5V10.5C2 10.7761 2.22386 11 2.5 11H9.5C9.77614 11 10 10.7761 10 10.5V5.5C10 5.22386 9.77614 5 9.5 5H2.5Z" }, null, -1), (0, vue.createElementVNode)("path", {
|
|
24335
|
+
"fill-rule": "evenodd",
|
|
24336
|
+
"clip-rule": "evenodd",
|
|
24337
|
+
d: "M12 5L15 8L12 11L12 5Z",
|
|
24338
|
+
"fill-opacity": "0.3"
|
|
24339
|
+
}, null, -1)])]);
|
|
23822
24340
|
}
|
|
23823
24341
|
var Row_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
23824
24342
|
//#endregion
|
|
@@ -23826,10 +24344,18 @@
|
|
|
23826
24344
|
var _sfc_main$5 = {};
|
|
23827
24345
|
var _hoisted_1$7 = {
|
|
23828
24346
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23829
|
-
|
|
24347
|
+
width: "16",
|
|
24348
|
+
height: "16",
|
|
24349
|
+
viewBox: "0 0 16 16",
|
|
24350
|
+
fill: "currentColor"
|
|
23830
24351
|
};
|
|
23831
24352
|
function _sfc_render$5(_ctx, _cache) {
|
|
23832
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24353
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M14 4C14.5523 4 15 4.44772 15 5V11C15 11.5523 14.5523 12 14 12H6C5.44772 12 5 11.5523 5 11V5C5 4.44772 5.44772 4 6 4H14ZM6.5 5C6.22386 5 6 5.22386 6 5.5V10.5C6 10.7761 6.22386 11 6.5 11H13.5C13.7761 11 14 10.7761 14 10.5V5.5C14 5.22386 13.7761 5 13.5 5H6.5Z" }, null, -1), (0, vue.createElementVNode)("path", {
|
|
24354
|
+
"fill-rule": "evenodd",
|
|
24355
|
+
"clip-rule": "evenodd",
|
|
24356
|
+
d: "M4 11L1 8L4 5L4 11Z",
|
|
24357
|
+
"fill-opacity": "0.3"
|
|
24358
|
+
}, null, -1)])]);
|
|
23833
24359
|
}
|
|
23834
24360
|
var RowReverse_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
23835
24361
|
//#endregion
|
|
@@ -23837,10 +24363,24 @@
|
|
|
23837
24363
|
var _sfc_main$4 = {};
|
|
23838
24364
|
var _hoisted_1$6 = {
|
|
23839
24365
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23840
|
-
|
|
24366
|
+
width: "16",
|
|
24367
|
+
height: "16",
|
|
24368
|
+
viewBox: "0 0 16 16",
|
|
24369
|
+
fill: "currentColor"
|
|
23841
24370
|
};
|
|
23842
24371
|
function _sfc_render$4(_ctx, _cache) {
|
|
23843
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24372
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M13 4C13.5523 4 14 4.44772 14 5V11C14 11.5523 13.5523 12 13 12H3C2.44772 12 2 11.5523 2 11V5C2 4.44772 2.44772 4 3 4H13ZM3.59082 5C3.31472 5.00005 3.09082 5.22389 3.09082 5.5V10.5C3.09082 10.7761 3.31472 11 3.59082 11H12.4092C12.6853 11 12.9092 10.7761 12.9092 10.5V5.5C12.9092 5.22389 12.6853 5.00005 12.4092 5H3.59082Z" }, null, -1), (0, vue.createElementVNode)("rect", {
|
|
24373
|
+
x: "7.5",
|
|
24374
|
+
y: "2",
|
|
24375
|
+
width: "1",
|
|
24376
|
+
height: "12",
|
|
24377
|
+
rx: "0.5",
|
|
24378
|
+
"fill-opacity": "0.3",
|
|
24379
|
+
style: {
|
|
24380
|
+
"fill": "black",
|
|
24381
|
+
"fill-opacity": "0.3"
|
|
24382
|
+
}
|
|
24383
|
+
}, null, -1)])]);
|
|
23844
24384
|
}
|
|
23845
24385
|
var Center_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
23846
24386
|
//#endregion
|
|
@@ -23848,10 +24388,26 @@
|
|
|
23848
24388
|
var _sfc_main$3 = {};
|
|
23849
24389
|
var _hoisted_1$5 = {
|
|
23850
24390
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23851
|
-
|
|
24391
|
+
width: "16",
|
|
24392
|
+
height: "16",
|
|
24393
|
+
viewBox: "0 0 16 16",
|
|
24394
|
+
fill: "currentColor"
|
|
23852
24395
|
};
|
|
23853
24396
|
function _sfc_render$3(_ctx, _cache) {
|
|
23854
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24397
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M11 4C11.5523 4 12 4.44772 12 5V11C12 11.5523 11.5523 12 11 12H2C1.44772 12 1 11.5523 1 11V5C1 4.44772 1.44772 4 2 4H11ZM2.5 5C2.22386 5 2 5.22386 2 5.5V10.5C2 10.7761 2.22386 11 2.5 11H10.5C10.7761 11 11 10.7761 11 10.5V5.5C11 5.22386 10.7761 5 10.5 5H2.5Z" }, null, -1), (0, vue.createElementVNode)("rect", {
|
|
24398
|
+
x: "14.25",
|
|
24399
|
+
y: "2.25",
|
|
24400
|
+
width: "0.5",
|
|
24401
|
+
height: "11.5",
|
|
24402
|
+
rx: "0.25",
|
|
24403
|
+
stroke: "black",
|
|
24404
|
+
"stroke-opacity": "0.3",
|
|
24405
|
+
style: {
|
|
24406
|
+
"stroke": "black",
|
|
24407
|
+
"stroke-opacity": "0.3"
|
|
24408
|
+
},
|
|
24409
|
+
"stroke-width": "0.5"
|
|
24410
|
+
}, null, -1)])]);
|
|
23855
24411
|
}
|
|
23856
24412
|
var FlexEnd_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
23857
24413
|
//#endregion
|
|
@@ -23859,10 +24415,26 @@
|
|
|
23859
24415
|
var _sfc_main$2 = {};
|
|
23860
24416
|
var _hoisted_1$4 = {
|
|
23861
24417
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23862
|
-
|
|
24418
|
+
width: "16",
|
|
24419
|
+
height: "16",
|
|
24420
|
+
viewBox: "0 0 16 16",
|
|
24421
|
+
fill: "currentColor"
|
|
23863
24422
|
};
|
|
23864
24423
|
function _sfc_render$2(_ctx, _cache) {
|
|
23865
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
24424
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "M14 4C14.5523 4 15 4.44772 15 5V11C15 11.5523 14.5523 12 14 12H5C4.44772 12 4 11.5523 4 11V5C4 4.44772 4.44772 4 5 4H14ZM5.5 5C5.22386 5 5 5.22386 5 5.5V10.5C5 10.7761 5.22386 11 5.5 11H13.5C13.7761 11 14 10.7761 14 10.5V5.5C14 5.22386 13.7761 5 13.5 5H5.5Z" }, null, -1), (0, vue.createElementVNode)("rect", {
|
|
24425
|
+
x: "1.25",
|
|
24426
|
+
y: "2.25",
|
|
24427
|
+
width: "0.5",
|
|
24428
|
+
height: "11.5",
|
|
24429
|
+
rx: "0.25",
|
|
24430
|
+
stroke: "white",
|
|
24431
|
+
"stroke-opacity": "0.3",
|
|
24432
|
+
style: {
|
|
24433
|
+
"stroke": "white",
|
|
24434
|
+
"stroke-opacity": "0.3"
|
|
24435
|
+
},
|
|
24436
|
+
"stroke-width": "0.5"
|
|
24437
|
+
}, null, -1)])]);
|
|
23866
24438
|
}
|
|
23867
24439
|
var FlexStart_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
23868
24440
|
//#endregion
|
|
@@ -23870,10 +24442,44 @@
|
|
|
23870
24442
|
var _sfc_main$1 = {};
|
|
23871
24443
|
var _hoisted_1$3 = {
|
|
23872
24444
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23873
|
-
|
|
24445
|
+
width: "16",
|
|
24446
|
+
height: "16",
|
|
24447
|
+
viewBox: "0 0 16 16",
|
|
24448
|
+
fill: "currentColor"
|
|
23874
24449
|
};
|
|
23875
24450
|
function _sfc_render$1(_ctx, _cache) {
|
|
23876
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
|
|
24451
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
|
|
24452
|
+
(0, vue.createElementVNode)("path", { d: "M6 4C6.55228 4 7 4.44772 7 5V11C7 11.5523 6.55228 12 6 12H3C2.44772 12 2 11.5523 2 11V5C2 4.44772 2.44772 4 3 4H6ZM3.5 5C3.22386 5 3 5.22386 3 5.5V10.5C3 10.7761 3.22386 11 3.5 11H5.5C5.77614 11 6 10.7761 6 10.5V5.5C6 5.22386 5.77614 5 5.5 5H3.5Z" }, null, -1),
|
|
24453
|
+
(0, vue.createElementVNode)("path", { d: "M13 4C13.5523 4 14 4.44772 14 5V11C14 11.5523 13.5523 12 13 12H10C9.44772 12 9 11.5523 9 11V5C9 4.44772 9.44772 4 10 4H13ZM10.5 5C10.2239 5 10 5.22386 10 5.5V10.5C10 10.7761 10.2239 11 10.5 11H12.5C12.7761 11 13 10.7761 13 10.5V5.5C13 5.22386 12.7761 5 12.5 5H10.5Z" }, null, -1),
|
|
24454
|
+
(0, vue.createElementVNode)("rect", {
|
|
24455
|
+
x: "11.25",
|
|
24456
|
+
y: "2.25",
|
|
24457
|
+
width: "0.5",
|
|
24458
|
+
height: "11.5",
|
|
24459
|
+
rx: "0.25",
|
|
24460
|
+
stroke: "black",
|
|
24461
|
+
"stroke-opacity": "0.3",
|
|
24462
|
+
style: {
|
|
24463
|
+
"stroke": "black",
|
|
24464
|
+
"stroke-opacity": "0.3"
|
|
24465
|
+
},
|
|
24466
|
+
"stroke-width": "0.5"
|
|
24467
|
+
}, null, -1),
|
|
24468
|
+
(0, vue.createElementVNode)("rect", {
|
|
24469
|
+
x: "4.25",
|
|
24470
|
+
y: "2.25",
|
|
24471
|
+
width: "0.5",
|
|
24472
|
+
height: "11.5",
|
|
24473
|
+
rx: "0.25",
|
|
24474
|
+
stroke: "black",
|
|
24475
|
+
"stroke-opacity": "0.3",
|
|
24476
|
+
style: {
|
|
24477
|
+
"stroke": "black",
|
|
24478
|
+
"stroke-opacity": "0.3"
|
|
24479
|
+
},
|
|
24480
|
+
"stroke-width": "0.5"
|
|
24481
|
+
}, null, -1)
|
|
24482
|
+
])]);
|
|
23877
24483
|
}
|
|
23878
24484
|
var SpaceAround_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
23879
24485
|
//#endregion
|
|
@@ -23881,10 +24487,40 @@
|
|
|
23881
24487
|
var _sfc_main = {};
|
|
23882
24488
|
var _hoisted_1$2 = {
|
|
23883
24489
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23884
|
-
|
|
24490
|
+
width: "16",
|
|
24491
|
+
height: "16",
|
|
24492
|
+
viewBox: "0 0 16 16",
|
|
24493
|
+
fill: "currentColor"
|
|
23885
24494
|
};
|
|
23886
24495
|
function _sfc_render(_ctx, _cache) {
|
|
23887
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
|
|
24496
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
|
|
24497
|
+
(0, vue.createElementVNode)("path", { d: "M6 4C6.55228 4 7 4.44772 7 5V11C7 11.5523 6.55228 12 6 12H4C3.44772 12 3 11.5523 3 11V5C3 4.44772 3.44772 4 4 4H6ZM4.5 5C4.22386 5 4 5.22386 4 5.5V10.5C4 10.7761 4.22386 11 4.5 11H5.5C5.77614 11 6 10.7761 6 10.5V5.5C6 5.22386 5.77614 5 5.5 5H4.5Z" }, null, -1),
|
|
24498
|
+
(0, vue.createElementVNode)("path", { d: "M12 4C12.5523 4 13 4.44772 13 5V11C13 11.5523 12.5523 12 12 12H10C9.44772 12 9 11.5523 9 11V5C9 4.44772 9.44772 4 10 4H12ZM10.5 5C10.2239 5 10 5.22386 10 5.5V10.5C10 10.7761 10.2239 11 10.5 11H11.5C11.7761 11 12 10.7761 12 10.5V5.5C12 5.22386 11.7761 5 11.5 5H10.5Z" }, null, -1),
|
|
24499
|
+
(0, vue.createElementVNode)("rect", {
|
|
24500
|
+
x: "14.25",
|
|
24501
|
+
y: "2.25",
|
|
24502
|
+
width: "0.5",
|
|
24503
|
+
height: "11.5",
|
|
24504
|
+
rx: "0.25",
|
|
24505
|
+
stroke: "black",
|
|
24506
|
+
"stroke-opacity": "0.3",
|
|
24507
|
+
"stroke-width": "0.5"
|
|
24508
|
+
}, null, -1),
|
|
24509
|
+
(0, vue.createElementVNode)("rect", {
|
|
24510
|
+
x: "1.25",
|
|
24511
|
+
y: "2.25",
|
|
24512
|
+
width: "0.5",
|
|
24513
|
+
height: "11.5",
|
|
24514
|
+
rx: "0.25",
|
|
24515
|
+
stroke: "black",
|
|
24516
|
+
"stroke-opacity": "0.3",
|
|
24517
|
+
style: {
|
|
24518
|
+
"stroke": "black",
|
|
24519
|
+
"stroke-opacity": "0.3"
|
|
24520
|
+
},
|
|
24521
|
+
"stroke-width": "0.5"
|
|
24522
|
+
}, null, -1)
|
|
24523
|
+
])]);
|
|
23888
24524
|
}
|
|
23889
24525
|
var SpaceBetween_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
23890
24526
|
//#endregion
|
|
@@ -23897,18 +24533,22 @@
|
|
|
23897
24533
|
isCompare: { type: Boolean },
|
|
23898
24534
|
disabled: { type: Boolean },
|
|
23899
24535
|
size: {},
|
|
24536
|
+
theme: {},
|
|
23900
24537
|
prop: {}
|
|
23901
24538
|
},
|
|
23902
24539
|
emits: ["change", "addDiffCount"],
|
|
23903
24540
|
setup(__props, { emit: __emit }) {
|
|
24541
|
+
const props = __props;
|
|
23904
24542
|
const emit = __emit;
|
|
24543
|
+
const displayTheme = (0, _tmagic_design.useTheme)(props);
|
|
23905
24544
|
const formConfig = (0, _tmagic_form.defineFormConfig)([
|
|
23906
24545
|
{
|
|
23907
24546
|
name: "display",
|
|
23908
24547
|
text: "模式",
|
|
23909
24548
|
type: "radioGroup",
|
|
23910
24549
|
childType: "button",
|
|
23911
|
-
labelWidth: "
|
|
24550
|
+
labelWidth: "90px",
|
|
24551
|
+
iconSize: "24px",
|
|
23912
24552
|
options: [
|
|
23913
24553
|
{
|
|
23914
24554
|
value: "inline",
|
|
@@ -23942,7 +24582,8 @@
|
|
|
23942
24582
|
text: "主轴方向",
|
|
23943
24583
|
type: "radioGroup",
|
|
23944
24584
|
childType: "button",
|
|
23945
|
-
labelWidth: "
|
|
24585
|
+
labelWidth: "90px",
|
|
24586
|
+
iconSize: "24px",
|
|
23946
24587
|
options: [
|
|
23947
24588
|
{
|
|
23948
24589
|
value: "row",
|
|
@@ -23972,7 +24613,8 @@
|
|
|
23972
24613
|
text: "主轴对齐",
|
|
23973
24614
|
type: "radioGroup",
|
|
23974
24615
|
childType: "button",
|
|
23975
|
-
labelWidth: "
|
|
24616
|
+
labelWidth: "90px",
|
|
24617
|
+
iconSize: "24px",
|
|
23976
24618
|
options: [
|
|
23977
24619
|
{
|
|
23978
24620
|
value: "flex-start",
|
|
@@ -24007,31 +24649,32 @@
|
|
|
24007
24649
|
text: "辅轴对齐",
|
|
24008
24650
|
type: "radioGroup",
|
|
24009
24651
|
childType: "button",
|
|
24010
|
-
labelWidth: "
|
|
24652
|
+
labelWidth: "90px",
|
|
24653
|
+
iconSize: "24px",
|
|
24011
24654
|
options: [
|
|
24012
24655
|
{
|
|
24013
24656
|
value: "flex-start",
|
|
24014
|
-
icon: (0, vue.markRaw)(FlexStart_default),
|
|
24657
|
+
icon: (0, vue.markRaw)(FlexStart_default$1),
|
|
24015
24658
|
tooltip: "左对齐 flex-start"
|
|
24016
24659
|
},
|
|
24017
24660
|
{
|
|
24018
24661
|
value: "flex-end",
|
|
24019
|
-
icon: (0, vue.markRaw)(FlexEnd_default),
|
|
24662
|
+
icon: (0, vue.markRaw)(FlexEnd_default$1),
|
|
24020
24663
|
tooltip: "右对齐 flex-end"
|
|
24021
24664
|
},
|
|
24022
24665
|
{
|
|
24023
24666
|
value: "center",
|
|
24024
|
-
icon: (0, vue.markRaw)(Center_default),
|
|
24667
|
+
icon: (0, vue.markRaw)(Center_default$1),
|
|
24025
24668
|
tooltip: "居中 center"
|
|
24026
24669
|
},
|
|
24027
24670
|
{
|
|
24028
24671
|
value: "space-between",
|
|
24029
|
-
icon: (0, vue.markRaw)(SpaceBetween_default),
|
|
24672
|
+
icon: (0, vue.markRaw)(SpaceBetween_default$1),
|
|
24030
24673
|
tooltip: "两端对齐 space-between"
|
|
24031
24674
|
},
|
|
24032
24675
|
{
|
|
24033
24676
|
value: "space-around",
|
|
24034
|
-
icon: (0, vue.markRaw)(SpaceAround_default),
|
|
24677
|
+
icon: (0, vue.markRaw)(SpaceAround_default$1),
|
|
24035
24678
|
tooltip: "横向平分 space-around"
|
|
24036
24679
|
}
|
|
24037
24680
|
],
|
|
@@ -24041,8 +24684,9 @@
|
|
|
24041
24684
|
name: "flexWrap",
|
|
24042
24685
|
text: "换行",
|
|
24043
24686
|
type: "radioGroup",
|
|
24044
|
-
childType: "button",
|
|
24045
|
-
labelWidth: "
|
|
24687
|
+
childType: displayTheme.value !== "magic-admin" ? "button" : "default",
|
|
24688
|
+
labelWidth: "90px",
|
|
24689
|
+
iconSize: "24px",
|
|
24046
24690
|
options: [
|
|
24047
24691
|
{
|
|
24048
24692
|
value: "nowrap",
|
|
@@ -24066,14 +24710,18 @@
|
|
|
24066
24710
|
type: "row",
|
|
24067
24711
|
items: [{
|
|
24068
24712
|
name: "width",
|
|
24069
|
-
text: "
|
|
24070
|
-
labelWidth: "
|
|
24713
|
+
text: "宽度(px)",
|
|
24714
|
+
labelWidth: "90px",
|
|
24071
24715
|
type: "data-source-field-select",
|
|
24072
24716
|
fieldConfig: { type: "text" }
|
|
24073
|
-
}
|
|
24717
|
+
}]
|
|
24718
|
+
},
|
|
24719
|
+
{
|
|
24720
|
+
type: "row",
|
|
24721
|
+
items: [{
|
|
24074
24722
|
name: "height",
|
|
24075
|
-
text: "
|
|
24076
|
-
labelWidth: "
|
|
24723
|
+
text: "高度(px)",
|
|
24724
|
+
labelWidth: "90px",
|
|
24077
24725
|
type: "data-source-field-select",
|
|
24078
24726
|
fieldConfig: { type: "text" }
|
|
24079
24727
|
}]
|
|
@@ -24084,7 +24732,7 @@
|
|
|
24084
24732
|
type: "data-source-field-select",
|
|
24085
24733
|
text: "overflow",
|
|
24086
24734
|
name: "overflow",
|
|
24087
|
-
labelWidth: "
|
|
24735
|
+
labelWidth: "90px",
|
|
24088
24736
|
checkStrictly: false,
|
|
24089
24737
|
dataSourceFieldType: ["string"],
|
|
24090
24738
|
fieldConfig: {
|
|
@@ -24122,11 +24770,15 @@
|
|
|
24122
24770
|
}
|
|
24123
24771
|
]
|
|
24124
24772
|
}
|
|
24125
|
-
}
|
|
24773
|
+
}]
|
|
24774
|
+
},
|
|
24775
|
+
{
|
|
24776
|
+
type: "row",
|
|
24777
|
+
items: [{
|
|
24126
24778
|
type: "data-source-field-select",
|
|
24127
|
-
text: "
|
|
24779
|
+
text: "透明度(%)",
|
|
24128
24780
|
name: "opacity",
|
|
24129
|
-
labelWidth: "
|
|
24781
|
+
labelWidth: "90px",
|
|
24130
24782
|
dataSourceFieldType: ["string", "number"],
|
|
24131
24783
|
fieldConfig: { type: "text" }
|
|
24132
24784
|
}]
|
|
@@ -24374,7 +25026,7 @@
|
|
|
24374
25026
|
onClick: _cache[1] || (_cache[1] = ($event) => selectDirection("Left"))
|
|
24375
25027
|
}, null, 2),
|
|
24376
25028
|
(0, vue.createElementVNode)("div", {
|
|
24377
|
-
class: (0, vue.normalizeClass)(["border-icon", {
|
|
25029
|
+
class: (0, vue.normalizeClass)(["border-icon center", {
|
|
24378
25030
|
active: direction.value === "",
|
|
24379
25031
|
configured: isConfigured("")
|
|
24380
25032
|
}]),
|
|
@@ -24551,7 +25203,6 @@
|
|
|
24551
25203
|
var Transform_default = Transform_vue_vue_type_script_setup_true_lang_default;
|
|
24552
25204
|
//#endregion
|
|
24553
25205
|
//#region packages/editor/src/fields/StyleSetter/Index.vue?vue&type=script&setup=true&lang.ts
|
|
24554
|
-
init_Icon();
|
|
24555
25206
|
var Index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
24556
25207
|
name: "MFieldsStyleSetter",
|
|
24557
25208
|
__name: "Index",
|
|
@@ -24565,7 +25216,10 @@
|
|
|
24565
25216
|
disabled: { type: Boolean },
|
|
24566
25217
|
size: {},
|
|
24567
25218
|
lastValues: {},
|
|
24568
|
-
isCompare: { type: Boolean }
|
|
25219
|
+
isCompare: { type: Boolean },
|
|
25220
|
+
text: {},
|
|
25221
|
+
labelWidth: {},
|
|
25222
|
+
labelPosition: {}
|
|
24569
25223
|
},
|
|
24570
25224
|
emits: ["change", "addDiffCount"],
|
|
24571
25225
|
setup(__props, { emit: __emit }) {
|
|
@@ -24613,7 +25267,7 @@
|
|
|
24613
25267
|
key: index,
|
|
24614
25268
|
name: `${index}`
|
|
24615
25269
|
}, {
|
|
24616
|
-
title: (0, vue.withCtx)(() => [(0, vue.
|
|
25270
|
+
title: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(item.title), 1)]),
|
|
24617
25271
|
default: (0, vue.withCtx)(() => [item.component ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(item.component), {
|
|
24618
25272
|
key: 0,
|
|
24619
25273
|
values: __props.model[__props.name],
|
|
@@ -24662,7 +25316,10 @@
|
|
|
24662
25316
|
},
|
|
24663
25317
|
size: {},
|
|
24664
25318
|
lastValues: {},
|
|
24665
|
-
isCompare: { type: Boolean }
|
|
25319
|
+
isCompare: { type: Boolean },
|
|
25320
|
+
text: {},
|
|
25321
|
+
labelWidth: {},
|
|
25322
|
+
labelPosition: {}
|
|
24666
25323
|
},
|
|
24667
25324
|
emits: ["change"],
|
|
24668
25325
|
setup(__props, { emit: __emit }) {
|
|
@@ -24731,7 +25388,10 @@
|
|
|
24731
25388
|
disabled: { type: Boolean },
|
|
24732
25389
|
size: {},
|
|
24733
25390
|
lastValues: {},
|
|
24734
|
-
isCompare: { type: Boolean }
|
|
25391
|
+
isCompare: { type: Boolean },
|
|
25392
|
+
text: {},
|
|
25393
|
+
labelWidth: {},
|
|
25394
|
+
labelPosition: {}
|
|
24735
25395
|
},
|
|
24736
25396
|
emits: ["change"],
|
|
24737
25397
|
setup(__props, { emit: __emit }) {
|
|
@@ -24802,7 +25462,10 @@
|
|
|
24802
25462
|
disabled: { type: Boolean },
|
|
24803
25463
|
size: {},
|
|
24804
25464
|
lastValues: {},
|
|
24805
|
-
isCompare: { type: Boolean }
|
|
25465
|
+
isCompare: { type: Boolean },
|
|
25466
|
+
text: {},
|
|
25467
|
+
labelWidth: {},
|
|
25468
|
+
labelPosition: {}
|
|
24806
25469
|
},
|
|
24807
25470
|
emits: ["change"],
|
|
24808
25471
|
setup(__props, { emit: __emit }) {
|
|
@@ -24948,7 +25611,8 @@
|
|
|
24948
25611
|
var defaultInstallOpt = {
|
|
24949
25612
|
parseDSL: (dsl) => eval(dsl),
|
|
24950
25613
|
customCreateMonacoEditor: (monaco, codeEditorEl, options) => monaco.editor.create(codeEditorEl, options),
|
|
24951
|
-
customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options)
|
|
25614
|
+
customCreateMonacoDiffEditor: (monaco, codeEditorEl, options) => monaco.editor.createDiffEditor(codeEditorEl, options),
|
|
25615
|
+
flat: false
|
|
24952
25616
|
};
|
|
24953
25617
|
var plugin_default = { install: (app, opt) => {
|
|
24954
25618
|
const option = Object.assign(defaultInstallOpt, opt || {});
|
|
@@ -24982,6 +25646,7 @@
|
|
|
24982
25646
|
//#endregion
|
|
24983
25647
|
//#region packages/editor/src/index.ts
|
|
24984
25648
|
init_type();
|
|
25649
|
+
init_config();
|
|
24985
25650
|
init_CodeEditor();
|
|
24986
25651
|
init_Icon();
|
|
24987
25652
|
init_CompareForm();
|
|
@@ -25067,6 +25732,7 @@
|
|
|
25067
25732
|
exports.UI_SELECT_MODE_EVENT_NAME = UI_SELECT_MODE_EVENT_NAME;
|
|
25068
25733
|
exports.UndoRedo = UndoRedo;
|
|
25069
25734
|
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|
|
25735
|
+
exports.ViewForm = ViewForm_default;
|
|
25070
25736
|
exports.advancedTabConfig = advancedTabConfig;
|
|
25071
25737
|
exports.arrayOptions = arrayOptions;
|
|
25072
25738
|
exports.beforePaste = beforePaste;
|
|
@@ -25150,6 +25816,7 @@
|
|
|
25150
25816
|
exports.idbSet = idbSet;
|
|
25151
25817
|
exports.info = info;
|
|
25152
25818
|
exports.isEventNameCheckStrictly = isEventNameCheckStrictly;
|
|
25819
|
+
exports.isGlobalFlat = isGlobalFlat;
|
|
25153
25820
|
exports.isIncludeDataSource = isIncludeDataSource;
|
|
25154
25821
|
exports.isIndexedDBSupported = isIndexedDBSupported;
|
|
25155
25822
|
exports.keybindingService = keybinding_default;
|
|
@@ -25162,6 +25829,7 @@
|
|
|
25162
25829
|
exports.numberOptions = numberOptions;
|
|
25163
25830
|
exports.openIndexedDB = openIndexedDB;
|
|
25164
25831
|
exports.propsService = props_default;
|
|
25832
|
+
exports.removeStyleDisplayConfig = removeStyleDisplayConfig;
|
|
25165
25833
|
exports.resolveFieldByPath = resolveFieldByPath;
|
|
25166
25834
|
exports.resolveSelectedNode = resolveSelectedNode;
|
|
25167
25835
|
exports.serializeConfig = serializeConfig;
|
|
@@ -25183,6 +25851,7 @@
|
|
|
25183
25851
|
exports.undoFloor = undoFloor;
|
|
25184
25852
|
exports.updateStatus = updateStatus;
|
|
25185
25853
|
exports.useCodeBlockEdit = useCodeBlockEdit;
|
|
25854
|
+
exports.useCompareForm = useCompareForm;
|
|
25186
25855
|
exports.useEditorContentHeight = useEditorContentHeight;
|
|
25187
25856
|
exports.useFilter = useFilter;
|
|
25188
25857
|
exports.useFloatBox = useFloatBox;
|