@tmagic/editor 1.8.0-beta.8 → 1.8.0-manmanyu.8
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 +13 -3
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +1 -4
- 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 +9 -4
- 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 +68 -43
- 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 +101 -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 +11 -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 +82 -46
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/icons/DatasourceIcon.js +17 -0
- package/dist/es/index.js +2 -2
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +14 -10
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +18 -28
- package/dist/es/layouts/history-list/useHistoryList.js +4 -4
- package/dist/es/layouts/history-list/useHistoryRevert.js +6 -6
- package/dist/es/services/codeBlock.js +28 -32
- package/dist/es/services/dataSource.js +34 -43
- package/dist/es/services/editor.js +26 -31
- package/dist/es/services/history.js +392 -259
- package/dist/es/style.css +294 -37
- package/dist/es/utils/const.js +1 -1
- package/dist/es/utils/history.js +47 -35
- package/dist/es/utils/props.js +137 -31
- package/dist/style.css +294 -37
- package/dist/themes/magic-admin.css +2316 -0
- package/dist/tmagic-editor.umd.cjs +1665 -880
- package/package.json +7 -7
- package/src/Editor.vue +13 -1
- package/src/components/ContentMenu.vue +10 -2
- package/src/components/FloatingBox.vue +13 -2
- package/src/editorProps.ts +9 -0
- package/src/fields/CodeSelect.vue +51 -40
- 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 +58 -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 copy.ts +5 -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 +11 -5
- package/src/fields/StyleSetter/pro/Font.vue +3 -3
- package/src/fields/StyleSetter/pro/Layout.vue +105 -28
- package/src/fields/UISelect.vue +1 -1
- package/src/icons/DatasourceIcon.vue +7 -0
- package/src/layouts/Framework.vue +7 -1
- 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 +55 -1
- package/src/theme/history-list-panel.scss +9 -9
- 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 +125 -0
- package/src/utils/const.ts +2 -1
- package/src/utils/props.ts +138 -9
- package/types/index.d.ts +310 -315
|
@@ -5167,69 +5167,173 @@
|
|
|
5167
5167
|
type: "event-select"
|
|
5168
5168
|
}]
|
|
5169
5169
|
};
|
|
5170
|
+
var getReportTypeConfig = ({ reportType }) => {
|
|
5171
|
+
return {
|
|
5172
|
+
name: reportType,
|
|
5173
|
+
style: {
|
|
5174
|
+
backgroundColor: "#fff",
|
|
5175
|
+
borderRadius: "4px",
|
|
5176
|
+
padding: "16px",
|
|
5177
|
+
marginBottom: "10px"
|
|
5178
|
+
},
|
|
5179
|
+
items: [
|
|
5180
|
+
{
|
|
5181
|
+
text: {
|
|
5182
|
+
click: "点击",
|
|
5183
|
+
expose: "曝光"
|
|
5184
|
+
}[reportType],
|
|
5185
|
+
static: true,
|
|
5186
|
+
labelPosition: "left",
|
|
5187
|
+
labelWidth: "200px",
|
|
5188
|
+
className: "m-fields-title-container"
|
|
5189
|
+
},
|
|
5190
|
+
{
|
|
5191
|
+
name: "f_module",
|
|
5192
|
+
type: "data-source-field-select",
|
|
5193
|
+
fieldConfig: { type: "text" },
|
|
5194
|
+
checkStrictly: false,
|
|
5195
|
+
dataSourceFieldType: ["string"],
|
|
5196
|
+
disabled: (_vm, { formValue }) => !formValue?.report?.custom,
|
|
5197
|
+
text: "f_module",
|
|
5198
|
+
labelPosition: "left"
|
|
5199
|
+
},
|
|
5200
|
+
{
|
|
5201
|
+
name: "f_resource",
|
|
5202
|
+
type: "data-source-field-select",
|
|
5203
|
+
fieldConfig: { type: "text" },
|
|
5204
|
+
checkStrictly: false,
|
|
5205
|
+
dataSourceFieldType: ["string"],
|
|
5206
|
+
disabled: (_vm, { formValue }) => !formValue?.report?.custom,
|
|
5207
|
+
text: "f_resource",
|
|
5208
|
+
labelPosition: "left"
|
|
5209
|
+
},
|
|
5210
|
+
{
|
|
5211
|
+
name: "f_type",
|
|
5212
|
+
type: "data-source-field-select",
|
|
5213
|
+
fieldConfig: { type: "text" },
|
|
5214
|
+
checkStrictly: false,
|
|
5215
|
+
dataSourceFieldType: ["string", "number"],
|
|
5216
|
+
disabled: (_vm, { formValue }) => !formValue?.report?.custom,
|
|
5217
|
+
text: "f_type",
|
|
5218
|
+
labelPosition: "left"
|
|
5219
|
+
}
|
|
5220
|
+
]
|
|
5221
|
+
};
|
|
5222
|
+
};
|
|
5170
5223
|
var advancedTabConfig = {
|
|
5171
5224
|
title: "高级",
|
|
5172
5225
|
lazy: true,
|
|
5173
5226
|
items: [
|
|
5227
|
+
{
|
|
5228
|
+
type: "link",
|
|
5229
|
+
displayText: "点击查看配置指南",
|
|
5230
|
+
href: "https://iwiki.woa.com/pages/viewpage.action?pageId=827749220",
|
|
5231
|
+
css: "color: #F56C6C;font-weight: bold"
|
|
5232
|
+
},
|
|
5174
5233
|
{
|
|
5175
5234
|
name: _tmagic_core.NODE_DISABLE_CODE_BLOCK_KEY,
|
|
5176
5235
|
text: "禁用代码块",
|
|
5177
5236
|
type: "switch",
|
|
5237
|
+
labelPosition: "left",
|
|
5178
5238
|
defaultValue: false,
|
|
5179
|
-
extra: "开启后,配置的代码块将不会被执行"
|
|
5239
|
+
extra: "开启后,配置的代码块将不会被执行",
|
|
5240
|
+
style: { padding: "0 22px" }
|
|
5180
5241
|
},
|
|
5181
5242
|
{
|
|
5182
5243
|
name: _tmagic_core.NODE_DISABLE_DATA_SOURCE_KEY,
|
|
5183
5244
|
text: "禁用数据源",
|
|
5184
5245
|
type: "switch",
|
|
5246
|
+
labelPosition: "left",
|
|
5185
5247
|
defaultValue: false,
|
|
5186
|
-
extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效"
|
|
5248
|
+
extra: "开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效",
|
|
5249
|
+
style: { padding: "0 22px" }
|
|
5187
5250
|
},
|
|
5188
5251
|
{
|
|
5189
5252
|
name: "created",
|
|
5190
|
-
text: "
|
|
5253
|
+
text: "Created",
|
|
5254
|
+
flat: true,
|
|
5191
5255
|
labelPosition: "top",
|
|
5192
5256
|
type: "code-select",
|
|
5193
|
-
|
|
5257
|
+
titleExtra: "组件初始化时执行",
|
|
5258
|
+
style: { padding: "0 22px" }
|
|
5194
5259
|
},
|
|
5195
5260
|
{
|
|
5196
5261
|
name: "mounted",
|
|
5197
|
-
text: "
|
|
5262
|
+
text: "Mounted",
|
|
5198
5263
|
labelPosition: "top",
|
|
5264
|
+
flat: true,
|
|
5199
5265
|
type: "code-select",
|
|
5200
|
-
|
|
5266
|
+
titleExtra: "组件挂载到dom时执行",
|
|
5267
|
+
style: { padding: "0 22px" }
|
|
5201
5268
|
},
|
|
5202
5269
|
{
|
|
5203
5270
|
name: "display",
|
|
5204
|
-
text: "
|
|
5205
|
-
|
|
5271
|
+
text: "Display",
|
|
5272
|
+
flat: true,
|
|
5273
|
+
titleExtra: "控制组件是否渲染,关系的代码块返回值为false时不渲染",
|
|
5206
5274
|
labelPosition: "top",
|
|
5207
|
-
type: "code-select"
|
|
5275
|
+
type: "code-select",
|
|
5276
|
+
style: { padding: "0 22px" }
|
|
5277
|
+
},
|
|
5278
|
+
{
|
|
5279
|
+
type: "fieldset",
|
|
5280
|
+
legend: "上报",
|
|
5281
|
+
labelWidth: "80px",
|
|
5282
|
+
name: "report",
|
|
5283
|
+
className: "no-border-fieldset",
|
|
5284
|
+
style: { paddingTop: "10px" },
|
|
5285
|
+
items: [
|
|
5286
|
+
{
|
|
5287
|
+
type: "row",
|
|
5288
|
+
items: [{
|
|
5289
|
+
type: "switch",
|
|
5290
|
+
name: "custom",
|
|
5291
|
+
labelPosition: "left",
|
|
5292
|
+
defaultValue: false,
|
|
5293
|
+
labelWidth: "120px",
|
|
5294
|
+
text: "开启自定义",
|
|
5295
|
+
extra: "开启自定义后可以手动修改上报内容,关闭后会自动生成上报内容"
|
|
5296
|
+
}]
|
|
5297
|
+
},
|
|
5298
|
+
getReportTypeConfig({ reportType: "click" }),
|
|
5299
|
+
getReportTypeConfig({ reportType: "expose" })
|
|
5300
|
+
]
|
|
5208
5301
|
}
|
|
5209
5302
|
]
|
|
5210
5303
|
};
|
|
5211
5304
|
var displayTabConfig = {
|
|
5212
5305
|
title: "显示条件",
|
|
5213
5306
|
display: (_state, { model }) => model.type !== "page",
|
|
5214
|
-
items: [
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5307
|
+
items: [
|
|
5308
|
+
{
|
|
5309
|
+
name: _tmagic_core.NODE_CONDS_RESULT_KEY,
|
|
5310
|
+
type: "select",
|
|
5311
|
+
text: "条件成立时",
|
|
5312
|
+
defaultValue: false,
|
|
5313
|
+
options: [{
|
|
5314
|
+
text: "显示",
|
|
5315
|
+
value: false
|
|
5316
|
+
}, {
|
|
5317
|
+
text: "隐藏",
|
|
5318
|
+
value: true
|
|
5319
|
+
}],
|
|
5320
|
+
extra: (_state, { model }) => `条件成立时${model[_tmagic_core.NODE_CONDS_RESULT_KEY] ? "隐藏" : "显示"},不成立时${model[_tmagic_core.NODE_CONDS_RESULT_KEY] ? "显示" : "隐藏"};<br />同一条件组内的所有条件配置同时成立时表示该条件组成立,任意一个条件组成立时表示条件成立(条件组内为且的关系,条件组间为或的关系);<br />条件为空时表示成立;`
|
|
5321
|
+
},
|
|
5322
|
+
{
|
|
5323
|
+
text: "条件组配置",
|
|
5324
|
+
static: true,
|
|
5325
|
+
className: "display-conds-title"
|
|
5326
|
+
},
|
|
5327
|
+
{
|
|
5328
|
+
type: "display-conds",
|
|
5329
|
+
name: _tmagic_core.NODE_CONDS_KEY,
|
|
5330
|
+
titlePrefix: "条件组",
|
|
5331
|
+
flat: true,
|
|
5332
|
+
fixed: "right",
|
|
5333
|
+
operateColWidth: 112,
|
|
5334
|
+
defaultValue: []
|
|
5335
|
+
}
|
|
5336
|
+
]
|
|
5233
5337
|
};
|
|
5234
5338
|
/**
|
|
5235
5339
|
* 统一为组件属性表单加上事件、高级、样式配置
|
|
@@ -5247,10 +5351,11 @@
|
|
|
5247
5351
|
name: "id",
|
|
5248
5352
|
text: "ID",
|
|
5249
5353
|
type: "text",
|
|
5250
|
-
|
|
5354
|
+
static: true,
|
|
5251
5355
|
append: {
|
|
5252
|
-
type: "
|
|
5253
|
-
text: "
|
|
5356
|
+
type: "icon",
|
|
5357
|
+
text: "https://vip.image.video.qpic.cn/vupload/20260615/36cf7e1781493669935.svg",
|
|
5358
|
+
extra: "复制",
|
|
5254
5359
|
handler: (vm, { model }) => {
|
|
5255
5360
|
navigator.clipboard.writeText(`${model.id}`).then(() => {
|
|
5256
5361
|
_tmagic_design.tMagicMessage.success("已复制");
|
|
@@ -5269,6 +5374,7 @@
|
|
|
5269
5374
|
const tabConfig = {
|
|
5270
5375
|
type: "tab",
|
|
5271
5376
|
labelWidth,
|
|
5377
|
+
className: "magic-right-panel-tabs-top",
|
|
5272
5378
|
items: [
|
|
5273
5379
|
{
|
|
5274
5380
|
title: "属性",
|
|
@@ -5674,7 +5780,7 @@
|
|
|
5674
5780
|
*
|
|
5675
5781
|
* - `add`:oldValue = null;`remove`:newValue = null;`update`:两者都有,可带 changeRecords 做局部更新。
|
|
5676
5782
|
* - 内容会做 cloneDeep 防止后续被外部引用篡改;opType 依据 old/new 是否为 null 推断。
|
|
5677
|
-
* - 仅负责构造 step 并返回,入栈与事件 emit
|
|
5783
|
+
* - 仅负责构造 step 并返回,入栈与事件 emit 由各公共方法(pushCodeBlock / pushDataSource)自行处理。
|
|
5678
5784
|
* - 不直接驱动业务 service,调用方负责实际写回。
|
|
5679
5785
|
*/
|
|
5680
5786
|
var createStackStep = (id, payload) => {
|
|
@@ -5683,14 +5789,9 @@
|
|
|
5683
5789
|
const newSchema = payload.newValue ? cloneDeep$1(payload.newValue) : null;
|
|
5684
5790
|
const changeRecords = payload.changeRecords?.length ? cloneDeep$1(payload.changeRecords) : void 0;
|
|
5685
5791
|
const opType = detectStackOpType(payload.oldValue, payload.newValue);
|
|
5686
|
-
const schema = payload.newValue ?? payload.oldValue;
|
|
5687
|
-
const name = payload.name ?? schema?.name ?? schema?.title ?? "";
|
|
5688
5792
|
return {
|
|
5689
5793
|
uuid: (0, _tmagic_utils.guid)(),
|
|
5690
|
-
|
|
5691
|
-
name,
|
|
5692
|
-
id
|
|
5693
|
-
},
|
|
5794
|
+
id,
|
|
5694
5795
|
opType,
|
|
5695
5796
|
diff: [{
|
|
5696
5797
|
...newSchema !== null ? { newSchema } : {},
|
|
@@ -5699,10 +5800,7 @@
|
|
|
5699
5800
|
}],
|
|
5700
5801
|
historyDescription: payload.historyDescription,
|
|
5701
5802
|
source: payload.source,
|
|
5702
|
-
|
|
5703
|
-
rootStep: payload.rootStep,
|
|
5704
|
-
timestamp: Date.now(),
|
|
5705
|
-
extra: payload.extra
|
|
5803
|
+
timestamp: Date.now()
|
|
5706
5804
|
};
|
|
5707
5805
|
};
|
|
5708
5806
|
var markStackSaved = (undoRedo) => {
|
|
@@ -5715,22 +5813,46 @@
|
|
|
5715
5813
|
});
|
|
5716
5814
|
};
|
|
5717
5815
|
/**
|
|
5718
|
-
*
|
|
5719
|
-
*
|
|
5720
|
-
* - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单实体修改组);
|
|
5721
|
-
* - 多实体 'update'(如页面批量改属性)也独立成组(无明确单一目标,避免误合并)。
|
|
5816
|
+
* 把单个「按 id 分栈」的历史栈(代码块 / 数据源)拆成若干 group:
|
|
5817
|
+
* 每条操作记录独立成组,不做相邻 update 合并(与页面历史的合并策略不同)。
|
|
5722
5818
|
*
|
|
5723
|
-
*
|
|
5819
|
+
* 代码块与数据源除 `kind` 外结构完全一致,统一由本方法处理;`kind` 决定返回的具体分组类型。
|
|
5820
|
+
*/
|
|
5821
|
+
var mergeStackSteps = (kind, id, list, cursor) => {
|
|
5822
|
+
const currentIndex = cursor - 1;
|
|
5823
|
+
return list.map((step, index) => {
|
|
5824
|
+
const applied = index < cursor;
|
|
5825
|
+
const isCurrent = index === currentIndex;
|
|
5826
|
+
return {
|
|
5827
|
+
kind,
|
|
5828
|
+
id,
|
|
5829
|
+
opType: step.opType,
|
|
5830
|
+
steps: [{
|
|
5831
|
+
step,
|
|
5832
|
+
index,
|
|
5833
|
+
applied,
|
|
5834
|
+
isCurrent
|
|
5835
|
+
}],
|
|
5836
|
+
applied,
|
|
5837
|
+
isCurrent
|
|
5838
|
+
};
|
|
5839
|
+
});
|
|
5840
|
+
};
|
|
5841
|
+
/**
|
|
5842
|
+
* 把页面栈拆成若干 group:
|
|
5843
|
+
* - 单节点的 'update' 按 targetId 与相邻同 targetId 的 update 合并到一个 group;
|
|
5844
|
+
* - 'add' / 'remove' 始终独立成组(语义上是结构变更,不应被收纳进单节点修改组);
|
|
5845
|
+
* - 多节点 'update'(如批量改属性)也独立成组(无明确单一目标,避免误合并)。
|
|
5724
5846
|
*/
|
|
5725
|
-
var
|
|
5847
|
+
var mergePageSteps = (pageId, list, cursor) => {
|
|
5726
5848
|
const groups = [];
|
|
5727
5849
|
let current = null;
|
|
5728
5850
|
const currentIndex = cursor - 1;
|
|
5729
5851
|
list.forEach((step, index) => {
|
|
5730
5852
|
const applied = index < cursor;
|
|
5731
5853
|
const isCurrent = index === currentIndex;
|
|
5732
|
-
const targetId =
|
|
5733
|
-
const targetName =
|
|
5854
|
+
const targetId = detectPageTargetId(step);
|
|
5855
|
+
const targetName = detectPageTargetName(step);
|
|
5734
5856
|
const entry = {
|
|
5735
5857
|
step,
|
|
5736
5858
|
index,
|
|
@@ -5745,8 +5867,8 @@
|
|
|
5745
5867
|
if (targetName) current.targetName = targetName;
|
|
5746
5868
|
} else {
|
|
5747
5869
|
current = {
|
|
5748
|
-
kind,
|
|
5749
|
-
|
|
5870
|
+
kind: "page",
|
|
5871
|
+
pageId,
|
|
5750
5872
|
opType: step.opType,
|
|
5751
5873
|
targetId: mergeable ? targetId : void 0,
|
|
5752
5874
|
targetName,
|
|
@@ -5760,21 +5882,18 @@
|
|
|
5760
5882
|
return groups;
|
|
5761
5883
|
};
|
|
5762
5884
|
/**
|
|
5763
|
-
* 解析
|
|
5764
|
-
* -
|
|
5765
|
-
*
|
|
5766
|
-
* - 其它情形(多实体 update / add / remove):返回 undefined,表示不参与合并。
|
|
5885
|
+
* 解析 StepValue 中的"目标节点 id"用于合并:
|
|
5886
|
+
* - 单节点 update:取唯一一项 updatedItems 的节点 id;
|
|
5887
|
+
* - 其它情形(多节点 update / add / remove):返回 undefined,表示不参与合并。
|
|
5767
5888
|
*/
|
|
5768
|
-
var
|
|
5889
|
+
var detectPageTargetId = (step) => {
|
|
5769
5890
|
if (step.opType !== "update") return void 0;
|
|
5770
5891
|
const items = step.diff;
|
|
5771
5892
|
if (items?.length !== 1) return void 0;
|
|
5772
|
-
|
|
5773
|
-
const oldSchema = items[0].oldSchema;
|
|
5774
|
-
return newSchema?.id ?? oldSchema?.id ?? step.data?.id;
|
|
5893
|
+
return items[0].newSchema?.id ?? items[0].oldSchema?.id;
|
|
5775
5894
|
};
|
|
5776
|
-
/** 解析
|
|
5777
|
-
var
|
|
5895
|
+
/** 解析 StepValue 中的目标节点可读名(用于 UI 展示)。 */
|
|
5896
|
+
var detectPageTargetName = (step) => {
|
|
5778
5897
|
const items = step.diff;
|
|
5779
5898
|
if (step.opType === "update") {
|
|
5780
5899
|
if (items?.length === 1) {
|
|
@@ -5848,9 +5967,8 @@
|
|
|
5848
5967
|
return stacks[id];
|
|
5849
5968
|
};
|
|
5850
5969
|
/**
|
|
5851
|
-
*
|
|
5852
|
-
*
|
|
5853
|
-
* 保证 undo / canUndo / goto 都不会越过初始基线。
|
|
5970
|
+
* 撤销下限:当页面栈 index 0 是 `opType: 'initial'` 的基线 step 时为 1(基线不可被撤销),否则为 0。
|
|
5971
|
+
* 用于把 cursor 钉在基线之上,保证 undo / canUndo / goto 都不会越过初始基线。
|
|
5854
5972
|
*/
|
|
5855
5973
|
var undoFloor = (undoRedo) => {
|
|
5856
5974
|
return undoRedo.getElementList()[0]?.opType === "initial" ? 1 : 0;
|
|
@@ -5946,92 +6064,78 @@
|
|
|
5946
6064
|
//#region packages/editor/src/services/history.ts
|
|
5947
6065
|
var canUsePluginMethods$7 = { sync: [
|
|
5948
6066
|
"push",
|
|
6067
|
+
"pushCodeBlock",
|
|
6068
|
+
"pushDataSource",
|
|
6069
|
+
"undoCodeBlock",
|
|
6070
|
+
"redoCodeBlock",
|
|
6071
|
+
"undoDataSource",
|
|
6072
|
+
"redoDataSource",
|
|
5949
6073
|
"undo",
|
|
5950
6074
|
"redo"
|
|
5951
6075
|
] };
|
|
5952
|
-
/** 各内置历史类型的默认展示名称(用于历史面板 tab / 分组标题等)。扩展类型可通过 registerStepType / setStepName 登记。 */
|
|
5953
|
-
var DEFAULT_STEP_NAMES = {
|
|
5954
|
-
page: "页面",
|
|
5955
|
-
codeBlock: "代码块",
|
|
5956
|
-
dataSource: "数据源"
|
|
5957
|
-
};
|
|
5958
|
-
/** 各历史类型对应的分组 `kind`(展示用):page→page,codeBlock→code-block,dataSource→data-source。扩展类型缺省回退到 stepType 本身。 */
|
|
5959
|
-
var STEP_TYPE_KIND = {
|
|
5960
|
-
page: "page",
|
|
5961
|
-
codeBlock: "code-block",
|
|
5962
|
-
dataSource: "data-source"
|
|
5963
|
-
};
|
|
5964
6076
|
/** 历史记录持久化快照的默认存储位置与结构版本。 */
|
|
5965
6077
|
var DEFAULT_DB_NAME = "tmagic-editor";
|
|
5966
6078
|
var DEFAULT_STORE_NAME = "history";
|
|
5967
6079
|
var DEFAULT_KEY = "default";
|
|
5968
|
-
var PERSIST_VERSION =
|
|
6080
|
+
var PERSIST_VERSION = 2;
|
|
5969
6081
|
var History = class extends BaseService {
|
|
5970
6082
|
state = (0, vue.reactive)({
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
},
|
|
5976
|
-
|
|
6083
|
+
pageSteps: {},
|
|
6084
|
+
pageId: void 0,
|
|
6085
|
+
canRedo: false,
|
|
6086
|
+
canUndo: false,
|
|
6087
|
+
codeBlockState: {},
|
|
6088
|
+
dataSourceState: {}
|
|
5977
6089
|
});
|
|
5978
6090
|
constructor() {
|
|
5979
6091
|
super([...canUsePluginMethods$7.sync.map((methodName) => ({
|
|
5980
6092
|
name: methodName,
|
|
5981
6093
|
isAsync: false
|
|
5982
6094
|
}))]);
|
|
5983
|
-
|
|
5984
|
-
/**
|
|
5985
|
-
* 注册一个扩展历史类型,使其可与内置 `page` / `codeBlock` / `dataSource` 一样走统一的
|
|
5986
|
-
* {@link push} / {@link undo} / {@link redo}(按 id 分栈、独立 undo/redo)。
|
|
5987
|
-
*
|
|
5988
|
-
* @param stepType 自定义历史类型标识(勿与内置类型重名)
|
|
5989
|
-
* @param options.event push/undo/redo 后派发的事件名,缺省为 `${stepType}-history-change`
|
|
5990
|
-
* @param options.name 历史面板中的展示名称(tab / 分组标题等),缺省回退到 stepType 本身
|
|
5991
|
-
*/
|
|
5992
|
-
registerStepType(stepType, options = {}) {
|
|
5993
|
-
this.getStepBucket(stepType);
|
|
5994
|
-
if (options.name !== void 0) this.state.stepNames[stepType] = options.name;
|
|
5995
|
-
}
|
|
5996
|
-
/**
|
|
5997
|
-
* 读取指定历史类型的展示名称(用于历史面板 tab / 分组标题等)。
|
|
5998
|
-
* 未登记名称时回退到 stepType 本身。
|
|
5999
|
-
*/
|
|
6000
|
-
getStepName(stepType) {
|
|
6001
|
-
return this.state.stepNames[stepType] ?? `${stepType}`;
|
|
6002
|
-
}
|
|
6003
|
-
/**
|
|
6004
|
-
* 设置指定历史类型的展示名称(用于历史面板 tab / 分组标题等)。
|
|
6005
|
-
* 内置 `page` / `codeBlock` / `dataSource` 也可在此覆盖默认中文名。
|
|
6006
|
-
*/
|
|
6007
|
-
setStepName(stepType, name) {
|
|
6008
|
-
this.state.stepNames[stepType] = name;
|
|
6095
|
+
this.on("change", this.setCanUndoRedo);
|
|
6009
6096
|
}
|
|
6010
6097
|
reset() {
|
|
6011
|
-
this.
|
|
6098
|
+
this.state.pageSteps = {};
|
|
6099
|
+
this.state.codeBlockState = {};
|
|
6100
|
+
this.state.dataSourceState = {};
|
|
6101
|
+
this.resetPage();
|
|
6102
|
+
}
|
|
6103
|
+
resetPage() {
|
|
6104
|
+
this.state.pageId = void 0;
|
|
6105
|
+
this.state.canRedo = false;
|
|
6106
|
+
this.state.canUndo = false;
|
|
6107
|
+
}
|
|
6108
|
+
changePage(page) {
|
|
6109
|
+
if (!page) return;
|
|
6110
|
+
this.state.pageId = page.id;
|
|
6111
|
+
if (!this.state.pageSteps[this.state.pageId]) this.state.pageSteps[this.state.pageId] = new UndoRedo();
|
|
6112
|
+
this.setCanUndoRedo();
|
|
6113
|
+
this.emit("page-change", this.state.pageSteps[this.state.pageId]);
|
|
6012
6114
|
}
|
|
6013
6115
|
resetState() {
|
|
6014
|
-
this.
|
|
6116
|
+
this.state.pageId = void 0;
|
|
6117
|
+
this.state.pageSteps = {};
|
|
6118
|
+
this.state.canRedo = false;
|
|
6119
|
+
this.state.canUndo = false;
|
|
6120
|
+
this.state.codeBlockState = {};
|
|
6121
|
+
this.state.dataSourceState = {};
|
|
6015
6122
|
}
|
|
6016
6123
|
/**
|
|
6017
|
-
*
|
|
6124
|
+
* 为指定页面 / 页面片种入一条「初始基线」记录(如加载 DSL 时的「初始 / 加载」基线)。
|
|
6018
6125
|
*
|
|
6019
|
-
* 该记录是一条 `opType: 'initial'` 的
|
|
6126
|
+
* 该记录是一条 `opType: 'initial'` 的 {@link StepValue},作为页面历史栈 **index 0 的固定底线**:
|
|
6020
6127
|
* - 它是一条真实入栈的 step(随栈一起持久化),但被钉为撤销/回滚的下限——cursor 永不低于它,
|
|
6021
|
-
* 因此不会被 undo / goto / revert 触达(详见 {@link undo} / {@link
|
|
6022
|
-
* - 历史面板把它过滤出分组列表(见 {@link
|
|
6023
|
-
*
|
|
6024
|
-
* 仅当目标栈为空时种入(保证 initial 一定位于 index 0);已存在 initial 底线时不重复种入。
|
|
6128
|
+
* 因此不会被 undo / goto / revert 触达(详见 {@link undo} / {@link setCanUndoRedo});
|
|
6129
|
+
* - 历史面板把它过滤出分组列表(见 {@link getPageHistoryGroups}),改由底部「初始」行展示。
|
|
6025
6130
|
*
|
|
6026
|
-
*
|
|
6027
|
-
*
|
|
6028
|
-
* @param options 基线展示信息(名称 / 描述 / 来源)
|
|
6131
|
+
* 仅当目标页面栈为空时种入(保证 initial 一定位于 index 0);已存在 initial 底线时默认不重复种入,
|
|
6132
|
+
* 传 `force=true` 且栈为空时按新基线种入。
|
|
6029
6133
|
*/
|
|
6030
|
-
|
|
6031
|
-
if (
|
|
6032
|
-
const existing = this.
|
|
6134
|
+
setPageMarker(pageId, options = {}) {
|
|
6135
|
+
if (pageId === void 0 || pageId === null || `${pageId}` === "") return null;
|
|
6136
|
+
const existing = this.getPageMarker(pageId);
|
|
6033
6137
|
if (existing) return existing;
|
|
6034
|
-
const stack = getOrCreateStack(this.
|
|
6138
|
+
const stack = getOrCreateStack(this.state.pageSteps, pageId);
|
|
6035
6139
|
if (stack.getLength() > 0) return null;
|
|
6036
6140
|
const marker = {
|
|
6037
6141
|
uuid: (0, _tmagic_utils.guid)(),
|
|
@@ -6039,95 +6143,164 @@
|
|
|
6039
6143
|
diff: [],
|
|
6040
6144
|
data: {
|
|
6041
6145
|
name: options.name || "",
|
|
6042
|
-
id
|
|
6043
|
-
},
|
|
6044
|
-
extra: {
|
|
6045
|
-
...options.extra || {},
|
|
6046
|
-
...stepType === "page" ? {
|
|
6047
|
-
selectedBefore: [],
|
|
6048
|
-
selectedAfter: [],
|
|
6049
|
-
modifiedNodeIds: /* @__PURE__ */ new Map()
|
|
6050
|
-
} : {}
|
|
6146
|
+
id: pageId
|
|
6051
6147
|
},
|
|
6148
|
+
selectedBefore: [],
|
|
6149
|
+
selectedAfter: [],
|
|
6150
|
+
modifiedNodeIds: /* @__PURE__ */ new Map(),
|
|
6052
6151
|
historyDescription: options.description || "未修改的初始状态",
|
|
6053
6152
|
timestamp: Date.now(),
|
|
6054
6153
|
...options.source ? { source: options.source } : {}
|
|
6055
6154
|
};
|
|
6056
6155
|
stack.pushElement(marker);
|
|
6057
|
-
this.
|
|
6058
|
-
|
|
6059
|
-
marker,
|
|
6060
|
-
stepType
|
|
6061
|
-
});
|
|
6156
|
+
if (`${pageId}` === `${this.state.pageId}`) this.setCanUndoRedo();
|
|
6157
|
+
this.emit("page-marker-change", marker);
|
|
6062
6158
|
return marker;
|
|
6063
6159
|
}
|
|
6064
6160
|
/**
|
|
6065
|
-
*
|
|
6066
|
-
*
|
|
6161
|
+
* 读取指定页面(缺省当前活动页)的初始基线 step(页面栈 index 0 且 `opType: 'initial'`);
|
|
6162
|
+
* 不存在时返回 undefined。
|
|
6067
6163
|
*/
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6164
|
+
getPageMarker(pageId) {
|
|
6165
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6166
|
+
if (!targetPageId) return void 0;
|
|
6167
|
+
const first = this.state.pageSteps[targetPageId]?.getElementList()[0];
|
|
6071
6168
|
return first?.opType === "initial" ? first : void 0;
|
|
6072
6169
|
}
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6170
|
+
/**
|
|
6171
|
+
* 把一条步骤推入指定页面的栈;不指定 pageId 时落到当前活动页。
|
|
6172
|
+
*
|
|
6173
|
+
* 跨页操作(例如 `moveToContainer` 把节点搬到其它页)必须显式传入 `pageId`,
|
|
6174
|
+
* 否则会把记录错误地落到操作发起页 / 当前激活页,破坏目标页 / 源页的撤销栈语义。
|
|
6175
|
+
*/
|
|
6176
|
+
push(state, pageId) {
|
|
6177
|
+
const undoRedo = this.getUndoRedo(pageId);
|
|
6178
|
+
if (!undoRedo) return null;
|
|
6179
|
+
if (state.uuid === void 0) state.uuid = (0, _tmagic_utils.guid)();
|
|
6180
|
+
if (state.timestamp === void 0) state.timestamp = Date.now();
|
|
6181
|
+
undoRedo.pushElement(state);
|
|
6182
|
+
if (pageId === void 0 || `${pageId}` === `${this.state.pageId}`) this.emit("change", state);
|
|
6183
|
+
return state;
|
|
6184
|
+
}
|
|
6185
|
+
/** 读取指定页面(缺省当前活动页)历史栈当前游标所在的 step(cursor - 1);无则返回 null。 */
|
|
6186
|
+
getCurrentPageStep(pageId) {
|
|
6187
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6188
|
+
if (!targetPageId) return null;
|
|
6189
|
+
return this.state.pageSteps[targetPageId]?.getCurrentElement() ?? null;
|
|
6190
|
+
}
|
|
6191
|
+
/**
|
|
6192
|
+
* 用 `state` 替换指定页面栈当前游标所在的 step(并丢弃其后的重做尾部),游标不变。
|
|
6193
|
+
* 用于「连续 set root 记录合并」等就地替换最新一条的场景;替换成功后按需刷新 / 通知。
|
|
6194
|
+
*/
|
|
6195
|
+
replaceCurrentPageStep(state, pageId) {
|
|
6196
|
+
const undoRedo = this.getUndoRedo(pageId);
|
|
6197
|
+
if (!undoRedo) return null;
|
|
6198
|
+
if (state.uuid === void 0) state.uuid = (0, _tmagic_utils.guid)();
|
|
6199
|
+
if (state.timestamp === void 0) state.timestamp = Date.now();
|
|
6200
|
+
if (!undoRedo.replaceCurrentElement(state)) return null;
|
|
6201
|
+
this.emit("change", state);
|
|
6202
|
+
return state;
|
|
6203
|
+
}
|
|
6204
|
+
/**
|
|
6205
|
+
* 推入一条代码块变更记录(与页面/节点完全无关),按 `codeBlockId` 维度独立一份 UndoRedo 栈。
|
|
6206
|
+
*
|
|
6207
|
+
* - 新增:oldContent = null,newContent = 新内容
|
|
6208
|
+
* - 更新:oldContent / newContent 都为对应内容
|
|
6209
|
+
* - 删除:newContent = null,oldContent = 删除前内容
|
|
6210
|
+
* - `changeRecords` 来自 form 端,撤销/重做时若有则按 propPath 局部覆盖;缺省才退化为整内容替换。
|
|
6211
|
+
* - 不直接驱动 codeBlockService,调用方负责实际写回。
|
|
6212
|
+
*/
|
|
6213
|
+
pushCodeBlock(codeBlockId, payload) {
|
|
6214
|
+
const step = createStackStep(codeBlockId, {
|
|
6215
|
+
oldValue: payload.oldContent,
|
|
6216
|
+
newValue: payload.newContent,
|
|
6217
|
+
changeRecords: payload.changeRecords,
|
|
6218
|
+
historyDescription: payload.historyDescription,
|
|
6219
|
+
source: payload.source
|
|
6220
|
+
});
|
|
6221
|
+
if (!step) return null;
|
|
6222
|
+
getOrCreateStack(this.state.codeBlockState, codeBlockId).pushElement(step);
|
|
6223
|
+
this.emit("code-block-history-change", codeBlockId, step);
|
|
6224
|
+
return step;
|
|
6225
|
+
}
|
|
6226
|
+
/**
|
|
6227
|
+
* 推入一条数据源变更记录(与页面/节点完全无关),按 `dataSourceId` 维度独立一份 UndoRedo 栈。
|
|
6228
|
+
* 行为同 pushCodeBlock(新增 oldSchema=null;删除 newSchema=null)。
|
|
6229
|
+
*/
|
|
6230
|
+
pushDataSource(dataSourceId, payload) {
|
|
6231
|
+
const step = createStackStep(dataSourceId, {
|
|
6232
|
+
oldValue: payload.oldSchema,
|
|
6233
|
+
newValue: payload.newSchema,
|
|
6234
|
+
changeRecords: payload.changeRecords,
|
|
6235
|
+
historyDescription: payload.historyDescription,
|
|
6236
|
+
source: payload.source
|
|
6237
|
+
});
|
|
6238
|
+
if (!step) return null;
|
|
6239
|
+
getOrCreateStack(this.state.dataSourceState, dataSourceId).pushElement(step);
|
|
6240
|
+
this.emit("data-source-history-change", dataSourceId, step);
|
|
6078
6241
|
return step;
|
|
6079
6242
|
}
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
const undoRedo = this.state.
|
|
6243
|
+
/** 撤销指定代码块的最近一次变更。 */
|
|
6244
|
+
undoCodeBlock(codeBlockId) {
|
|
6245
|
+
const undoRedo = this.state.codeBlockState[codeBlockId];
|
|
6083
6246
|
if (!undoRedo) return null;
|
|
6084
|
-
if (undoRedo.getCursor() <= undoFloor(undoRedo)) return null;
|
|
6085
6247
|
const step = undoRedo.undo();
|
|
6086
|
-
if (step) this.emit("change",
|
|
6248
|
+
if (step) this.emit("code-block-history-change", codeBlockId, step);
|
|
6087
6249
|
return step;
|
|
6088
6250
|
}
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
const undoRedo = this.state.
|
|
6251
|
+
/** 重做指定代码块的下一次变更。 */
|
|
6252
|
+
redoCodeBlock(codeBlockId) {
|
|
6253
|
+
const undoRedo = this.state.codeBlockState[codeBlockId];
|
|
6092
6254
|
if (!undoRedo) return null;
|
|
6093
6255
|
const step = undoRedo.redo();
|
|
6094
|
-
if (step) this.emit("change",
|
|
6256
|
+
if (step) this.emit("code-block-history-change", codeBlockId, step);
|
|
6095
6257
|
return step;
|
|
6096
6258
|
}
|
|
6097
|
-
/**
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
* @param id 目标栈 id;缺省 / 无效时返回 false
|
|
6101
|
-
*/
|
|
6102
|
-
canUndo(stepType, id) {
|
|
6103
|
-
if (!this.isValidStackId(id)) return false;
|
|
6104
|
-
const undoRedo = this.state.steps[stepType]?.[id];
|
|
6105
|
-
return undoRedo ? undoRedo.getCursor() > undoFloor(undoRedo) : false;
|
|
6259
|
+
/** 是否可对指定代码块撤销。 */
|
|
6260
|
+
canUndoCodeBlock(codeBlockId) {
|
|
6261
|
+
return this.state.codeBlockState[codeBlockId]?.canUndo() ?? false;
|
|
6106
6262
|
}
|
|
6107
|
-
/**
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
* @param id 目标栈 id;缺省 / 无效时返回 false
|
|
6111
|
-
*/
|
|
6112
|
-
canRedo(stepType, id) {
|
|
6113
|
-
if (!this.isValidStackId(id)) return false;
|
|
6114
|
-
return this.state.steps[stepType]?.[id]?.canRedo() ?? false;
|
|
6263
|
+
/** 是否可对指定代码块重做。 */
|
|
6264
|
+
canRedoCodeBlock(codeBlockId) {
|
|
6265
|
+
return this.state.codeBlockState[codeBlockId]?.canRedo() ?? false;
|
|
6115
6266
|
}
|
|
6116
|
-
/**
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6267
|
+
/** 撤销指定数据源的最近一次变更。 */
|
|
6268
|
+
undoDataSource(dataSourceId) {
|
|
6269
|
+
const undoRedo = this.state.dataSourceState[dataSourceId];
|
|
6270
|
+
if (!undoRedo) return null;
|
|
6271
|
+
const step = undoRedo.undo();
|
|
6272
|
+
if (step) this.emit("data-source-history-change", dataSourceId, step);
|
|
6273
|
+
return step;
|
|
6120
6274
|
}
|
|
6121
|
-
/**
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
if (
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6275
|
+
/** 重做指定数据源的下一次变更。 */
|
|
6276
|
+
redoDataSource(dataSourceId) {
|
|
6277
|
+
const undoRedo = this.state.dataSourceState[dataSourceId];
|
|
6278
|
+
if (!undoRedo) return null;
|
|
6279
|
+
const step = undoRedo.redo();
|
|
6280
|
+
if (step) this.emit("data-source-history-change", dataSourceId, step);
|
|
6281
|
+
return step;
|
|
6282
|
+
}
|
|
6283
|
+
/** 是否可对指定数据源撤销。 */
|
|
6284
|
+
canUndoDataSource(dataSourceId) {
|
|
6285
|
+
return this.state.dataSourceState[dataSourceId]?.canUndo() ?? false;
|
|
6286
|
+
}
|
|
6287
|
+
/** 是否可对指定数据源重做。 */
|
|
6288
|
+
canRedoDataSource(dataSourceId) {
|
|
6289
|
+
return this.state.dataSourceState[dataSourceId]?.canRedo() ?? false;
|
|
6290
|
+
}
|
|
6291
|
+
undo() {
|
|
6292
|
+
const undoRedo = this.getUndoRedo();
|
|
6293
|
+
if (!undoRedo) return null;
|
|
6294
|
+
if (undoRedo.getCursor() <= undoFloor(undoRedo)) return null;
|
|
6295
|
+
const state = undoRedo.undo();
|
|
6296
|
+
this.emit("change", state);
|
|
6297
|
+
return state;
|
|
6298
|
+
}
|
|
6299
|
+
redo() {
|
|
6300
|
+
const undoRedo = this.getUndoRedo();
|
|
6301
|
+
if (!undoRedo) return null;
|
|
6302
|
+
const state = undoRedo.redo();
|
|
6303
|
+
this.emit("change", state);
|
|
6131
6304
|
return state;
|
|
6132
6305
|
}
|
|
6133
6306
|
destroy() {
|
|
@@ -6136,52 +6309,84 @@
|
|
|
6136
6309
|
this.removeAllPlugins();
|
|
6137
6310
|
}
|
|
6138
6311
|
/**
|
|
6139
|
-
*
|
|
6140
|
-
*
|
|
6141
|
-
* - 缺省 `id`:清空 `stepType` 下的全部栈。
|
|
6142
|
-
*
|
|
6143
|
-
* 仅删除撤销/重做记录,不会改动 DSL / 代码块 / 数据源本身。清空时会**保留各栈原有的
|
|
6144
|
-
* initial 基线**(文案 / 来源),无基线时清空成空栈。清空后派发 `clear`(签名 `(id, stepType)`)。
|
|
6145
|
-
*
|
|
6146
|
-
* @param stepType 历史类型
|
|
6147
|
-
* @param id 目标栈 id;缺省表示清空该类型下全部栈
|
|
6312
|
+
* 清空指定页面(缺省当前活动页)的历史记录栈。
|
|
6313
|
+
* 仅删除撤销/重做记录,不会改动当前 DSL;清空后该页将无法再撤销/重做之前的操作。
|
|
6148
6314
|
*/
|
|
6149
|
-
|
|
6150
|
-
const
|
|
6151
|
-
if (!
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6315
|
+
clearPage(pageId) {
|
|
6316
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6317
|
+
if (!targetPageId) return;
|
|
6318
|
+
const marker = this.getPageMarker(targetPageId);
|
|
6319
|
+
this.state.pageSteps[targetPageId] = new UndoRedo();
|
|
6320
|
+
if (marker) this.setPageMarker(targetPageId, {
|
|
6321
|
+
name: marker.data?.name,
|
|
6322
|
+
description: marker.historyDescription,
|
|
6323
|
+
source: marker.source
|
|
6158
6324
|
});
|
|
6325
|
+
if (`${targetPageId}` === `${this.state.pageId}`) {
|
|
6326
|
+
this.setCanUndoRedo();
|
|
6327
|
+
this.emit("clear-page", null);
|
|
6328
|
+
}
|
|
6159
6329
|
}
|
|
6160
6330
|
/**
|
|
6161
|
-
*
|
|
6162
|
-
*
|
|
6163
|
-
* - 传入 `id`:仅标记 `stepType` 下该 id 对应的栈,派发 `mark-saved` 且 `kind` 为 `stepType`。
|
|
6164
|
-
*
|
|
6165
|
-
* 同一栈内任意时刻最多只有一条记录为 `saved`;从 IndexedDB 恢复时游标会被定位到最近一条已保存记录之后。
|
|
6166
|
-
*
|
|
6167
|
-
* @param stepType 历史类型
|
|
6168
|
-
* @param id 目标栈 id;缺省表示标记全部类型 / 全部栈
|
|
6331
|
+
* 清空数据源历史记录栈:传入 `dataSourceId` 仅清空该数据源,缺省清空全部数据源。
|
|
6332
|
+
* 仅删除撤销/重做记录,不会改动数据源本身。
|
|
6169
6333
|
*/
|
|
6170
|
-
|
|
6171
|
-
if (
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6334
|
+
clearDataSource(dataSourceId) {
|
|
6335
|
+
if (dataSourceId !== void 0) delete this.state.dataSourceState[dataSourceId];
|
|
6336
|
+
else this.state.dataSourceState = {};
|
|
6337
|
+
}
|
|
6338
|
+
/**
|
|
6339
|
+
* 清空代码块历史记录栈:传入 `codeBlockId` 仅清空该代码块,缺省清空全部代码块。
|
|
6340
|
+
* 仅删除撤销/重做记录,不会改动代码块本身。
|
|
6341
|
+
*/
|
|
6342
|
+
clearCodeBlock(codeBlockId) {
|
|
6343
|
+
if (codeBlockId !== void 0) delete this.state.codeBlockState[codeBlockId];
|
|
6344
|
+
else this.state.codeBlockState = {};
|
|
6345
|
+
}
|
|
6346
|
+
/**
|
|
6347
|
+
* 标记「整份 DSL 已保存」:把页面 / 代码块 / 数据源所有栈当前游标所在的记录都标为 `saved`。
|
|
6348
|
+
* 适用于「整体落库」场景;若只保存了其中一类,请改用更细粒度的
|
|
6349
|
+
* {@link markPageSaved} / {@link markCodeBlockSaved} / {@link markDataSourceSaved}。
|
|
6350
|
+
*/
|
|
6351
|
+
markSaved() {
|
|
6352
|
+
Object.values(this.state.pageSteps).forEach(markStackSaved);
|
|
6353
|
+
Object.values(this.state.codeBlockState).forEach(markStackSaved);
|
|
6354
|
+
Object.values(this.state.dataSourceState).forEach(markStackSaved);
|
|
6355
|
+
this.emit("mark-saved", { kind: "all" });
|
|
6356
|
+
}
|
|
6357
|
+
/**
|
|
6358
|
+
* 标记指定页面(缺省为当前活动页)的历史栈当前记录为已保存。
|
|
6359
|
+
* 仅影响该页面自己的栈,不波及代码块 / 数据源 / 其它页面。
|
|
6360
|
+
*/
|
|
6361
|
+
markPageSaved(pageId) {
|
|
6362
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6363
|
+
if (!targetPageId) return;
|
|
6364
|
+
markStackSaved(this.state.pageSteps[targetPageId]);
|
|
6365
|
+
this.emit("mark-saved", {
|
|
6366
|
+
kind: "page",
|
|
6367
|
+
id: targetPageId
|
|
6368
|
+
});
|
|
6369
|
+
}
|
|
6370
|
+
/** 标记指定代码块的历史栈当前记录为已保存,仅影响该代码块自己的栈。 */
|
|
6371
|
+
markCodeBlockSaved(codeBlockId) {
|
|
6372
|
+
if (!codeBlockId) return;
|
|
6373
|
+
markStackSaved(this.state.codeBlockState[codeBlockId]);
|
|
6374
|
+
this.emit("mark-saved", {
|
|
6375
|
+
kind: "code-block",
|
|
6376
|
+
id: codeBlockId
|
|
6377
|
+
});
|
|
6378
|
+
}
|
|
6379
|
+
/** 标记指定数据源的历史栈当前记录为已保存,仅影响该数据源自己的栈。 */
|
|
6380
|
+
markDataSourceSaved(dataSourceId) {
|
|
6381
|
+
if (!dataSourceId) return;
|
|
6382
|
+
markStackSaved(this.state.dataSourceState[dataSourceId]);
|
|
6178
6383
|
this.emit("mark-saved", {
|
|
6179
|
-
kind:
|
|
6180
|
-
id
|
|
6384
|
+
kind: "data-source",
|
|
6385
|
+
id: dataSourceId
|
|
6181
6386
|
});
|
|
6182
6387
|
}
|
|
6183
6388
|
/**
|
|
6184
|
-
* 把当前内存中的全部历史栈(页面 / 代码块 /
|
|
6389
|
+
* 把当前内存中的全部历史栈(页面 / 代码块 / 数据源)序列化后写入本地 IndexedDB。
|
|
6185
6390
|
*
|
|
6186
6391
|
* - 每个 UndoRedo 栈连同其游标、容量一并保存,恢复后可继续 undo/redo;
|
|
6187
6392
|
* - `key` 用于区分不同活动页 / 项目(同一 store 下可保存多份快照),缺省为 `default`;
|
|
@@ -6190,17 +6395,12 @@
|
|
|
6190
6395
|
*/
|
|
6191
6396
|
async saveToIndexedDB(options = {}) {
|
|
6192
6397
|
const { dbName = DEFAULT_DB_NAME, storeName = DEFAULT_STORE_NAME, key = DEFAULT_KEY, appId } = options;
|
|
6193
|
-
const steps = {
|
|
6194
|
-
page: {},
|
|
6195
|
-
codeBlock: {},
|
|
6196
|
-
dataSource: {}
|
|
6197
|
-
};
|
|
6198
|
-
Object.entries(this.state.steps).forEach(([stepType, bucket]) => {
|
|
6199
|
-
steps[stepType] = serializeStacks(bucket);
|
|
6200
|
-
});
|
|
6201
6398
|
const snapshot = {
|
|
6202
6399
|
version: PERSIST_VERSION,
|
|
6203
|
-
|
|
6400
|
+
pageId: this.state.pageId,
|
|
6401
|
+
pageSteps: serializeStacks(this.state.pageSteps),
|
|
6402
|
+
codeBlockState: serializeStacks(this.state.codeBlockState),
|
|
6403
|
+
dataSourceState: serializeStacks(this.state.dataSourceState),
|
|
6204
6404
|
savedAt: Date.now()
|
|
6205
6405
|
};
|
|
6206
6406
|
await idbSet(this.resolveDbName(dbName, appId), storeName, key, snapshot);
|
|
@@ -6211,7 +6411,7 @@
|
|
|
6211
6411
|
* 从本地 IndexedDB 读取此前保存的历史快照并重建全部撤销/重做栈。
|
|
6212
6412
|
*
|
|
6213
6413
|
* - 读取到的每个栈都会经 {@link UndoRedo.fromSerialized} 还原(含游标),随后可直接 undo/redo;
|
|
6214
|
-
* -
|
|
6414
|
+
* - 会整体覆盖当前内存中的历史状态,并把活动页恢复为快照中的 pageId;
|
|
6215
6415
|
* - 找不到对应记录时返回 null,且不改动当前状态;
|
|
6216
6416
|
* - 不支持 IndexedDB 的环境(如 SSR)会 reject。
|
|
6217
6417
|
*/
|
|
@@ -6220,21 +6420,23 @@
|
|
|
6220
6420
|
const snapshot = await idbGet(this.resolveDbName(dbName, appId), storeName, key);
|
|
6221
6421
|
if (!snapshot) return null;
|
|
6222
6422
|
const parseDSL = getEditorConfig("parseDSL");
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
Object.entries(snapshot.steps).forEach(([stepType, bucket]) => {
|
|
6229
|
-
steps[stepType] = deserializeStacks(bucket, parseDSL);
|
|
6230
|
-
});
|
|
6231
|
-
this.state.steps = steps;
|
|
6423
|
+
this.state.pageSteps = deserializeStacks(snapshot.pageSteps, parseDSL);
|
|
6424
|
+
this.state.codeBlockState = deserializeStacks(snapshot.codeBlockState, parseDSL);
|
|
6425
|
+
this.state.dataSourceState = deserializeStacks(snapshot.dataSourceState, parseDSL);
|
|
6426
|
+
this.state.pageId = snapshot.pageId;
|
|
6427
|
+
this.setCanUndoRedo();
|
|
6232
6428
|
this.emit("restore-from-indexed-db", snapshot);
|
|
6233
6429
|
return snapshot;
|
|
6234
6430
|
}
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6431
|
+
/**
|
|
6432
|
+
* 取出当前活动页的历史步骤平铺列表(包含已应用 + 已撤销)。
|
|
6433
|
+
* 列表按时间正序,最早一步在最前面。
|
|
6434
|
+
* 通常 UI 应使用 `getPageHistoryGroups` 取已合并分组的版本;本方法仅为兼容/调试保留。
|
|
6435
|
+
*/
|
|
6436
|
+
getPageStepList(pageId) {
|
|
6437
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6438
|
+
if (!targetPageId) return [];
|
|
6439
|
+
const undoRedo = this.state.pageSteps[targetPageId];
|
|
6238
6440
|
if (!undoRedo) return [];
|
|
6239
6441
|
const list = undoRedo.getElementList();
|
|
6240
6442
|
const cursor = undoRedo.getCursor();
|
|
@@ -6244,103 +6446,147 @@
|
|
|
6244
6446
|
applied: index < cursor
|
|
6245
6447
|
}));
|
|
6246
6448
|
}
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6449
|
+
/**
|
|
6450
|
+
* 取出当前活动页的历史栈,按"目标节点"做相邻合并:
|
|
6451
|
+
* - 连续修改同一节点(单节点 update)的多步合并为一个 group,组内可展开查看每步;
|
|
6452
|
+
* - add / remove / 多节点 update 始终独立成组。
|
|
6453
|
+
* 用于历史面板的"页面"tab 展示。
|
|
6454
|
+
*/
|
|
6455
|
+
getPageHistoryGroups(pageId) {
|
|
6456
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6457
|
+
if (!targetPageId) return [];
|
|
6458
|
+
const undoRedo = this.state.pageSteps[targetPageId];
|
|
6459
|
+
if (!undoRedo) return [];
|
|
6460
|
+
const list = undoRedo.getElementList();
|
|
6461
|
+
if (!list.length) return [];
|
|
6462
|
+
return mergePageSteps(targetPageId, list, undoRedo.getCursor()).filter((group) => group.opType !== "initial");
|
|
6463
|
+
}
|
|
6464
|
+
/**
|
|
6465
|
+
* 取出全部代码块的历史栈,按 codeBlockId 分桶展示。
|
|
6466
|
+
* 同一栈内每条操作记录独立成组,不做相邻 update 合并。
|
|
6467
|
+
*/
|
|
6468
|
+
getCodeBlockHistoryGroups() {
|
|
6469
|
+
const groups = [];
|
|
6470
|
+
Object.entries(this.state.codeBlockState).forEach(([id, undoRedo]) => {
|
|
6471
|
+
if (!undoRedo) return;
|
|
6254
6472
|
const list = undoRedo.getElementList();
|
|
6255
|
-
if (!list.length) return
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
return
|
|
6473
|
+
if (!list.length) return;
|
|
6474
|
+
const cursor = undoRedo.getCursor();
|
|
6475
|
+
groups.push(...mergeStackSteps("code-block", id, list, cursor));
|
|
6476
|
+
});
|
|
6477
|
+
return groups;
|
|
6260
6478
|
}
|
|
6261
6479
|
/**
|
|
6262
|
-
*
|
|
6263
|
-
*
|
|
6264
|
-
* - `id` 缺省或非法、或对应栈不存在时返回 0;
|
|
6265
|
-
* - `stepType` 支持 `page` / `codeBlock` / `dataSource` / 扩展类型。
|
|
6480
|
+
* 读取指定页面历史栈的当前游标(已应用步骤数量)。不传则取当前活动页。
|
|
6481
|
+
* 没有对应栈时返回 0。
|
|
6266
6482
|
*/
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6483
|
+
getPageCursor(pageId) {
|
|
6484
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6485
|
+
if (!targetPageId) return 0;
|
|
6486
|
+
return this.state.pageSteps[targetPageId]?.getCursor() ?? 0;
|
|
6487
|
+
}
|
|
6488
|
+
/** 读取指定代码块历史栈的当前游标。 */
|
|
6489
|
+
getCodeBlockCursor(codeBlockId) {
|
|
6490
|
+
return this.state.codeBlockState[codeBlockId]?.getCursor() ?? 0;
|
|
6491
|
+
}
|
|
6492
|
+
/** 读取指定数据源历史栈的当前游标。 */
|
|
6493
|
+
getDataSourceCursor(dataSourceId) {
|
|
6494
|
+
return this.state.dataSourceState[dataSourceId]?.getCursor() ?? 0;
|
|
6270
6495
|
}
|
|
6271
6496
|
/**
|
|
6272
|
-
*
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6497
|
+
* 取出指定代码块历史栈的平铺步骤列表(含 applied 标记)。供 revert 等按 index 索引步骤使用。
|
|
6498
|
+
*/
|
|
6499
|
+
getCodeBlockStepList(codeBlockId) {
|
|
6500
|
+
const undoRedo = this.state.codeBlockState[codeBlockId];
|
|
6501
|
+
if (!undoRedo) return [];
|
|
6502
|
+
const list = undoRedo.getElementList();
|
|
6503
|
+
const cursor = undoRedo.getCursor();
|
|
6504
|
+
return list.map((step, index) => ({
|
|
6505
|
+
step,
|
|
6506
|
+
index,
|
|
6507
|
+
applied: index < cursor
|
|
6508
|
+
}));
|
|
6509
|
+
}
|
|
6510
|
+
/**
|
|
6511
|
+
* 取出指定数据源历史栈的平铺步骤列表(含 applied 标记)。供 revert 等按 index 索引步骤使用。
|
|
6512
|
+
*/
|
|
6513
|
+
getDataSourceStepList(dataSourceId) {
|
|
6514
|
+
const undoRedo = this.state.dataSourceState[dataSourceId];
|
|
6515
|
+
if (!undoRedo) return [];
|
|
6516
|
+
const list = undoRedo.getElementList();
|
|
6517
|
+
const cursor = undoRedo.getCursor();
|
|
6518
|
+
return list.map((step, index) => ({
|
|
6519
|
+
step,
|
|
6520
|
+
index,
|
|
6521
|
+
applied: index < cursor
|
|
6522
|
+
}));
|
|
6523
|
+
}
|
|
6524
|
+
/**
|
|
6525
|
+
* 按历史记录 uuid 在指定页面(默认当前活动页)的栈中查找其索引。
|
|
6526
|
+
* 找不到时返回 -1。供「按 uuid 回滚」等需要把 uuid 映射回 index 的场景使用。
|
|
6527
|
+
*/
|
|
6528
|
+
getPageStepIndexByUuid(uuid, pageId) {
|
|
6529
|
+
if (!uuid) return -1;
|
|
6530
|
+
return this.getPageStepList(pageId).findIndex((entry) => entry.step.uuid === uuid);
|
|
6531
|
+
}
|
|
6532
|
+
/**
|
|
6533
|
+
* 按历史记录 uuid 在全部代码块栈中查找其所属 codeBlockId 与索引。
|
|
6534
|
+
* 找不到时返回 null。
|
|
6283
6535
|
*/
|
|
6284
|
-
|
|
6536
|
+
findCodeBlockStepLocationByUuid(uuid) {
|
|
6285
6537
|
if (!uuid) return null;
|
|
6286
|
-
const
|
|
6287
|
-
|
|
6288
|
-
if (this.isValidStackId(id)) {
|
|
6289
|
-
const index = this.getStepList(stepType, id).findIndex((entry) => entry.step.uuid === uuid);
|
|
6290
|
-
return index >= 0 ? {
|
|
6291
|
-
id,
|
|
6292
|
-
index
|
|
6293
|
-
} : null;
|
|
6294
|
-
}
|
|
6295
|
-
for (const stackId of Object.keys(bucket)) {
|
|
6296
|
-
const index = this.getStepList(stepType, stackId).findIndex((entry) => entry.step.uuid === uuid);
|
|
6538
|
+
for (const id of Object.keys(this.state.codeBlockState)) {
|
|
6539
|
+
const index = this.getCodeBlockStepList(id).findIndex((entry) => entry.step.uuid === uuid);
|
|
6297
6540
|
if (index >= 0) return {
|
|
6298
|
-
id
|
|
6541
|
+
id,
|
|
6299
6542
|
index
|
|
6300
6543
|
};
|
|
6301
6544
|
}
|
|
6302
6545
|
return null;
|
|
6303
6546
|
}
|
|
6304
|
-
usePlugin(options) {
|
|
6305
|
-
super.usePlugin(options);
|
|
6306
|
-
}
|
|
6307
|
-
emit(eventName, ...args) {
|
|
6308
|
-
return super.emit(eventName, ...args);
|
|
6309
|
-
}
|
|
6310
6547
|
/**
|
|
6311
|
-
*
|
|
6312
|
-
*
|
|
6548
|
+
* 按历史记录 uuid 在全部数据源栈中查找其所属 dataSourceId 与索引。
|
|
6549
|
+
* 找不到时返回 null。
|
|
6313
6550
|
*/
|
|
6314
|
-
|
|
6315
|
-
if (!
|
|
6316
|
-
|
|
6551
|
+
findDataSourceStepLocationByUuid(uuid) {
|
|
6552
|
+
if (!uuid) return null;
|
|
6553
|
+
for (const id of Object.keys(this.state.dataSourceState)) {
|
|
6554
|
+
const index = this.getDataSourceStepList(id).findIndex((entry) => entry.step.uuid === uuid);
|
|
6555
|
+
if (index >= 0) return {
|
|
6556
|
+
id,
|
|
6557
|
+
index
|
|
6558
|
+
};
|
|
6559
|
+
}
|
|
6560
|
+
return null;
|
|
6317
6561
|
}
|
|
6318
6562
|
/**
|
|
6319
|
-
*
|
|
6563
|
+
* 取出全部数据源的历史栈,按 dataSourceId 分桶展示。同上,每条操作独立成组。
|
|
6320
6564
|
*/
|
|
6321
|
-
|
|
6322
|
-
const
|
|
6323
|
-
this.
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6565
|
+
getDataSourceHistoryGroups() {
|
|
6566
|
+
const groups = [];
|
|
6567
|
+
Object.entries(this.state.dataSourceState).forEach(([id, undoRedo]) => {
|
|
6568
|
+
if (!undoRedo) return;
|
|
6569
|
+
const list = undoRedo.getElementList();
|
|
6570
|
+
if (!list.length) return;
|
|
6571
|
+
const cursor = undoRedo.getCursor();
|
|
6572
|
+
groups.push(...mergeStackSteps("data-source", id, list, cursor));
|
|
6328
6573
|
});
|
|
6574
|
+
return groups;
|
|
6329
6575
|
}
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
if (step.uuid === void 0) step.uuid = (0, _tmagic_utils.guid)();
|
|
6333
|
-
if (step.timestamp === void 0) step.timestamp = Date.now();
|
|
6334
|
-
}
|
|
6335
|
-
/** 校验「按 id 分栈」类型(codeBlock / dataSource / 扩展)的 id 是否有效。 */
|
|
6336
|
-
isValidStackId(id) {
|
|
6337
|
-
return id !== void 0 && id !== null && `${id}` !== "";
|
|
6576
|
+
usePlugin(options) {
|
|
6577
|
+
super.usePlugin(options);
|
|
6338
6578
|
}
|
|
6339
|
-
/**
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6579
|
+
/**
|
|
6580
|
+
* 取出指定页面的栈;不传 pageId 时按当前活动页取。
|
|
6581
|
+
*
|
|
6582
|
+
* 跨页 push 时如果目标页的栈尚不存在(用户从未进入过该页),会按需创建一条空栈,
|
|
6583
|
+
* 这样切到目标页时 Ctrl+Z 也能撤回该步骤。
|
|
6584
|
+
*/
|
|
6585
|
+
getUndoRedo(pageId) {
|
|
6586
|
+
const targetPageId = pageId ?? this.state.pageId;
|
|
6587
|
+
if (!targetPageId) return null;
|
|
6588
|
+
if (!this.state.pageSteps[targetPageId]) this.state.pageSteps[targetPageId] = new UndoRedo();
|
|
6589
|
+
return this.state.pageSteps[targetPageId];
|
|
6344
6590
|
}
|
|
6345
6591
|
/**
|
|
6346
6592
|
* 把基础 dbName 与当前 DSL(root app)的 id 拼成最终库名,实现不同应用历史隔离。
|
|
@@ -6350,6 +6596,11 @@
|
|
|
6350
6596
|
const resolvedAppId = appId ?? editor_default.get("root")?.id;
|
|
6351
6597
|
return resolvedAppId ? `${dbName}-${resolvedAppId}` : dbName;
|
|
6352
6598
|
}
|
|
6599
|
+
setCanUndoRedo() {
|
|
6600
|
+
const undoRedo = this.getUndoRedo();
|
|
6601
|
+
this.state.canRedo = undoRedo?.canRedo() || false;
|
|
6602
|
+
this.state.canUndo = undoRedo ? undoRedo.getCursor() > undoFloor(undoRedo) : false;
|
|
6603
|
+
}
|
|
6353
6604
|
};
|
|
6354
6605
|
var history_default = new History();
|
|
6355
6606
|
//#endregion
|
|
@@ -7000,7 +7251,7 @@
|
|
|
7000
7251
|
this.state.stageLoading = this.state.pageLength !== 0;
|
|
7001
7252
|
if (preValue && !isEmpty(preValue)) this.pushRootDiffHistory(preValue, app, options.historySource);
|
|
7002
7253
|
else app.items?.forEach((pageNode) => {
|
|
7003
|
-
if (pageNode?.id !== void 0 && !history_default.
|
|
7254
|
+
if (pageNode?.id !== void 0 && !history_default.getPageMarker(pageNode.id)) history_default.setPageMarker(pageNode.id, {
|
|
7004
7255
|
name: pageNode.name,
|
|
7005
7256
|
source: options.historySource
|
|
7006
7257
|
});
|
|
@@ -7102,6 +7353,8 @@
|
|
|
7102
7353
|
this.set("nodes", node ? [node] : []);
|
|
7103
7354
|
this.set("page", page);
|
|
7104
7355
|
this.set("parent", parent);
|
|
7356
|
+
if (page) history_default.changePage((0, vue.toRaw)(page));
|
|
7357
|
+
else history_default.resetState();
|
|
7105
7358
|
if (node?.id) this.get("stage")?.renderer?.runtime?.getApp?.()?.page?.emit("editor:select", {
|
|
7106
7359
|
node,
|
|
7107
7360
|
page,
|
|
@@ -7292,7 +7545,10 @@
|
|
|
7292
7545
|
if (pages[0]) {
|
|
7293
7546
|
await this.select(pages[0]);
|
|
7294
7547
|
stage?.select(pages[0].id);
|
|
7295
|
-
} else
|
|
7548
|
+
} else {
|
|
7549
|
+
this.selectRoot();
|
|
7550
|
+
history_default.resetPage();
|
|
7551
|
+
}
|
|
7296
7552
|
};
|
|
7297
7553
|
const rootItems = root.items || [];
|
|
7298
7554
|
if ((0, _tmagic_utils.isPage)(node)) {
|
|
@@ -7796,9 +8052,7 @@
|
|
|
7796
8052
|
* @returns 被撤销的操作
|
|
7797
8053
|
*/
|
|
7798
8054
|
async undo() {
|
|
7799
|
-
const
|
|
7800
|
-
if (pageId === void 0) return null;
|
|
7801
|
-
const value = history_default.undo("page", pageId);
|
|
8055
|
+
const value = history_default.undo();
|
|
7802
8056
|
if (value) await this.applyHistoryOp(value, true);
|
|
7803
8057
|
return value;
|
|
7804
8058
|
}
|
|
@@ -7807,9 +8061,7 @@
|
|
|
7807
8061
|
* @returns 被恢复的操作
|
|
7808
8062
|
*/
|
|
7809
8063
|
async redo() {
|
|
7810
|
-
const
|
|
7811
|
-
if (pageId === void 0) return null;
|
|
7812
|
-
const value = history_default.redo("page", pageId);
|
|
8064
|
+
const value = history_default.redo();
|
|
7813
8065
|
if (value) await this.applyHistoryOp(value, false);
|
|
7814
8066
|
return value;
|
|
7815
8067
|
}
|
|
@@ -7830,7 +8082,7 @@
|
|
|
7830
8082
|
* @returns 反向后产生的新 step;目标不存在 / 未应用 / 反向失败时返回 null
|
|
7831
8083
|
*/
|
|
7832
8084
|
async revertPageStep(index) {
|
|
7833
|
-
const entry = history_default.
|
|
8085
|
+
const entry = history_default.getPageStepList()[index];
|
|
7834
8086
|
if (!entry?.applied) return null;
|
|
7835
8087
|
const { step } = entry;
|
|
7836
8088
|
if (step.opType === "initial") return null;
|
|
@@ -7840,7 +8092,7 @@
|
|
|
7840
8092
|
if (!items.length || !items.every((item) => item.changeRecords?.length)) return null;
|
|
7841
8093
|
}
|
|
7842
8094
|
let revertedStep = null;
|
|
7843
|
-
const captureRevert = (
|
|
8095
|
+
const captureRevert = (s) => {
|
|
7844
8096
|
revertedStep = s;
|
|
7845
8097
|
};
|
|
7846
8098
|
history_default.once("change", captureRevert);
|
|
@@ -7910,10 +8162,9 @@
|
|
|
7910
8162
|
*/
|
|
7911
8163
|
async revertPageStepById(uuids) {
|
|
7912
8164
|
const results = [];
|
|
7913
|
-
const pageId = this.get("page")?.id;
|
|
7914
8165
|
for (const uuid of uuids) {
|
|
7915
|
-
const
|
|
7916
|
-
results.push(
|
|
8166
|
+
const index = history_default.getPageStepIndexByUuid(uuid);
|
|
8167
|
+
results.push(index < 0 ? null : await this.revertPageStep(index));
|
|
7917
8168
|
}
|
|
7918
8169
|
return results;
|
|
7919
8170
|
}
|
|
@@ -7927,9 +8178,8 @@
|
|
|
7927
8178
|
* @returns 实际移动到的最终游标位置
|
|
7928
8179
|
*/
|
|
7929
8180
|
async gotoPageStep(targetCursor) {
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
const { length } = history_default.getStepList("page", pageId);
|
|
8181
|
+
let cursor = history_default.getPageCursor();
|
|
8182
|
+
const { length } = history_default.getPageStepList();
|
|
7933
8183
|
const target = Math.max(0, Math.min(targetCursor, length));
|
|
7934
8184
|
while (cursor > target) {
|
|
7935
8185
|
if (!await this.undo()) break;
|
|
@@ -8044,34 +8294,30 @@
|
|
|
8044
8294
|
id: page.id
|
|
8045
8295
|
},
|
|
8046
8296
|
opType,
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
modifiedNodeIds: /* @__PURE__ */ new Map()
|
|
8051
|
-
},
|
|
8297
|
+
selectedBefore: [],
|
|
8298
|
+
selectedAfter: [],
|
|
8299
|
+
modifiedNodeIds: /* @__PURE__ */ new Map(),
|
|
8052
8300
|
diff: [diffItem],
|
|
8053
8301
|
rootStep: true
|
|
8054
8302
|
};
|
|
8055
8303
|
if (source) step.source = source;
|
|
8056
8304
|
const top = history_default.getCurrentPageStep(page.id);
|
|
8057
|
-
if (top?.rootStep && top.source === source) history_default.
|
|
8058
|
-
else history_default.push(
|
|
8305
|
+
if (top?.rootStep && top.source === source) history_default.replaceCurrentPageStep(step, page.id);
|
|
8306
|
+
else history_default.push(step, page.id);
|
|
8059
8307
|
}
|
|
8060
8308
|
pushOpHistory(opType, { diff, pageData, historyDescription, source }) {
|
|
8061
8309
|
const step = {
|
|
8062
8310
|
uuid: (0, _tmagic_utils.guid)(),
|
|
8063
8311
|
data: pageData,
|
|
8064
8312
|
opType,
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
modifiedNodeIds: new Map(this.get("modifiedNodeIds"))
|
|
8069
|
-
},
|
|
8313
|
+
selectedBefore: this.selectionBeforeOp ?? [],
|
|
8314
|
+
selectedAfter: this.get("nodes").map((n) => n.id),
|
|
8315
|
+
modifiedNodeIds: new Map(this.get("modifiedNodeIds")),
|
|
8070
8316
|
diff
|
|
8071
8317
|
};
|
|
8072
8318
|
if (historyDescription) step.historyDescription = historyDescription;
|
|
8073
8319
|
if (source) step.source = source;
|
|
8074
|
-
const historyId = history_default.push(
|
|
8320
|
+
const historyId = history_default.push(step, pageData.id) ? step.uuid : null;
|
|
8075
8321
|
this.lastPushedHistoryId = historyId;
|
|
8076
8322
|
this.selectionBeforeOp = null;
|
|
8077
8323
|
return historyId;
|
|
@@ -8172,10 +8418,10 @@
|
|
|
8172
8418
|
break;
|
|
8173
8419
|
}
|
|
8174
8420
|
}
|
|
8175
|
-
this.set("modifiedNodeIds", step.
|
|
8421
|
+
this.set("modifiedNodeIds", step.modifiedNodeIds);
|
|
8176
8422
|
const page = (0, vue.toRaw)(this.get("page"));
|
|
8177
8423
|
if (page) {
|
|
8178
|
-
const selectIds =
|
|
8424
|
+
const selectIds = reverse ? step.selectedBefore : step.selectedAfter;
|
|
8179
8425
|
setTimeout(() => {
|
|
8180
8426
|
if (!selectIds.length) return;
|
|
8181
8427
|
if (selectIds.length > 1) {
|
|
@@ -8200,7 +8446,7 @@
|
|
|
8200
8446
|
var PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
|
|
8201
8447
|
var DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
8202
8448
|
var DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
8203
|
-
var MIN_LEFT_COLUMN_WIDTH =
|
|
8449
|
+
var MIN_LEFT_COLUMN_WIDTH = 238;
|
|
8204
8450
|
var MIN_CENTER_COLUMN_WIDTH = 400;
|
|
8205
8451
|
var MIN_RIGHT_COLUMN_WIDTH = 300;
|
|
8206
8452
|
var H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
|
@@ -9459,9 +9705,9 @@
|
|
|
9459
9705
|
var SplitView_default = SplitView_vue_vue_type_script_setup_true_lang_default;
|
|
9460
9706
|
//#endregion
|
|
9461
9707
|
//#region packages/editor/src/components/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
9462
|
-
var _hoisted_1$
|
|
9708
|
+
var _hoisted_1$75, Icon_vue_vue_type_script_setup_true_lang_default;
|
|
9463
9709
|
var init_Icon_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
9464
|
-
_hoisted_1$
|
|
9710
|
+
_hoisted_1$75 = ["src"];
|
|
9465
9711
|
Icon_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
9466
9712
|
name: "MEditorIcon",
|
|
9467
9713
|
__name: "Icon",
|
|
@@ -9479,7 +9725,7 @@
|
|
|
9479
9725
|
key: 1,
|
|
9480
9726
|
class: "magic-editor-icon"
|
|
9481
9727
|
}, {
|
|
9482
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("img", { src: __props.icon }, null, 8, _hoisted_1$
|
|
9728
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("img", { src: __props.icon }, null, 8, _hoisted_1$75)]),
|
|
9483
9729
|
_: 1
|
|
9484
9730
|
})) : typeof __props.icon === "string" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("i", {
|
|
9485
9731
|
key: 2,
|
|
@@ -9507,7 +9753,7 @@
|
|
|
9507
9753
|
//#region packages/editor/src/components/ToolButton.vue?vue&type=script&setup=true&lang.ts
|
|
9508
9754
|
init_use_services();
|
|
9509
9755
|
init_Icon();
|
|
9510
|
-
var _hoisted_1$
|
|
9756
|
+
var _hoisted_1$74 = {
|
|
9511
9757
|
key: 1,
|
|
9512
9758
|
class: "menu-item-text"
|
|
9513
9759
|
};
|
|
@@ -9570,7 +9816,7 @@
|
|
|
9570
9816
|
}, [__props.data.type === "divider" ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicDivider), {
|
|
9571
9817
|
key: 0,
|
|
9572
9818
|
direction: __props.data.direction || "vertical"
|
|
9573
|
-
}, null, 8, ["direction"])) : __props.data.type === "text" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
9819
|
+
}, null, 8, ["direction"])) : __props.data.type === "text" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$74, (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), {
|
|
9574
9820
|
key: 0,
|
|
9575
9821
|
effect: "dark",
|
|
9576
9822
|
placement: "bottom-start",
|
|
@@ -9642,7 +9888,7 @@
|
|
|
9642
9888
|
init_Icon();
|
|
9643
9889
|
init_use_services();
|
|
9644
9890
|
init_editor();
|
|
9645
|
-
var _hoisted_1$
|
|
9891
|
+
var _hoisted_1$73 = {
|
|
9646
9892
|
key: 0,
|
|
9647
9893
|
id: "m-editor-page-bar-add-icon",
|
|
9648
9894
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
@@ -9668,7 +9914,7 @@
|
|
|
9668
9914
|
editorService.add(pageConfig);
|
|
9669
9915
|
};
|
|
9670
9916
|
return (_ctx, _cache) => {
|
|
9671
|
-
return showAddPageButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
9917
|
+
return showAddPageButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$73, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicPopover), { "popper-class": "data-source-list-panel-add-menu" }, {
|
|
9672
9918
|
reference: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: (0, vue.unref)(_element_plus_icons_vue.Plus) }, null, 8, ["icon"])]),
|
|
9673
9919
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(ToolButton_default, { data: {
|
|
9674
9920
|
type: "button",
|
|
@@ -9695,7 +9941,7 @@
|
|
|
9695
9941
|
//#region packages/editor/src/layouts/page-bar/PageBarScrollContainer.vue?vue&type=script&setup=true&lang.ts
|
|
9696
9942
|
init_Icon();
|
|
9697
9943
|
init_use_services();
|
|
9698
|
-
var _hoisted_1$
|
|
9944
|
+
var _hoisted_1$72 = {
|
|
9699
9945
|
class: "m-editor-page-bar",
|
|
9700
9946
|
ref: "pageBar"
|
|
9701
9947
|
};
|
|
@@ -9789,7 +10035,7 @@
|
|
|
9789
10035
|
}
|
|
9790
10036
|
});
|
|
9791
10037
|
return (_ctx, _cache) => {
|
|
9792
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
10038
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$72, [
|
|
9793
10039
|
(0, vue.renderSlot)(_ctx.$slots, "prepend"),
|
|
9794
10040
|
__props.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$28, [(0, vue.renderSlot)(_ctx.$slots, "default")], 512)) : (0, vue.createCommentVNode)("v-if", true),
|
|
9795
10041
|
canScroll.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -9812,13 +10058,13 @@
|
|
|
9812
10058
|
//#endregion
|
|
9813
10059
|
//#region packages/editor/src/layouts/page-bar/PageList.vue?vue&type=script&setup=true&lang.ts
|
|
9814
10060
|
init_use_services();
|
|
9815
|
-
var _hoisted_1$
|
|
10061
|
+
var _hoisted_1$71 = {
|
|
9816
10062
|
key: 0,
|
|
9817
10063
|
id: "m-editor-page-bar-list-icon",
|
|
9818
10064
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
9819
10065
|
};
|
|
9820
10066
|
var _hoisted_2$27 = { class: "page-bar-popover-wrapper" };
|
|
9821
|
-
var _hoisted_3$
|
|
10067
|
+
var _hoisted_3$14 = { class: "page-bar-popover-inner" };
|
|
9822
10068
|
var PageList_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
9823
10069
|
name: "MEditorPageList",
|
|
9824
10070
|
__name: "PageList",
|
|
@@ -9831,7 +10077,7 @@
|
|
|
9831
10077
|
await editorService.select(id);
|
|
9832
10078
|
};
|
|
9833
10079
|
return (_ctx, _cache) => {
|
|
9834
|
-
return showPageListButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
10080
|
+
return showPageListButton.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$71, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicPopover), {
|
|
9835
10081
|
"popper-class": "page-bar-popover",
|
|
9836
10082
|
placement: "top",
|
|
9837
10083
|
trigger: "hover",
|
|
@@ -9842,7 +10088,7 @@
|
|
|
9842
10088
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_element_plus_icons_vue.Files))]),
|
|
9843
10089
|
_: 1
|
|
9844
10090
|
})]),
|
|
9845
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_2$27, [(0, vue.createElementVNode)("div", _hoisted_3$
|
|
10091
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_2$27, [(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) => {
|
|
9846
10092
|
return (0, vue.openBlock)(), (0, vue.createBlock)(ToolButton_default, {
|
|
9847
10093
|
data: {
|
|
9848
10094
|
type: "button",
|
|
@@ -9864,7 +10110,7 @@
|
|
|
9864
10110
|
//#endregion
|
|
9865
10111
|
//#region packages/editor/src/layouts/page-bar/Search.vue?vue&type=script&setup=true&lang.ts
|
|
9866
10112
|
init_Icon();
|
|
9867
|
-
var _hoisted_1$
|
|
10113
|
+
var _hoisted_1$70 = { class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-search" };
|
|
9868
10114
|
var Search_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
9869
10115
|
__name: "Search",
|
|
9870
10116
|
props: {
|
|
@@ -9897,7 +10143,7 @@
|
|
|
9897
10143
|
emit("search", values);
|
|
9898
10144
|
};
|
|
9899
10145
|
return (_ctx, _cache) => {
|
|
9900
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
10146
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$70, [(0, vue.createVNode)(Icon_default, {
|
|
9901
10147
|
icon: (0, vue.unref)(_element_plus_icons_vue.Search),
|
|
9902
10148
|
onClick: _cache[0] || (_cache[0] = ($event) => visible.value = !visible.value),
|
|
9903
10149
|
class: (0, vue.normalizeClass)({ "icon-active": visible.value })
|
|
@@ -9922,10 +10168,10 @@
|
|
|
9922
10168
|
//#endregion
|
|
9923
10169
|
//#region packages/editor/src/layouts/page-bar/PageBar.vue?vue&type=script&setup=true&lang.ts
|
|
9924
10170
|
init_use_services();
|
|
9925
|
-
var _hoisted_1$
|
|
10171
|
+
var _hoisted_1$69 = { class: "m-editor-page-bar-tabs" };
|
|
9926
10172
|
var _hoisted_2$26 = ["data-page-id", "onClick"];
|
|
9927
|
-
var _hoisted_3$
|
|
9928
|
-
var _hoisted_4$
|
|
10173
|
+
var _hoisted_3$13 = { class: "m-editor-page-bar-title" };
|
|
10174
|
+
var _hoisted_4$10 = ["title"];
|
|
9929
10175
|
var PageBar_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
9930
10176
|
name: "MEditorPageBar",
|
|
9931
10177
|
__name: "PageBar",
|
|
@@ -9991,7 +10237,7 @@
|
|
|
9991
10237
|
}
|
|
9992
10238
|
});
|
|
9993
10239
|
return (_ctx, _cache) => {
|
|
9994
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
10240
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$69, [(0, vue.createVNode)(PageBarScrollContainer_default, {
|
|
9995
10241
|
ref: "pageBarScrollContainer",
|
|
9996
10242
|
"page-bar-sort-options": __props.pageBarSortOptions,
|
|
9997
10243
|
length: list.value.length
|
|
@@ -10015,7 +10261,7 @@
|
|
|
10015
10261
|
key: item.id,
|
|
10016
10262
|
"data-page-id": item.id,
|
|
10017
10263
|
onClick: ($event) => switchPage(item.id)
|
|
10018
|
-
}, [(0, vue.createElementVNode)("div", _hoisted_3$
|
|
10264
|
+
}, [(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), {
|
|
10019
10265
|
"popper-class": "page-bar-popover",
|
|
10020
10266
|
placement: "top",
|
|
10021
10267
|
trigger: "hover",
|
|
@@ -10053,7 +10299,7 @@
|
|
|
10053
10299
|
//#region packages/editor/src/layouts/AddPageBox.vue?vue&type=script&setup=true&lang.ts
|
|
10054
10300
|
init_Icon();
|
|
10055
10301
|
init_use_services();
|
|
10056
|
-
var _hoisted_1$
|
|
10302
|
+
var _hoisted_1$68 = { class: "m-editor-empty-panel" };
|
|
10057
10303
|
var _hoisted_2$25 = { class: "m-editor-empty-content" };
|
|
10058
10304
|
var AddPageBox_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10059
10305
|
name: "MEditorAddPageBox",
|
|
@@ -10071,7 +10317,7 @@
|
|
|
10071
10317
|
});
|
|
10072
10318
|
};
|
|
10073
10319
|
return (_ctx, _cache) => {
|
|
10074
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
10320
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$68, [(0, vue.createElementVNode)("div", _hoisted_2$25, [(0, vue.createElementVNode)("div", {
|
|
10075
10321
|
class: "m-editor-empty-button",
|
|
10076
10322
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler((0, vue.unref)(_tmagic_core.NodeType).PAGE))
|
|
10077
10323
|
}, [(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", {
|
|
@@ -10087,14 +10333,14 @@
|
|
|
10087
10333
|
var AddPageBox_default = AddPageBox_vue_vue_type_script_setup_true_lang_default;
|
|
10088
10334
|
//#endregion
|
|
10089
10335
|
//#region packages/editor/src/layouts/CodeEditor.vue?vue&type=script&setup=true&lang.ts
|
|
10090
|
-
var _hoisted_1$
|
|
10336
|
+
var _hoisted_1$67, _hoisted_2$24, CodeEditor_vue_vue_type_script_setup_true_lang_default;
|
|
10091
10337
|
var init_CodeEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
10092
10338
|
init_lodash();
|
|
10093
10339
|
init_Icon();
|
|
10094
10340
|
init_config();
|
|
10095
10341
|
init_editor();
|
|
10096
10342
|
init_monaco_editor();
|
|
10097
|
-
_hoisted_1$
|
|
10343
|
+
_hoisted_1$67 = { class: "magic-code-editor" };
|
|
10098
10344
|
_hoisted_2$24 = {
|
|
10099
10345
|
ref: "codeEditor",
|
|
10100
10346
|
class: "magic-code-editor-content"
|
|
@@ -10332,7 +10578,7 @@
|
|
|
10332
10578
|
}
|
|
10333
10579
|
});
|
|
10334
10580
|
return (_ctx, _cache) => {
|
|
10335
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
10581
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$67, [((0, vue.openBlock)(), (0, vue.createBlock)(vue.Teleport, {
|
|
10336
10582
|
to: "body",
|
|
10337
10583
|
disabled: !fullScreen.value
|
|
10338
10584
|
}, [(0, vue.createElementVNode)("div", {
|
|
@@ -10368,11 +10614,6 @@
|
|
|
10368
10614
|
init_use_services();
|
|
10369
10615
|
init_config();
|
|
10370
10616
|
init_CodeEditor();
|
|
10371
|
-
var _hoisted_1$62 = {
|
|
10372
|
-
class: "m-editor",
|
|
10373
|
-
ref: "content",
|
|
10374
|
-
style: { "min-width": "900px" }
|
|
10375
|
-
};
|
|
10376
10617
|
var Framework_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10377
10618
|
name: "MEditorFramework",
|
|
10378
10619
|
__name: "Framework",
|
|
@@ -10380,7 +10621,8 @@
|
|
|
10380
10621
|
disabledPageFragment: { type: Boolean },
|
|
10381
10622
|
pageBarSortOptions: {},
|
|
10382
10623
|
pageFilterFunction: { type: Function },
|
|
10383
|
-
hideSidebar: { type: Boolean }
|
|
10624
|
+
hideSidebar: { type: Boolean },
|
|
10625
|
+
theme: {}
|
|
10384
10626
|
},
|
|
10385
10627
|
setup(__props) {
|
|
10386
10628
|
const props = __props;
|
|
@@ -10432,7 +10674,15 @@
|
|
|
10432
10674
|
}
|
|
10433
10675
|
};
|
|
10434
10676
|
return (_ctx, _cache) => {
|
|
10435
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
10677
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
10678
|
+
ref: "content",
|
|
10679
|
+
class: (0, vue.normalizeClass)([
|
|
10680
|
+
"m-editor",
|
|
10681
|
+
__props.theme ? `m-editor--${__props.theme}` : "",
|
|
10682
|
+
__props.theme ? `m-theme--${__props.theme}` : ""
|
|
10683
|
+
]),
|
|
10684
|
+
style: { "min-width": "900px" }
|
|
10685
|
+
}, [
|
|
10436
10686
|
(0, vue.renderSlot)(_ctx.$slots, "header"),
|
|
10437
10687
|
(0, vue.renderSlot)(_ctx.$slots, "nav"),
|
|
10438
10688
|
(0, vue.renderSlot)(_ctx.$slots, "content-before"),
|
|
@@ -10451,7 +10701,7 @@
|
|
|
10451
10701
|
"right-class": "m-editor-framework-right",
|
|
10452
10702
|
left: __props.hideSidebar ? void 0 : columnWidth.value.left,
|
|
10453
10703
|
right: columnWidth.value.right,
|
|
10454
|
-
"min-left": __props.hideSidebar ? 0 : (0, vue.unref)(
|
|
10704
|
+
"min-left": __props.hideSidebar ? 0 : (0, vue.unref)(238),
|
|
10455
10705
|
"min-right": (0, vue.unref)(300),
|
|
10456
10706
|
"min-center": (0, vue.unref)(400),
|
|
10457
10707
|
width: frameworkRect.value.width,
|
|
@@ -10491,7 +10741,7 @@
|
|
|
10491
10741
|
]), [[vue.vShow, !showSrc.value]]),
|
|
10492
10742
|
(0, vue.renderSlot)(_ctx.$slots, "content-after"),
|
|
10493
10743
|
(0, vue.renderSlot)(_ctx.$slots, "footer")
|
|
10494
|
-
],
|
|
10744
|
+
], 2);
|
|
10495
10745
|
};
|
|
10496
10746
|
}
|
|
10497
10747
|
});
|
|
@@ -10681,15 +10931,15 @@
|
|
|
10681
10931
|
};
|
|
10682
10932
|
//#endregion
|
|
10683
10933
|
//#region packages/editor/src/layouts/history-list/GroupRow.vue?vue&type=script&setup=true&lang.ts
|
|
10684
|
-
var _hoisted_1$
|
|
10934
|
+
var _hoisted_1$66 = ["title"];
|
|
10685
10935
|
var _hoisted_2$23 = ["title"];
|
|
10686
|
-
var _hoisted_3$
|
|
10687
|
-
var _hoisted_4$
|
|
10936
|
+
var _hoisted_3$12 = { class: "m-editor-history-list-item-desc" };
|
|
10937
|
+
var _hoisted_4$9 = {
|
|
10688
10938
|
key: 0,
|
|
10689
10939
|
class: "m-editor-history-list-item-saved",
|
|
10690
10940
|
title: "该记录为最近一次保存的状态"
|
|
10691
10941
|
};
|
|
10692
|
-
var _hoisted_5$
|
|
10942
|
+
var _hoisted_5$5 = {
|
|
10693
10943
|
key: 1,
|
|
10694
10944
|
class: "m-editor-history-list-item-actions"
|
|
10695
10945
|
};
|
|
@@ -10849,9 +11099,9 @@
|
|
|
10849
11099
|
title: headIndexTitle.value
|
|
10850
11100
|
}, (0, vue.toDisplayString)(headIndexLabel.value), 9, _hoisted_2$23),
|
|
10851
11101
|
(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),
|
|
10852
|
-
(0, vue.createElementVNode)("span", _hoisted_3$
|
|
10853
|
-
headSaved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$
|
|
10854
|
-
!merged.value && (headRevertable.value || headDiffable.value || canHeadGoto.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5$
|
|
11102
|
+
(0, vue.createElementVNode)("span", _hoisted_3$12, (0, vue.toDisplayString)(__props.group.desc), 1),
|
|
11103
|
+
headSaved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$9, "已保存")) : (0, vue.createCommentVNode)("v-if", true),
|
|
11104
|
+
!merged.value && (headRevertable.value || headDiffable.value || canHeadGoto.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5$5, [
|
|
10855
11105
|
headRevertable.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
10856
11106
|
key: 0,
|
|
10857
11107
|
class: "m-editor-history-list-item-revert",
|
|
@@ -10891,7 +11141,7 @@
|
|
|
10891
11141
|
key: 6,
|
|
10892
11142
|
class: (0, vue.normalizeClass)(["m-editor-history-list-group-toggle", { "is-expanded": __props.expanded }])
|
|
10893
11143
|
}, "▾", 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
10894
|
-
], 10, _hoisted_1$
|
|
11144
|
+
], 10, _hoisted_1$66), 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) => {
|
|
10895
11145
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
|
10896
11146
|
key: s.index,
|
|
10897
11147
|
class: (0, vue.normalizeClass)({
|
|
@@ -10950,18 +11200,18 @@
|
|
|
10950
11200
|
var GroupRow_default = GroupRow_vue_vue_type_script_setup_true_lang_default;
|
|
10951
11201
|
//#endregion
|
|
10952
11202
|
//#region packages/editor/src/layouts/history-list/InitialRow.vue?vue&type=script&setup=true&lang.ts
|
|
10953
|
-
var _hoisted_1$
|
|
11203
|
+
var _hoisted_1$65 = ["title"];
|
|
10954
11204
|
var _hoisted_2$22 = { class: "m-editor-history-list-item-desc" };
|
|
10955
|
-
var _hoisted_3$
|
|
11205
|
+
var _hoisted_3$11 = {
|
|
10956
11206
|
key: 0,
|
|
10957
11207
|
class: "m-editor-history-list-item-saved",
|
|
10958
11208
|
title: "该记录为最近一次保存的状态"
|
|
10959
11209
|
};
|
|
10960
|
-
var _hoisted_4$
|
|
11210
|
+
var _hoisted_4$8 = {
|
|
10961
11211
|
key: 1,
|
|
10962
11212
|
class: "m-editor-history-list-item-actions"
|
|
10963
11213
|
};
|
|
10964
|
-
var _hoisted_5$
|
|
11214
|
+
var _hoisted_5$4 = ["title"];
|
|
10965
11215
|
var InitialRow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10966
11216
|
name: "MEditorHistoryListInitialRow",
|
|
10967
11217
|
__name: "InitialRow",
|
|
@@ -11013,8 +11263,8 @@
|
|
|
11013
11263
|
}, "#0", -1)),
|
|
11014
11264
|
_cache[1] || (_cache[1] = (0, vue.createElementVNode)("span", { class: "m-editor-history-list-item-op op-initial" }, "初始", -1)),
|
|
11015
11265
|
(0, vue.createElementVNode)("span", _hoisted_2$22, (0, vue.toDisplayString)(desc.value), 1),
|
|
11016
|
-
saved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
11017
|
-
__props.gotoEnabled && !__props.isCurrent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$
|
|
11266
|
+
saved.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$11, "已保存")) : (0, vue.createCommentVNode)("v-if", true),
|
|
11267
|
+
__props.gotoEnabled && !__props.isCurrent ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$8, [(0, vue.createElementVNode)("span", {
|
|
11018
11268
|
class: "m-editor-history-list-item-goto",
|
|
11019
11269
|
title: "回到该记录",
|
|
11020
11270
|
onClick: (0, vue.withModifiers)(onClick, ["stop"])
|
|
@@ -11023,8 +11273,8 @@
|
|
|
11023
11273
|
key: 2,
|
|
11024
11274
|
class: "m-editor-history-list-item-time",
|
|
11025
11275
|
title: timeTitle.value
|
|
11026
|
-
}, (0, vue.toDisplayString)(time.value), 9, _hoisted_5$
|
|
11027
|
-
], 10, _hoisted_1$
|
|
11276
|
+
}, (0, vue.toDisplayString)(time.value), 9, _hoisted_5$4)) : (0, vue.createCommentVNode)("v-if", true)
|
|
11277
|
+
], 10, _hoisted_1$65);
|
|
11028
11278
|
};
|
|
11029
11279
|
}
|
|
11030
11280
|
});
|
|
@@ -11033,10 +11283,10 @@
|
|
|
11033
11283
|
var InitialRow_default = InitialRow_vue_vue_type_script_setup_true_lang_default;
|
|
11034
11284
|
//#endregion
|
|
11035
11285
|
//#region packages/editor/src/layouts/history-list/Bucket.vue?vue&type=script&setup=true&lang.ts
|
|
11036
|
-
var _hoisted_1$
|
|
11286
|
+
var _hoisted_1$64 = { class: "m-editor-history-list-bucket" };
|
|
11037
11287
|
var _hoisted_2$21 = { class: "m-editor-history-list-bucket-title" };
|
|
11038
|
-
var _hoisted_3$
|
|
11039
|
-
var _hoisted_4$
|
|
11288
|
+
var _hoisted_3$10 = { class: "m-editor-history-list-bucket-count" };
|
|
11289
|
+
var _hoisted_4$7 = { class: "m-editor-history-list-ul" };
|
|
11040
11290
|
var Bucket_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
11041
11291
|
name: "MEditorHistoryListBucket",
|
|
11042
11292
|
__name: "Bucket",
|
|
@@ -11065,11 +11315,11 @@
|
|
|
11065
11315
|
/** 该 bucket 是否处于初始状态(栈 cursor=0),等价于全部 group 都未 applied。 */
|
|
11066
11316
|
const isInitial = (0, vue.computed)(() => props.groups.length > 0 && props.groups.every((g) => !g.applied));
|
|
11067
11317
|
return (_ctx, _cache) => {
|
|
11068
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11318
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$64, [(0, vue.createElementVNode)("div", _hoisted_2$21, [
|
|
11069
11319
|
(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)(__props.config.title), 1),
|
|
11070
11320
|
(0, vue.createElementVNode)("code", null, (0, vue.toDisplayString)(String(__props.bucketId)), 1),
|
|
11071
|
-
(0, vue.createElementVNode)("span", _hoisted_3$
|
|
11072
|
-
]), (0, vue.createElementVNode)("ul", _hoisted_4$
|
|
11321
|
+
(0, vue.createElementVNode)("span", _hoisted_3$10, (0, vue.toDisplayString)(__props.groups.length) + " 组", 1)
|
|
11322
|
+
]), (0, vue.createElementVNode)("ul", _hoisted_4$7, [
|
|
11073
11323
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.groups, (group) => {
|
|
11074
11324
|
return (0, vue.openBlock)(), (0, vue.createBlock)(GroupRow_default, {
|
|
11075
11325
|
key: rowKey(group),
|
|
@@ -11102,12 +11352,12 @@
|
|
|
11102
11352
|
var Bucket_default = Bucket_vue_vue_type_script_setup_true_lang_default;
|
|
11103
11353
|
//#endregion
|
|
11104
11354
|
//#region packages/editor/src/layouts/history-list/BucketTab.vue?vue&type=script&setup=true&lang.ts
|
|
11105
|
-
var _hoisted_1$
|
|
11355
|
+
var _hoisted_1$63 = {
|
|
11106
11356
|
key: 0,
|
|
11107
11357
|
class: "m-editor-history-list-empty"
|
|
11108
11358
|
};
|
|
11109
11359
|
var _hoisted_2$20 = { class: "m-editor-history-list-toolbar" };
|
|
11110
|
-
var _hoisted_3$
|
|
11360
|
+
var _hoisted_3$9 = ["title"];
|
|
11111
11361
|
var BucketTab_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
11112
11362
|
name: "MEditorHistoryListBucketTab",
|
|
11113
11363
|
__name: "BucketTab",
|
|
@@ -11126,11 +11376,11 @@
|
|
|
11126
11376
|
],
|
|
11127
11377
|
setup(__props) {
|
|
11128
11378
|
return (_ctx, _cache) => {
|
|
11129
|
-
return !__props.buckets.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11379
|
+
return !__props.buckets.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$63, "暂无操作记录")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [(0, vue.createElementVNode)("div", _hoisted_2$20, [(0, vue.createElementVNode)("span", {
|
|
11130
11380
|
class: "m-editor-history-list-clear",
|
|
11131
11381
|
title: `清空${__props.config.title}的历史记录`,
|
|
11132
11382
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("clear"))
|
|
11133
|
-
}, "清空", 8, _hoisted_3$
|
|
11383
|
+
}, "清空", 8, _hoisted_3$9)]), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { "max-height": "360px" }, {
|
|
11134
11384
|
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.buckets, (bucket) => {
|
|
11135
11385
|
return (0, vue.openBlock)(), (0, vue.createBlock)(Bucket_default, {
|
|
11136
11386
|
key: `${__props.config.prefix}-${bucket.id}`,
|
|
@@ -11160,7 +11410,7 @@
|
|
|
11160
11410
|
var BucketTab_default = BucketTab_vue_vue_type_script_setup_true_lang_default;
|
|
11161
11411
|
//#endregion
|
|
11162
11412
|
//#region packages/editor/src/layouts/history-list/PageTab.vue?vue&type=script&setup=true&lang.ts
|
|
11163
|
-
var _hoisted_1$
|
|
11413
|
+
var _hoisted_1$62 = {
|
|
11164
11414
|
key: 0,
|
|
11165
11415
|
class: "m-editor-history-list-empty"
|
|
11166
11416
|
};
|
|
@@ -11168,7 +11418,7 @@
|
|
|
11168
11418
|
key: 0,
|
|
11169
11419
|
class: "m-editor-history-list-toolbar"
|
|
11170
11420
|
};
|
|
11171
|
-
var _hoisted_3$
|
|
11421
|
+
var _hoisted_3$8 = { class: "m-editor-history-list-ul" };
|
|
11172
11422
|
var PageTab_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
11173
11423
|
name: "MEditorHistoryListPageTab",
|
|
11174
11424
|
__name: "PageTab",
|
|
@@ -11216,12 +11466,12 @@
|
|
|
11216
11466
|
*/
|
|
11217
11467
|
const isInitial = (0, vue.computed)(() => props.list.every((g) => !g.applied));
|
|
11218
11468
|
return (_ctx, _cache) => {
|
|
11219
|
-
return !__props.list.length && !__props.marker ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11469
|
+
return !__props.list.length && !__props.marker ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$62, "暂无操作记录")) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [__props.list.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$19, [(0, vue.createElementVNode)("span", {
|
|
11220
11470
|
class: "m-editor-history-list-clear",
|
|
11221
11471
|
title: "清空当前页面的历史记录",
|
|
11222
11472
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("clear"))
|
|
11223
11473
|
}, "清空")])) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { "max-height": "360px" }, {
|
|
11224
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("ul", _hoisted_3$
|
|
11474
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("ul", _hoisted_3$8, [
|
|
11225
11475
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.list, (group) => {
|
|
11226
11476
|
return (0, vue.openBlock)(), (0, vue.createBlock)(GroupRow_default, {
|
|
11227
11477
|
key: rowKey(group),
|
|
@@ -11262,7 +11512,7 @@
|
|
|
11262
11512
|
* 所有数据基于 historyService 的 reactive state 派生,自动跟随历史变化刷新。
|
|
11263
11513
|
*/
|
|
11264
11514
|
var useHistoryList = () => {
|
|
11265
|
-
const {
|
|
11515
|
+
const { historyService } = useServices();
|
|
11266
11516
|
/**
|
|
11267
11517
|
* 折叠状态:key 形如 `pg-${组内首步 index}` / `ds-${id}-${组内首步 index}` / `cb-${id}-${组内首步 index}`。
|
|
11268
11518
|
* 用组内首步的稳定 index(而非展示位置)作为 key,确保历史数据更新后已展开的分组状态保持不变。
|
|
@@ -11272,9 +11522,9 @@
|
|
|
11272
11522
|
const toggleGroup = (key) => {
|
|
11273
11523
|
expanded[key] = expanded[key] === false;
|
|
11274
11524
|
};
|
|
11275
|
-
const pageGroups = (0, vue.computed)(() => historyService.
|
|
11276
|
-
const dataSourceGroups = (0, vue.computed)(() => historyService.
|
|
11277
|
-
const codeBlockGroups = (0, vue.computed)(() => historyService.
|
|
11525
|
+
const pageGroups = (0, vue.computed)(() => historyService.getPageHistoryGroups());
|
|
11526
|
+
const dataSourceGroups = (0, vue.computed)(() => historyService.getDataSourceHistoryGroups());
|
|
11527
|
+
const codeBlockGroups = (0, vue.computed)(() => historyService.getCodeBlockHistoryGroups());
|
|
11278
11528
|
/** 页面 tab 倒序展示(最新一组在最上面)。 */
|
|
11279
11529
|
const pageGroupsDisplay = (0, vue.computed)(() => pageGroups.value.slice().reverse());
|
|
11280
11530
|
/**
|
|
@@ -11408,10 +11658,7 @@
|
|
|
11408
11658
|
case "node":
|
|
11409
11659
|
if (!props.type) return [];
|
|
11410
11660
|
return removeStyleDisplayConfig(await propsService.getPropsConfig(props.type, { node: props.value }));
|
|
11411
|
-
case "data-source": return dataSourceService.getFormConfig(props.type || "base")
|
|
11412
|
-
...item,
|
|
11413
|
-
active: "fields"
|
|
11414
|
-
} : item);
|
|
11661
|
+
case "data-source": return dataSourceService.getFormConfig(props.type || "base");
|
|
11415
11662
|
case "code-block": return getCodeBlockFormConfig({
|
|
11416
11663
|
paramColConfig: codeBlockService.getParamsColConfig(),
|
|
11417
11664
|
isDataSource: () => Boolean(props.dataSourceType),
|
|
@@ -11501,13 +11748,13 @@
|
|
|
11501
11748
|
}));
|
|
11502
11749
|
//#endregion
|
|
11503
11750
|
//#region packages/editor/src/layouts/history-list/HistoryDiffDialog.vue?vue&type=script&setup=true&lang.ts
|
|
11504
|
-
var _hoisted_1$
|
|
11751
|
+
var _hoisted_1$61, _hoisted_2$18, _hoisted_3$7, _hoisted_4$6, _hoisted_5$3, _hoisted_6$2, _hoisted_7, HistoryDiffDialog_vue_vue_type_script_setup_true_lang_default;
|
|
11505
11752
|
var init_HistoryDiffDialog_vue_vue_type_script_setup_true_lang = __esmMin((() => {
|
|
11506
11753
|
init_lodash();
|
|
11507
11754
|
init_CompareForm();
|
|
11508
11755
|
init_use_services();
|
|
11509
11756
|
init_CodeEditor();
|
|
11510
|
-
_hoisted_1$
|
|
11757
|
+
_hoisted_1$61 = {
|
|
11511
11758
|
key: 0,
|
|
11512
11759
|
class: "m-editor-history-diff-dialog-body"
|
|
11513
11760
|
};
|
|
@@ -11515,9 +11762,9 @@
|
|
|
11515
11762
|
key: 0,
|
|
11516
11763
|
class: "m-editor-history-diff-dialog-notice"
|
|
11517
11764
|
};
|
|
11518
|
-
_hoisted_3$
|
|
11519
|
-
_hoisted_4$
|
|
11520
|
-
_hoisted_5$
|
|
11765
|
+
_hoisted_3$7 = { class: "m-editor-history-diff-dialog-header" };
|
|
11766
|
+
_hoisted_4$6 = { class: "m-editor-history-diff-dialog-target" };
|
|
11767
|
+
_hoisted_5$3 = { class: "m-editor-history-diff-dialog-controls" };
|
|
11521
11768
|
_hoisted_6$2 = { class: "m-editor-history-diff-dialog-legend" };
|
|
11522
11769
|
_hoisted_7 = {
|
|
11523
11770
|
key: 0,
|
|
@@ -11679,9 +11926,9 @@
|
|
|
11679
11926
|
default: (0, vue.withCtx)(() => [..._cache[12] || (_cache[12] = [(0, vue.createTextVNode)("关闭", -1)])]),
|
|
11680
11927
|
_: 1
|
|
11681
11928
|
}))]),
|
|
11682
|
-
default: (0, vue.withCtx)(() => [payload.value && visible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
11929
|
+
default: (0, vue.withCtx)(() => [payload.value && visible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$61, [
|
|
11683
11930
|
__props.onConfirm ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$18, "仅回滚有差异的字段")) : (0, vue.createCommentVNode)("v-if", true),
|
|
11684
|
-
(0, vue.createElementVNode)("div", _hoisted_3$
|
|
11931
|
+
(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), {
|
|
11685
11932
|
modelValue: viewMode.value,
|
|
11686
11933
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => viewMode.value = $event),
|
|
11687
11934
|
size: "small",
|
|
@@ -11934,21 +12181,21 @@
|
|
|
11934
12181
|
};
|
|
11935
12182
|
const buildPageDiffPayload = (index) => buildDiffPayload({
|
|
11936
12183
|
category: "node",
|
|
11937
|
-
groups: () => historyService.
|
|
12184
|
+
groups: () => historyService.getPageHistoryGroups(),
|
|
11938
12185
|
getCurrent: (id) => editorService.getNodeById(id),
|
|
11939
12186
|
resolveType: (n, o) => n.type || o.type || "",
|
|
11940
12187
|
resolveLabel: (n, o) => n.name || o.name || n.type || o.type || ""
|
|
11941
12188
|
}, index);
|
|
11942
12189
|
const buildDataSourceDiffPayload = (id, index) => buildDiffPayload({
|
|
11943
12190
|
category: "data-source",
|
|
11944
|
-
groups: () => historyService.
|
|
12191
|
+
groups: () => historyService.getDataSourceHistoryGroups(),
|
|
11945
12192
|
getCurrent: (id) => dataSourceService.getDataSourceById(`${id}`),
|
|
11946
12193
|
resolveType: (n, o) => n.type || o.type || "base",
|
|
11947
12194
|
resolveLabel: (n, o, id) => n.title || o.title || `${id}`
|
|
11948
12195
|
}, index, id);
|
|
11949
12196
|
const buildCodeBlockDiffPayload = (id, index) => buildDiffPayload({
|
|
11950
12197
|
category: "code-block",
|
|
11951
|
-
groups: () => historyService.
|
|
12198
|
+
groups: () => historyService.getCodeBlockHistoryGroups(),
|
|
11952
12199
|
getCurrent: (id) => codeBlockService.getCodeContentById(id),
|
|
11953
12200
|
resolveLabel: (n, o, id) => n.name || o.name || `${id}`
|
|
11954
12201
|
}, index, id);
|
|
@@ -11959,7 +12206,7 @@
|
|
|
11959
12206
|
* add(回滚即删除)即使目标已不在,也已达成「删除」目的,不视为失败。
|
|
11960
12207
|
*/
|
|
11961
12208
|
const isPageRevertTargetMissing = (index) => {
|
|
11962
|
-
const step = historyService.
|
|
12209
|
+
const step = historyService.getPageStepList()[index]?.step;
|
|
11963
12210
|
if (!step) return false;
|
|
11964
12211
|
if (step.opType === "update") return (step.diff ?? []).some((item) => {
|
|
11965
12212
|
const id = item.newSchema?.id ?? item.oldSchema?.id;
|
|
@@ -11970,12 +12217,12 @@
|
|
|
11970
12217
|
};
|
|
11971
12218
|
/** 数据源 update 步骤回滚时,对应数据源必须仍存在(已删除则无处写回旧值)。 */
|
|
11972
12219
|
const isDataSourceRevertTargetMissing = (id, index) => {
|
|
11973
|
-
const step = historyService.
|
|
12220
|
+
const step = historyService.getDataSourceStepList(id)[index]?.step;
|
|
11974
12221
|
return Boolean(step?.opType === "update" && !dataSourceService.getDataSourceById(`${id}`));
|
|
11975
12222
|
};
|
|
11976
12223
|
/** 代码块 update 步骤回滚时,对应代码块必须仍存在(已删除则无处写回旧值)。 */
|
|
11977
12224
|
const isCodeBlockRevertTargetMissing = (id, index) => {
|
|
11978
|
-
const step = historyService.
|
|
12225
|
+
const step = historyService.getCodeBlockStepList(id)[index]?.step;
|
|
11979
12226
|
return Boolean(step?.opType === "update" && !codeBlockService.getCodeContentById(id));
|
|
11980
12227
|
};
|
|
11981
12228
|
const onPageRevert = (index) => {
|
|
@@ -12087,7 +12334,7 @@
|
|
|
12087
12334
|
//#region packages/editor/src/layouts/history-list/HistoryListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
12088
12335
|
init_Icon();
|
|
12089
12336
|
init_use_services();
|
|
12090
|
-
var _hoisted_1$
|
|
12337
|
+
var _hoisted_1$60 = { class: "m-editor-history-list" };
|
|
12091
12338
|
var HistoryListPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
12092
12339
|
name: "MEditorHistoryListPanel",
|
|
12093
12340
|
__name: "HistoryListPanel",
|
|
@@ -12151,35 +12398,27 @@
|
|
|
12151
12398
|
* 当前活动页的「加载/初始」标记记录(设置 root 时生成),透传给 PageTab 的底部初始行展示。
|
|
12152
12399
|
* 基于 historyService 的 reactive state 派生,活动页切换或标记写入后自动刷新。
|
|
12153
12400
|
*/
|
|
12154
|
-
const pageMarker = (0, vue.computed)(() => historyService.
|
|
12155
|
-
/**
|
|
12156
|
-
* 各历史类型的展示名称(页面 / 数据源 / 代码块),由 historyService.state.stepNames 配置,
|
|
12157
|
-
* 业务方可通过 historyService.setStepName / registerStepType 覆盖。基于 reactive state 派生,配置变更后自动刷新。
|
|
12158
|
-
*/
|
|
12159
|
-
const pageName = (0, vue.computed)(() => historyService.getStepName("page"));
|
|
12160
|
-
const dataSourceName = (0, vue.computed)(() => historyService.getStepName("dataSource"));
|
|
12161
|
-
const codeBlockName = (0, vue.computed)(() => historyService.getStepName("codeBlock"));
|
|
12401
|
+
const pageMarker = (0, vue.computed)(() => historyService.getPageMarker());
|
|
12162
12402
|
/** 代码块 step 仅 update(前后 content 都存在)时可查看差异。 */
|
|
12163
12403
|
const isStepDiffable = (step) => Boolean(step.diff?.[0]?.oldSchema && step.diff?.[0]?.newSchema);
|
|
12164
12404
|
/**
|
|
12165
12405
|
* 数据源 / 代码块两类 bucket 历史的整体渲染配置:把 title / prefix 与各自的描述、
|
|
12166
12406
|
* 可差异、可回滚判定收敛为单一对象整体注入 BucketTab,组件内部按需读取。
|
|
12167
|
-
* title / 描述回退名取自可配置的展示名称,故用 computed 使其随 stepNames 变更刷新。
|
|
12168
12407
|
*/
|
|
12169
|
-
const dataSourceConfig =
|
|
12170
|
-
title:
|
|
12408
|
+
const dataSourceConfig = {
|
|
12409
|
+
title: "数据源",
|
|
12171
12410
|
prefix: "ds",
|
|
12172
|
-
describeStep: (step) => describeStep(step, (schema) => schema?.title,
|
|
12411
|
+
describeStep: (step) => describeStep(step, (schema) => schema?.title, "数据源"),
|
|
12173
12412
|
isStepDiffable,
|
|
12174
12413
|
isStepRevertable: isSingleDiffStepRevertable
|
|
12175
|
-
}
|
|
12176
|
-
const codeBlockConfig =
|
|
12177
|
-
title:
|
|
12414
|
+
};
|
|
12415
|
+
const codeBlockConfig = {
|
|
12416
|
+
title: "代码块",
|
|
12178
12417
|
prefix: "cb",
|
|
12179
|
-
describeStep: (step) => describeStep(step, (content) => content?.name,
|
|
12418
|
+
describeStep: (step) => describeStep(step, (content) => content?.name, "代码块"),
|
|
12180
12419
|
isStepDiffable,
|
|
12181
12420
|
isStepRevertable: isSingleDiffStepRevertable
|
|
12182
|
-
}
|
|
12421
|
+
};
|
|
12183
12422
|
/** 把"目标 step 索引"翻译成"目标 cursor"(已应用步骤数量)。 */
|
|
12184
12423
|
const indexToCursor = (index) => index + 1;
|
|
12185
12424
|
const onPageGoto = (index) => {
|
|
@@ -12192,7 +12431,7 @@
|
|
|
12192
12431
|
* - 该 step 涉及的节点都已不存在(如删除记录、被撤销的新增)时给出提示,不做选中。
|
|
12193
12432
|
*/
|
|
12194
12433
|
const onPageSelect = async (index) => {
|
|
12195
|
-
const step = historyService.
|
|
12434
|
+
const step = historyService.getPageStepList()[index]?.step;
|
|
12196
12435
|
if (!step) return;
|
|
12197
12436
|
const targetId = (step.diff ?? []).map((item) => item.newSchema?.id ?? item.oldSchema?.id).find((id) => id !== void 0 && id !== null && editorService.getNodeById(id, false));
|
|
12198
12437
|
if (targetId === void 0 || targetId === null) {
|
|
@@ -12242,19 +12481,19 @@
|
|
|
12242
12481
|
};
|
|
12243
12482
|
const onPageClear = async () => {
|
|
12244
12483
|
if (await confirmHistoryAction("确定清空当前页面的历史记录吗?清空后将无法撤销/重做之前的操作,本地保存的记录也会一并删除。")) {
|
|
12245
|
-
historyService.
|
|
12484
|
+
historyService.clearPage();
|
|
12246
12485
|
await syncIndexedDB();
|
|
12247
12486
|
}
|
|
12248
12487
|
};
|
|
12249
12488
|
const onDataSourceClear = async () => {
|
|
12250
12489
|
if (await confirmHistoryAction("确定清空数据源的历史记录吗?清空后将无法撤销/重做之前的操作,本地保存的记录也会一并删除。")) {
|
|
12251
|
-
historyService.
|
|
12490
|
+
historyService.clearDataSource();
|
|
12252
12491
|
await syncIndexedDB();
|
|
12253
12492
|
}
|
|
12254
12493
|
};
|
|
12255
12494
|
const onCodeBlockClear = async () => {
|
|
12256
12495
|
if (await confirmHistoryAction("确定清空代码块的历史记录吗?清空后将无法撤销/重做之前的操作,本地保存的记录也会一并删除。")) {
|
|
12257
|
-
historyService.
|
|
12496
|
+
historyService.clearCodeBlock();
|
|
12258
12497
|
await syncIndexedDB();
|
|
12259
12498
|
}
|
|
12260
12499
|
};
|
|
@@ -12282,7 +12521,7 @@
|
|
|
12282
12521
|
})]),
|
|
12283
12522
|
_: 1
|
|
12284
12523
|
})]),
|
|
12285
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
12524
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$60, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicTooltip), {
|
|
12286
12525
|
effect: "dark",
|
|
12287
12526
|
placement: "top",
|
|
12288
12527
|
content: "关闭"
|
|
@@ -12305,7 +12544,7 @@
|
|
|
12305
12544
|
default: (0, vue.withCtx)(() => [
|
|
12306
12545
|
((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)((0, vue.unref)(tabPaneComponent)?.component || "el-tab-pane"), (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(tabPaneComponent)?.props({
|
|
12307
12546
|
name: "page",
|
|
12308
|
-
label:
|
|
12547
|
+
label: `页面 (${(0, vue.unref)(pageGroups).length})`
|
|
12309
12548
|
}) || {})), {
|
|
12310
12549
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(PageTab_default, {
|
|
12311
12550
|
list: (0, vue.unref)(pageGroupsDisplay),
|
|
@@ -12330,10 +12569,10 @@
|
|
|
12330
12569
|
}, 16)),
|
|
12331
12570
|
!disabledDataSource.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)((0, vue.unref)(tabPaneComponent)?.component || "el-tab-pane"), (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(tabPaneComponent)?.props({
|
|
12332
12571
|
name: "data-source",
|
|
12333
|
-
label:
|
|
12572
|
+
label: `数据源 (${(0, vue.unref)(dataSourceGroups).length})`
|
|
12334
12573
|
}) || {})), {
|
|
12335
12574
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(BucketTab_default, {
|
|
12336
|
-
config: dataSourceConfig
|
|
12575
|
+
config: dataSourceConfig,
|
|
12337
12576
|
buckets: (0, vue.unref)(dataSourceGroupsByTarget),
|
|
12338
12577
|
expanded: (0, vue.unref)(expanded),
|
|
12339
12578
|
onToggle: (0, vue.unref)(toggleGroup),
|
|
@@ -12343,7 +12582,6 @@
|
|
|
12343
12582
|
onRevertStep: (0, vue.unref)(onDataSourceRevert),
|
|
12344
12583
|
onClear: onDataSourceClear
|
|
12345
12584
|
}, null, 8, [
|
|
12346
|
-
"config",
|
|
12347
12585
|
"buckets",
|
|
12348
12586
|
"expanded",
|
|
12349
12587
|
"onToggle",
|
|
@@ -12354,10 +12592,10 @@
|
|
|
12354
12592
|
}, 16)) : (0, vue.createCommentVNode)("v-if", true),
|
|
12355
12593
|
!disabledCodeBlock.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)((0, vue.unref)(tabPaneComponent)?.component || "el-tab-pane"), (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 1 }, (0, vue.unref)(tabPaneComponent)?.props({
|
|
12356
12594
|
name: "code-block",
|
|
12357
|
-
label:
|
|
12595
|
+
label: `代码块 (${(0, vue.unref)(codeBlockGroups).length})`
|
|
12358
12596
|
}) || {})), {
|
|
12359
12597
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(BucketTab_default, {
|
|
12360
|
-
config: codeBlockConfig
|
|
12598
|
+
config: codeBlockConfig,
|
|
12361
12599
|
buckets: (0, vue.unref)(codeBlockGroupsByTarget),
|
|
12362
12600
|
expanded: (0, vue.unref)(expanded),
|
|
12363
12601
|
onToggle: (0, vue.unref)(toggleGroup),
|
|
@@ -12367,7 +12605,6 @@
|
|
|
12367
12605
|
onRevertStep: (0, vue.unref)(onCodeBlockRevert),
|
|
12368
12606
|
onClear: onCodeBlockClear
|
|
12369
12607
|
}, null, 8, [
|
|
12370
|
-
"config",
|
|
12371
12608
|
"buckets",
|
|
12372
12609
|
"expanded",
|
|
12373
12610
|
"onToggle",
|
|
@@ -12398,7 +12635,7 @@
|
|
|
12398
12635
|
var HistoryListPanel_default = HistoryListPanel_vue_vue_type_script_setup_true_lang_default;
|
|
12399
12636
|
//#endregion
|
|
12400
12637
|
//#region packages/editor/src/layouts/NavMenuColumn.vue?vue&type=script&setup=true&lang.ts
|
|
12401
|
-
var _hoisted_1$
|
|
12638
|
+
var _hoisted_1$59 = { class: "m-editor-nav-menu-overflow-list" };
|
|
12402
12639
|
var NavMenuColumn_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
12403
12640
|
name: "MEditorNavMenuColumn",
|
|
12404
12641
|
__name: "NavMenuColumn",
|
|
@@ -12581,7 +12818,7 @@
|
|
|
12581
12818
|
"bg",
|
|
12582
12819
|
"type"
|
|
12583
12820
|
])], 512)]),
|
|
12584
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
12821
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$59, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(overflowItems.value, (item, index) => {
|
|
12585
12822
|
return (0, vue.openBlock)(), (0, vue.createBlock)(ToolButton_default, {
|
|
12586
12823
|
data: item,
|
|
12587
12824
|
key: `o-${index}`
|
|
@@ -12648,7 +12885,7 @@
|
|
|
12648
12885
|
className: "undo",
|
|
12649
12886
|
icon: (0, vue.markRaw)(_element_plus_icons_vue.Back),
|
|
12650
12887
|
tooltip: `后退(${ctrl}+z)`,
|
|
12651
|
-
disabled: () => !historyService.canUndo
|
|
12888
|
+
disabled: () => !historyService.state.canUndo,
|
|
12652
12889
|
handler: () => editorService.undo()
|
|
12653
12890
|
});
|
|
12654
12891
|
break;
|
|
@@ -12658,7 +12895,7 @@
|
|
|
12658
12895
|
className: "redo",
|
|
12659
12896
|
icon: (0, vue.markRaw)(_element_plus_icons_vue.Right),
|
|
12660
12897
|
tooltip: `前进(${ctrl}+Shift+z)`,
|
|
12661
|
-
disabled: () => !historyService.canRedo
|
|
12898
|
+
disabled: () => !historyService.state.canRedo,
|
|
12662
12899
|
handler: () => editorService.redo()
|
|
12663
12900
|
});
|
|
12664
12901
|
break;
|
|
@@ -12788,7 +13025,7 @@
|
|
|
12788
13025
|
init_Icon();
|
|
12789
13026
|
init_use_services();
|
|
12790
13027
|
init_CodeEditor();
|
|
12791
|
-
var _hoisted_1$
|
|
13028
|
+
var _hoisted_1$58 = { class: "m-editor-props-form-panel" };
|
|
12792
13029
|
var FormPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
12793
13030
|
name: "MEditorFormPanel",
|
|
12794
13031
|
__name: "FormPanel",
|
|
@@ -12850,7 +13087,7 @@
|
|
|
12850
13087
|
submit
|
|
12851
13088
|
});
|
|
12852
13089
|
return (_ctx, _cache) => {
|
|
12853
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13090
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$58, [
|
|
12854
13091
|
(0, vue.renderSlot)(_ctx.$slots, "props-form-panel-header"),
|
|
12855
13092
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), null, {
|
|
12856
13093
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MForm), {
|
|
@@ -12949,7 +13186,7 @@
|
|
|
12949
13186
|
//#region packages/editor/src/layouts/props-panel/PropsPanel.vue?vue&type=script&setup=true&lang.ts
|
|
12950
13187
|
init_Icon();
|
|
12951
13188
|
init_use_services();
|
|
12952
|
-
var _hoisted_1$
|
|
13189
|
+
var _hoisted_1$57 = {
|
|
12953
13190
|
ref: "propsPanel",
|
|
12954
13191
|
class: "m-editor-props-panel"
|
|
12955
13192
|
};
|
|
@@ -13052,7 +13289,7 @@
|
|
|
13052
13289
|
submit
|
|
13053
13290
|
});
|
|
13054
13291
|
return (_ctx, _cache) => {
|
|
13055
|
-
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
13292
|
+
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$57, [
|
|
13056
13293
|
(0, vue.renderSlot)(_ctx.$slots, "props-panel-header"),
|
|
13057
13294
|
(0, vue.createVNode)(FormPanel_default, {
|
|
13058
13295
|
ref: "propertyFormPanel",
|
|
@@ -13124,7 +13361,7 @@
|
|
|
13124
13361
|
//#region packages/editor/src/components/FloatingBox.vue?vue&type=script&setup=true&lang.ts
|
|
13125
13362
|
init_Icon();
|
|
13126
13363
|
init_use_services();
|
|
13127
|
-
var _hoisted_1$
|
|
13364
|
+
var _hoisted_1$56 = {
|
|
13128
13365
|
ref: "title",
|
|
13129
13366
|
class: "m-editor-float-box-title"
|
|
13130
13367
|
};
|
|
@@ -13160,6 +13397,11 @@
|
|
|
13160
13397
|
const props = __props;
|
|
13161
13398
|
const targetEl = (0, vue.useTemplateRef)("target");
|
|
13162
13399
|
const titleEl = (0, vue.useTemplateRef)("title");
|
|
13400
|
+
/**
|
|
13401
|
+
* 主题修饰类(来自最近的 `<MEditor>` / `<MForm>` 祖先 provide)。
|
|
13402
|
+
* 挂在 `Teleport` 出去的浮动面板根节点上,让主题级 CSS 变量在 portal 节点上也能命中。
|
|
13403
|
+
*/
|
|
13404
|
+
const themeClass = (0, _tmagic_design.useThemeClass)();
|
|
13163
13405
|
const zIndex = (0, _tmagic_design.useZIndex)();
|
|
13164
13406
|
const curZIndex = (0, vue.ref)(0);
|
|
13165
13407
|
const titleHeight = (0, vue.ref)(0);
|
|
@@ -13256,13 +13498,13 @@
|
|
|
13256
13498
|
to: "body"
|
|
13257
13499
|
}, [(0, vue.createElementVNode)("div", {
|
|
13258
13500
|
ref: "target",
|
|
13259
|
-
class: "m-editor-float-box",
|
|
13501
|
+
class: (0, vue.normalizeClass)(["m-editor-float-box", (0, vue.unref)(themeClass)]),
|
|
13260
13502
|
style: (0, vue.normalizeStyle)({
|
|
13261
13503
|
...style.value,
|
|
13262
13504
|
zIndex: curZIndex.value
|
|
13263
13505
|
}),
|
|
13264
13506
|
onMousedown: nextZIndex
|
|
13265
|
-
}, [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
13507
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_1$56, [(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), {
|
|
13266
13508
|
link: "",
|
|
13267
13509
|
size: "small",
|
|
13268
13510
|
onClick: closeHandler
|
|
@@ -13272,7 +13514,7 @@
|
|
|
13272
13514
|
})])], 512), (0, vue.createElementVNode)("div", {
|
|
13273
13515
|
class: "m-editor-float-box-body",
|
|
13274
13516
|
style: (0, vue.normalizeStyle)({ height: `${bodyHeight.value}px` })
|
|
13275
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "body")], 4)],
|
|
13517
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "body")], 4)], 38)])) : (0, vue.createCommentVNode)("v-if", true);
|
|
13276
13518
|
};
|
|
13277
13519
|
}
|
|
13278
13520
|
});
|
|
@@ -13285,13 +13527,13 @@
|
|
|
13285
13527
|
init_CodeEditor();
|
|
13286
13528
|
init_code_block();
|
|
13287
13529
|
init_config();
|
|
13288
|
-
var _hoisted_1$
|
|
13530
|
+
var _hoisted_1$55 = { style: {
|
|
13289
13531
|
"display": "flex",
|
|
13290
13532
|
"margin-bottom": "10px"
|
|
13291
13533
|
} };
|
|
13292
13534
|
var _hoisted_2$16 = { style: { "flex": "1" } };
|
|
13293
|
-
var _hoisted_3$
|
|
13294
|
-
var _hoisted_4$
|
|
13535
|
+
var _hoisted_3$6 = { style: { "flex": "1" } };
|
|
13536
|
+
var _hoisted_4$5 = { class: "dialog-footer" };
|
|
13295
13537
|
var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
13296
13538
|
name: "MEditorCodeBlockEditor",
|
|
13297
13539
|
__name: "CodeBlockEditor",
|
|
@@ -13471,7 +13713,7 @@
|
|
|
13471
13713
|
fullscreen: "",
|
|
13472
13714
|
"destroy-on-close": ""
|
|
13473
13715
|
}, {
|
|
13474
|
-
footer: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_4$
|
|
13716
|
+
footer: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_4$5, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
13475
13717
|
size: "small",
|
|
13476
13718
|
onClick: _cache[4] || (_cache[4] = ($event) => difVisible.value = false)
|
|
13477
13719
|
}, {
|
|
@@ -13485,13 +13727,13 @@
|
|
|
13485
13727
|
default: (0, vue.withCtx)(() => [..._cache[10] || (_cache[10] = [(0, vue.createTextVNode)("确定", -1)])]),
|
|
13486
13728
|
_: 1
|
|
13487
13729
|
})])]),
|
|
13488
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
13730
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_1$55, [(0, vue.createElementVNode)("div", _hoisted_2$16, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicTag), {
|
|
13489
13731
|
size: "small",
|
|
13490
13732
|
type: "danger"
|
|
13491
13733
|
}, {
|
|
13492
13734
|
default: (0, vue.withCtx)(() => [..._cache[7] || (_cache[7] = [(0, vue.createTextVNode)("修改前", -1)])]),
|
|
13493
13735
|
_: 1
|
|
13494
|
-
})]), (0, vue.createElementVNode)("div", _hoisted_3$
|
|
13736
|
+
})]), (0, vue.createElementVNode)("div", _hoisted_3$6, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicTag), {
|
|
13495
13737
|
size: "small",
|
|
13496
13738
|
type: "success"
|
|
13497
13739
|
}, {
|
|
@@ -13548,6 +13790,13 @@
|
|
|
13548
13790
|
const buttonRefs = (0, vue.useTemplateRef)("buttons");
|
|
13549
13791
|
const subMenuRef = (0, vue.useTemplateRef)("subMenu");
|
|
13550
13792
|
const visible = (0, vue.ref)(false);
|
|
13793
|
+
/**
|
|
13794
|
+
* 主题修饰类(来自最近的 `<MEditor>` / `<MForm>` 祖先 provide)。
|
|
13795
|
+
* - 顶层 `ContentMenu` 渲染在编辑器子树中,加上去是冗余但无害;
|
|
13796
|
+
* - 子菜单(递归 `<content-menu :is-sub-menu="true">` 被 `<teleport to="body">` 送到 body)
|
|
13797
|
+
* 不在编辑器子树中,必须显式挂上主题类,主题级 CSS 变量才能命中。
|
|
13798
|
+
*/
|
|
13799
|
+
const themeClass = (0, _tmagic_design.useThemeClass)();
|
|
13551
13800
|
const subMenuData = (0, vue.ref)([]);
|
|
13552
13801
|
const zIndex = (0, _tmagic_design.useZIndex)();
|
|
13553
13802
|
const curZIndex = (0, vue.ref)(0);
|
|
@@ -13637,8 +13886,8 @@
|
|
|
13637
13886
|
persisted: ""
|
|
13638
13887
|
}, {
|
|
13639
13888
|
default: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createElementVNode)("div", {
|
|
13640
|
-
class: "magic-editor-content-menu",
|
|
13641
13889
|
ref: "menu",
|
|
13890
|
+
class: (0, vue.normalizeClass)(["magic-editor-content-menu", (0, vue.unref)(themeClass)]),
|
|
13642
13891
|
style: (0, vue.normalizeStyle)(menuStyle.value),
|
|
13643
13892
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => mouseenterHandler()),
|
|
13644
13893
|
onContextmenu: _cache[1] || (_cache[1] = (0, vue.withModifiers)(() => {}, ["prevent"]))
|
|
@@ -13669,7 +13918,7 @@
|
|
|
13669
13918
|
"is-sub-menu": true,
|
|
13670
13919
|
onHide: hide
|
|
13671
13920
|
}, null, 8, ["active", "menu-data"])) : (0, vue.createCommentVNode)("v-if", true)]))
|
|
13672
|
-
],
|
|
13921
|
+
], 38), [[vue.vShow, visible.value]])]),
|
|
13673
13922
|
_: 3
|
|
13674
13923
|
});
|
|
13675
13924
|
};
|
|
@@ -13720,7 +13969,7 @@
|
|
|
13720
13969
|
//#endregion
|
|
13721
13970
|
//#region packages/editor/src/components/TreeNode.vue?vue&type=script&setup=true&lang.ts
|
|
13722
13971
|
init_Icon();
|
|
13723
|
-
var _hoisted_1$
|
|
13972
|
+
var _hoisted_1$54 = [
|
|
13724
13973
|
"draggable",
|
|
13725
13974
|
"data-node-id",
|
|
13726
13975
|
"data-parent-id",
|
|
@@ -13728,8 +13977,8 @@
|
|
|
13728
13977
|
"data-is-container"
|
|
13729
13978
|
];
|
|
13730
13979
|
var _hoisted_2$15 = { class: "tree-node-label" };
|
|
13731
|
-
var _hoisted_3$
|
|
13732
|
-
var _hoisted_4$
|
|
13980
|
+
var _hoisted_3$5 = { class: "tree-node-tool" };
|
|
13981
|
+
var _hoisted_4$4 = {
|
|
13733
13982
|
key: 0,
|
|
13734
13983
|
class: "m-editor-tree-node-children"
|
|
13735
13984
|
};
|
|
@@ -13823,7 +14072,7 @@
|
|
|
13823
14072
|
class: "tree-node-content",
|
|
13824
14073
|
onClick: nodeClickHandler,
|
|
13825
14074
|
onDblclick: nodeDblclickHandler
|
|
13826
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-content", { data: __props.data }, () => [(0, vue.createElementVNode)("div", _hoisted_2$15, [(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$
|
|
14075
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "tree-node-content", { data: __props.data }, () => [(0, vue.createElementVNode)("div", _hoisted_2$15, [(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) => {
|
|
13827
14076
|
return (0, vue.openBlock)(), (0, vue.createBlock)(_component_TreeNode, {
|
|
13828
14077
|
key: item.id,
|
|
13829
14078
|
data: item,
|
|
@@ -13845,7 +14094,7 @@
|
|
|
13845
14094
|
"indent",
|
|
13846
14095
|
"is-expandable"
|
|
13847
14096
|
]);
|
|
13848
|
-
}), 128))])) : (0, vue.createCommentVNode)("v-if", true)], 40, _hoisted_1$
|
|
14097
|
+
}), 128))])) : (0, vue.createCommentVNode)("v-if", true)], 40, _hoisted_1$54)), [[vue.vShow, visible.value]]);
|
|
13849
14098
|
};
|
|
13850
14099
|
}
|
|
13851
14100
|
});
|
|
@@ -13854,7 +14103,7 @@
|
|
|
13854
14103
|
var TreeNode_default = TreeNode_vue_vue_type_script_setup_true_lang_default;
|
|
13855
14104
|
//#endregion
|
|
13856
14105
|
//#region packages/editor/src/components/Tree.vue?vue&type=script&setup=true&lang.ts
|
|
13857
|
-
var _hoisted_1$
|
|
14106
|
+
var _hoisted_1$53 = {
|
|
13858
14107
|
key: 1,
|
|
13859
14108
|
class: "m-editor-tree-empty"
|
|
13860
14109
|
};
|
|
@@ -13909,7 +14158,7 @@
|
|
|
13909
14158
|
"node-status-map",
|
|
13910
14159
|
"is-expandable"
|
|
13911
14160
|
]);
|
|
13912
|
-
}), 128)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
14161
|
+
}), 128)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$53, [(0, vue.createElementVNode)("p", null, (0, vue.toDisplayString)(__props.emptyText), 1)]))], 32);
|
|
13913
14162
|
};
|
|
13914
14163
|
}
|
|
13915
14164
|
});
|
|
@@ -14132,7 +14381,7 @@
|
|
|
14132
14381
|
//#endregion
|
|
14133
14382
|
//#region packages/editor/src/layouts/sidebar/code-block/CodeBlockListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
14134
14383
|
init_use_services();
|
|
14135
|
-
var _hoisted_1$
|
|
14384
|
+
var _hoisted_1$52 = { class: "search-wrapper" };
|
|
14136
14385
|
var CodeBlockListPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
14137
14386
|
name: "MEditorCodeBlockListPanel",
|
|
14138
14387
|
__name: "CodeBlockListPanel",
|
|
@@ -14169,7 +14418,7 @@
|
|
|
14169
14418
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [
|
|
14170
14419
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
14171
14420
|
default: (0, vue.withCtx)(() => [
|
|
14172
|
-
(0, vue.renderSlot)(_ctx.$slots, "code-block-panel-header", {}, () => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
14421
|
+
(0, vue.renderSlot)(_ctx.$slots, "code-block-panel-header", {}, () => [(0, vue.createElementVNode)("div", _hoisted_1$52, [
|
|
14173
14422
|
(0, vue.createVNode)(SearchInput_default, { onSearch: filterTextChangeHandler }),
|
|
14174
14423
|
editable.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
14175
14424
|
key: 0,
|
|
@@ -14638,7 +14887,7 @@
|
|
|
14638
14887
|
//#region packages/editor/src/layouts/sidebar/data-source/DataSourceListPanel.vue?vue&type=script&setup=true&lang.ts
|
|
14639
14888
|
init_lodash();
|
|
14640
14889
|
init_use_services();
|
|
14641
|
-
var _hoisted_1$
|
|
14890
|
+
var _hoisted_1$51 = { class: "search-wrapper" };
|
|
14642
14891
|
var DataSourceListPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
14643
14892
|
name: "MEditorDataSourceListPanel",
|
|
14644
14893
|
__name: "DataSourceListPanel",
|
|
@@ -14719,7 +14968,7 @@
|
|
|
14719
14968
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, null, [
|
|
14720
14969
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
14721
14970
|
default: (0, vue.withCtx)(() => [
|
|
14722
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
14971
|
+
(0, vue.createElementVNode)("div", _hoisted_1$51, [
|
|
14723
14972
|
(0, vue.createVNode)(SearchInput_default, { onSearch: filterTextChangeHandler }),
|
|
14724
14973
|
(0, vue.unref)(editable) ? ((0, vue.openBlock)(), (0, vue.createBlock)(DataSourceAddButton_default, {
|
|
14725
14974
|
key: 0,
|
|
@@ -14784,7 +15033,7 @@
|
|
|
14784
15033
|
var DataSourceListPanel_default = DataSourceListPanel_vue_vue_type_script_setup_true_lang_default;
|
|
14785
15034
|
//#endregion
|
|
14786
15035
|
//#region packages/editor/src/icons/FolderMinusIcon.vue?vue&type=script&setup=true&lang.ts
|
|
14787
|
-
var _hoisted_1$
|
|
15036
|
+
var _hoisted_1$50 = {
|
|
14788
15037
|
width: "1em",
|
|
14789
15038
|
height: "1em",
|
|
14790
15039
|
viewBox: "0 0 16 16",
|
|
@@ -14797,7 +15046,7 @@
|
|
|
14797
15046
|
__name: "FolderMinusIcon",
|
|
14798
15047
|
setup(__props) {
|
|
14799
15048
|
return (_ctx, _cache) => {
|
|
14800
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
15049
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$50, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", {
|
|
14801
15050
|
"fill-rule": "evenodd",
|
|
14802
15051
|
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"
|
|
14803
15052
|
}, null, -1), (0, vue.createElementVNode)("path", {
|
|
@@ -15581,7 +15830,7 @@
|
|
|
15581
15830
|
init_Icon();
|
|
15582
15831
|
init_use_services();
|
|
15583
15832
|
init_type();
|
|
15584
|
-
var _hoisted_1$
|
|
15833
|
+
var _hoisted_1$49 = ["onClick", "onDragstart"];
|
|
15585
15834
|
var _hoisted_2$14 = ["title"];
|
|
15586
15835
|
var ComponentListPanel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
15587
15836
|
name: "MEditorComponentListPanel",
|
|
@@ -15677,7 +15926,7 @@
|
|
|
15677
15926
|
}, {
|
|
15678
15927
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: item.icon }, null, 8, ["icon"])]),
|
|
15679
15928
|
_: 2
|
|
15680
|
-
}, 1032, ["disabled", "content"]), (0, vue.createElementVNode)("span", { title: item.text }, (0, vue.toDisplayString)(item.text), 9, _hoisted_2$14)])], 40, _hoisted_1$
|
|
15929
|
+
}, 1032, ["disabled", "content"]), (0, vue.createElementVNode)("span", { title: item.text }, (0, vue.toDisplayString)(item.text), 9, _hoisted_2$14)])], 40, _hoisted_1$49);
|
|
15681
15930
|
}), 128))]),
|
|
15682
15931
|
_: 2
|
|
15683
15932
|
}, 1032, ["name"])) : (0, vue.createCommentVNode)("v-if", true)], 64);
|
|
@@ -15698,21 +15947,21 @@
|
|
|
15698
15947
|
init_Icon();
|
|
15699
15948
|
init_use_services();
|
|
15700
15949
|
init_type();
|
|
15701
|
-
var _hoisted_1$
|
|
15950
|
+
var _hoisted_1$48 = {
|
|
15702
15951
|
key: 0,
|
|
15703
15952
|
class: "m-editor-sidebar"
|
|
15704
15953
|
};
|
|
15705
15954
|
var _hoisted_2$13 = { class: "m-editor-sidebar-header" };
|
|
15706
|
-
var _hoisted_3$
|
|
15955
|
+
var _hoisted_3$4 = [
|
|
15707
15956
|
"draggable",
|
|
15708
15957
|
"onClick",
|
|
15709
15958
|
"onDragend"
|
|
15710
15959
|
];
|
|
15711
|
-
var _hoisted_4$
|
|
15960
|
+
var _hoisted_4$3 = {
|
|
15712
15961
|
key: 1,
|
|
15713
15962
|
class: "magic-editor-tab-panel-title"
|
|
15714
15963
|
};
|
|
15715
|
-
var _hoisted_5$
|
|
15964
|
+
var _hoisted_5$2 = {
|
|
15716
15965
|
key: 0,
|
|
15717
15966
|
class: "m-editor-sidebar-tips"
|
|
15718
15967
|
};
|
|
@@ -15851,7 +16100,7 @@
|
|
|
15851
16100
|
};
|
|
15852
16101
|
__expose({ activeTabName });
|
|
15853
16102
|
return (_ctx, _cache) => {
|
|
15854
|
-
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$
|
|
16103
|
+
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, [
|
|
15855
16104
|
(0, vue.createElementVNode)("div", _hoisted_2$13, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sideBarItems.value, (config, index) => {
|
|
15856
16105
|
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
15857
16106
|
class: (0, vue.normalizeClass)(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
@@ -15864,7 +16113,7 @@
|
|
|
15864
16113
|
}, [config.icon ? ((0, vue.openBlock)(), (0, vue.createBlock)(Icon_default, {
|
|
15865
16114
|
key: 0,
|
|
15866
16115
|
icon: config.icon
|
|
15867
|
-
}, null, 8, ["icon"])) : (0, vue.createCommentVNode)("v-if", true), config.text ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$
|
|
16116
|
+
}, 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]]);
|
|
15868
16117
|
}), 128))]),
|
|
15869
16118
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(sideBarItems.value, (config, index) => {
|
|
15870
16119
|
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -15974,7 +16223,7 @@
|
|
|
15974
16223
|
`${index}`
|
|
15975
16224
|
].includes(activeTabName.value)]]);
|
|
15976
16225
|
}), 128)),
|
|
15977
|
-
tipsBarVisible.value && collecting.value && taskLength.value > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$
|
|
16226
|
+
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, {
|
|
15978
16227
|
icon: (0, vue.unref)(_element_plus_icons_vue.Close),
|
|
15979
16228
|
class: "close-icon",
|
|
15980
16229
|
onClick: _cache[1] || (_cache[1] = (0, vue.withModifiers)(($event) => tipsBarVisible.value = false, ["stop"]))
|
|
@@ -16087,7 +16336,7 @@
|
|
|
16087
16336
|
var ScrollBar_default = ScrollBar_vue_vue_type_script_setup_true_lang_default;
|
|
16088
16337
|
//#endregion
|
|
16089
16338
|
//#region packages/editor/src/components/ScrollViewer.vue?vue&type=script&setup=true&lang.ts
|
|
16090
|
-
var _hoisted_1$
|
|
16339
|
+
var _hoisted_1$47 = {
|
|
16091
16340
|
class: "m-editor-scroll-viewer-container",
|
|
16092
16341
|
ref: "container"
|
|
16093
16342
|
};
|
|
@@ -16151,7 +16400,7 @@
|
|
|
16151
16400
|
};
|
|
16152
16401
|
__expose({ container: containerEl });
|
|
16153
16402
|
return (_ctx, _cache) => {
|
|
16154
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
16403
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$47, [
|
|
16155
16404
|
(0, vue.createElementVNode)("div", {
|
|
16156
16405
|
ref: "target",
|
|
16157
16406
|
style: (0, vue.normalizeStyle)(style.value)
|
|
@@ -16273,7 +16522,7 @@
|
|
|
16273
16522
|
//#endregion
|
|
16274
16523
|
//#region packages/editor/src/layouts/workspace/viewer/StageOverlay.vue?vue&type=script&setup=true&lang.ts
|
|
16275
16524
|
init_use_services();
|
|
16276
|
-
var _hoisted_1$
|
|
16525
|
+
var _hoisted_1$46 = {
|
|
16277
16526
|
key: 0,
|
|
16278
16527
|
class: "m-editor-stage-overlay"
|
|
16279
16528
|
};
|
|
@@ -16319,7 +16568,7 @@
|
|
|
16319
16568
|
stageOverlayService.closeOverlay();
|
|
16320
16569
|
};
|
|
16321
16570
|
return (_ctx, _cache) => {
|
|
16322
|
-
return stageOverlayVisible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
16571
|
+
return stageOverlayVisible.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$46, [(0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicIcon), {
|
|
16323
16572
|
class: "m-editor-stage-overlay-close",
|
|
16324
16573
|
size: "30",
|
|
16325
16574
|
onClick: closeOverlayHandler
|
|
@@ -16355,7 +16604,7 @@
|
|
|
16355
16604
|
var StageOverlay_default = StageOverlay_vue_vue_type_script_setup_true_lang_default;
|
|
16356
16605
|
//#endregion
|
|
16357
16606
|
//#region packages/editor/src/icons/CenterIcon.vue?vue&type=script&setup=true&lang.ts
|
|
16358
|
-
var _hoisted_1$
|
|
16607
|
+
var _hoisted_1$45 = {
|
|
16359
16608
|
viewBox: "0 0 24 24",
|
|
16360
16609
|
fill: "none",
|
|
16361
16610
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -16365,7 +16614,7 @@
|
|
|
16365
16614
|
__name: "CenterIcon",
|
|
16366
16615
|
setup(__props) {
|
|
16367
16616
|
return (_ctx, _cache) => {
|
|
16368
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
16617
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$45, [..._cache[0] || (_cache[0] = [
|
|
16369
16618
|
(0, vue.createElementVNode)("path", {
|
|
16370
16619
|
"fill-rule": "evenodd",
|
|
16371
16620
|
"clip-rule": "evenodd",
|
|
@@ -16797,7 +17046,7 @@
|
|
|
16797
17046
|
//#endregion
|
|
16798
17047
|
//#region packages/editor/src/layouts/workspace/Breadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
16799
17048
|
init_use_services();
|
|
16800
|
-
var _hoisted_1$
|
|
17049
|
+
var _hoisted_1$44 = {
|
|
16801
17050
|
key: 0,
|
|
16802
17051
|
class: "m-editor-breadcrumb-ellipsis"
|
|
16803
17052
|
};
|
|
@@ -16883,7 +17132,7 @@
|
|
|
16883
17132
|
ref: containerRef,
|
|
16884
17133
|
class: "m-editor-breadcrumb"
|
|
16885
17134
|
}, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(displayPath.value, (item, index) => {
|
|
16886
|
-
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$
|
|
17135
|
+
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), {
|
|
16887
17136
|
key: 1,
|
|
16888
17137
|
content: item.name,
|
|
16889
17138
|
placement: "top",
|
|
@@ -16910,7 +17159,7 @@
|
|
|
16910
17159
|
//#endregion
|
|
16911
17160
|
//#region packages/editor/src/layouts/workspace/Workspace.vue?vue&type=script&setup=true&lang.ts
|
|
16912
17161
|
init_use_services();
|
|
16913
|
-
var _hoisted_1$
|
|
17162
|
+
var _hoisted_1$43 = { class: "m-editor-workspace" };
|
|
16914
17163
|
var Workspace_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
16915
17164
|
name: "MEditorWorkspace",
|
|
16916
17165
|
__name: "Workspace",
|
|
@@ -16927,7 +17176,7 @@
|
|
|
16927
17176
|
const { editorService } = useServices();
|
|
16928
17177
|
const page = (0, vue.computed)(() => editorService.get("page"));
|
|
16929
17178
|
return (_ctx, _cache) => {
|
|
16930
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
17179
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$43, [
|
|
16931
17180
|
(0, vue.createVNode)(Breadcrumb_default),
|
|
16932
17181
|
(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, {
|
|
16933
17182
|
key: 0,
|
|
@@ -17068,16 +17317,13 @@
|
|
|
17068
17317
|
...codeConfigProcessed
|
|
17069
17318
|
};
|
|
17070
17319
|
const newContent = cloneDeep$1(codeDsl[id]);
|
|
17071
|
-
if (!doNotPushHistory) {
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17078
|
-
});
|
|
17079
|
-
this.lastPushedHistoryId = (step ? history_default.push("codeBlock", step, id) : null)?.uuid ?? null;
|
|
17080
|
-
}
|
|
17320
|
+
if (!doNotPushHistory) this.lastPushedHistoryId = history_default.pushCodeBlock(id, {
|
|
17321
|
+
oldContent,
|
|
17322
|
+
newContent,
|
|
17323
|
+
changeRecords,
|
|
17324
|
+
historyDescription,
|
|
17325
|
+
source: historySource
|
|
17326
|
+
})?.uuid ?? null;
|
|
17081
17327
|
this.emit("addOrUpdate", id, codeDsl[id]);
|
|
17082
17328
|
}
|
|
17083
17329
|
/**
|
|
@@ -17162,16 +17408,15 @@
|
|
|
17162
17408
|
if (!currentDsl) return;
|
|
17163
17409
|
this.lastDeletedHistoryIds = [];
|
|
17164
17410
|
codeIds.forEach((id) => {
|
|
17165
|
-
const
|
|
17411
|
+
const oldContent = currentDsl[id] ? cloneDeep$1(currentDsl[id]) : null;
|
|
17166
17412
|
delete currentDsl[id];
|
|
17167
|
-
if (
|
|
17168
|
-
const
|
|
17169
|
-
|
|
17170
|
-
|
|
17413
|
+
if (oldContent && !doNotPushHistory) {
|
|
17414
|
+
const uuid = history_default.pushCodeBlock(id, {
|
|
17415
|
+
oldContent,
|
|
17416
|
+
newContent: null,
|
|
17171
17417
|
historyDescription,
|
|
17172
17418
|
source: historySource
|
|
17173
|
-
});
|
|
17174
|
-
const uuid = step ? history_default.push("codeBlock", step, id)?.uuid : void 0;
|
|
17419
|
+
})?.uuid;
|
|
17175
17420
|
if (uuid) this.lastDeletedHistoryIds.push(uuid);
|
|
17176
17421
|
}
|
|
17177
17422
|
this.emit("remove", id);
|
|
@@ -17232,7 +17477,7 @@
|
|
|
17232
17477
|
* @returns 撤销的 step;栈不存在或已无可撤销时返回 null
|
|
17233
17478
|
*/
|
|
17234
17479
|
async undo(id) {
|
|
17235
|
-
const step = history_default.
|
|
17480
|
+
const step = history_default.undoCodeBlock(id);
|
|
17236
17481
|
if (!step) return null;
|
|
17237
17482
|
await this.applyHistoryStep(step, true);
|
|
17238
17483
|
return step;
|
|
@@ -17243,18 +17488,18 @@
|
|
|
17243
17488
|
* @returns 重做的 step;栈不存在或已无可重做时返回 null
|
|
17244
17489
|
*/
|
|
17245
17490
|
async redo(id) {
|
|
17246
|
-
const step = history_default.
|
|
17491
|
+
const step = history_default.redoCodeBlock(id);
|
|
17247
17492
|
if (!step) return null;
|
|
17248
17493
|
await this.applyHistoryStep(step, false);
|
|
17249
17494
|
return step;
|
|
17250
17495
|
}
|
|
17251
17496
|
/** 是否可对指定代码块撤销。 */
|
|
17252
17497
|
canUndo(id) {
|
|
17253
|
-
return history_default.
|
|
17498
|
+
return history_default.canUndoCodeBlock(id);
|
|
17254
17499
|
}
|
|
17255
17500
|
/** 是否可对指定代码块重做。 */
|
|
17256
17501
|
canRedo(id) {
|
|
17257
|
-
return history_default.
|
|
17502
|
+
return history_default.canRedoCodeBlock(id);
|
|
17258
17503
|
}
|
|
17259
17504
|
/**
|
|
17260
17505
|
* 跳转指定代码块的历史栈到目标游标。语义同 editor.gotoPageStep。
|
|
@@ -17264,7 +17509,7 @@
|
|
|
17264
17509
|
* @returns 实际移动到的最终游标位置
|
|
17265
17510
|
*/
|
|
17266
17511
|
async goto(id, targetCursor) {
|
|
17267
|
-
let cursor = history_default.
|
|
17512
|
+
let cursor = history_default.getCodeBlockCursor(id);
|
|
17268
17513
|
const target = Math.max(0, targetCursor);
|
|
17269
17514
|
while (cursor > target) {
|
|
17270
17515
|
if (!await this.undo(id)) break;
|
|
@@ -17287,11 +17532,11 @@
|
|
|
17287
17532
|
* @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
|
|
17288
17533
|
*/
|
|
17289
17534
|
async revert(id, index) {
|
|
17290
|
-
const entry = history_default.
|
|
17535
|
+
const entry = history_default.getCodeBlockStepList(id)[index];
|
|
17291
17536
|
if (!entry?.applied) return null;
|
|
17292
17537
|
const { oldSchema, newSchema, changeRecords } = entry.step.diff?.[0] ?? {};
|
|
17293
17538
|
if (oldSchema && newSchema && !changeRecords?.length) return null;
|
|
17294
|
-
const description = `回滚 #${index + 1}: ${describeRevertStep(entry.step.
|
|
17539
|
+
const description = `回滚 #${index + 1}: ${describeRevertStep(entry.step.id, entry.step.diff?.[0], (s) => s.name)}`;
|
|
17295
17540
|
return await this.applyRevertStep(entry.step, description);
|
|
17296
17541
|
}
|
|
17297
17542
|
/**
|
|
@@ -17304,7 +17549,7 @@
|
|
|
17304
17549
|
async revertById(uuids) {
|
|
17305
17550
|
const results = [];
|
|
17306
17551
|
for (const uuid of uuids) {
|
|
17307
|
-
const location = history_default.
|
|
17552
|
+
const location = history_default.findCodeBlockStepLocationByUuid(uuid);
|
|
17308
17553
|
results.push(location ? await this.revert(location.id, location.index) : null);
|
|
17309
17554
|
}
|
|
17310
17555
|
return results;
|
|
@@ -17374,21 +17619,21 @@
|
|
|
17374
17619
|
* 差异仅在于通过公开的 setCodeDslByIdSync / deleteCodeDslByIds 触发 push。
|
|
17375
17620
|
*/
|
|
17376
17621
|
async applyRevertStep(step, historyDescription) {
|
|
17377
|
-
const { id } = step
|
|
17622
|
+
const { id } = step;
|
|
17378
17623
|
const { oldSchema, newSchema, changeRecords } = step.diff?.[0] ?? {};
|
|
17379
17624
|
if (!oldSchema && newSchema) {
|
|
17380
17625
|
await this.deleteCodeDslByIds([id], {
|
|
17381
17626
|
historyDescription,
|
|
17382
17627
|
historySource: "rollback"
|
|
17383
17628
|
});
|
|
17384
|
-
return history_default.
|
|
17629
|
+
return history_default.getCodeBlockStepList(id).slice(-1)[0]?.step ?? null;
|
|
17385
17630
|
}
|
|
17386
17631
|
if (oldSchema && !newSchema) {
|
|
17387
17632
|
this.setCodeDslByIdSync(id, cloneDeep$1(oldSchema), true, {
|
|
17388
17633
|
historyDescription,
|
|
17389
17634
|
historySource: "rollback"
|
|
17390
17635
|
});
|
|
17391
|
-
return history_default.
|
|
17636
|
+
return history_default.getCodeBlockStepList(id).slice(-1)[0]?.step ?? null;
|
|
17392
17637
|
}
|
|
17393
17638
|
if (!oldSchema || !newSchema) return null;
|
|
17394
17639
|
if (changeRecords?.length) {
|
|
@@ -17409,13 +17654,13 @@
|
|
|
17409
17654
|
historyDescription,
|
|
17410
17655
|
historySource: "rollback"
|
|
17411
17656
|
});
|
|
17412
|
-
return history_default.
|
|
17657
|
+
return history_default.getCodeBlockStepList(id).slice(-1)[0]?.step ?? null;
|
|
17413
17658
|
}
|
|
17414
17659
|
this.setCodeDslByIdSync(id, cloneDeep$1(oldSchema), true, {
|
|
17415
17660
|
historyDescription,
|
|
17416
17661
|
historySource: "rollback"
|
|
17417
17662
|
});
|
|
17418
|
-
return history_default.
|
|
17663
|
+
return history_default.getCodeBlockStepList(id).slice(-1)[0]?.step ?? null;
|
|
17419
17664
|
}
|
|
17420
17665
|
/**
|
|
17421
17666
|
* 把一条历史 step 应用到当前代码块服务上。
|
|
@@ -17432,7 +17677,7 @@
|
|
|
17432
17677
|
* @param reverse true=撤销,false=重做
|
|
17433
17678
|
*/
|
|
17434
17679
|
async applyHistoryStep(step, reverse) {
|
|
17435
|
-
const { id } = step
|
|
17680
|
+
const { id } = step;
|
|
17436
17681
|
const { oldSchema, newSchema, changeRecords } = step.diff?.[0] ?? {};
|
|
17437
17682
|
if (!oldSchema && newSchema) {
|
|
17438
17683
|
if (reverse) await this.deleteCodeDslByIds([id], { doNotPushHistory: true });
|
|
@@ -17581,15 +17826,12 @@
|
|
|
17581
17826
|
id: config.id && !this.getDataSourceById(config.id) ? config.id : this.createId()
|
|
17582
17827
|
};
|
|
17583
17828
|
this.get("dataSources").push(newConfig);
|
|
17584
|
-
if (!doNotPushHistory) {
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
});
|
|
17591
|
-
this.lastPushedHistoryId = (step ? history_default.push("dataSource", step, newConfig.id) : null)?.uuid ?? null;
|
|
17592
|
-
}
|
|
17829
|
+
if (!doNotPushHistory) this.lastPushedHistoryId = history_default.pushDataSource(newConfig.id, {
|
|
17830
|
+
oldSchema: null,
|
|
17831
|
+
newSchema: newConfig,
|
|
17832
|
+
historyDescription,
|
|
17833
|
+
source: historySource
|
|
17834
|
+
})?.uuid ?? null;
|
|
17593
17835
|
this.emit("add", newConfig);
|
|
17594
17836
|
return newConfig;
|
|
17595
17837
|
}
|
|
@@ -17607,16 +17849,13 @@
|
|
|
17607
17849
|
const oldConfig = dataSources[index];
|
|
17608
17850
|
const newConfig = cloneDeep$1(config);
|
|
17609
17851
|
dataSources[index] = newConfig;
|
|
17610
|
-
if (!doNotPushHistory) {
|
|
17611
|
-
|
|
17612
|
-
|
|
17613
|
-
|
|
17614
|
-
|
|
17615
|
-
|
|
17616
|
-
|
|
17617
|
-
});
|
|
17618
|
-
this.lastPushedHistoryId = (step ? history_default.push("dataSource", step, newConfig.id) : null)?.uuid ?? null;
|
|
17619
|
-
}
|
|
17852
|
+
if (!doNotPushHistory) this.lastPushedHistoryId = history_default.pushDataSource(newConfig.id, {
|
|
17853
|
+
oldSchema: oldConfig ? cloneDeep$1(oldConfig) : null,
|
|
17854
|
+
newSchema: newConfig,
|
|
17855
|
+
changeRecords,
|
|
17856
|
+
historyDescription,
|
|
17857
|
+
source: historySource
|
|
17858
|
+
})?.uuid ?? null;
|
|
17620
17859
|
this.emit("update", newConfig, {
|
|
17621
17860
|
oldConfig,
|
|
17622
17861
|
changeRecords
|
|
@@ -17635,15 +17874,12 @@
|
|
|
17635
17874
|
const index = dataSources.findIndex((ds) => ds.id === id);
|
|
17636
17875
|
const oldConfig = index !== -1 ? dataSources[index] : null;
|
|
17637
17876
|
dataSources.splice(index, 1);
|
|
17638
|
-
if (oldConfig && !doNotPushHistory) {
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
});
|
|
17645
|
-
this.lastPushedHistoryId = (step ? history_default.push("dataSource", step, id) : null)?.uuid ?? null;
|
|
17646
|
-
}
|
|
17877
|
+
if (oldConfig && !doNotPushHistory) this.lastPushedHistoryId = history_default.pushDataSource(id, {
|
|
17878
|
+
oldSchema: cloneDeep$1(oldConfig),
|
|
17879
|
+
newSchema: null,
|
|
17880
|
+
historyDescription,
|
|
17881
|
+
source: historySource
|
|
17882
|
+
})?.uuid ?? null;
|
|
17647
17883
|
this.emit("remove", id);
|
|
17648
17884
|
}
|
|
17649
17885
|
/**
|
|
@@ -17689,7 +17925,7 @@
|
|
|
17689
17925
|
* @returns 撤销的 step;栈不存在或已无可撤销时返回 null
|
|
17690
17926
|
*/
|
|
17691
17927
|
undo(id) {
|
|
17692
|
-
const step = history_default.
|
|
17928
|
+
const step = history_default.undoDataSource(id);
|
|
17693
17929
|
if (!step) return null;
|
|
17694
17930
|
this.applyHistoryStep(step, true);
|
|
17695
17931
|
return step;
|
|
@@ -17700,18 +17936,18 @@
|
|
|
17700
17936
|
* @returns 重做的 step;栈不存在或已无可重做时返回 null
|
|
17701
17937
|
*/
|
|
17702
17938
|
redo(id) {
|
|
17703
|
-
const step = history_default.
|
|
17939
|
+
const step = history_default.redoDataSource(id);
|
|
17704
17940
|
if (!step) return null;
|
|
17705
17941
|
this.applyHistoryStep(step, false);
|
|
17706
17942
|
return step;
|
|
17707
17943
|
}
|
|
17708
17944
|
/** 是否可对指定数据源撤销。 */
|
|
17709
17945
|
canUndo(id) {
|
|
17710
|
-
return history_default.
|
|
17946
|
+
return history_default.canUndoDataSource(id);
|
|
17711
17947
|
}
|
|
17712
17948
|
/** 是否可对指定数据源重做。 */
|
|
17713
17949
|
canRedo(id) {
|
|
17714
|
-
return history_default.
|
|
17950
|
+
return history_default.canRedoDataSource(id);
|
|
17715
17951
|
}
|
|
17716
17952
|
/**
|
|
17717
17953
|
* 跳转指定数据源的历史栈到目标游标。语义同 editor.gotoPageStep。
|
|
@@ -17721,7 +17957,7 @@
|
|
|
17721
17957
|
* @returns 实际移动到的最终游标位置
|
|
17722
17958
|
*/
|
|
17723
17959
|
goto(id, targetCursor) {
|
|
17724
|
-
let cursor = history_default.
|
|
17960
|
+
let cursor = history_default.getDataSourceCursor(id);
|
|
17725
17961
|
const target = Math.max(0, targetCursor);
|
|
17726
17962
|
while (cursor > target) {
|
|
17727
17963
|
if (!this.undo(id)) break;
|
|
@@ -17744,11 +17980,11 @@
|
|
|
17744
17980
|
* @returns 反向后产生的新 step;目标不存在 / 未应用时返回 null
|
|
17745
17981
|
*/
|
|
17746
17982
|
revert(id, index) {
|
|
17747
|
-
const entry = history_default.
|
|
17983
|
+
const entry = history_default.getDataSourceStepList(id)[index];
|
|
17748
17984
|
if (!entry?.applied) return null;
|
|
17749
17985
|
const { oldSchema, newSchema, changeRecords } = entry.step.diff?.[0] ?? {};
|
|
17750
17986
|
if (oldSchema && newSchema && !changeRecords?.length) return null;
|
|
17751
|
-
const description = `回滚 #${index + 1}: ${describeRevertStep(entry.step.
|
|
17987
|
+
const description = `回滚 #${index + 1}: ${describeRevertStep(entry.step.id, entry.step.diff?.[0], (s) => s.title)}`;
|
|
17752
17988
|
return this.applyRevertStep(entry.step, description);
|
|
17753
17989
|
}
|
|
17754
17990
|
/**
|
|
@@ -17760,7 +17996,7 @@
|
|
|
17760
17996
|
*/
|
|
17761
17997
|
revertById(uuids) {
|
|
17762
17998
|
return uuids.map((uuid) => {
|
|
17763
|
-
const location = history_default.
|
|
17999
|
+
const location = history_default.findDataSourceStepLocationByUuid(uuid);
|
|
17764
18000
|
if (!location) return null;
|
|
17765
18001
|
return this.revert(location.id, location.index);
|
|
17766
18002
|
});
|
|
@@ -17823,21 +18059,21 @@
|
|
|
17823
18059
|
* 同构,差异仅在于走对应的公共 add / update / remove 而不是带 doNotPushHistory 的版本。
|
|
17824
18060
|
*/
|
|
17825
18061
|
applyRevertStep(step, historyDescription) {
|
|
17826
|
-
const { id } = step
|
|
18062
|
+
const { id } = step;
|
|
17827
18063
|
const { oldSchema, newSchema, changeRecords } = step.diff?.[0] ?? {};
|
|
17828
18064
|
if (!oldSchema && newSchema) {
|
|
17829
18065
|
this.remove(`${id}`, {
|
|
17830
18066
|
historyDescription,
|
|
17831
18067
|
historySource: "rollback"
|
|
17832
18068
|
});
|
|
17833
|
-
return history_default.
|
|
18069
|
+
return history_default.getDataSourceStepList(id).slice(-1)[0]?.step ?? null;
|
|
17834
18070
|
}
|
|
17835
18071
|
if (oldSchema && !newSchema) {
|
|
17836
18072
|
this.add(cloneDeep$1(oldSchema), {
|
|
17837
18073
|
historyDescription,
|
|
17838
18074
|
historySource: "rollback"
|
|
17839
18075
|
});
|
|
17840
|
-
return history_default.
|
|
18076
|
+
return history_default.getDataSourceStepList(id).slice(-1)[0]?.step ?? null;
|
|
17841
18077
|
}
|
|
17842
18078
|
if (!oldSchema || !newSchema) return null;
|
|
17843
18079
|
if (changeRecords?.length) {
|
|
@@ -17858,13 +18094,13 @@
|
|
|
17858
18094
|
historyDescription,
|
|
17859
18095
|
historySource: "rollback"
|
|
17860
18096
|
});
|
|
17861
|
-
return history_default.
|
|
18097
|
+
return history_default.getDataSourceStepList(id).slice(-1)[0]?.step ?? null;
|
|
17862
18098
|
}
|
|
17863
18099
|
this.update(cloneDeep$1(oldSchema), {
|
|
17864
18100
|
historyDescription,
|
|
17865
18101
|
historySource: "rollback"
|
|
17866
18102
|
});
|
|
17867
|
-
return history_default.
|
|
18103
|
+
return history_default.getDataSourceStepList(id).slice(-1)[0]?.step ?? null;
|
|
17868
18104
|
}
|
|
17869
18105
|
/**
|
|
17870
18106
|
* 把一条历史 step 应用到当前数据源服务上。
|
|
@@ -17881,7 +18117,7 @@
|
|
|
17881
18117
|
* @param reverse true=撤销,false=重做
|
|
17882
18118
|
*/
|
|
17883
18119
|
applyHistoryStep(step, reverse) {
|
|
17884
|
-
const { id } = step
|
|
18120
|
+
const { id } = step;
|
|
17885
18121
|
const { oldSchema, newSchema, changeRecords } = step.diff?.[0] ?? {};
|
|
17886
18122
|
if (!oldSchema && newSchema) {
|
|
17887
18123
|
if (reverse) this.remove(`${id}`, { doNotPushHistory: true });
|
|
@@ -18935,6 +19171,7 @@
|
|
|
18935
19171
|
name: "MEditor",
|
|
18936
19172
|
__name: "Editor",
|
|
18937
19173
|
props: /* @__PURE__ */ (0, vue.mergeDefaults)({
|
|
19174
|
+
theme: {},
|
|
18938
19175
|
modelValue: {},
|
|
18939
19176
|
componentGroupList: {},
|
|
18940
19177
|
datasourceList: {},
|
|
@@ -19051,6 +19288,12 @@
|
|
|
19051
19288
|
*/
|
|
19052
19289
|
(0, vue.provide)("historyListExtraTabs", props.historyListExtraTabs);
|
|
19053
19290
|
(0, vue.provide)("eventBus", new events.EventEmitter());
|
|
19291
|
+
/**
|
|
19292
|
+
* 把当前主题以响应式 ref 形式 provide 给后代,供包含 `Teleport` 的组件
|
|
19293
|
+
* (如 `TMagicPopover` / `FloatingBox` / `ContentMenu`)在传送目标上挂 `m-theme--<theme>`
|
|
19294
|
+
* 类,让主题级 CSS 变量在 portal 节点上也能命中。详见 `@tmagic/design/theme.ts`。
|
|
19295
|
+
*/
|
|
19296
|
+
(0, vue.provide)(_tmagic_design.M_THEME_KEY, (0, vue.computed)(() => props.theme ?? ""));
|
|
19054
19297
|
const propsPanelMountedHandler = (e) => {
|
|
19055
19298
|
emit("props-panel-mounted", e);
|
|
19056
19299
|
};
|
|
@@ -19072,7 +19315,8 @@
|
|
|
19072
19315
|
"disabled-page-fragment": __props.disabledPageFragment,
|
|
19073
19316
|
"page-bar-sort-options": __props.pageBarSortOptions,
|
|
19074
19317
|
"page-filter-function": __props.pageFilterFunction,
|
|
19075
|
-
"hide-sidebar": __props.hideSidebar
|
|
19318
|
+
"hide-sidebar": __props.hideSidebar,
|
|
19319
|
+
theme: __props.theme
|
|
19076
19320
|
}, {
|
|
19077
19321
|
header: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "header")]),
|
|
19078
19322
|
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"])])]),
|
|
@@ -19153,7 +19397,8 @@
|
|
|
19153
19397
|
"disabled-page-fragment",
|
|
19154
19398
|
"page-bar-sort-options",
|
|
19155
19399
|
"page-filter-function",
|
|
19156
|
-
"hide-sidebar"
|
|
19400
|
+
"hide-sidebar",
|
|
19401
|
+
"theme"
|
|
19157
19402
|
]);
|
|
19158
19403
|
};
|
|
19159
19404
|
}
|
|
@@ -19178,7 +19423,10 @@
|
|
|
19178
19423
|
disabled: { type: Boolean },
|
|
19179
19424
|
size: {},
|
|
19180
19425
|
lastValues: {},
|
|
19181
|
-
isCompare: { type: Boolean }
|
|
19426
|
+
isCompare: { type: Boolean },
|
|
19427
|
+
text: {},
|
|
19428
|
+
labelWidth: {},
|
|
19429
|
+
labelPosition: {}
|
|
19182
19430
|
},
|
|
19183
19431
|
emits: ["change"],
|
|
19184
19432
|
setup(__props, { emit: __emit }) {
|
|
@@ -19199,11 +19447,21 @@
|
|
|
19199
19447
|
* 仅当存在历史值时才启用对比,避免 lastValues 缺失时退化为「全部新增」的空对比。
|
|
19200
19448
|
*/
|
|
19201
19449
|
const isCompareMode = (0, vue.computed)(() => Boolean(props.isCompare && props.lastValues));
|
|
19450
|
+
const newHandler = () => {
|
|
19451
|
+
const defaultCode = {
|
|
19452
|
+
codeType: _tmagic_core.HookCodeType.CODE,
|
|
19453
|
+
codeId: ""
|
|
19454
|
+
};
|
|
19455
|
+
const name = props.config.name || "";
|
|
19456
|
+
emit("change", defaultCode, { modifyKey: `hookData.${(props.model[name]?.hookData || []).length}` });
|
|
19457
|
+
};
|
|
19202
19458
|
const codeConfig = (0, vue.computed)(() => ({
|
|
19203
19459
|
type: "group-list",
|
|
19204
19460
|
name: "hookData",
|
|
19205
19461
|
enableToggleMode: false,
|
|
19206
19462
|
expandAll: true,
|
|
19463
|
+
flat: true,
|
|
19464
|
+
addable: () => false,
|
|
19207
19465
|
title: (mForm, { model, index }) => {
|
|
19208
19466
|
if (model.codeType === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD) {
|
|
19209
19467
|
if (Array.isArray(model.codeId)) {
|
|
@@ -19216,45 +19474,42 @@
|
|
|
19216
19474
|
if (codeContent) return codeContent.name;
|
|
19217
19475
|
return model.codeId || index;
|
|
19218
19476
|
},
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
|
|
19232
|
-
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
|
|
19237
|
-
|
|
19238
|
-
}
|
|
19239
|
-
},
|
|
19240
|
-
{
|
|
19241
|
-
type: "code-select-col",
|
|
19242
|
-
name: "codeId",
|
|
19243
|
-
span: 18,
|
|
19244
|
-
labelWidth: 0,
|
|
19245
|
-
display: (_mForm, { model }) => model.codeType !== _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
19246
|
-
notEditable: () => !codeBlockService.getEditStatus()
|
|
19247
|
-
},
|
|
19248
|
-
{
|
|
19249
|
-
type: "data-source-method-select",
|
|
19250
|
-
name: "codeId",
|
|
19251
|
-
span: 18,
|
|
19252
|
-
labelWidth: 0,
|
|
19253
|
-
display: (_mForm, { model }) => model.codeType === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
19254
|
-
notEditable: () => !dataSourceService.get("editable")
|
|
19477
|
+
titlePrefix: props.config.name === void 0 ? void 0 : String(props.config.name),
|
|
19478
|
+
items: [
|
|
19479
|
+
{
|
|
19480
|
+
text: "代码类型",
|
|
19481
|
+
type: "select",
|
|
19482
|
+
name: "codeType",
|
|
19483
|
+
labelPosition: "right",
|
|
19484
|
+
options: [{
|
|
19485
|
+
value: _tmagic_core.HookCodeType.CODE,
|
|
19486
|
+
text: "代码块"
|
|
19487
|
+
}, {
|
|
19488
|
+
value: _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
19489
|
+
text: "数据源方法"
|
|
19490
|
+
}],
|
|
19491
|
+
defaultValue: "code",
|
|
19492
|
+
onChange: (_mForm, v, { setModel }) => {
|
|
19493
|
+
if (v === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD) setModel("codeId", []);
|
|
19494
|
+
else setModel("codeId", "");
|
|
19495
|
+
return v;
|
|
19255
19496
|
}
|
|
19256
|
-
|
|
19257
|
-
|
|
19497
|
+
},
|
|
19498
|
+
{
|
|
19499
|
+
type: "code-select-col",
|
|
19500
|
+
name: "codeId",
|
|
19501
|
+
text: "代码块",
|
|
19502
|
+
display: (_mForm, { model }) => model.codeType !== _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
19503
|
+
notEditable: () => !codeBlockService.getEditStatus()
|
|
19504
|
+
},
|
|
19505
|
+
{
|
|
19506
|
+
type: "data-source-method-select",
|
|
19507
|
+
name: "codeId",
|
|
19508
|
+
text: "数据源字段",
|
|
19509
|
+
display: (_mForm, { model }) => model.codeType === _tmagic_core.HookCodeType.DATA_SOURCE_METHOD,
|
|
19510
|
+
notEditable: () => !dataSourceService.get("editable")
|
|
19511
|
+
}
|
|
19512
|
+
]
|
|
19258
19513
|
}));
|
|
19259
19514
|
(0, vue.watch)(() => props.model[props.name], (value) => {
|
|
19260
19515
|
if (isEmpty(value)) props.model[props.name] = {
|
|
@@ -19264,10 +19519,11 @@
|
|
|
19264
19519
|
}, { immediate: true });
|
|
19265
19520
|
const changeHandler = (v, eventData) => emit("change", v, eventData);
|
|
19266
19521
|
return (_ctx, _cache) => {
|
|
19267
|
-
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),
|
|
19522
|
+
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 }, {
|
|
19268
19523
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MContainer), {
|
|
19269
19524
|
config: codeConfig.value,
|
|
19270
19525
|
size: __props.size,
|
|
19526
|
+
class: "code-select-content",
|
|
19271
19527
|
prop: __props.prop,
|
|
19272
19528
|
disabled: __props.disabled,
|
|
19273
19529
|
"is-compare": isCompareMode.value,
|
|
@@ -19282,9 +19538,22 @@
|
|
|
19282
19538
|
"is-compare",
|
|
19283
19539
|
"last-values",
|
|
19284
19540
|
"model"
|
|
19541
|
+
]), (0, vue.createVNode)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
19542
|
+
class: "create-button fullWidth",
|
|
19543
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Plus),
|
|
19544
|
+
size: __props.size,
|
|
19545
|
+
disabled: __props.disabled,
|
|
19546
|
+
onClick: _cache[0] || (_cache[0] = ($event) => newHandler())
|
|
19547
|
+
}, {
|
|
19548
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)("添加" + (0, vue.toDisplayString)(__props.config.text), 1)]),
|
|
19549
|
+
_: 1
|
|
19550
|
+
}, 8, [
|
|
19551
|
+
"icon",
|
|
19552
|
+
"size",
|
|
19553
|
+
"disabled"
|
|
19285
19554
|
])]),
|
|
19286
19555
|
_: 1
|
|
19287
|
-
})], 2);
|
|
19556
|
+
}, 8, ["flat"])], 2);
|
|
19288
19557
|
};
|
|
19289
19558
|
}
|
|
19290
19559
|
});
|
|
@@ -19375,7 +19644,7 @@
|
|
|
19375
19644
|
init_Icon();
|
|
19376
19645
|
init_use_services();
|
|
19377
19646
|
init_type();
|
|
19378
|
-
var _hoisted_1$
|
|
19647
|
+
var _hoisted_1$42 = { class: "m-fields-code-select-col" };
|
|
19379
19648
|
var _hoisted_2$11 = { class: "code-select-container" };
|
|
19380
19649
|
var CodeSelectCol_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
19381
19650
|
name: "MFieldsCodeSelectCol",
|
|
@@ -19393,7 +19662,10 @@
|
|
|
19393
19662
|
},
|
|
19394
19663
|
size: {},
|
|
19395
19664
|
lastValues: {},
|
|
19396
|
-
isCompare: { type: Boolean }
|
|
19665
|
+
isCompare: { type: Boolean },
|
|
19666
|
+
text: {},
|
|
19667
|
+
labelWidth: {},
|
|
19668
|
+
labelPosition: {}
|
|
19397
19669
|
},
|
|
19398
19670
|
emits: ["change"],
|
|
19399
19671
|
setup(__props, { emit: __emit }) {
|
|
@@ -19439,6 +19711,7 @@
|
|
|
19439
19711
|
type: "select",
|
|
19440
19712
|
name: props.name,
|
|
19441
19713
|
disabled: props.disabled,
|
|
19714
|
+
text: props.config.text,
|
|
19442
19715
|
options: () => {
|
|
19443
19716
|
if (codeDsl.value) return map(codeDsl.value, (value, key) => ({
|
|
19444
19717
|
text: `${value.name}(${key})`,
|
|
@@ -19475,7 +19748,7 @@
|
|
|
19475
19748
|
eventBus?.emit("edit-code", id);
|
|
19476
19749
|
};
|
|
19477
19750
|
return (_ctx, _cache) => {
|
|
19478
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
19751
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$42, [
|
|
19479
19752
|
(0, vue.createElementVNode)("div", _hoisted_2$11, [
|
|
19480
19753
|
(0, vue.createCommentVNode)(" 代码块下拉框 "),
|
|
19481
19754
|
(0, vue.createCommentVNode)(" 对比模式下交由 MFormContainer 展示下拉框的前后差异(codeId 变化时高亮新旧代码块名),\n 普通模式仍直接渲染 MSelect 以保留选择 / 写值逻辑 "),
|
|
@@ -19548,7 +19821,7 @@
|
|
|
19548
19821
|
//#endregion
|
|
19549
19822
|
//#region packages/editor/src/fields/DataSourceFields.vue?vue&type=script&setup=true&lang.ts
|
|
19550
19823
|
init_use_services();
|
|
19551
|
-
var _hoisted_1$
|
|
19824
|
+
var _hoisted_1$41 = { class: "m-editor-data-source-fields" };
|
|
19552
19825
|
var _hoisted_2$10 = {
|
|
19553
19826
|
key: 0,
|
|
19554
19827
|
class: "m-editor-data-source-fields-footer"
|
|
@@ -19569,7 +19842,10 @@
|
|
|
19569
19842
|
},
|
|
19570
19843
|
size: {},
|
|
19571
19844
|
lastValues: {},
|
|
19572
|
-
isCompare: { type: Boolean }
|
|
19845
|
+
isCompare: { type: Boolean },
|
|
19846
|
+
text: {},
|
|
19847
|
+
labelWidth: {},
|
|
19848
|
+
labelPosition: {}
|
|
19573
19849
|
}, {
|
|
19574
19850
|
"width": { default: 670 },
|
|
19575
19851
|
"widthModifiers": {},
|
|
@@ -19867,7 +20143,7 @@
|
|
|
19867
20143
|
editField(fields[index], index);
|
|
19868
20144
|
});
|
|
19869
20145
|
return (_ctx, _cache) => {
|
|
19870
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
20146
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$41, [
|
|
19871
20147
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_table.MagicTable), {
|
|
19872
20148
|
data: __props.model[__props.name],
|
|
19873
20149
|
columns: displayColumns.value,
|
|
@@ -19957,7 +20233,7 @@
|
|
|
19957
20233
|
//#region packages/editor/src/fields/DataSourceMocks.vue?vue&type=script&setup=true&lang.ts
|
|
19958
20234
|
init_use_services();
|
|
19959
20235
|
init_CodeEditor();
|
|
19960
|
-
var _hoisted_1$
|
|
20236
|
+
var _hoisted_1$40 = { class: "m-editor-data-source-fields" };
|
|
19961
20237
|
var _hoisted_2$9 = {
|
|
19962
20238
|
key: 0,
|
|
19963
20239
|
class: "m-editor-data-source-fields-footer"
|
|
@@ -19978,7 +20254,10 @@
|
|
|
19978
20254
|
},
|
|
19979
20255
|
size: {},
|
|
19980
20256
|
lastValues: {},
|
|
19981
|
-
isCompare: { type: Boolean }
|
|
20257
|
+
isCompare: { type: Boolean },
|
|
20258
|
+
text: {},
|
|
20259
|
+
labelWidth: {},
|
|
20260
|
+
labelPosition: {}
|
|
19982
20261
|
}, {
|
|
19983
20262
|
"width": { default: 670 },
|
|
19984
20263
|
"widthModifiers": {},
|
|
@@ -20162,7 +20441,7 @@
|
|
|
20162
20441
|
const { height: editorHeight } = useEditorContentHeight();
|
|
20163
20442
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, (0, vue.inject)("parentFloating", (0, vue.ref)(null)));
|
|
20164
20443
|
return (_ctx, _cache) => {
|
|
20165
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
20444
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$40, [
|
|
20166
20445
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_table.MagicTable), {
|
|
20167
20446
|
data: __props.model[__props.name],
|
|
20168
20447
|
columns: displayColumns.value
|
|
@@ -20217,7 +20496,7 @@
|
|
|
20217
20496
|
//#endregion
|
|
20218
20497
|
//#region packages/editor/src/fields/DataSourceMethods.vue?vue&type=script&setup=true&lang.ts
|
|
20219
20498
|
init_lodash();
|
|
20220
|
-
var _hoisted_1$
|
|
20499
|
+
var _hoisted_1$39 = { class: "m-editor-data-source-methods" };
|
|
20221
20500
|
var _hoisted_2$8 = {
|
|
20222
20501
|
key: 0,
|
|
20223
20502
|
class: "m-editor-data-source-methods-footer"
|
|
@@ -20238,7 +20517,10 @@
|
|
|
20238
20517
|
},
|
|
20239
20518
|
size: {},
|
|
20240
20519
|
lastValues: {},
|
|
20241
|
-
isCompare: { type: Boolean }
|
|
20520
|
+
isCompare: { type: Boolean },
|
|
20521
|
+
text: {},
|
|
20522
|
+
labelWidth: {},
|
|
20523
|
+
labelPosition: {}
|
|
20242
20524
|
},
|
|
20243
20525
|
emits: ["change"],
|
|
20244
20526
|
setup(__props, { emit: __emit }) {
|
|
@@ -20346,7 +20628,7 @@
|
|
|
20346
20628
|
editMethod(methods[index], index);
|
|
20347
20629
|
});
|
|
20348
20630
|
return (_ctx, _cache) => {
|
|
20349
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
20631
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$39, [
|
|
20350
20632
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_table.MagicTable), {
|
|
20351
20633
|
data: __props.model[__props.name],
|
|
20352
20634
|
columns: displayColumns.value,
|
|
@@ -20386,7 +20668,7 @@
|
|
|
20386
20668
|
//#region packages/editor/src/fields/DataSourceInput.vue?vue&type=script&setup=true&lang.ts
|
|
20387
20669
|
init_Icon();
|
|
20388
20670
|
init_use_services();
|
|
20389
|
-
var _hoisted_1$
|
|
20671
|
+
var _hoisted_1$38 = { style: {
|
|
20390
20672
|
"display": "flex",
|
|
20391
20673
|
"flex-direction": "column",
|
|
20392
20674
|
"line-height": "1.2em"
|
|
@@ -20411,7 +20693,10 @@
|
|
|
20411
20693
|
},
|
|
20412
20694
|
size: {},
|
|
20413
20695
|
lastValues: {},
|
|
20414
|
-
isCompare: { type: Boolean }
|
|
20696
|
+
isCompare: { type: Boolean },
|
|
20697
|
+
text: {},
|
|
20698
|
+
labelWidth: {},
|
|
20699
|
+
labelPosition: {}
|
|
20415
20700
|
},
|
|
20416
20701
|
emits: ["change"],
|
|
20417
20702
|
setup(__props, { emit: __emit }) {
|
|
@@ -20607,7 +20892,7 @@
|
|
|
20607
20892
|
onSelect: selectHandler
|
|
20608
20893
|
}), {
|
|
20609
20894
|
suffix: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: (0, vue.unref)(_element_plus_icons_vue.Coin) }, null, 8, ["icon"])]),
|
|
20610
|
-
default: (0, vue.withCtx)(({ item }) => [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
20895
|
+
default: (0, vue.withCtx)(({ item }) => [(0, vue.createElementVNode)("div", _hoisted_1$38, [(0, vue.createElementVNode)("div", null, (0, vue.toDisplayString)(item.text), 1), (0, vue.createElementVNode)("span", _hoisted_2$7, (0, vue.toDisplayString)(item.value), 1)])]),
|
|
20611
20896
|
_: 1
|
|
20612
20897
|
}, 16, ["modelValue"])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
20613
20898
|
key: 2,
|
|
@@ -20652,7 +20937,7 @@
|
|
|
20652
20937
|
init_Icon();
|
|
20653
20938
|
init_use_services();
|
|
20654
20939
|
init_type();
|
|
20655
|
-
var _hoisted_1$
|
|
20940
|
+
var _hoisted_1$37 = { class: "m-fields-data-source-select" };
|
|
20656
20941
|
var DataSourceSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
20657
20942
|
name: "MFieldsDataSourceSelect",
|
|
20658
20943
|
__name: "DataSourceSelect",
|
|
@@ -20669,7 +20954,10 @@
|
|
|
20669
20954
|
},
|
|
20670
20955
|
size: {},
|
|
20671
20956
|
lastValues: {},
|
|
20672
|
-
isCompare: { type: Boolean }
|
|
20957
|
+
isCompare: { type: Boolean },
|
|
20958
|
+
text: {},
|
|
20959
|
+
labelWidth: {},
|
|
20960
|
+
labelPosition: {}
|
|
20673
20961
|
},
|
|
20674
20962
|
emits: ["change"],
|
|
20675
20963
|
setup(__props, { emit: __emit }) {
|
|
@@ -20711,7 +20999,7 @@
|
|
|
20711
20999
|
eventBus?.emit("edit-data-source", id);
|
|
20712
21000
|
};
|
|
20713
21001
|
return (_ctx, _cache) => {
|
|
20714
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21002
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$37, [(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MSelect), {
|
|
20715
21003
|
model: __props.model,
|
|
20716
21004
|
name: __props.name,
|
|
20717
21005
|
size: __props.size,
|
|
@@ -20753,7 +21041,7 @@
|
|
|
20753
21041
|
init_Icon();
|
|
20754
21042
|
init_use_services();
|
|
20755
21043
|
init_type();
|
|
20756
|
-
var _hoisted_1$
|
|
21044
|
+
var _hoisted_1$36 = { class: "m-fields-data-source-method-select" };
|
|
20757
21045
|
var _hoisted_2$6 = { class: "data-source-method-select-container" };
|
|
20758
21046
|
var DataSourceMethodSelect_vue_vue_type_script_setup_true_name_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
20759
21047
|
name: "MFieldsDataSourceMethodSelect",
|
|
@@ -20771,7 +21059,10 @@
|
|
|
20771
21059
|
},
|
|
20772
21060
|
size: {},
|
|
20773
21061
|
lastValues: {},
|
|
20774
|
-
isCompare: { type: Boolean }
|
|
21062
|
+
isCompare: { type: Boolean },
|
|
21063
|
+
text: {},
|
|
21064
|
+
labelWidth: {},
|
|
21065
|
+
labelPosition: {}
|
|
20775
21066
|
},
|
|
20776
21067
|
emits: ["change"],
|
|
20777
21068
|
setup(__props, { emit: __emit }) {
|
|
@@ -20875,7 +21166,7 @@
|
|
|
20875
21166
|
eventBus?.emit("edit-data-source-method", id, methodName);
|
|
20876
21167
|
};
|
|
20877
21168
|
return (_ctx, _cache) => {
|
|
20878
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21169
|
+
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), {
|
|
20879
21170
|
class: "select",
|
|
20880
21171
|
config: cascaderConfig.value,
|
|
20881
21172
|
model: __props.model,
|
|
@@ -20925,11 +21216,32 @@
|
|
|
20925
21216
|
//#region packages/editor/src/fields/DataSourceMethodSelect.vue
|
|
20926
21217
|
var DataSourceMethodSelect_default = DataSourceMethodSelect_vue_vue_type_script_setup_true_name_true_lang_default;
|
|
20927
21218
|
//#endregion
|
|
21219
|
+
//#region \0plugin-vue:export-helper
|
|
21220
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
21221
|
+
const target = sfc.__vccOpts || sfc;
|
|
21222
|
+
for (const [key, val] of props) target[key] = val;
|
|
21223
|
+
return target;
|
|
21224
|
+
};
|
|
21225
|
+
//#endregion
|
|
21226
|
+
//#region packages/editor/src/icons/DatasourceIcon.vue
|
|
21227
|
+
var _sfc_main$26 = {};
|
|
21228
|
+
var _hoisted_1$35 = {
|
|
21229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21230
|
+
width: "16",
|
|
21231
|
+
height: "16",
|
|
21232
|
+
viewBox: "0 0 16 16",
|
|
21233
|
+
fill: "currentColor"
|
|
21234
|
+
};
|
|
21235
|
+
function _sfc_render$26(_ctx, _cache) {
|
|
21236
|
+
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)])]);
|
|
21237
|
+
}
|
|
21238
|
+
var DatasourceIcon_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$26, [["render", _sfc_render$26]]);
|
|
21239
|
+
//#endregion
|
|
20928
21240
|
//#region packages/editor/src/fields/DataSourceFieldSelect/FieldSelect.vue?vue&type=script&setup=true&lang.ts
|
|
20929
21241
|
init_Icon();
|
|
20930
21242
|
init_use_services();
|
|
20931
21243
|
init_type();
|
|
20932
|
-
var _hoisted_1$
|
|
21244
|
+
var _hoisted_1$34 = { class: "m-editor-data-source-field-select" };
|
|
20933
21245
|
var FieldSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
20934
21246
|
__name: "FieldSelect",
|
|
20935
21247
|
props: /* @__PURE__ */ (0, vue.mergeModels)({
|
|
@@ -21021,7 +21333,7 @@
|
|
|
21021
21333
|
else eventBus?.emit("edit-data-source", dataSourceId);
|
|
21022
21334
|
};
|
|
21023
21335
|
return (_ctx, _cache) => {
|
|
21024
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21336
|
+
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), {
|
|
21025
21337
|
key: 0,
|
|
21026
21338
|
"model-value": selectFieldsId.value,
|
|
21027
21339
|
clearable: "",
|
|
@@ -21119,7 +21431,6 @@
|
|
|
21119
21431
|
//#region packages/editor/src/fields/DataSourceFieldSelect/Index.vue?vue&type=script&setup=true&lang.ts
|
|
21120
21432
|
init_Icon();
|
|
21121
21433
|
init_use_services();
|
|
21122
|
-
var _hoisted_1$29 = { class: "m-fields-data-source-field-select" };
|
|
21123
21434
|
var Index_vue_vue_type_script_setup_true_lang_default$1 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
21124
21435
|
name: "MFieldsDataSourceFieldSelect",
|
|
21125
21436
|
__name: "Index",
|
|
@@ -21136,13 +21447,17 @@
|
|
|
21136
21447
|
},
|
|
21137
21448
|
size: {},
|
|
21138
21449
|
lastValues: {},
|
|
21139
|
-
isCompare: { type: Boolean }
|
|
21450
|
+
isCompare: { type: Boolean },
|
|
21451
|
+
text: {},
|
|
21452
|
+
labelWidth: {},
|
|
21453
|
+
labelPosition: {}
|
|
21140
21454
|
},
|
|
21141
21455
|
emits: ["change"],
|
|
21142
21456
|
setup(__props, { emit: __emit }) {
|
|
21143
21457
|
const emit = __emit;
|
|
21144
21458
|
const props = __props;
|
|
21145
21459
|
const showDataSourceFieldSelect = (0, vue.ref)(false);
|
|
21460
|
+
const isSelectValid = (0, vue.computed)(() => !disabledDataSource.value && (showDataSourceFieldSelect.value || !props.config.fieldConfig));
|
|
21146
21461
|
(0, vue.watch)(() => props.model[props.name], (value) => {
|
|
21147
21462
|
if (Array.isArray(value) && typeof value[0] === "string" && value[0].startsWith(_tmagic_utils.DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX)) showDataSourceFieldSelect.value = true;
|
|
21148
21463
|
else showDataSourceFieldSelect.value = false;
|
|
@@ -21212,7 +21527,7 @@
|
|
|
21212
21527
|
showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value;
|
|
21213
21528
|
};
|
|
21214
21529
|
return (_ctx, _cache) => {
|
|
21215
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
21530
|
+
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, {
|
|
21216
21531
|
key: 0,
|
|
21217
21532
|
"model-value": __props.model[__props.name],
|
|
21218
21533
|
disabled: __props.disabled,
|
|
@@ -21263,7 +21578,7 @@
|
|
|
21263
21578
|
disabled: __props.disabled,
|
|
21264
21579
|
onClick: onToggleDataSourceFieldSelectHandler
|
|
21265
21580
|
}, {
|
|
21266
|
-
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon:
|
|
21581
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)(Icon_default, { icon: DatasourceIcon_default })]),
|
|
21267
21582
|
_: 1
|
|
21268
21583
|
}, 8, [
|
|
21269
21584
|
"type",
|
|
@@ -21271,7 +21586,7 @@
|
|
|
21271
21586
|
"disabled"
|
|
21272
21587
|
])]),
|
|
21273
21588
|
_: 1
|
|
21274
|
-
}, 8, ["disabled"])) : (0, vue.createCommentVNode)("v-if", true)]);
|
|
21589
|
+
}, 8, ["disabled"])) : (0, vue.createCommentVNode)("v-if", true)], 2);
|
|
21275
21590
|
};
|
|
21276
21591
|
}
|
|
21277
21592
|
});
|
|
@@ -21282,11 +21597,14 @@
|
|
|
21282
21597
|
//#region packages/editor/src/fields/EventSelect.vue?vue&type=script&setup=true&lang.ts
|
|
21283
21598
|
init_lodash();
|
|
21284
21599
|
init_use_services();
|
|
21285
|
-
var _hoisted_1$
|
|
21600
|
+
var _hoisted_1$33 = { class: "m-fields-event-select" };
|
|
21286
21601
|
var _hoisted_2$5 = {
|
|
21287
21602
|
key: 1,
|
|
21288
|
-
class: "fullWidth"
|
|
21603
|
+
class: "fullWidth event-select-container"
|
|
21289
21604
|
};
|
|
21605
|
+
var _hoisted_3$3 = { class: "event-select-header" };
|
|
21606
|
+
var _hoisted_4$2 = { class: "event-item-header" };
|
|
21607
|
+
var _hoisted_5$1 = { class: "event-item-title" };
|
|
21290
21608
|
var EventSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
21291
21609
|
name: "MFieldsEventSelect",
|
|
21292
21610
|
__name: "EventSelect",
|
|
@@ -21300,7 +21618,10 @@
|
|
|
21300
21618
|
disabled: { type: Boolean },
|
|
21301
21619
|
size: {},
|
|
21302
21620
|
lastValues: {},
|
|
21303
|
-
isCompare: { type: Boolean }
|
|
21621
|
+
isCompare: { type: Boolean },
|
|
21622
|
+
text: {},
|
|
21623
|
+
labelWidth: {},
|
|
21624
|
+
labelPosition: {}
|
|
21304
21625
|
},
|
|
21305
21626
|
emits: ["change"],
|
|
21306
21627
|
setup(__props, { emit: __emit }) {
|
|
@@ -21310,12 +21631,12 @@
|
|
|
21310
21631
|
const eventNameConfig = (0, vue.computed)(() => {
|
|
21311
21632
|
return {
|
|
21312
21633
|
name: "name",
|
|
21313
|
-
text: "
|
|
21634
|
+
text: "事件类型",
|
|
21314
21635
|
type: (mForm, { formValue }) => {
|
|
21315
21636
|
if (props.config.src !== "component" || formValue.type === "page-fragment-container" && formValue.pageFragmentId) return "cascader";
|
|
21316
21637
|
return "select";
|
|
21317
21638
|
},
|
|
21318
|
-
labelWidth: "
|
|
21639
|
+
labelWidth: "70px",
|
|
21319
21640
|
checkStrictly: () => props.config.src !== "component",
|
|
21320
21641
|
valueSeparator: ".",
|
|
21321
21642
|
options: (mForm, { formValue }) => {
|
|
@@ -21367,6 +21688,7 @@
|
|
|
21367
21688
|
name: "actionType",
|
|
21368
21689
|
text: "联动类型",
|
|
21369
21690
|
type: "select",
|
|
21691
|
+
labelPosition: "left",
|
|
21370
21692
|
defaultValue: _tmagic_core.ActionType.COMP,
|
|
21371
21693
|
options: () => {
|
|
21372
21694
|
const o = [{
|
|
@@ -21395,6 +21717,7 @@
|
|
|
21395
21717
|
name: "to",
|
|
21396
21718
|
text: "联动组件",
|
|
21397
21719
|
type: "ui-select",
|
|
21720
|
+
labelPosition: "left",
|
|
21398
21721
|
display: (_mForm, { model }) => model.actionType === _tmagic_core.ActionType.COMP,
|
|
21399
21722
|
onChange: (_MForm, _v, { setModel }) => {
|
|
21400
21723
|
setModel("method", "");
|
|
@@ -21406,6 +21729,7 @@
|
|
|
21406
21729
|
return {
|
|
21407
21730
|
name: "method",
|
|
21408
21731
|
text: "动作",
|
|
21732
|
+
labelPosition: "left",
|
|
21409
21733
|
type: (mForm, { model }) => {
|
|
21410
21734
|
const to = editorService.getNodeById(model.to);
|
|
21411
21735
|
if (to && to.type === "page-fragment-container" && to.pageFragmentId) return "cascader";
|
|
@@ -21498,12 +21822,16 @@
|
|
|
21498
21822
|
}));
|
|
21499
21823
|
const actionsConfig = (0, vue.computed)(() => (0, _tmagic_form.defineFormItem)({
|
|
21500
21824
|
type: "panel",
|
|
21825
|
+
labelPosition: "left",
|
|
21826
|
+
flat: true,
|
|
21501
21827
|
items: [{
|
|
21502
21828
|
type: "group-list",
|
|
21503
21829
|
name: "actions",
|
|
21504
21830
|
expandAll: true,
|
|
21505
21831
|
enableToggleMode: false,
|
|
21506
21832
|
titlePrefix: "动作",
|
|
21833
|
+
labelPosition: "left",
|
|
21834
|
+
flat: true,
|
|
21507
21835
|
items: [
|
|
21508
21836
|
actionTypeConfig.value,
|
|
21509
21837
|
targetCompConfig.value,
|
|
@@ -21568,7 +21896,7 @@
|
|
|
21568
21896
|
};
|
|
21569
21897
|
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
21570
21898
|
return (_ctx, _cache) => {
|
|
21571
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
21899
|
+
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), {
|
|
21572
21900
|
key: 0,
|
|
21573
21901
|
name: "events",
|
|
21574
21902
|
size: __props.size,
|
|
@@ -21585,73 +21913,97 @@
|
|
|
21585
21913
|
"last-values",
|
|
21586
21914
|
"is-compare",
|
|
21587
21915
|
"config"
|
|
21588
|
-
])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$5, [
|
|
21589
|
-
|
|
21590
|
-
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21595
|
-
}, {
|
|
21596
|
-
default: (0, vue.withCtx)(() => [..._cache[1] || (_cache[1] = [(0, vue.createTextVNode)("添加事件", -1)])]),
|
|
21597
|
-
_: 1
|
|
21598
|
-
}, 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) => {
|
|
21599
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MPanel), {
|
|
21600
|
-
key: entry.index,
|
|
21601
|
-
disabled: __props.disabled,
|
|
21916
|
+
])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$5, [
|
|
21917
|
+
(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), {
|
|
21918
|
+
key: 0,
|
|
21919
|
+
class: "create-button",
|
|
21920
|
+
text: "",
|
|
21921
|
+
type: "primary",
|
|
21922
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Plus),
|
|
21602
21923
|
size: __props.size,
|
|
21603
|
-
|
|
21604
|
-
|
|
21605
|
-
model: entry.cardItem,
|
|
21606
|
-
"last-values": entry.lastCardItem,
|
|
21607
|
-
"is-compare": isCompareMode.value,
|
|
21608
|
-
"label-width": __props.config.labelWidth || "100px",
|
|
21609
|
-
onChange: onChangeHandler
|
|
21924
|
+
disabled: __props.disabled,
|
|
21925
|
+
onClick: _cache[0] || (_cache[0] = ($event) => addEvent())
|
|
21610
21926
|
}, {
|
|
21611
|
-
|
|
21612
|
-
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
21927
|
+
default: (0, vue.withCtx)(() => [..._cache[2] || (_cache[2] = [(0, vue.createTextVNode)("添加事件", -1)])]),
|
|
21928
|
+
_: 1
|
|
21929
|
+
}, 8, [
|
|
21930
|
+
"icon",
|
|
21931
|
+
"size",
|
|
21932
|
+
"disabled"
|
|
21933
|
+
])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
21934
|
+
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(displayList.value, (entry) => {
|
|
21935
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_form.MPanel), {
|
|
21936
|
+
key: entry.index,
|
|
21617
21937
|
disabled: __props.disabled,
|
|
21618
21938
|
size: __props.size,
|
|
21619
21939
|
prop: `${__props.prop}.${entry.index}`,
|
|
21620
|
-
|
|
21621
|
-
|
|
21940
|
+
config: actionsConfig.value,
|
|
21941
|
+
model: entry.cardItem,
|
|
21942
|
+
"last-values": entry.lastCardItem,
|
|
21943
|
+
"is-compare": isCompareMode.value,
|
|
21944
|
+
"hide-expand": true,
|
|
21945
|
+
"label-width": __props.config.labelWidth || "100px",
|
|
21946
|
+
onChange: onChangeHandler
|
|
21947
|
+
}, {
|
|
21948
|
+
header: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", _hoisted_4$2, [
|
|
21949
|
+
(0, vue.createElementVNode)("div", _hoisted_5$1, "事件" + (0, vue.toDisplayString)(Number(entry.index) + 1), 1),
|
|
21950
|
+
(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MContainer), {
|
|
21951
|
+
class: "fullWidth",
|
|
21952
|
+
config: eventNameConfig.value,
|
|
21953
|
+
model: entry.cardItem,
|
|
21954
|
+
"last-values": entry.lastCardItem,
|
|
21955
|
+
"is-compare": isCompareMode.value,
|
|
21956
|
+
disabled: __props.disabled,
|
|
21957
|
+
size: __props.size,
|
|
21958
|
+
prop: `${__props.prop}.${entry.index}`,
|
|
21959
|
+
onChange: eventNameChangeHandler
|
|
21960
|
+
}, null, 8, [
|
|
21961
|
+
"config",
|
|
21962
|
+
"model",
|
|
21963
|
+
"last-values",
|
|
21964
|
+
"is-compare",
|
|
21965
|
+
"disabled",
|
|
21966
|
+
"size",
|
|
21967
|
+
"prop"
|
|
21968
|
+
]),
|
|
21969
|
+
!isCompareMode.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
21970
|
+
key: 0,
|
|
21971
|
+
class: "event-item-delete-button",
|
|
21972
|
+
link: "",
|
|
21973
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Delete),
|
|
21974
|
+
disabled: __props.disabled,
|
|
21975
|
+
size: __props.size,
|
|
21976
|
+
onClick: ($event) => removeEvent(Number(entry.index))
|
|
21977
|
+
}, null, 8, [
|
|
21978
|
+
"icon",
|
|
21979
|
+
"disabled",
|
|
21980
|
+
"size",
|
|
21981
|
+
"onClick"
|
|
21982
|
+
])) : (0, vue.createCommentVNode)("v-if", true)
|
|
21983
|
+
])]),
|
|
21984
|
+
_: 2
|
|
21985
|
+
}, 1032, [
|
|
21986
|
+
"disabled",
|
|
21987
|
+
"size",
|
|
21988
|
+
"prop",
|
|
21622
21989
|
"config",
|
|
21623
21990
|
"model",
|
|
21624
21991
|
"last-values",
|
|
21625
21992
|
"is-compare",
|
|
21626
|
-
"
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
"size",
|
|
21641
|
-
"onClick"
|
|
21642
|
-
])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
21643
|
-
_: 2
|
|
21644
|
-
}, 1032, [
|
|
21645
|
-
"disabled",
|
|
21646
|
-
"size",
|
|
21647
|
-
"prop",
|
|
21648
|
-
"config",
|
|
21649
|
-
"model",
|
|
21650
|
-
"last-values",
|
|
21651
|
-
"is-compare",
|
|
21652
|
-
"label-width"
|
|
21653
|
-
]);
|
|
21654
|
-
}), 128))]))]);
|
|
21993
|
+
"label-width"
|
|
21994
|
+
]);
|
|
21995
|
+
}), 128)),
|
|
21996
|
+
!isCompareMode.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
21997
|
+
key: 0,
|
|
21998
|
+
class: "create-button fullWidth",
|
|
21999
|
+
icon: (0, vue.unref)(_element_plus_icons_vue.Plus),
|
|
22000
|
+
disabled: __props.disabled,
|
|
22001
|
+
onClick: _cache[1] || (_cache[1] = ($event) => addEvent())
|
|
22002
|
+
}, {
|
|
22003
|
+
default: (0, vue.withCtx)(() => [..._cache[4] || (_cache[4] = [(0, vue.createTextVNode)("添加事件", -1)])]),
|
|
22004
|
+
_: 1
|
|
22005
|
+
}, 8, ["icon", "disabled"])) : (0, vue.createCommentVNode)("v-if", true)
|
|
22006
|
+
]))]);
|
|
21655
22007
|
};
|
|
21656
22008
|
}
|
|
21657
22009
|
});
|
|
@@ -21660,7 +22012,7 @@
|
|
|
21660
22012
|
var EventSelect_default = EventSelect_vue_vue_type_script_setup_true_lang_default;
|
|
21661
22013
|
//#endregion
|
|
21662
22014
|
//#region packages/editor/src/icons/CodeIcon.vue?vue&type=script&setup=true&lang.ts
|
|
21663
|
-
var _hoisted_1$
|
|
22015
|
+
var _hoisted_1$32 = {
|
|
21664
22016
|
viewBox: "0 0 32 32",
|
|
21665
22017
|
version: "1.1",
|
|
21666
22018
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -21671,7 +22023,7 @@
|
|
|
21671
22023
|
__name: "CodeIcon",
|
|
21672
22024
|
setup(__props) {
|
|
21673
22025
|
return (_ctx, _cache) => {
|
|
21674
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22026
|
+
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)])]);
|
|
21675
22027
|
};
|
|
21676
22028
|
}
|
|
21677
22029
|
});
|
|
@@ -21681,7 +22033,7 @@
|
|
|
21681
22033
|
//#endregion
|
|
21682
22034
|
//#region packages/editor/src/fields/KeyValue.vue?vue&type=script&setup=true&lang.ts
|
|
21683
22035
|
init_CodeEditor();
|
|
21684
|
-
var _hoisted_1$
|
|
22036
|
+
var _hoisted_1$31 = { class: "m-fields-key-value" };
|
|
21685
22037
|
var _hoisted_2$4 = { key: 0 };
|
|
21686
22038
|
var KeyValue_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
21687
22039
|
name: "MFieldsKeyValue",
|
|
@@ -21699,7 +22051,10 @@
|
|
|
21699
22051
|
},
|
|
21700
22052
|
size: {},
|
|
21701
22053
|
lastValues: {},
|
|
21702
|
-
isCompare: { type: Boolean }
|
|
22054
|
+
isCompare: { type: Boolean },
|
|
22055
|
+
text: {},
|
|
22056
|
+
labelWidth: {},
|
|
22057
|
+
labelPosition: {}
|
|
21703
22058
|
},
|
|
21704
22059
|
emits: ["change"],
|
|
21705
22060
|
setup(__props, { emit: __emit }) {
|
|
@@ -21745,7 +22100,7 @@
|
|
|
21745
22100
|
emit("change", v);
|
|
21746
22101
|
};
|
|
21747
22102
|
return (_ctx, _cache) => {
|
|
21748
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22103
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$31, [
|
|
21749
22104
|
!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) => {
|
|
21750
22105
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
21751
22106
|
class: "m-fields-key-value-item",
|
|
@@ -21844,7 +22199,7 @@
|
|
|
21844
22199
|
init_HistoryDiffDialog();
|
|
21845
22200
|
init_Icon();
|
|
21846
22201
|
init_use_services();
|
|
21847
|
-
var _hoisted_1$
|
|
22202
|
+
var _hoisted_1$30 = { class: "m-fields-page-fragment-select" };
|
|
21848
22203
|
var _hoisted_2$3 = { class: "page-fragment-select-container" };
|
|
21849
22204
|
var PageFragmentSelect_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
21850
22205
|
name: "MFieldsPageFragmentSelect",
|
|
@@ -21862,7 +22217,10 @@
|
|
|
21862
22217
|
},
|
|
21863
22218
|
size: {},
|
|
21864
22219
|
lastValues: {},
|
|
21865
|
-
isCompare: { type: Boolean }
|
|
22220
|
+
isCompare: { type: Boolean },
|
|
22221
|
+
text: {},
|
|
22222
|
+
labelWidth: {},
|
|
22223
|
+
labelPosition: {}
|
|
21866
22224
|
},
|
|
21867
22225
|
emits: ["change"],
|
|
21868
22226
|
setup(__props, { emit: __emit }) {
|
|
@@ -21887,7 +22245,7 @@
|
|
|
21887
22245
|
editorService.select(id);
|
|
21888
22246
|
};
|
|
21889
22247
|
return (_ctx, _cache) => {
|
|
21890
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22248
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$30, [(0, vue.createElementVNode)("div", _hoisted_2$3, [
|
|
21891
22249
|
(0, vue.createCommentVNode)(" 页面片下拉框 "),
|
|
21892
22250
|
(0, vue.createVNode)((0, vue.unref)(_tmagic_form.MSelect), {
|
|
21893
22251
|
class: "select",
|
|
@@ -21938,7 +22296,10 @@
|
|
|
21938
22296
|
},
|
|
21939
22297
|
size: {},
|
|
21940
22298
|
lastValues: {},
|
|
21941
|
-
isCompare: { type: Boolean }
|
|
22299
|
+
isCompare: { type: Boolean },
|
|
22300
|
+
text: {},
|
|
22301
|
+
labelWidth: {},
|
|
22302
|
+
labelPosition: {}
|
|
21942
22303
|
},
|
|
21943
22304
|
emits: ["change"],
|
|
21944
22305
|
setup(__props, { emit: __emit }) {
|
|
@@ -21962,11 +22323,14 @@
|
|
|
21962
22323
|
titlePrefix: props.config.titlePrefix,
|
|
21963
22324
|
expandAll: true,
|
|
21964
22325
|
enableToggleMode: false,
|
|
22326
|
+
flat: props.config.flat,
|
|
21965
22327
|
items: [{
|
|
21966
22328
|
type: "table",
|
|
21967
22329
|
name: "cond",
|
|
21968
|
-
operateColWidth:
|
|
22330
|
+
operateColWidth: props.config.operateColWidth,
|
|
21969
22331
|
enableToggleMode: false,
|
|
22332
|
+
fixed: props.config.fixed,
|
|
22333
|
+
flat: props.config.flat,
|
|
21970
22334
|
items: [
|
|
21971
22335
|
parentFields.value.length ? {
|
|
21972
22336
|
type: "cascader",
|
|
@@ -22091,7 +22455,10 @@
|
|
|
22091
22455
|
disabled: { type: Boolean },
|
|
22092
22456
|
size: {},
|
|
22093
22457
|
lastValues: {},
|
|
22094
|
-
isCompare: { type: Boolean }
|
|
22458
|
+
isCompare: { type: Boolean },
|
|
22459
|
+
text: {},
|
|
22460
|
+
labelWidth: {},
|
|
22461
|
+
labelPosition: {}
|
|
22095
22462
|
},
|
|
22096
22463
|
emits: ["change"],
|
|
22097
22464
|
setup(__props, { emit: __emit }) {
|
|
@@ -22156,7 +22523,7 @@
|
|
|
22156
22523
|
var CondOpSelect_default = CondOpSelect_vue_vue_type_script_setup_true_lang_default;
|
|
22157
22524
|
//#endregion
|
|
22158
22525
|
//#region packages/editor/src/fields/StyleSetter/components/BackgroundPosition.vue?vue&type=script&setup=true&lang.ts
|
|
22159
|
-
var _hoisted_1$
|
|
22526
|
+
var _hoisted_1$29 = { class: "background-position-container" };
|
|
22160
22527
|
var _hoisted_2$2 = { class: "presets-value-list" };
|
|
22161
22528
|
var _hoisted_3$2 = { class: "custom-value" };
|
|
22162
22529
|
var BackgroundPosition_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -22171,7 +22538,10 @@
|
|
|
22171
22538
|
disabled: { type: Boolean },
|
|
22172
22539
|
size: {},
|
|
22173
22540
|
lastValues: {},
|
|
22174
|
-
isCompare: { type: Boolean }
|
|
22541
|
+
isCompare: { type: Boolean },
|
|
22542
|
+
text: {},
|
|
22543
|
+
labelWidth: {},
|
|
22544
|
+
labelPosition: {}
|
|
22175
22545
|
},
|
|
22176
22546
|
emits: ["change"],
|
|
22177
22547
|
setup(__props, { emit: __emit }) {
|
|
@@ -22212,7 +22582,7 @@
|
|
|
22212
22582
|
emit("change", v);
|
|
22213
22583
|
};
|
|
22214
22584
|
return (_ctx, _cache) => {
|
|
22215
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
22585
|
+
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) => {
|
|
22216
22586
|
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_tmagic_design.TMagicButton), {
|
|
22217
22587
|
key: index,
|
|
22218
22588
|
link: "",
|
|
@@ -22251,65 +22621,110 @@
|
|
|
22251
22621
|
//#region packages/editor/src/fields/StyleSetter/components/BackgroundPosition.vue
|
|
22252
22622
|
var BackgroundPosition_default = BackgroundPosition_vue_vue_type_script_setup_true_lang_default;
|
|
22253
22623
|
//#endregion
|
|
22254
|
-
//#region \0plugin-vue:export-helper
|
|
22255
|
-
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
22256
|
-
const target = sfc.__vccOpts || sfc;
|
|
22257
|
-
for (const [key, val] of props) target[key] = val;
|
|
22258
|
-
return target;
|
|
22259
|
-
};
|
|
22260
|
-
//#endregion
|
|
22261
22624
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/Repeat.vue
|
|
22262
|
-
var _sfc_main$
|
|
22263
|
-
var _hoisted_1$
|
|
22625
|
+
var _sfc_main$25 = {};
|
|
22626
|
+
var _hoisted_1$28 = {
|
|
22264
22627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22265
|
-
|
|
22628
|
+
width: "16",
|
|
22629
|
+
height: "16",
|
|
22630
|
+
viewBox: "0 0 16 16",
|
|
22631
|
+
fill: "currentColor"
|
|
22266
22632
|
};
|
|
22267
|
-
function _sfc_render$
|
|
22268
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22633
|
+
function _sfc_render$25(_ctx, _cache) {
|
|
22634
|
+
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)])]);
|
|
22269
22635
|
}
|
|
22270
|
-
var Repeat_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$
|
|
22636
|
+
var Repeat_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$25, [["render", _sfc_render$25]]);
|
|
22271
22637
|
//#endregion
|
|
22272
22638
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue
|
|
22273
|
-
var _sfc_main$
|
|
22274
|
-
var _hoisted_1$
|
|
22639
|
+
var _sfc_main$24 = {};
|
|
22640
|
+
var _hoisted_1$27 = {
|
|
22275
22641
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22276
|
-
|
|
22642
|
+
width: "16",
|
|
22643
|
+
height: "16",
|
|
22644
|
+
viewBox: "0 0 16 16",
|
|
22645
|
+
fill: "currentColor"
|
|
22277
22646
|
};
|
|
22278
|
-
function _sfc_render$
|
|
22279
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22280
|
-
|
|
22281
|
-
|
|
22282
|
-
|
|
22647
|
+
function _sfc_render$24(_ctx, _cache) {
|
|
22648
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$27, [..._cache[0] || (_cache[0] = [
|
|
22649
|
+
(0, vue.createElementVNode)("rect", {
|
|
22650
|
+
x: "3",
|
|
22651
|
+
y: "3",
|
|
22652
|
+
width: "2",
|
|
22653
|
+
height: "10",
|
|
22654
|
+
rx: "1"
|
|
22655
|
+
}, null, -1),
|
|
22656
|
+
(0, vue.createElementVNode)("rect", {
|
|
22657
|
+
x: "7",
|
|
22658
|
+
y: "3",
|
|
22659
|
+
width: "2",
|
|
22660
|
+
height: "10",
|
|
22661
|
+
rx: "1"
|
|
22662
|
+
}, null, -1),
|
|
22663
|
+
(0, vue.createElementVNode)("rect", {
|
|
22664
|
+
x: "11",
|
|
22665
|
+
y: "3",
|
|
22666
|
+
width: "2",
|
|
22667
|
+
height: "10",
|
|
22668
|
+
rx: "1",
|
|
22669
|
+
"fill-opacity": "0.3"
|
|
22670
|
+
}, null, -1)
|
|
22671
|
+
])]);
|
|
22283
22672
|
}
|
|
22284
|
-
var RepeatX_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$
|
|
22673
|
+
var RepeatX_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$24, [["render", _sfc_render$24]]);
|
|
22285
22674
|
//#endregion
|
|
22286
22675
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue
|
|
22287
|
-
var _sfc_main$
|
|
22288
|
-
var _hoisted_1$
|
|
22676
|
+
var _sfc_main$23 = {};
|
|
22677
|
+
var _hoisted_1$26 = {
|
|
22289
22678
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22290
|
-
|
|
22679
|
+
width: "16",
|
|
22680
|
+
height: "16",
|
|
22681
|
+
viewBox: "0 0 16 16",
|
|
22682
|
+
fill: "currentColor"
|
|
22291
22683
|
};
|
|
22292
|
-
function _sfc_render$
|
|
22293
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22684
|
+
function _sfc_render$23(_ctx, _cache) {
|
|
22685
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$26, [..._cache[0] || (_cache[0] = [
|
|
22686
|
+
(0, vue.createElementVNode)("rect", {
|
|
22687
|
+
x: "13",
|
|
22688
|
+
y: "3",
|
|
22689
|
+
width: "2",
|
|
22690
|
+
height: "10",
|
|
22691
|
+
rx: "1",
|
|
22692
|
+
transform: "rotate(90 13 3)"
|
|
22693
|
+
}, null, -1),
|
|
22694
|
+
(0, vue.createElementVNode)("rect", {
|
|
22695
|
+
x: "13",
|
|
22696
|
+
y: "7",
|
|
22697
|
+
width: "2",
|
|
22698
|
+
height: "10",
|
|
22699
|
+
rx: "1",
|
|
22700
|
+
transform: "rotate(90 13 7)"
|
|
22701
|
+
}, null, -1),
|
|
22702
|
+
(0, vue.createElementVNode)("rect", {
|
|
22703
|
+
x: "13",
|
|
22704
|
+
y: "11",
|
|
22705
|
+
width: "2",
|
|
22706
|
+
height: "10",
|
|
22707
|
+
rx: "1",
|
|
22708
|
+
transform: "rotate(90 13 11)",
|
|
22709
|
+
"fill-opacity": "0.3"
|
|
22710
|
+
}, null, -1)
|
|
22711
|
+
])]);
|
|
22297
22712
|
}
|
|
22298
|
-
var RepeatY_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$
|
|
22713
|
+
var RepeatY_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$23, [["render", _sfc_render$23]]);
|
|
22299
22714
|
//#endregion
|
|
22300
22715
|
//#region packages/editor/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue
|
|
22301
|
-
var _sfc_main$
|
|
22302
|
-
var _hoisted_1$
|
|
22716
|
+
var _sfc_main$22 = {};
|
|
22717
|
+
var _hoisted_1$25 = {
|
|
22303
22718
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22304
|
-
|
|
22719
|
+
width: "10",
|
|
22720
|
+
height: "10",
|
|
22721
|
+
viewBox: "0 0 10 10",
|
|
22722
|
+
fill: "currentColor"
|
|
22305
22723
|
};
|
|
22306
|
-
function _sfc_render$
|
|
22307
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22308
|
-
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",
|
|
22309
|
-
fill: "#5D5D5D"
|
|
22310
|
-
}, null, -1)])]);
|
|
22724
|
+
function _sfc_render$22(_ctx, _cache) {
|
|
22725
|
+
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)])]);
|
|
22311
22726
|
}
|
|
22312
|
-
var NoRepeat_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$
|
|
22727
|
+
var NoRepeat_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$22, [["render", _sfc_render$22]]);
|
|
22313
22728
|
//#endregion
|
|
22314
22729
|
//#region packages/editor/src/fields/StyleSetter/pro/Background.vue?vue&type=script&setup=true&lang.ts
|
|
22315
22730
|
var Background_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -22319,7 +22734,8 @@
|
|
|
22319
22734
|
lastValues: {},
|
|
22320
22735
|
isCompare: { type: Boolean },
|
|
22321
22736
|
disabled: { type: Boolean },
|
|
22322
|
-
size: {}
|
|
22737
|
+
size: {},
|
|
22738
|
+
theme: {}
|
|
22323
22739
|
},
|
|
22324
22740
|
emits: ["change", "addDiffCount"],
|
|
22325
22741
|
setup(__props, { emit: __emit }) {
|
|
@@ -22343,7 +22759,7 @@
|
|
|
22343
22759
|
name: "backgroundSize",
|
|
22344
22760
|
text: "背景尺寸",
|
|
22345
22761
|
type: "radioGroup",
|
|
22346
|
-
childType: "
|
|
22762
|
+
childType: "default",
|
|
22347
22763
|
labelWidth: "68px",
|
|
22348
22764
|
options: [
|
|
22349
22765
|
{
|
|
@@ -22373,22 +22789,26 @@
|
|
|
22373
22789
|
{
|
|
22374
22790
|
value: "repeat",
|
|
22375
22791
|
icon: (0, vue.markRaw)(Repeat_default),
|
|
22376
|
-
tooltip: "垂直和水平方向重复 repeat"
|
|
22792
|
+
tooltip: "垂直和水平方向重复 repeat",
|
|
22793
|
+
text: "垂直与水平重复"
|
|
22377
22794
|
},
|
|
22378
22795
|
{
|
|
22379
22796
|
value: "repeat-x",
|
|
22380
22797
|
icon: (0, vue.markRaw)(RepeatX_default),
|
|
22381
|
-
tooltip: "水平方向重复 repeat-x"
|
|
22798
|
+
tooltip: "水平方向重复 repeat-x",
|
|
22799
|
+
text: "水平方向重复"
|
|
22382
22800
|
},
|
|
22383
22801
|
{
|
|
22384
22802
|
value: "repeat-y",
|
|
22385
22803
|
icon: (0, vue.markRaw)(RepeatY_default),
|
|
22386
|
-
tooltip: "垂直方向重复 repeat-y"
|
|
22804
|
+
tooltip: "垂直方向重复 repeat-y",
|
|
22805
|
+
text: "垂直方向重复"
|
|
22387
22806
|
},
|
|
22388
22807
|
{
|
|
22389
22808
|
value: "no-repeat",
|
|
22390
22809
|
icon: (0, vue.markRaw)(NoRepeat_default),
|
|
22391
|
-
tooltip: "不重复 no-repeat"
|
|
22810
|
+
tooltip: "不重复 no-repeat",
|
|
22811
|
+
text: "不重复"
|
|
22392
22812
|
}
|
|
22393
22813
|
]
|
|
22394
22814
|
},
|
|
@@ -22430,37 +22850,37 @@
|
|
|
22430
22850
|
var Background_default = Background_vue_vue_type_script_setup_true_lang_default;
|
|
22431
22851
|
//#endregion
|
|
22432
22852
|
//#region packages/editor/src/fields/StyleSetter/icons/text-align/Left.vue
|
|
22433
|
-
var _sfc_main$
|
|
22434
|
-
var _hoisted_1$
|
|
22853
|
+
var _sfc_main$21 = {};
|
|
22854
|
+
var _hoisted_1$24 = {
|
|
22435
22855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22436
22856
|
viewBox: "0 0 1024 1024"
|
|
22437
22857
|
};
|
|
22438
|
-
function _sfc_render$
|
|
22439
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22858
|
+
function _sfc_render$21(_ctx, _cache) {
|
|
22859
|
+
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)])]);
|
|
22440
22860
|
}
|
|
22441
|
-
var Left_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$
|
|
22861
|
+
var Left_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$21, [["render", _sfc_render$21]]);
|
|
22442
22862
|
//#endregion
|
|
22443
22863
|
//#region packages/editor/src/fields/StyleSetter/icons/text-align/Center.vue
|
|
22444
|
-
var _sfc_main$
|
|
22445
|
-
var _hoisted_1$
|
|
22864
|
+
var _sfc_main$20 = {};
|
|
22865
|
+
var _hoisted_1$23 = {
|
|
22446
22866
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22447
22867
|
viewBox: "0 0 1024 1024"
|
|
22448
22868
|
};
|
|
22449
|
-
function _sfc_render$
|
|
22450
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22869
|
+
function _sfc_render$20(_ctx, _cache) {
|
|
22870
|
+
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)])]);
|
|
22451
22871
|
}
|
|
22452
|
-
var Center_default$
|
|
22872
|
+
var Center_default$2 = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$20, [["render", _sfc_render$20]]);
|
|
22453
22873
|
//#endregion
|
|
22454
22874
|
//#region packages/editor/src/fields/StyleSetter/icons/text-align/Right.vue
|
|
22455
|
-
var _sfc_main$
|
|
22456
|
-
var _hoisted_1$
|
|
22875
|
+
var _sfc_main$19 = {};
|
|
22876
|
+
var _hoisted_1$22 = {
|
|
22457
22877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22458
22878
|
viewBox: "0 0 1024 1024"
|
|
22459
22879
|
};
|
|
22460
|
-
function _sfc_render$
|
|
22461
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$
|
|
22880
|
+
function _sfc_render$19(_ctx, _cache) {
|
|
22881
|
+
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)])]);
|
|
22462
22882
|
}
|
|
22463
|
-
var Right_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$
|
|
22883
|
+
var Right_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$19, [["render", _sfc_render$19]]);
|
|
22464
22884
|
//#endregion
|
|
22465
22885
|
//#region packages/editor/src/fields/StyleSetter/pro/Font.vue?vue&type=script&setup=true&lang.ts
|
|
22466
22886
|
var Font_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -22522,17 +22942,20 @@
|
|
|
22522
22942
|
{
|
|
22523
22943
|
value: "left",
|
|
22524
22944
|
icon: (0, vue.markRaw)(Left_default),
|
|
22525
|
-
tooltip: "左对齐 row"
|
|
22945
|
+
tooltip: "左对齐 row",
|
|
22946
|
+
text: "左对齐"
|
|
22526
22947
|
},
|
|
22527
22948
|
{
|
|
22528
22949
|
value: "center",
|
|
22529
|
-
icon: (0, vue.markRaw)(Center_default$
|
|
22530
|
-
tooltip: "居中对齐 center"
|
|
22950
|
+
icon: (0, vue.markRaw)(Center_default$2),
|
|
22951
|
+
tooltip: "居中对齐 center",
|
|
22952
|
+
text: "居中对齐"
|
|
22531
22953
|
},
|
|
22532
22954
|
{
|
|
22533
22955
|
value: "right",
|
|
22534
22956
|
icon: (0, vue.markRaw)(Right_default),
|
|
22535
|
-
tooltip: "右对齐 right"
|
|
22957
|
+
tooltip: "右对齐 right",
|
|
22958
|
+
text: "右对齐"
|
|
22536
22959
|
}
|
|
22537
22960
|
]
|
|
22538
22961
|
}
|
|
@@ -22567,7 +22990,7 @@
|
|
|
22567
22990
|
var Font_default = Font_vue_vue_type_script_setup_true_lang_default;
|
|
22568
22991
|
//#endregion
|
|
22569
22992
|
//#region packages/editor/src/fields/StyleSetter/components/Box.vue?vue&type=script&setup=true&lang.ts
|
|
22570
|
-
var _hoisted_1$
|
|
22993
|
+
var _hoisted_1$21 = { class: "layout-box-container" };
|
|
22571
22994
|
var _hoisted_2$1 = {
|
|
22572
22995
|
key: 0,
|
|
22573
22996
|
class: "help-txt"
|
|
@@ -22631,7 +23054,7 @@
|
|
|
22631
23054
|
emit("change", event.target.value, { modifyKey: name });
|
|
22632
23055
|
};
|
|
22633
23056
|
return (_ctx, _cache) => {
|
|
22634
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
23057
|
+
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) => {
|
|
22635
23058
|
return (0, vue.createElementVNode)("div", {
|
|
22636
23059
|
key: index,
|
|
22637
23060
|
class: (0, vue.normalizeClass)(item.class)
|
|
@@ -22650,6 +23073,184 @@
|
|
|
22650
23073
|
//#region packages/editor/src/fields/StyleSetter/components/Box.vue
|
|
22651
23074
|
var Box_default = Box_vue_vue_type_script_setup_true_lang_default;
|
|
22652
23075
|
//#endregion
|
|
23076
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/Center.vue
|
|
23077
|
+
var _sfc_main$18 = {};
|
|
23078
|
+
var _hoisted_1$20 = {
|
|
23079
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23080
|
+
width: "16",
|
|
23081
|
+
height: "16",
|
|
23082
|
+
viewBox: "0 0 16 16",
|
|
23083
|
+
fill: "currentColor"
|
|
23084
|
+
};
|
|
23085
|
+
function _sfc_render$18(_ctx, _cache) {
|
|
23086
|
+
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", {
|
|
23087
|
+
x: "13.75",
|
|
23088
|
+
y: "7.75",
|
|
23089
|
+
width: "0.5",
|
|
23090
|
+
height: "11.5",
|
|
23091
|
+
rx: "0.25",
|
|
23092
|
+
transform: "rotate(90 13.75 7.75)",
|
|
23093
|
+
stroke: "black",
|
|
23094
|
+
"stroke-opacity": "0.3",
|
|
23095
|
+
style: {
|
|
23096
|
+
"stroke": "black",
|
|
23097
|
+
"stroke-opacity": "0.3"
|
|
23098
|
+
},
|
|
23099
|
+
"stroke-width": "0.5"
|
|
23100
|
+
}, null, -1)])]);
|
|
23101
|
+
}
|
|
23102
|
+
var Center_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$18, [["render", _sfc_render$18]]);
|
|
23103
|
+
//#endregion
|
|
23104
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/FlexEnd.vue
|
|
23105
|
+
var _sfc_main$17 = {};
|
|
23106
|
+
var _hoisted_1$19 = {
|
|
23107
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23108
|
+
width: "16",
|
|
23109
|
+
height: "16",
|
|
23110
|
+
viewBox: "0 0 16 16",
|
|
23111
|
+
fill: "currentColor"
|
|
23112
|
+
};
|
|
23113
|
+
function _sfc_render$17(_ctx, _cache) {
|
|
23114
|
+
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", {
|
|
23115
|
+
x: "13.75",
|
|
23116
|
+
y: "12.25",
|
|
23117
|
+
width: "0.5",
|
|
23118
|
+
height: "11.5",
|
|
23119
|
+
rx: "0.25",
|
|
23120
|
+
transform: "rotate(90 13.75 12.25)",
|
|
23121
|
+
stroke: "black",
|
|
23122
|
+
"stroke-opacity": "0.3",
|
|
23123
|
+
style: {
|
|
23124
|
+
"stroke": "black",
|
|
23125
|
+
"stroke-opacity": "0.3"
|
|
23126
|
+
},
|
|
23127
|
+
"stroke-width": "0.5"
|
|
23128
|
+
}, null, -1)])]);
|
|
23129
|
+
}
|
|
23130
|
+
var FlexEnd_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$17, [["render", _sfc_render$17]]);
|
|
23131
|
+
//#endregion
|
|
23132
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/FlexStart.vue
|
|
23133
|
+
var _sfc_main$16 = {};
|
|
23134
|
+
var _hoisted_1$18 = {
|
|
23135
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23136
|
+
width: "16",
|
|
23137
|
+
height: "16",
|
|
23138
|
+
viewBox: "0 0 16 16",
|
|
23139
|
+
fill: "currentColor"
|
|
23140
|
+
};
|
|
23141
|
+
function _sfc_render$16(_ctx, _cache) {
|
|
23142
|
+
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", {
|
|
23143
|
+
x: "13.75",
|
|
23144
|
+
y: "3.25",
|
|
23145
|
+
width: "0.5",
|
|
23146
|
+
height: "11.5",
|
|
23147
|
+
rx: "0.25",
|
|
23148
|
+
transform: "rotate(90 13.75 3.25)",
|
|
23149
|
+
stroke: "white",
|
|
23150
|
+
"stroke-opacity": "0.3",
|
|
23151
|
+
style: {
|
|
23152
|
+
"stroke": "white",
|
|
23153
|
+
"stroke-opacity": "0.3"
|
|
23154
|
+
},
|
|
23155
|
+
"stroke-width": "0.5"
|
|
23156
|
+
}, null, -1)])]);
|
|
23157
|
+
}
|
|
23158
|
+
var FlexStart_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$16, [["render", _sfc_render$16]]);
|
|
23159
|
+
//#endregion
|
|
23160
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/SpaceAround.vue
|
|
23161
|
+
var _sfc_main$15 = {};
|
|
23162
|
+
var _hoisted_1$17 = {
|
|
23163
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23164
|
+
width: "16",
|
|
23165
|
+
height: "16",
|
|
23166
|
+
viewBox: "0 0 16 16",
|
|
23167
|
+
fill: "currentColor"
|
|
23168
|
+
};
|
|
23169
|
+
function _sfc_render$15(_ctx, _cache) {
|
|
23170
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$17, [..._cache[0] || (_cache[0] = [
|
|
23171
|
+
(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),
|
|
23172
|
+
(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),
|
|
23173
|
+
(0, vue.createElementVNode)("rect", {
|
|
23174
|
+
x: "13.75",
|
|
23175
|
+
y: "10.25",
|
|
23176
|
+
width: "0.5",
|
|
23177
|
+
height: "11.5",
|
|
23178
|
+
rx: "0.25",
|
|
23179
|
+
transform: "rotate(90 13.75 10.25)",
|
|
23180
|
+
stroke: "black",
|
|
23181
|
+
"stroke-opacity": "0.3",
|
|
23182
|
+
style: {
|
|
23183
|
+
"stroke": "black",
|
|
23184
|
+
"stroke-opacity": "0.3"
|
|
23185
|
+
},
|
|
23186
|
+
"stroke-width": "0.5"
|
|
23187
|
+
}, null, -1),
|
|
23188
|
+
(0, vue.createElementVNode)("rect", {
|
|
23189
|
+
x: "13.75",
|
|
23190
|
+
y: "4.25",
|
|
23191
|
+
width: "0.5",
|
|
23192
|
+
height: "11.5",
|
|
23193
|
+
rx: "0.25",
|
|
23194
|
+
transform: "rotate(90 13.75 4.25)",
|
|
23195
|
+
stroke: "black",
|
|
23196
|
+
"stroke-opacity": "0.3",
|
|
23197
|
+
style: {
|
|
23198
|
+
"stroke": "black",
|
|
23199
|
+
"stroke-opacity": "0.3"
|
|
23200
|
+
},
|
|
23201
|
+
"stroke-width": "0.5"
|
|
23202
|
+
}, null, -1)
|
|
23203
|
+
])]);
|
|
23204
|
+
}
|
|
23205
|
+
var SpaceAround_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$15, [["render", _sfc_render$15]]);
|
|
23206
|
+
//#endregion
|
|
23207
|
+
//#region packages/editor/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue
|
|
23208
|
+
var _sfc_main$14 = {};
|
|
23209
|
+
var _hoisted_1$16 = {
|
|
23210
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23211
|
+
width: "16",
|
|
23212
|
+
height: "16",
|
|
23213
|
+
viewBox: "0 0 16 16",
|
|
23214
|
+
fill: "currentColor"
|
|
23215
|
+
};
|
|
23216
|
+
function _sfc_render$14(_ctx, _cache) {
|
|
23217
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$16, [..._cache[0] || (_cache[0] = [
|
|
23218
|
+
(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),
|
|
23219
|
+
(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),
|
|
23220
|
+
(0, vue.createElementVNode)("rect", {
|
|
23221
|
+
x: "13.75",
|
|
23222
|
+
y: "14.25",
|
|
23223
|
+
width: "0.5",
|
|
23224
|
+
height: "11.5",
|
|
23225
|
+
rx: "0.25",
|
|
23226
|
+
transform: "rotate(90 13.75 14.25)",
|
|
23227
|
+
stroke: "black",
|
|
23228
|
+
"stroke-opacity": "0.3",
|
|
23229
|
+
style: {
|
|
23230
|
+
"stroke": "black",
|
|
23231
|
+
"stroke-opacity": "0.3"
|
|
23232
|
+
},
|
|
23233
|
+
"stroke-width": "0.5"
|
|
23234
|
+
}, null, -1),
|
|
23235
|
+
(0, vue.createElementVNode)("rect", {
|
|
23236
|
+
x: "13.75",
|
|
23237
|
+
y: "1.25",
|
|
23238
|
+
width: "0.5",
|
|
23239
|
+
height: "11.5",
|
|
23240
|
+
rx: "0.25",
|
|
23241
|
+
transform: "rotate(90 13.75 1.25)",
|
|
23242
|
+
stroke: "black",
|
|
23243
|
+
"stroke-opacity": "0.3",
|
|
23244
|
+
style: {
|
|
23245
|
+
"stroke": "black",
|
|
23246
|
+
"stroke-opacity": "0.3"
|
|
23247
|
+
},
|
|
23248
|
+
"stroke-width": "0.5"
|
|
23249
|
+
}, null, -1)
|
|
23250
|
+
])]);
|
|
23251
|
+
}
|
|
23252
|
+
var SpaceBetween_default$1 = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$14, [["render", _sfc_render$14]]);
|
|
23253
|
+
//#endregion
|
|
22653
23254
|
//#region packages/editor/src/fields/StyleSetter/icons/display/Block.vue
|
|
22654
23255
|
var _sfc_main$13 = {};
|
|
22655
23256
|
var _hoisted_1$15 = {
|
|
@@ -22709,10 +23310,18 @@
|
|
|
22709
23310
|
var _sfc_main$8 = {};
|
|
22710
23311
|
var _hoisted_1$10 = {
|
|
22711
23312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22712
|
-
|
|
23313
|
+
width: "16",
|
|
23314
|
+
height: "16",
|
|
23315
|
+
viewBox: "0 0 16 16",
|
|
23316
|
+
fill: "currentColor"
|
|
22713
23317
|
};
|
|
22714
23318
|
function _sfc_render$8(_ctx, _cache) {
|
|
22715
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$10, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23319
|
+
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", {
|
|
23320
|
+
"fill-rule": "evenodd",
|
|
23321
|
+
"clip-rule": "evenodd",
|
|
23322
|
+
d: "M11 12L8 15L5 12L11 12Z",
|
|
23323
|
+
"fill-opacity": "0.3"
|
|
23324
|
+
}, null, -1)])]);
|
|
22716
23325
|
}
|
|
22717
23326
|
var Column_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$8, [["render", _sfc_render$8]]);
|
|
22718
23327
|
//#endregion
|
|
@@ -22720,10 +23329,18 @@
|
|
|
22720
23329
|
var _sfc_main$7 = {};
|
|
22721
23330
|
var _hoisted_1$9 = {
|
|
22722
23331
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22723
|
-
|
|
23332
|
+
width: "16",
|
|
23333
|
+
height: "16",
|
|
23334
|
+
viewBox: "0 0 16 16",
|
|
23335
|
+
fill: "currentColor"
|
|
22724
23336
|
};
|
|
22725
23337
|
function _sfc_render$7(_ctx, _cache) {
|
|
22726
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23338
|
+
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", {
|
|
23339
|
+
"fill-rule": "evenodd",
|
|
23340
|
+
"clip-rule": "evenodd",
|
|
23341
|
+
d: "M5 4L8 1L11 4L5 4Z",
|
|
23342
|
+
"fill-opacity": "0.3"
|
|
23343
|
+
}, null, -1)])]);
|
|
22727
23344
|
}
|
|
22728
23345
|
var ColumnReverse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$7, [["render", _sfc_render$7]]);
|
|
22729
23346
|
//#endregion
|
|
@@ -22731,10 +23348,18 @@
|
|
|
22731
23348
|
var _sfc_main$6 = {};
|
|
22732
23349
|
var _hoisted_1$8 = {
|
|
22733
23350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22734
|
-
|
|
23351
|
+
width: "16",
|
|
23352
|
+
height: "16",
|
|
23353
|
+
viewBox: "0 0 16 16",
|
|
23354
|
+
fill: "currentColor"
|
|
22735
23355
|
};
|
|
22736
23356
|
function _sfc_render$6(_ctx, _cache) {
|
|
22737
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23357
|
+
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", {
|
|
23358
|
+
"fill-rule": "evenodd",
|
|
23359
|
+
"clip-rule": "evenodd",
|
|
23360
|
+
d: "M12 5L15 8L12 11L12 5Z",
|
|
23361
|
+
"fill-opacity": "0.3"
|
|
23362
|
+
}, null, -1)])]);
|
|
22738
23363
|
}
|
|
22739
23364
|
var Row_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
22740
23365
|
//#endregion
|
|
@@ -22742,10 +23367,18 @@
|
|
|
22742
23367
|
var _sfc_main$5 = {};
|
|
22743
23368
|
var _hoisted_1$7 = {
|
|
22744
23369
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22745
|
-
|
|
23370
|
+
width: "16",
|
|
23371
|
+
height: "16",
|
|
23372
|
+
viewBox: "0 0 16 16",
|
|
23373
|
+
fill: "currentColor"
|
|
22746
23374
|
};
|
|
22747
23375
|
function _sfc_render$5(_ctx, _cache) {
|
|
22748
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23376
|
+
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", {
|
|
23377
|
+
"fill-rule": "evenodd",
|
|
23378
|
+
"clip-rule": "evenodd",
|
|
23379
|
+
d: "M4 11L1 8L4 5L4 11Z",
|
|
23380
|
+
"fill-opacity": "0.3"
|
|
23381
|
+
}, null, -1)])]);
|
|
22749
23382
|
}
|
|
22750
23383
|
var RowReverse_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
22751
23384
|
//#endregion
|
|
@@ -22753,10 +23386,24 @@
|
|
|
22753
23386
|
var _sfc_main$4 = {};
|
|
22754
23387
|
var _hoisted_1$6 = {
|
|
22755
23388
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22756
|
-
|
|
23389
|
+
width: "16",
|
|
23390
|
+
height: "16",
|
|
23391
|
+
viewBox: "0 0 16 16",
|
|
23392
|
+
fill: "currentColor"
|
|
22757
23393
|
};
|
|
22758
23394
|
function _sfc_render$4(_ctx, _cache) {
|
|
22759
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23395
|
+
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", {
|
|
23396
|
+
x: "7.5",
|
|
23397
|
+
y: "2",
|
|
23398
|
+
width: "1",
|
|
23399
|
+
height: "12",
|
|
23400
|
+
rx: "0.5",
|
|
23401
|
+
"fill-opacity": "0.3",
|
|
23402
|
+
style: {
|
|
23403
|
+
"fill": "black",
|
|
23404
|
+
"fill-opacity": "0.3"
|
|
23405
|
+
}
|
|
23406
|
+
}, null, -1)])]);
|
|
22760
23407
|
}
|
|
22761
23408
|
var Center_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
22762
23409
|
//#endregion
|
|
@@ -22764,10 +23411,26 @@
|
|
|
22764
23411
|
var _sfc_main$3 = {};
|
|
22765
23412
|
var _hoisted_1$5 = {
|
|
22766
23413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22767
|
-
|
|
23414
|
+
width: "16",
|
|
23415
|
+
height: "16",
|
|
23416
|
+
viewBox: "0 0 16 16",
|
|
23417
|
+
fill: "currentColor"
|
|
22768
23418
|
};
|
|
22769
23419
|
function _sfc_render$3(_ctx, _cache) {
|
|
22770
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23420
|
+
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", {
|
|
23421
|
+
x: "14.25",
|
|
23422
|
+
y: "2.25",
|
|
23423
|
+
width: "0.5",
|
|
23424
|
+
height: "11.5",
|
|
23425
|
+
rx: "0.25",
|
|
23426
|
+
stroke: "black",
|
|
23427
|
+
"stroke-opacity": "0.3",
|
|
23428
|
+
style: {
|
|
23429
|
+
"stroke": "black",
|
|
23430
|
+
"stroke-opacity": "0.3"
|
|
23431
|
+
},
|
|
23432
|
+
"stroke-width": "0.5"
|
|
23433
|
+
}, null, -1)])]);
|
|
22771
23434
|
}
|
|
22772
23435
|
var FlexEnd_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
22773
23436
|
//#endregion
|
|
@@ -22775,10 +23438,26 @@
|
|
|
22775
23438
|
var _sfc_main$2 = {};
|
|
22776
23439
|
var _hoisted_1$4 = {
|
|
22777
23440
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22778
|
-
|
|
23441
|
+
width: "16",
|
|
23442
|
+
height: "16",
|
|
23443
|
+
viewBox: "0 0 16 16",
|
|
23444
|
+
fill: "currentColor"
|
|
22779
23445
|
};
|
|
22780
23446
|
function _sfc_render$2(_ctx, _cache) {
|
|
22781
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("path", { d: "
|
|
23447
|
+
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", {
|
|
23448
|
+
x: "1.25",
|
|
23449
|
+
y: "2.25",
|
|
23450
|
+
width: "0.5",
|
|
23451
|
+
height: "11.5",
|
|
23452
|
+
rx: "0.25",
|
|
23453
|
+
stroke: "white",
|
|
23454
|
+
"stroke-opacity": "0.3",
|
|
23455
|
+
style: {
|
|
23456
|
+
"stroke": "white",
|
|
23457
|
+
"stroke-opacity": "0.3"
|
|
23458
|
+
},
|
|
23459
|
+
"stroke-width": "0.5"
|
|
23460
|
+
}, null, -1)])]);
|
|
22782
23461
|
}
|
|
22783
23462
|
var FlexStart_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
22784
23463
|
//#endregion
|
|
@@ -22786,10 +23465,44 @@
|
|
|
22786
23465
|
var _sfc_main$1 = {};
|
|
22787
23466
|
var _hoisted_1$3 = {
|
|
22788
23467
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22789
|
-
|
|
23468
|
+
width: "16",
|
|
23469
|
+
height: "16",
|
|
23470
|
+
viewBox: "0 0 16 16",
|
|
23471
|
+
fill: "currentColor"
|
|
22790
23472
|
};
|
|
22791
23473
|
function _sfc_render$1(_ctx, _cache) {
|
|
22792
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
|
|
23474
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
|
|
23475
|
+
(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),
|
|
23476
|
+
(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),
|
|
23477
|
+
(0, vue.createElementVNode)("rect", {
|
|
23478
|
+
x: "11.25",
|
|
23479
|
+
y: "2.25",
|
|
23480
|
+
width: "0.5",
|
|
23481
|
+
height: "11.5",
|
|
23482
|
+
rx: "0.25",
|
|
23483
|
+
stroke: "black",
|
|
23484
|
+
"stroke-opacity": "0.3",
|
|
23485
|
+
style: {
|
|
23486
|
+
"stroke": "black",
|
|
23487
|
+
"stroke-opacity": "0.3"
|
|
23488
|
+
},
|
|
23489
|
+
"stroke-width": "0.5"
|
|
23490
|
+
}, null, -1),
|
|
23491
|
+
(0, vue.createElementVNode)("rect", {
|
|
23492
|
+
x: "4.25",
|
|
23493
|
+
y: "2.25",
|
|
23494
|
+
width: "0.5",
|
|
23495
|
+
height: "11.5",
|
|
23496
|
+
rx: "0.25",
|
|
23497
|
+
stroke: "black",
|
|
23498
|
+
"stroke-opacity": "0.3",
|
|
23499
|
+
style: {
|
|
23500
|
+
"stroke": "black",
|
|
23501
|
+
"stroke-opacity": "0.3"
|
|
23502
|
+
},
|
|
23503
|
+
"stroke-width": "0.5"
|
|
23504
|
+
}, null, -1)
|
|
23505
|
+
])]);
|
|
22793
23506
|
}
|
|
22794
23507
|
var SpaceAround_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
22795
23508
|
//#endregion
|
|
@@ -22797,10 +23510,40 @@
|
|
|
22797
23510
|
var _sfc_main = {};
|
|
22798
23511
|
var _hoisted_1$2 = {
|
|
22799
23512
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22800
|
-
|
|
23513
|
+
width: "16",
|
|
23514
|
+
height: "16",
|
|
23515
|
+
viewBox: "0 0 16 16",
|
|
23516
|
+
fill: "currentColor"
|
|
22801
23517
|
};
|
|
22802
23518
|
function _sfc_render(_ctx, _cache) {
|
|
22803
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
|
|
23519
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
|
|
23520
|
+
(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),
|
|
23521
|
+
(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),
|
|
23522
|
+
(0, vue.createElementVNode)("rect", {
|
|
23523
|
+
x: "14.25",
|
|
23524
|
+
y: "2.25",
|
|
23525
|
+
width: "0.5",
|
|
23526
|
+
height: "11.5",
|
|
23527
|
+
rx: "0.25",
|
|
23528
|
+
stroke: "black",
|
|
23529
|
+
"stroke-opacity": "0.3",
|
|
23530
|
+
"stroke-width": "0.5"
|
|
23531
|
+
}, null, -1),
|
|
23532
|
+
(0, vue.createElementVNode)("rect", {
|
|
23533
|
+
x: "1.25",
|
|
23534
|
+
y: "2.25",
|
|
23535
|
+
width: "0.5",
|
|
23536
|
+
height: "11.5",
|
|
23537
|
+
rx: "0.25",
|
|
23538
|
+
stroke: "black",
|
|
23539
|
+
"stroke-opacity": "0.3",
|
|
23540
|
+
style: {
|
|
23541
|
+
"stroke": "black",
|
|
23542
|
+
"stroke-opacity": "0.3"
|
|
23543
|
+
},
|
|
23544
|
+
"stroke-width": "0.5"
|
|
23545
|
+
}, null, -1)
|
|
23546
|
+
])]);
|
|
22804
23547
|
}
|
|
22805
23548
|
var SpaceBetween_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
22806
23549
|
//#endregion
|
|
@@ -22812,43 +23555,51 @@
|
|
|
22812
23555
|
lastValues: {},
|
|
22813
23556
|
isCompare: { type: Boolean },
|
|
22814
23557
|
disabled: { type: Boolean },
|
|
22815
|
-
size: {}
|
|
23558
|
+
size: {},
|
|
23559
|
+
theme: {}
|
|
22816
23560
|
},
|
|
22817
23561
|
emits: ["change", "addDiffCount"],
|
|
22818
23562
|
setup(__props, { emit: __emit }) {
|
|
23563
|
+
const props = __props;
|
|
22819
23564
|
const emit = __emit;
|
|
23565
|
+
const displayTheme = (0, _tmagic_design.useTheme)(props);
|
|
22820
23566
|
const config = (0, _tmagic_form.defineFormItem)({ items: [
|
|
22821
23567
|
{
|
|
22822
23568
|
name: "display",
|
|
22823
23569
|
text: "模式",
|
|
22824
23570
|
type: "radioGroup",
|
|
22825
|
-
childType: "button",
|
|
23571
|
+
childType: displayTheme.value !== "magic-admin" ? "button" : "default",
|
|
22826
23572
|
labelWidth: "68px",
|
|
22827
23573
|
options: [
|
|
22828
23574
|
{
|
|
22829
23575
|
value: "inline",
|
|
22830
|
-
icon: (0, vue.markRaw)(Inline_default),
|
|
22831
|
-
tooltip: "内联布局 inline"
|
|
23576
|
+
icon: displayTheme.value !== "magic-admin" ? (0, vue.markRaw)(Inline_default) : void 0,
|
|
23577
|
+
tooltip: "内联布局 inline",
|
|
23578
|
+
text: "内联布局\n inline"
|
|
22832
23579
|
},
|
|
22833
23580
|
{
|
|
22834
23581
|
value: "flex",
|
|
22835
|
-
icon: (0, vue.markRaw)(Flex_default),
|
|
22836
|
-
tooltip: "弹性布局 flex"
|
|
23582
|
+
icon: displayTheme.value !== "magic-admin" ? (0, vue.markRaw)(Flex_default) : void 0,
|
|
23583
|
+
tooltip: "弹性布局 flex",
|
|
23584
|
+
text: "弹性布局\n flex"
|
|
22837
23585
|
},
|
|
22838
23586
|
{
|
|
22839
23587
|
value: "block",
|
|
22840
|
-
icon: (0, vue.markRaw)(Block_default),
|
|
22841
|
-
tooltip: "块级布局 block"
|
|
23588
|
+
icon: displayTheme.value !== "magic-admin" ? (0, vue.markRaw)(Block_default) : void 0,
|
|
23589
|
+
tooltip: "块级布局 block",
|
|
23590
|
+
text: "块级布局\n block"
|
|
22842
23591
|
},
|
|
22843
23592
|
{
|
|
22844
23593
|
value: "inline-block",
|
|
22845
|
-
icon: (0, vue.markRaw)(InlineBlock_default),
|
|
22846
|
-
tooltip: "内联块布局 inline-block"
|
|
23594
|
+
icon: displayTheme.value !== "magic-admin" ? (0, vue.markRaw)(InlineBlock_default) : void 0,
|
|
23595
|
+
tooltip: "内联块布局 inline-block",
|
|
23596
|
+
text: "内联块布局\n inline-block"
|
|
22847
23597
|
},
|
|
22848
23598
|
{
|
|
22849
23599
|
value: "none",
|
|
22850
|
-
icon: (0, vue.markRaw)(None_default),
|
|
22851
|
-
tooltip: "隐藏 none"
|
|
23600
|
+
icon: displayTheme.value !== "magic-admin" ? (0, vue.markRaw)(None_default) : void 0,
|
|
23601
|
+
tooltip: "隐藏 none",
|
|
23602
|
+
text: "隐藏\n none"
|
|
22852
23603
|
}
|
|
22853
23604
|
]
|
|
22854
23605
|
},
|
|
@@ -22862,22 +23613,26 @@
|
|
|
22862
23613
|
{
|
|
22863
23614
|
value: "row",
|
|
22864
23615
|
icon: (0, vue.markRaw)(Row_default),
|
|
22865
|
-
tooltip: "水平方向 起点在左侧 row"
|
|
23616
|
+
tooltip: "水平方向 起点在左侧 row",
|
|
23617
|
+
text: "左起点"
|
|
22866
23618
|
},
|
|
22867
23619
|
{
|
|
22868
23620
|
value: "row-reverse",
|
|
22869
23621
|
icon: (0, vue.markRaw)(RowReverse_default),
|
|
22870
|
-
tooltip: "水平方向 起点在右侧 row-reverse"
|
|
23622
|
+
tooltip: "水平方向 起点在右侧 row-reverse",
|
|
23623
|
+
text: "右起点"
|
|
22871
23624
|
},
|
|
22872
23625
|
{
|
|
22873
23626
|
value: "column",
|
|
22874
23627
|
icon: (0, vue.markRaw)(Column_default),
|
|
22875
|
-
tooltip: "垂直方向 起点在上沿 column"
|
|
23628
|
+
tooltip: "垂直方向 起点在上沿 column",
|
|
23629
|
+
text: "顶部起点"
|
|
22876
23630
|
},
|
|
22877
23631
|
{
|
|
22878
23632
|
value: "column-reverse",
|
|
22879
23633
|
icon: (0, vue.markRaw)(ColumnReverse_default),
|
|
22880
|
-
tooltip: "垂直方向 起点在下沿 column-reverse"
|
|
23634
|
+
tooltip: "垂直方向 起点在下沿 column-reverse",
|
|
23635
|
+
text: "底部起点"
|
|
22881
23636
|
}
|
|
22882
23637
|
],
|
|
22883
23638
|
display: (_mForm, { model }) => model.display === "flex"
|
|
@@ -22892,27 +23647,32 @@
|
|
|
22892
23647
|
{
|
|
22893
23648
|
value: "flex-start",
|
|
22894
23649
|
icon: (0, vue.markRaw)(FlexStart_default),
|
|
22895
|
-
tooltip: "左对齐 flex-start"
|
|
23650
|
+
tooltip: "左对齐 flex-start",
|
|
23651
|
+
text: "左对齐"
|
|
22896
23652
|
},
|
|
22897
23653
|
{
|
|
22898
23654
|
value: "flex-end",
|
|
22899
23655
|
icon: (0, vue.markRaw)(FlexEnd_default),
|
|
22900
|
-
tooltip: "右对齐 flex-end"
|
|
23656
|
+
tooltip: "右对齐 flex-end",
|
|
23657
|
+
text: "右对齐"
|
|
22901
23658
|
},
|
|
22902
23659
|
{
|
|
22903
23660
|
value: "center",
|
|
22904
23661
|
icon: (0, vue.markRaw)(Center_default),
|
|
22905
|
-
tooltip: "居中 center"
|
|
23662
|
+
tooltip: "居中 center",
|
|
23663
|
+
text: "居中"
|
|
22906
23664
|
},
|
|
22907
23665
|
{
|
|
22908
23666
|
value: "space-between",
|
|
22909
23667
|
icon: (0, vue.markRaw)(SpaceBetween_default),
|
|
22910
|
-
tooltip: "两端对齐 space-between"
|
|
23668
|
+
tooltip: "两端对齐 space-between",
|
|
23669
|
+
text: "左右对齐"
|
|
22911
23670
|
},
|
|
22912
23671
|
{
|
|
22913
23672
|
value: "space-around",
|
|
22914
23673
|
icon: (0, vue.markRaw)(SpaceAround_default),
|
|
22915
|
-
tooltip: "横向平分 space-around"
|
|
23674
|
+
tooltip: "横向平分 space-around",
|
|
23675
|
+
text: "横向等分"
|
|
22916
23676
|
}
|
|
22917
23677
|
],
|
|
22918
23678
|
display: (_mForm, { model }) => model.display === "flex"
|
|
@@ -22926,28 +23686,33 @@
|
|
|
22926
23686
|
options: [
|
|
22927
23687
|
{
|
|
22928
23688
|
value: "flex-start",
|
|
22929
|
-
icon: (0, vue.markRaw)(FlexStart_default),
|
|
22930
|
-
tooltip: "左对齐 flex-start"
|
|
23689
|
+
icon: (0, vue.markRaw)(FlexStart_default$1),
|
|
23690
|
+
tooltip: "左对齐 flex-start",
|
|
23691
|
+
text: "上对齐"
|
|
22931
23692
|
},
|
|
22932
23693
|
{
|
|
22933
23694
|
value: "flex-end",
|
|
22934
|
-
icon: (0, vue.markRaw)(FlexEnd_default),
|
|
22935
|
-
tooltip: "右对齐 flex-end"
|
|
23695
|
+
icon: (0, vue.markRaw)(FlexEnd_default$1),
|
|
23696
|
+
tooltip: "右对齐 flex-end",
|
|
23697
|
+
text: "下对齐"
|
|
22936
23698
|
},
|
|
22937
23699
|
{
|
|
22938
23700
|
value: "center",
|
|
22939
|
-
icon: (0, vue.markRaw)(Center_default),
|
|
22940
|
-
tooltip: "居中 center"
|
|
23701
|
+
icon: (0, vue.markRaw)(Center_default$1),
|
|
23702
|
+
tooltip: "居中 center",
|
|
23703
|
+
text: "居中"
|
|
22941
23704
|
},
|
|
22942
23705
|
{
|
|
22943
23706
|
value: "space-between",
|
|
22944
|
-
icon: (0, vue.markRaw)(SpaceBetween_default),
|
|
22945
|
-
tooltip: "两端对齐 space-between"
|
|
23707
|
+
icon: (0, vue.markRaw)(SpaceBetween_default$1),
|
|
23708
|
+
tooltip: "两端对齐 space-between",
|
|
23709
|
+
text: "上下对齐"
|
|
22946
23710
|
},
|
|
22947
23711
|
{
|
|
22948
23712
|
value: "space-around",
|
|
22949
|
-
icon: (0, vue.markRaw)(SpaceAround_default),
|
|
22950
|
-
tooltip: "横向平分 space-around"
|
|
23713
|
+
icon: (0, vue.markRaw)(SpaceAround_default$1),
|
|
23714
|
+
tooltip: "横向平分 space-around",
|
|
23715
|
+
text: "纵向等分"
|
|
22951
23716
|
}
|
|
22952
23717
|
],
|
|
22953
23718
|
display: (_mForm, { model }) => model.display === "flex"
|
|
@@ -22956,7 +23721,7 @@
|
|
|
22956
23721
|
name: "flexWrap",
|
|
22957
23722
|
text: "换行",
|
|
22958
23723
|
type: "radioGroup",
|
|
22959
|
-
childType: "button",
|
|
23724
|
+
childType: displayTheme.value !== "magic-admin" ? "button" : "default",
|
|
22960
23725
|
labelWidth: "68px",
|
|
22961
23726
|
options: [
|
|
22962
23727
|
{
|
|
@@ -22981,14 +23746,18 @@
|
|
|
22981
23746
|
type: "row",
|
|
22982
23747
|
items: [{
|
|
22983
23748
|
name: "width",
|
|
22984
|
-
text: "
|
|
22985
|
-
labelWidth: "
|
|
23749
|
+
text: "宽度(px)",
|
|
23750
|
+
labelWidth: "90px",
|
|
22986
23751
|
type: "data-source-field-select",
|
|
22987
23752
|
fieldConfig: { type: "text" }
|
|
22988
|
-
}
|
|
23753
|
+
}]
|
|
23754
|
+
},
|
|
23755
|
+
{
|
|
23756
|
+
type: "row",
|
|
23757
|
+
items: [{
|
|
22989
23758
|
name: "height",
|
|
22990
|
-
text: "
|
|
22991
|
-
labelWidth: "
|
|
23759
|
+
text: "高度(px)",
|
|
23760
|
+
labelWidth: "90px",
|
|
22992
23761
|
type: "data-source-field-select",
|
|
22993
23762
|
fieldConfig: { type: "text" }
|
|
22994
23763
|
}]
|
|
@@ -22999,7 +23768,7 @@
|
|
|
22999
23768
|
type: "data-source-field-select",
|
|
23000
23769
|
text: "overflow",
|
|
23001
23770
|
name: "overflow",
|
|
23002
|
-
labelWidth: "
|
|
23771
|
+
labelWidth: "90px",
|
|
23003
23772
|
checkStrictly: false,
|
|
23004
23773
|
dataSourceFieldType: ["string"],
|
|
23005
23774
|
fieldConfig: {
|
|
@@ -23037,11 +23806,15 @@
|
|
|
23037
23806
|
}
|
|
23038
23807
|
]
|
|
23039
23808
|
}
|
|
23040
|
-
}
|
|
23809
|
+
}]
|
|
23810
|
+
},
|
|
23811
|
+
{
|
|
23812
|
+
type: "row",
|
|
23813
|
+
items: [{
|
|
23041
23814
|
type: "data-source-field-select",
|
|
23042
|
-
text: "
|
|
23815
|
+
text: "透明度(%)",
|
|
23043
23816
|
name: "opacity",
|
|
23044
|
-
labelWidth: "
|
|
23817
|
+
labelWidth: "90px",
|
|
23045
23818
|
dataSourceFieldType: ["string", "number"],
|
|
23046
23819
|
fieldConfig: { type: "text" }
|
|
23047
23820
|
}]
|
|
@@ -23278,7 +24051,7 @@
|
|
|
23278
24051
|
onClick: _cache[1] || (_cache[1] = ($event) => selectDirection("Left"))
|
|
23279
24052
|
}, null, 2),
|
|
23280
24053
|
(0, vue.createElementVNode)("div", {
|
|
23281
|
-
class: (0, vue.normalizeClass)(["border-icon", {
|
|
24054
|
+
class: (0, vue.normalizeClass)(["border-icon center", {
|
|
23282
24055
|
active: direction.value === "",
|
|
23283
24056
|
configured: isConfigured("")
|
|
23284
24057
|
}]),
|
|
@@ -23449,7 +24222,6 @@
|
|
|
23449
24222
|
var Transform_default = Transform_vue_vue_type_script_setup_true_lang_default;
|
|
23450
24223
|
//#endregion
|
|
23451
24224
|
//#region packages/editor/src/fields/StyleSetter/Index.vue?vue&type=script&setup=true&lang.ts
|
|
23452
|
-
init_Icon();
|
|
23453
24225
|
var Index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
23454
24226
|
name: "MFieldsStyleSetter",
|
|
23455
24227
|
__name: "Index",
|
|
@@ -23463,7 +24235,10 @@
|
|
|
23463
24235
|
disabled: { type: Boolean },
|
|
23464
24236
|
size: {},
|
|
23465
24237
|
lastValues: {},
|
|
23466
|
-
isCompare: { type: Boolean }
|
|
24238
|
+
isCompare: { type: Boolean },
|
|
24239
|
+
text: {},
|
|
24240
|
+
labelWidth: {},
|
|
24241
|
+
labelPosition: {}
|
|
23467
24242
|
},
|
|
23468
24243
|
emits: ["change", "addDiffCount"],
|
|
23469
24244
|
setup(__props, { emit: __emit }) {
|
|
@@ -23516,7 +24291,7 @@
|
|
|
23516
24291
|
key: index,
|
|
23517
24292
|
name: `${index}`
|
|
23518
24293
|
}, {
|
|
23519
|
-
title: (0, vue.withCtx)(() => [(0, vue.
|
|
24294
|
+
title: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(item.title), 1)]),
|
|
23520
24295
|
default: (0, vue.withCtx)(() => [item.component ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(item.component), {
|
|
23521
24296
|
key: 0,
|
|
23522
24297
|
values: __props.model[__props.name],
|
|
@@ -23563,7 +24338,10 @@
|
|
|
23563
24338
|
},
|
|
23564
24339
|
size: {},
|
|
23565
24340
|
lastValues: {},
|
|
23566
|
-
isCompare: { type: Boolean }
|
|
24341
|
+
isCompare: { type: Boolean },
|
|
24342
|
+
text: {},
|
|
24343
|
+
labelWidth: {},
|
|
24344
|
+
labelPosition: {}
|
|
23567
24345
|
},
|
|
23568
24346
|
emits: ["change"],
|
|
23569
24347
|
setup(__props, { emit: __emit }) {
|
|
@@ -23632,7 +24410,10 @@
|
|
|
23632
24410
|
disabled: { type: Boolean },
|
|
23633
24411
|
size: {},
|
|
23634
24412
|
lastValues: {},
|
|
23635
|
-
isCompare: { type: Boolean }
|
|
24413
|
+
isCompare: { type: Boolean },
|
|
24414
|
+
text: {},
|
|
24415
|
+
labelWidth: {},
|
|
24416
|
+
labelPosition: {}
|
|
23636
24417
|
},
|
|
23637
24418
|
emits: ["change"],
|
|
23638
24419
|
setup(__props, { emit: __emit }) {
|
|
@@ -23704,7 +24485,10 @@
|
|
|
23704
24485
|
disabled: { type: Boolean },
|
|
23705
24486
|
size: {},
|
|
23706
24487
|
lastValues: {},
|
|
23707
|
-
isCompare: { type: Boolean }
|
|
24488
|
+
isCompare: { type: Boolean },
|
|
24489
|
+
text: {},
|
|
24490
|
+
labelWidth: {},
|
|
24491
|
+
labelPosition: {}
|
|
23708
24492
|
},
|
|
23709
24493
|
emits: ["change"],
|
|
23710
24494
|
setup(__props, { emit: __emit }) {
|
|
@@ -23993,9 +24777,9 @@
|
|
|
23993
24777
|
return _tmagic_design.default;
|
|
23994
24778
|
}
|
|
23995
24779
|
});
|
|
24780
|
+
exports.detectPageTargetId = detectPageTargetId;
|
|
24781
|
+
exports.detectPageTargetName = detectPageTargetName;
|
|
23996
24782
|
exports.detectStackOpType = detectStackOpType;
|
|
23997
|
-
exports.detectTargetId = detectTargetId;
|
|
23998
|
-
exports.detectTargetName = detectTargetName;
|
|
23999
24783
|
exports.displayTabConfig = displayTabConfig;
|
|
24000
24784
|
exports.editorNodeMergeCustomizer = editorNodeMergeCustomizer;
|
|
24001
24785
|
exports.editorService = editor_default;
|
|
@@ -24043,7 +24827,8 @@
|
|
|
24043
24827
|
exports.loadMonaco = monaco_editor_default;
|
|
24044
24828
|
exports.log = log;
|
|
24045
24829
|
exports.markStackSaved = markStackSaved;
|
|
24046
|
-
exports.
|
|
24830
|
+
exports.mergePageSteps = mergePageSteps;
|
|
24831
|
+
exports.mergeStackSteps = mergeStackSteps;
|
|
24047
24832
|
exports.moveItemsInContainer = moveItemsInContainer;
|
|
24048
24833
|
exports.numberOptions = numberOptions;
|
|
24049
24834
|
exports.openIndexedDB = openIndexedDB;
|