@tmagic/editor 1.5.0-beta.1 → 1.5.0-beta.2
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/style.css +2 -1
- package/dist/tmagic-editor.js +7 -4
- package/dist/tmagic-editor.umd.cjs +7 -4
- package/package.json +9 -9
- package/src/Editor.vue +10 -2
- package/src/editorProps.ts +1 -1
- package/src/fields/DataSourceFieldSelect/Index.vue +1 -1
- package/src/layouts/page-bar/PageBar.vue +7 -1
- package/src/layouts/page-bar/PageList.vue +7 -1
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +7 -1
- package/src/theme/page-bar.scss +2 -1
- package/src/type.ts +1 -1
- package/types/index.d.ts +2 -2
package/dist/style.css
CHANGED
|
@@ -432,12 +432,13 @@
|
|
|
432
432
|
width: 100%;
|
|
433
433
|
}
|
|
434
434
|
.m-editor-page-bar-tabs .tmagic-design-button.m-editor-page-bar-switch-type-button {
|
|
435
|
-
margin-left:
|
|
435
|
+
margin-left: 10px;
|
|
436
436
|
position: relative;
|
|
437
437
|
top: 1px;
|
|
438
438
|
border-radius: 3px 3px 0 0;
|
|
439
439
|
border: 1px solid #d9dbdd;
|
|
440
440
|
border-bottom: 1px solid transparent;
|
|
441
|
+
padding: 5px 10px;
|
|
441
442
|
}
|
|
442
443
|
.m-editor-page-bar-tabs .tmagic-design-button.m-editor-page-bar-switch-type-button.active {
|
|
443
444
|
background-color: #f3f3f3;
|
package/dist/tmagic-editor.js
CHANGED
|
@@ -4798,7 +4798,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
4798
4798
|
"last-values": _ctx.lastValues,
|
|
4799
4799
|
"init-values": _ctx.initValues,
|
|
4800
4800
|
values: _ctx.values,
|
|
4801
|
-
prop:
|
|
4801
|
+
prop: _ctx.prop,
|
|
4802
4802
|
onChange: onChangeHandler
|
|
4803
4803
|
}, null, 40, ["config", "model", "name", "disabled", "size", "last-values", "init-values", "values", "prop"])),
|
|
4804
4804
|
_ctx.config.fieldConfig ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
@@ -7385,8 +7385,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7385
7385
|
createVNode(unref(TMagicPopover), {
|
|
7386
7386
|
"popper-class": "page-bar-popover",
|
|
7387
7387
|
placement: "top",
|
|
7388
|
+
trigger: "hover",
|
|
7388
7389
|
width: 160,
|
|
7389
|
-
|
|
7390
|
+
"destroy-on-close": true
|
|
7390
7391
|
}, {
|
|
7391
7392
|
reference: withCtx(() => [
|
|
7392
7393
|
createVNode(unref(TMagicIcon), { class: "m-editor-page-list-menu-icon" }, {
|
|
@@ -7583,8 +7584,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7583
7584
|
createVNode(unref(TMagicPopover), {
|
|
7584
7585
|
"popper-class": "page-bar-popover",
|
|
7585
7586
|
placement: "top",
|
|
7587
|
+
trigger: "hover",
|
|
7586
7588
|
width: 160,
|
|
7587
|
-
|
|
7589
|
+
"destroy-on-close": true
|
|
7588
7590
|
}, {
|
|
7589
7591
|
reference: withCtx(() => [
|
|
7590
7592
|
createVNode(unref(TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
@@ -8897,7 +8899,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
8897
8899
|
key: 0,
|
|
8898
8900
|
placement: "right",
|
|
8899
8901
|
trigger: "hover",
|
|
8900
|
-
"popper-class": "data-source-list-panel-add-menu"
|
|
8902
|
+
"popper-class": "data-source-list-panel-add-menu",
|
|
8903
|
+
"destroy-on-close": true
|
|
8901
8904
|
}, {
|
|
8902
8905
|
reference: withCtx(() => [
|
|
8903
8906
|
createVNode(unref(TMagicButton), {
|
|
@@ -4802,7 +4802,7 @@
|
|
|
4802
4802
|
"last-values": _ctx.lastValues,
|
|
4803
4803
|
"init-values": _ctx.initValues,
|
|
4804
4804
|
values: _ctx.values,
|
|
4805
|
-
prop:
|
|
4805
|
+
prop: _ctx.prop,
|
|
4806
4806
|
onChange: onChangeHandler
|
|
4807
4807
|
}, null, 40, ["config", "model", "name", "disabled", "size", "last-values", "init-values", "values", "prop"])),
|
|
4808
4808
|
_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
|
|
@@ -7389,8 +7389,9 @@
|
|
|
7389
7389
|
vue.createVNode(vue.unref(design.TMagicPopover), {
|
|
7390
7390
|
"popper-class": "page-bar-popover",
|
|
7391
7391
|
placement: "top",
|
|
7392
|
+
trigger: "hover",
|
|
7392
7393
|
width: 160,
|
|
7393
|
-
|
|
7394
|
+
"destroy-on-close": true
|
|
7394
7395
|
}, {
|
|
7395
7396
|
reference: vue.withCtx(() => [
|
|
7396
7397
|
vue.createVNode(vue.unref(design.TMagicIcon), { class: "m-editor-page-list-menu-icon" }, {
|
|
@@ -7587,8 +7588,9 @@
|
|
|
7587
7588
|
vue.createVNode(vue.unref(design.TMagicPopover), {
|
|
7588
7589
|
"popper-class": "page-bar-popover",
|
|
7589
7590
|
placement: "top",
|
|
7591
|
+
trigger: "hover",
|
|
7590
7592
|
width: 160,
|
|
7591
|
-
|
|
7593
|
+
"destroy-on-close": true
|
|
7592
7594
|
}, {
|
|
7593
7595
|
reference: vue.withCtx(() => [
|
|
7594
7596
|
vue.createVNode(vue.unref(design.TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
@@ -8901,7 +8903,8 @@
|
|
|
8901
8903
|
key: 0,
|
|
8902
8904
|
placement: "right",
|
|
8903
8905
|
trigger: "hover",
|
|
8904
|
-
"popper-class": "data-source-list-panel-add-menu"
|
|
8906
|
+
"popper-class": "data-source-list-panel-add-menu",
|
|
8907
|
+
"destroy-on-close": true
|
|
8905
8908
|
}, {
|
|
8906
8909
|
reference: vue.withCtx(() => [
|
|
8907
8910
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.5.0-beta.
|
|
2
|
+
"version": "1.5.0-beta.2",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"moveable": "^0.53.0",
|
|
56
56
|
"serialize-javascript": "^6.0.0",
|
|
57
57
|
"sortablejs": "^1.15.2",
|
|
58
|
-
"@tmagic/
|
|
59
|
-
"@tmagic/
|
|
58
|
+
"@tmagic/dep": "1.5.0-beta.2",
|
|
59
|
+
"@tmagic/table": "1.5.0-beta.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/events": "^3.0.0",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"monaco-editor": "^0.48.0",
|
|
78
78
|
"typescript": "*",
|
|
79
79
|
"vue": "^3.4.35",
|
|
80
|
-
"@tmagic/
|
|
81
|
-
"@tmagic/
|
|
82
|
-
"@tmagic/
|
|
83
|
-
"@tmagic/
|
|
84
|
-
"@tmagic/
|
|
85
|
-
"@tmagic/utils": "1.5.0-beta.
|
|
80
|
+
"@tmagic/form": "1.5.0-beta.2",
|
|
81
|
+
"@tmagic/schema": "1.5.0-beta.2",
|
|
82
|
+
"@tmagic/design": "1.5.0-beta.2",
|
|
83
|
+
"@tmagic/stage": "1.5.0-beta.2",
|
|
84
|
+
"@tmagic/core": "1.5.0-beta.2",
|
|
85
|
+
"@tmagic/utils": "1.5.0-beta.2"
|
|
86
86
|
},
|
|
87
87
|
"peerDependenciesMeta": {
|
|
88
88
|
"typescript": {
|
package/src/Editor.vue
CHANGED
|
@@ -141,7 +141,15 @@ import uiService from './services/ui';
|
|
|
141
141
|
import keybindingConfig from './utils/keybinding-config';
|
|
142
142
|
import { defaultEditorProps, EditorProps } from './editorProps';
|
|
143
143
|
import { initServiceEvents, initServiceState } from './initService';
|
|
144
|
-
import type {
|
|
144
|
+
import type {
|
|
145
|
+
EventBus,
|
|
146
|
+
FrameworkSlots,
|
|
147
|
+
PropsPanelSlots,
|
|
148
|
+
Services,
|
|
149
|
+
SidebarSlots,
|
|
150
|
+
StageOptions,
|
|
151
|
+
WorkspaceSlots,
|
|
152
|
+
} from './type';
|
|
145
153
|
|
|
146
154
|
defineSlots<
|
|
147
155
|
FrameworkSlots &
|
|
@@ -186,7 +194,7 @@ initServiceState(props, services);
|
|
|
186
194
|
keybindingService.register(keybindingConfig);
|
|
187
195
|
keybindingService.registerEl('global');
|
|
188
196
|
|
|
189
|
-
const stageOptions = {
|
|
197
|
+
const stageOptions: StageOptions = {
|
|
190
198
|
runtimeUrl: props.runtimeUrl,
|
|
191
199
|
autoScrollIntoView: props.autoScrollIntoView,
|
|
192
200
|
render: props.render,
|
package/src/editorProps.ts
CHANGED
|
@@ -82,7 +82,7 @@ export interface EditorProps {
|
|
|
82
82
|
/** 禁用属性配置面板右下角显示源码的按钮 */
|
|
83
83
|
disabledShowSrc?: boolean;
|
|
84
84
|
/** 中间工作区域中画布渲染的内容 */
|
|
85
|
-
render?: (stage: StageCore) => HTMLDivElement | Promise<HTMLDivElement>;
|
|
85
|
+
render?: (stage: StageCore) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
86
86
|
/** 选中时会在画布上复制出一个大小相同的dom,实际拖拽的是这个dom,此方法用于干预这个dom的生成方式 */
|
|
87
87
|
updateDragEl?: UpdateDragEl;
|
|
88
88
|
/** 用于设置画布上的dom是否可以被选中 */
|
|
@@ -24,7 +24,13 @@
|
|
|
24
24
|
</slot>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
|
-
<TMagicPopover
|
|
27
|
+
<TMagicPopover
|
|
28
|
+
popper-class="page-bar-popover"
|
|
29
|
+
placement="top"
|
|
30
|
+
trigger="hover"
|
|
31
|
+
:width="160"
|
|
32
|
+
:destroy-on-close="true"
|
|
33
|
+
>
|
|
28
34
|
<div>
|
|
29
35
|
<slot name="page-bar-popover" :page="item">
|
|
30
36
|
<ToolButton
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
id="m-editor-page-bar-list-icon"
|
|
5
5
|
class="m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
6
6
|
>
|
|
7
|
-
<TMagicPopover
|
|
7
|
+
<TMagicPopover
|
|
8
|
+
popper-class="page-bar-popover"
|
|
9
|
+
placement="top"
|
|
10
|
+
trigger="hover"
|
|
11
|
+
:width="160"
|
|
12
|
+
:destroy-on-close="true"
|
|
13
|
+
>
|
|
8
14
|
<div>
|
|
9
15
|
<slot name="page-list-popover" :list="list">
|
|
10
16
|
<ToolButton
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
<TMagicScrollbar class="data-source-list-panel m-editor-layer-panel">
|
|
3
3
|
<div class="search-wrapper">
|
|
4
4
|
<SearchInput @search="filterTextChangeHandler"></SearchInput>
|
|
5
|
-
<TMagicPopover
|
|
5
|
+
<TMagicPopover
|
|
6
|
+
v-if="editable"
|
|
7
|
+
placement="right"
|
|
8
|
+
trigger="hover"
|
|
9
|
+
popper-class="data-source-list-panel-add-menu"
|
|
10
|
+
:destroy-on-close="true"
|
|
11
|
+
>
|
|
6
12
|
<template #reference>
|
|
7
13
|
<TMagicButton type="primary" size="small">新增</TMagicButton>
|
|
8
14
|
</template>
|
package/src/theme/page-bar.scss
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
|
|
7
7
|
.tmagic-design-button.m-editor-page-bar-switch-type-button {
|
|
8
|
-
margin-left:
|
|
8
|
+
margin-left: 10px;
|
|
9
9
|
position: relative;
|
|
10
10
|
top: 1px;
|
|
11
11
|
border-radius: 3px 3px 0 0;
|
|
12
12
|
border: 1px solid $--border-color;
|
|
13
13
|
border-bottom: 1px solid transparent;
|
|
14
|
+
padding: 5px 10px;
|
|
14
15
|
|
|
15
16
|
&.active {
|
|
16
17
|
background-color: #f3f3f3;
|
package/src/type.ts
CHANGED
|
@@ -145,7 +145,7 @@ export interface StageOptions {
|
|
|
145
145
|
containerHighlightDuration?: number;
|
|
146
146
|
containerHighlightType?: ContainerHighlightType;
|
|
147
147
|
disabledDragStart?: boolean;
|
|
148
|
-
render?: (stage: StageCore) => HTMLDivElement | Promise<HTMLDivElement>;
|
|
148
|
+
render?: (stage: StageCore) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
149
149
|
moveableOptions?: MoveableOptions | ((config?: CustomizeMoveableOptionsCallbackConfig) => MoveableOptions);
|
|
150
150
|
canSelect?: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
151
151
|
isContainer?: (el: HTMLElement) => boolean | Promise<boolean>;
|
package/types/index.d.ts
CHANGED
|
@@ -916,7 +916,7 @@ interface StageOptions {
|
|
|
916
916
|
containerHighlightDuration?: number;
|
|
917
917
|
containerHighlightType?: ContainerHighlightType;
|
|
918
918
|
disabledDragStart?: boolean;
|
|
919
|
-
render?: (stage: StageCore__default) => HTMLDivElement | Promise<HTMLDivElement>;
|
|
919
|
+
render?: (stage: StageCore__default) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
920
920
|
moveableOptions?: MoveableOptions | ((config?: CustomizeMoveableOptionsCallbackConfig) => MoveableOptions);
|
|
921
921
|
canSelect?: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
922
922
|
isContainer?: (el: HTMLElement) => boolean | Promise<boolean>;
|
|
@@ -2694,7 +2694,7 @@ interface EditorProps {
|
|
|
2694
2694
|
/** 禁用属性配置面板右下角显示源码的按钮 */
|
|
2695
2695
|
disabledShowSrc?: boolean;
|
|
2696
2696
|
/** 中间工作区域中画布渲染的内容 */
|
|
2697
|
-
render?: (stage: StageCore__default) => HTMLDivElement | Promise<HTMLDivElement>;
|
|
2697
|
+
render?: (stage: StageCore__default) => HTMLDivElement | void | Promise<HTMLDivElement | void>;
|
|
2698
2698
|
/** 选中时会在画布上复制出一个大小相同的dom,实际拖拽的是这个dom,此方法用于干预这个dom的生成方式 */
|
|
2699
2699
|
updateDragEl?: UpdateDragEl;
|
|
2700
2700
|
/** 用于设置画布上的dom是否可以被选中 */
|