@tmagic/editor 1.4.0-beta.1 → 1.4.0
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 +22 -26
- package/dist/tmagic-editor.js +977 -798
- package/dist/tmagic-editor.umd.cjs +981 -800
- package/package.json +11 -11
- package/src/components/CodeBlockEditor.vue +75 -101
- package/src/components/FloatingBox.vue +58 -38
- package/src/components/SplitView.vue +46 -35
- package/src/fields/DataSourceFieldSelect.vue +2 -1
- package/src/fields/DataSourceFields.vue +55 -30
- package/src/fields/DataSourceInput.vue +6 -2
- package/src/fields/DataSourceMocks.vue +35 -17
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-code-block-edit.ts +1 -1
- package/src/hooks/use-editor-content-height.ts +20 -0
- package/src/hooks/use-float-box.ts +21 -15
- package/src/hooks/use-next-float-box-position.ts +29 -0
- package/src/hooks/use-window-rect.ts +20 -0
- package/src/layouts/CodeEditor.vue +3 -6
- package/src/layouts/Framework.vue +33 -34
- package/src/layouts/PropsPanel.vue +37 -0
- package/src/layouts/sidebar/Sidebar.vue +17 -15
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +1 -3
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +36 -22
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +1 -6
- package/src/layouts/workspace/viewer/NodeListMenu.vue +1 -0
- package/src/layouts/workspace/viewer/StageOverlay.vue +3 -1
- package/src/services/stageOverlay.ts +2 -2
- package/src/services/ui.ts +6 -0
- package/src/theme/code-block.scss +0 -19
- package/src/theme/component-list-panel.scss +0 -1
- package/src/theme/floating-box.scss +2 -2
- package/src/theme/icon.scss +7 -1
- package/src/theme/layer-panel.scss +0 -1
- package/src/theme/props-panel.scss +14 -0
- package/src/theme/sidebar.scss +0 -7
- package/src/type.ts +6 -6
- package/types/components/CodeBlockEditor.vue.d.ts +39 -25
- package/types/components/FloatingBox.vue.d.ts +42 -57
- package/types/components/SplitView.vue.d.ts +2 -0
- package/types/fields/DataSourceFields.vue.d.ts +84 -28
- package/types/fields/DataSourceMocks.vue.d.ts +80 -28
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/use-code-block-edit.d.ts +16 -11
- package/types/hooks/use-data-source-method.d.ts +16 -11
- package/types/hooks/use-editor-content-height.d.ts +3 -0
- package/types/hooks/use-next-float-box-position.d.ts +9 -0
- package/types/hooks/use-window-rect.d.ts +6 -0
- package/types/layouts/sidebar/Sidebar.vue.d.ts +1 -1
- package/types/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts +1 -3
- package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +34 -22
- package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +2 -15
- package/types/services/stageOverlay.d.ts +1 -1
- package/types/services/ui.d.ts +6 -0
- package/types/type.d.ts +6 -5
|
@@ -111,6 +111,8 @@
|
|
|
111
111
|
:key="config.$key ?? index"
|
|
112
112
|
v-if="floatBoxStates[config.$key]?.status"
|
|
113
113
|
v-model:visible="floatBoxStates[config.$key].status"
|
|
114
|
+
v-model:height="columnLeftHeight"
|
|
115
|
+
:width="columnLeftWidth"
|
|
114
116
|
:title="config.text"
|
|
115
117
|
:position="{
|
|
116
118
|
left: floatBoxStates[config.$key].left,
|
|
@@ -121,8 +123,8 @@
|
|
|
121
123
|
<div class="m-editor-slide-list-box">
|
|
122
124
|
<component
|
|
123
125
|
v-if="config && floatBoxStates[config.$key].status"
|
|
124
|
-
:is="config.
|
|
125
|
-
v-bind="config.
|
|
126
|
+
:is="config.component"
|
|
127
|
+
v-bind="config.props || {}"
|
|
126
128
|
v-on="config?.listeners || {}"
|
|
127
129
|
/>
|
|
128
130
|
</div>
|
|
@@ -138,15 +140,17 @@ import { Coin, EditPen, Goods, List } from '@element-plus/icons-vue';
|
|
|
138
140
|
|
|
139
141
|
import FloatingBox from '@editor/components/FloatingBox.vue';
|
|
140
142
|
import MIcon from '@editor/components/Icon.vue';
|
|
143
|
+
import { useEditorContentHeight } from '@editor/hooks/use-editor-content-height';
|
|
141
144
|
import { useFloatBox } from '@editor/hooks/use-float-box';
|
|
142
|
-
import
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
import {
|
|
146
|
+
ColumnLayout,
|
|
147
|
+
type MenuButton,
|
|
148
|
+
type MenuComponent,
|
|
149
|
+
type Services,
|
|
150
|
+
type SideBarData,
|
|
151
|
+
type SidebarSlots,
|
|
152
|
+
type SideComponent,
|
|
153
|
+
type SideItem,
|
|
150
154
|
} from '@editor/type';
|
|
151
155
|
|
|
152
156
|
import CodeBlockListPanel from './code-block/CodeBlockListPanel.vue';
|
|
@@ -173,6 +177,9 @@ const props = withDefaults(
|
|
|
173
177
|
|
|
174
178
|
const services = inject<Services>('services');
|
|
175
179
|
|
|
180
|
+
const columnLeftWidth = computed(() => services?.uiService.get('columnWidth')[ColumnLayout.LEFT] || 0);
|
|
181
|
+
const { height: columnLeftHeight } = useEditorContentHeight();
|
|
182
|
+
|
|
176
183
|
const activeTabName = ref(props.data?.status);
|
|
177
184
|
|
|
178
185
|
const getItemConfig = (data: SideItem): SideComponent => {
|
|
@@ -204,11 +211,6 @@ const getItemConfig = (data: SideItem): SideComponent => {
|
|
|
204
211
|
text: '代码编辑',
|
|
205
212
|
component: CodeBlockListPanel,
|
|
206
213
|
slots: {},
|
|
207
|
-
boxComponentConfig: {
|
|
208
|
-
props: {
|
|
209
|
-
slideType: 'box',
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
214
|
},
|
|
213
215
|
'data-source': {
|
|
214
216
|
$key: 'data-source',
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
ref="codeBlockEditor"
|
|
24
24
|
:disabled="!editable"
|
|
25
25
|
:content="codeConfig"
|
|
26
|
-
:slideType="slideType"
|
|
27
26
|
@submit="submitCodeBlockHandler"
|
|
28
27
|
></CodeBlockEditor>
|
|
29
28
|
</template>
|
|
@@ -37,7 +36,7 @@ import type { Id } from '@tmagic/schema';
|
|
|
37
36
|
import CodeBlockEditor from '@editor/components/CodeBlockEditor.vue';
|
|
38
37
|
import SearchInput from '@editor/components/SearchInput.vue';
|
|
39
38
|
import { useCodeBlockEdit } from '@editor/hooks/use-code-block-edit';
|
|
40
|
-
import type { CodeBlockListPanelSlots, CodeDeleteErrorType, Services
|
|
39
|
+
import type { CodeBlockListPanelSlots, CodeDeleteErrorType, Services } from '@editor/type';
|
|
41
40
|
|
|
42
41
|
import CodeBlockList from './CodeBlockList.vue';
|
|
43
42
|
|
|
@@ -49,7 +48,6 @@ defineOptions({
|
|
|
49
48
|
|
|
50
49
|
defineProps<{
|
|
51
50
|
customError?: (id: Id, errorType: CodeDeleteErrorType) => any;
|
|
52
|
-
slideType?: SlideType;
|
|
53
51
|
}>();
|
|
54
52
|
|
|
55
53
|
const { codeBlockService } = inject<Services>('services') || {};
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
:close-on-press-escape="false"
|
|
2
|
+
<FloatingBox
|
|
3
|
+
v-model:visible="boxVisible"
|
|
4
|
+
v-model:width="width"
|
|
5
|
+
v-model:height="editorHeight"
|
|
7
6
|
:title="title"
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
:position="boxPosition"
|
|
8
|
+
>
|
|
9
|
+
<template #body>
|
|
10
|
+
<MFormBox
|
|
11
|
+
label-width="80px"
|
|
12
|
+
:title="title"
|
|
13
|
+
:config="dataSourceConfig"
|
|
14
|
+
:values="initValues"
|
|
15
|
+
:disabled="disabled"
|
|
16
|
+
style="height: 100%"
|
|
17
|
+
@submit="submitHandler"
|
|
18
|
+
@error="errorHandler"
|
|
19
|
+
></MFormBox>
|
|
20
|
+
</template>
|
|
21
|
+
</FloatingBox>
|
|
15
22
|
</template>
|
|
16
23
|
|
|
17
24
|
<script setup lang="ts">
|
|
18
|
-
import {
|
|
25
|
+
import { inject, Ref, ref, watchEffect } from 'vue';
|
|
19
26
|
|
|
20
27
|
import { tMagicMessage } from '@tmagic/design';
|
|
21
|
-
import { FormConfig, MFormBox
|
|
28
|
+
import { FormConfig, MFormBox } from '@tmagic/form';
|
|
22
29
|
import { DataSourceSchema } from '@tmagic/schema';
|
|
23
30
|
|
|
24
|
-
import
|
|
31
|
+
import FloatingBox from '@editor/components/FloatingBox.vue';
|
|
32
|
+
import { useEditorContentHeight } from '@editor/hooks';
|
|
33
|
+
import { useNextFloatBoxPosition } from '@editor/hooks/use-next-float-box-position';
|
|
34
|
+
import type { Services } from '@editor/type';
|
|
25
35
|
|
|
26
36
|
defineOptions({
|
|
27
37
|
name: 'MEditorDataSourceConfigPanel',
|
|
@@ -31,20 +41,23 @@ const props = defineProps<{
|
|
|
31
41
|
title?: string;
|
|
32
42
|
values: any;
|
|
33
43
|
disabled: boolean;
|
|
34
|
-
slideType?: SlideType;
|
|
35
44
|
}>();
|
|
36
45
|
|
|
46
|
+
const boxVisible = defineModel<boolean>('visible', { default: false });
|
|
47
|
+
const width = defineModel<number>('width', { default: 670 });
|
|
48
|
+
|
|
37
49
|
const emit = defineEmits(['submit']);
|
|
38
50
|
|
|
39
51
|
const services = inject<Services>('services');
|
|
40
52
|
|
|
41
|
-
const size = computed(() => globalThis.document.body.clientWidth - (services?.uiService.get('columnWidth').left || 0));
|
|
42
|
-
|
|
43
|
-
const fomDrawer = ref<InstanceType<typeof MFormDrawer>>();
|
|
44
|
-
|
|
45
53
|
const initValues = ref<Partial<DataSourceSchema>>({});
|
|
46
54
|
const dataSourceConfig = ref<FormConfig>([]);
|
|
47
55
|
|
|
56
|
+
const { height: editorHeight } = useEditorContentHeight();
|
|
57
|
+
|
|
58
|
+
const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
|
|
59
|
+
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
60
|
+
|
|
48
61
|
watchEffect(() => {
|
|
49
62
|
initValues.value = props.values;
|
|
50
63
|
dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
|
|
@@ -60,11 +73,12 @@ const errorHandler = (error: any) => {
|
|
|
60
73
|
|
|
61
74
|
defineExpose({
|
|
62
75
|
show() {
|
|
63
|
-
|
|
76
|
+
calcBoxPosition();
|
|
77
|
+
boxVisible.value = true;
|
|
64
78
|
},
|
|
65
79
|
|
|
66
80
|
hide() {
|
|
67
|
-
|
|
81
|
+
boxVisible.value = false;
|
|
68
82
|
},
|
|
69
83
|
});
|
|
70
84
|
</script>
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
:disabled="!editable"
|
|
34
34
|
:values="dataSourceValues"
|
|
35
35
|
:title="dialogTitle"
|
|
36
|
-
:slideType="slideType"
|
|
37
36
|
@submit="submitDataSourceHandler"
|
|
38
37
|
></DataSourceConfigPanel>
|
|
39
38
|
</template>
|
|
@@ -47,7 +46,7 @@ import type { DataSourceSchema } from '@tmagic/schema';
|
|
|
47
46
|
|
|
48
47
|
import SearchInput from '@editor/components/SearchInput.vue';
|
|
49
48
|
import ToolButton from '@editor/components/ToolButton.vue';
|
|
50
|
-
import type { DataSourceListSlots, Services
|
|
49
|
+
import type { DataSourceListSlots, Services } from '@editor/type';
|
|
51
50
|
|
|
52
51
|
import DataSourceConfigPanel from './DataSourceConfigPanel.vue';
|
|
53
52
|
import DataSourceList from './DataSourceList.vue';
|
|
@@ -58,10 +57,6 @@ defineOptions({
|
|
|
58
57
|
name: 'MEditorDataSourceListPanel',
|
|
59
58
|
});
|
|
60
59
|
|
|
61
|
-
defineProps<{
|
|
62
|
-
slideType?: SlideType;
|
|
63
|
-
}>();
|
|
64
|
-
|
|
65
60
|
const { dataSourceService } = inject<Services>('services') || {};
|
|
66
61
|
|
|
67
62
|
const editDialog = ref<InstanceType<typeof DataSourceConfigPanel>>();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="stageOverlayVisible" class="m-editor-stage-overlay" @click="closeOverlayHandler">
|
|
3
|
-
<TMagicIcon class="m-editor-stage-overlay-close" :size="20" @click="closeOverlayHandler"
|
|
3
|
+
<TMagicIcon class="m-editor-stage-overlay-close" :size="'20'" @click="closeOverlayHandler"
|
|
4
|
+
><CloseBold
|
|
5
|
+
/></TMagicIcon>
|
|
4
6
|
<div ref="stageOverlay" class="m-editor-stage-overlay-container" :style="style" @click.stop></div>
|
|
5
7
|
</div>
|
|
6
8
|
</template>
|
|
@@ -41,7 +41,7 @@ class StageOverlay extends BaseService {
|
|
|
41
41
|
this.state[name] = value;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
public openOverlay(el: HTMLElement |
|
|
44
|
+
public openOverlay(el: HTMLElement | null) {
|
|
45
45
|
const stageOptions = this.get('stageOptions');
|
|
46
46
|
if (!el || !stageOptions) return;
|
|
47
47
|
|
|
@@ -168,7 +168,7 @@ class StageOverlay extends BaseService {
|
|
|
168
168
|
});
|
|
169
169
|
|
|
170
170
|
if (await stageOptions?.canSelect?.(contentEl)) {
|
|
171
|
-
subStage?.select(contentEl);
|
|
171
|
+
subStage?.select(contentEl.id);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
package/src/services/ui.ts
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
.m-editor-code-block-list {
|
|
2
|
-
height: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.m-fields-code-select {
|
|
6
2
|
width: 100%;
|
|
7
3
|
.el-card__header {
|
|
8
4
|
display: none;
|
|
9
5
|
}
|
|
10
6
|
}
|
|
11
|
-
|
|
12
|
-
.m-editor-code-block-editor {
|
|
13
|
-
.tmagic-design-table {
|
|
14
|
-
height: 180px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.el-drawer__body {
|
|
18
|
-
padding: 10px 20px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&.m-form-box {
|
|
22
|
-
width: 100%;
|
|
23
|
-
min-width: 872px;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/src/theme/icon.scss
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
.m-editor-props-panel {
|
|
2
2
|
padding: 0 10px;
|
|
3
3
|
|
|
4
|
+
.m-editor-props-panel-src-icon {
|
|
5
|
+
position: absolute;
|
|
6
|
+
right: 15px;
|
|
7
|
+
bottom: 15px;
|
|
8
|
+
z-index: 30;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.magic-code-editor {
|
|
12
|
+
position: absolute;
|
|
13
|
+
left: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
z-index: 10;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
&.small {
|
|
5
19
|
.el-form-item__label {
|
|
6
20
|
font-size: 12px;
|
package/src/theme/sidebar.scss
CHANGED
|
@@ -50,10 +50,6 @@
|
|
|
50
50
|
overflow: auto;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.tmagic-design-scrollbar {
|
|
54
|
-
height: 100%;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
53
|
.fold-icon {
|
|
58
54
|
position: absolute;
|
|
59
55
|
bottom: 8px;
|
|
@@ -72,9 +68,6 @@
|
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
.m-editor-slide-list-box {
|
|
75
|
-
display: flex;
|
|
76
|
-
min-width: 240px;
|
|
77
|
-
min-height: 500px;
|
|
78
71
|
> div {
|
|
79
72
|
&:first-child {
|
|
80
73
|
min-width: 240px;
|
package/src/type.ts
CHANGED
|
@@ -246,6 +246,12 @@ export interface UiState {
|
|
|
246
246
|
width: number;
|
|
247
247
|
height: number;
|
|
248
248
|
};
|
|
249
|
+
frameworkRect: {
|
|
250
|
+
left: number;
|
|
251
|
+
top: number;
|
|
252
|
+
width: number;
|
|
253
|
+
height: number;
|
|
254
|
+
};
|
|
249
255
|
}
|
|
250
256
|
|
|
251
257
|
export interface EditorNodeInfo {
|
|
@@ -395,12 +401,6 @@ export interface SideBarData {
|
|
|
395
401
|
items: SideItem[];
|
|
396
402
|
}
|
|
397
403
|
|
|
398
|
-
/**
|
|
399
|
-
* drawer 抽屉
|
|
400
|
-
* box 悬浮窗
|
|
401
|
-
*/
|
|
402
|
-
export type SlideType = 'drawer' | 'box';
|
|
403
|
-
|
|
404
404
|
export interface ComponentItem {
|
|
405
405
|
/** 显示文案 */
|
|
406
406
|
text: string;
|
|
@@ -1,32 +1,46 @@
|
|
|
1
1
|
import type { CodeBlockContent } from '@tmagic/schema';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
width: import("vue").PropType<number>;
|
|
4
|
+
visible: import("vue").PropType<boolean>;
|
|
5
|
+
content: {
|
|
6
|
+
type: import("vue").PropType<CodeBlockContent>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
disabled: {
|
|
10
|
+
type: import("vue").PropType<boolean>;
|
|
11
|
+
};
|
|
12
|
+
isDataSource: {
|
|
13
|
+
type: import("vue").PropType<boolean>;
|
|
14
|
+
};
|
|
15
|
+
dataSourceType: {
|
|
16
|
+
type: import("vue").PropType<string>;
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
10
19
|
show(): Promise<void>;
|
|
11
|
-
hide(): void
|
|
20
|
+
hide(): Promise<void>;
|
|
12
21
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
"update:width": (width: number) => void;
|
|
23
|
+
"update:visible": (visible: boolean) => void;
|
|
13
24
|
submit: (values: CodeBlockContent) => void;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
width: import("vue").PropType<number>;
|
|
27
|
+
visible: import("vue").PropType<boolean>;
|
|
28
|
+
content: {
|
|
29
|
+
type: import("vue").PropType<CodeBlockContent>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
disabled: {
|
|
33
|
+
type: import("vue").PropType<boolean>;
|
|
34
|
+
};
|
|
35
|
+
isDataSource: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
38
|
+
dataSourceType: {
|
|
39
|
+
type: import("vue").PropType<string>;
|
|
40
|
+
};
|
|
41
|
+
}>> & {
|
|
21
42
|
onSubmit?: ((values: CodeBlockContent) => any) | undefined;
|
|
43
|
+
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
44
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
22
45
|
}, {}, {}>;
|
|
23
46
|
export default _default;
|
|
24
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
-
type __VLS_TypePropsToOption<T> = {
|
|
26
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
-
} : {
|
|
29
|
-
type: import('vue').PropType<T[K]>;
|
|
30
|
-
required: true;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -2,79 +2,64 @@ interface Position {
|
|
|
2
2
|
left: number;
|
|
3
3
|
top: number;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
width: number
|
|
7
|
-
height: number
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
left: number;
|
|
20
|
-
top: number;
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
6
|
+
width: import("vue").PropType<number>;
|
|
7
|
+
height: import("vue").PropType<number>;
|
|
8
|
+
visible: import("vue").PropType<boolean>;
|
|
9
|
+
title: {
|
|
10
|
+
type: import("vue").PropType<string>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
position: {
|
|
14
|
+
type: import("vue").PropType<Position>;
|
|
15
|
+
default: () => {
|
|
16
|
+
left: number;
|
|
17
|
+
top: number;
|
|
18
|
+
};
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
height: string;
|
|
20
|
+
beforeClose: {
|
|
21
|
+
type: import("vue").PropType<(done: (cancel?: boolean | undefined) => void) => void>;
|
|
25
22
|
};
|
|
26
|
-
}
|
|
23
|
+
}, {
|
|
24
|
+
bodyHeight: import("vue").ComputedRef<number | "auto">;
|
|
27
25
|
target: import("vue").Ref<HTMLDivElement | undefined>;
|
|
26
|
+
titleEl: import("vue").Ref<HTMLDivElement | undefined>;
|
|
28
27
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
-
"update:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
position: () => {
|
|
40
|
-
left: number;
|
|
41
|
-
top: number;
|
|
28
|
+
"update:width": (width: number) => void;
|
|
29
|
+
"update:visible": (visible: boolean) => void;
|
|
30
|
+
"update:height": (height: number) => void;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
width: import("vue").PropType<number>;
|
|
33
|
+
height: import("vue").PropType<number>;
|
|
34
|
+
visible: import("vue").PropType<boolean>;
|
|
35
|
+
title: {
|
|
36
|
+
type: import("vue").PropType<string>;
|
|
37
|
+
default: string;
|
|
42
38
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
position: {
|
|
40
|
+
type: import("vue").PropType<Position>;
|
|
41
|
+
default: () => {
|
|
42
|
+
left: number;
|
|
43
|
+
top: number;
|
|
44
|
+
};
|
|
46
45
|
};
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
beforeClose: {
|
|
47
|
+
type: import("vue").PropType<(done: (cancel?: boolean | undefined) => void) => void>;
|
|
48
|
+
};
|
|
49
|
+
}>> & {
|
|
50
|
+
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
51
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
52
|
+
"onUpdate:height"?: ((height: number) => any) | undefined;
|
|
49
53
|
}, {
|
|
50
54
|
title: string;
|
|
51
55
|
position: Position;
|
|
52
|
-
visible: boolean;
|
|
53
|
-
rect: Rect;
|
|
54
56
|
}, {}>, {
|
|
55
57
|
title?(_: {}): any;
|
|
56
58
|
body?(_: {}): any;
|
|
57
59
|
}>;
|
|
58
60
|
export default _default;
|
|
59
|
-
type __VLS_WithDefaults<P, D> = {
|
|
60
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
61
|
-
default: D[K];
|
|
62
|
-
}> : P[K];
|
|
63
|
-
};
|
|
64
|
-
type __VLS_Prettify<T> = {
|
|
65
|
-
[K in keyof T]: T[K];
|
|
66
|
-
} & {};
|
|
67
61
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
68
62
|
new (): {
|
|
69
63
|
$slots: S;
|
|
70
64
|
};
|
|
71
65
|
};
|
|
72
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
73
|
-
type __VLS_TypePropsToOption<T> = {
|
|
74
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
75
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
76
|
-
} : {
|
|
77
|
-
type: import('vue').PropType<T[K]>;
|
|
78
|
-
required: true;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
2
|
+
width?: number | undefined;
|
|
2
3
|
left?: number | undefined;
|
|
3
4
|
right?: number | undefined;
|
|
4
5
|
minLeft?: number | undefined;
|
|
@@ -18,6 +19,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
18
19
|
"update:left": (...args: any[]) => void;
|
|
19
20
|
"update:right": (...args: any[]) => void;
|
|
20
21
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
22
|
+
width?: number | undefined;
|
|
21
23
|
left?: number | undefined;
|
|
22
24
|
right?: number | undefined;
|
|
23
25
|
minLeft?: number | undefined;
|