@tmagic/editor 1.1.3 → 1.1.5
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/tmagic-editor.mjs +592 -481
- package/dist/tmagic-editor.mjs.map +1 -1
- package/dist/tmagic-editor.umd.js +591 -480
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/package.json +9 -9
- package/src/Editor.vue +0 -2
- package/src/fields/Code.vue +17 -21
- package/src/fields/CodeLink.vue +49 -63
- package/src/index.ts +2 -2
- package/src/layouts/Framework.vue +85 -55
- package/src/layouts/Layout.vue +100 -0
- package/src/layouts/NavMenu.vue +1 -1
- package/src/layouts/Resizer.vue +17 -46
- package/src/layouts/sidebar/ComponentListPanel.vue +1 -1
- package/src/layouts/workspace/PageBarScrollContainer.vue +46 -43
- package/src/layouts/workspace/Workspace.vue +3 -3
- package/src/services/editor.ts +6 -3
- package/src/services/ui.ts +12 -73
- package/src/utils/scroll-viewer.ts +1 -0
- package/types/components/ToolButton.vue.d.ts +4 -4
- package/types/fields/Code.vue.d.ts +88 -20
- package/types/fields/CodeLink.vue.d.ts +99 -48
- package/types/layouts/Framework.vue.d.ts +88 -20
- package/types/layouts/Layout.vue.d.ts +133 -0
- package/types/layouts/Resizer.vue.d.ts +54 -10
- package/types/layouts/workspace/PageBarScrollContainer.vue.d.ts +2 -1
- package/types/services/ui.d.ts +2 -4
|
@@ -6,27 +6,33 @@
|
|
|
6
6
|
class="m-editor-page-bar-item m-editor-page-bar-item-icon"
|
|
7
7
|
@click="addPage"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
9
|
+
<Icon :icon="Plus"></Icon>
|
|
10
10
|
</div>
|
|
11
11
|
<div v-else style="width: 21px"></div>
|
|
12
12
|
<div v-if="canScroll" class="m-editor-page-bar-item m-editor-page-bar-item-icon" @click="scroll('left')">
|
|
13
|
-
<
|
|
13
|
+
<Icon :icon="ArrowLeftBold"></Icon>
|
|
14
14
|
</div>
|
|
15
|
-
<div
|
|
15
|
+
<div
|
|
16
|
+
v-if="pageLength"
|
|
17
|
+
class="m-editor-page-bar-items"
|
|
18
|
+
ref="itemsContainer"
|
|
19
|
+
:style="`width: ${itemsContainerWidth}px`"
|
|
20
|
+
>
|
|
16
21
|
<slot></slot>
|
|
17
22
|
</div>
|
|
18
23
|
<div v-if="canScroll" class="m-editor-page-bar-item m-editor-page-bar-item-icon" @click="scroll('right')">
|
|
19
|
-
<
|
|
24
|
+
<Icon :icon="ArrowRightBold"></Icon>
|
|
20
25
|
</div>
|
|
21
26
|
</div>
|
|
22
27
|
</template>
|
|
23
28
|
|
|
24
29
|
<script setup lang="ts">
|
|
25
|
-
import { computed, inject, onMounted, onUnmounted, ref, toRaw, watch } from 'vue';
|
|
30
|
+
import { computed, inject, nextTick, onMounted, onUnmounted, ref, toRaw, watch } from 'vue';
|
|
26
31
|
import { ArrowLeftBold, ArrowRightBold, Plus } from '@element-plus/icons-vue';
|
|
27
32
|
|
|
28
|
-
import {
|
|
33
|
+
import { NodeType } from '@tmagic/schema';
|
|
29
34
|
|
|
35
|
+
import Icon from '../../components/Icon.vue';
|
|
30
36
|
import type { Services } from '../../type';
|
|
31
37
|
import { generatePageNameByApp } from '../../utils/editor';
|
|
32
38
|
|
|
@@ -34,31 +40,39 @@ const services = inject<Services>('services');
|
|
|
34
40
|
const editorService = services?.editorService;
|
|
35
41
|
const uiService = services?.uiService;
|
|
36
42
|
|
|
37
|
-
const pageBar = ref<HTMLDivElement>();
|
|
38
43
|
const itemsContainer = ref<HTMLDivElement>();
|
|
39
|
-
const pageBarWidth = ref(0);
|
|
40
44
|
const canScroll = ref(false);
|
|
41
45
|
|
|
42
46
|
const showAddPageButton = computed(() => uiService?.get('showAddPageButton'));
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
const itemsContainerWidth = computed(() => pageBarWidth.value - 35 * 2 - (showAddPageButton.value ? 35 : 21));
|
|
48
|
+
const itemsContainerWidth = ref(0);
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
pageBarWidth.value = width || 0;
|
|
50
|
+
const setCanScroll = () => {
|
|
51
|
+
// 减去新增、左移、右移三个按钮的宽度
|
|
52
|
+
// 37 = icon width 16 + padding 10 * 2 + border-right 1
|
|
53
|
+
itemsContainerWidth.value = (pageBar.value?.clientWidth || 0) - 37 * 2 - (showAddPageButton.value ? 37 : 21);
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
nextTick(() => {
|
|
56
|
+
if (itemsContainer.value) {
|
|
57
|
+
canScroll.value = itemsContainer.value.scrollWidth - itemsContainerWidth.value > 1;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
63
|
+
setCanScroll();
|
|
55
64
|
});
|
|
56
65
|
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
const pageBar = ref<HTMLDivElement>();
|
|
67
|
+
onMounted(() => {
|
|
68
|
+
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
onUnmounted(() => {
|
|
72
|
+
resizeObserver.disconnect();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
let translateLeft = 0;
|
|
62
76
|
|
|
63
77
|
const scroll = (type: 'left' | 'right' | 'start' | 'end') => {
|
|
64
78
|
if (!itemsContainer.value) return;
|
|
@@ -86,30 +100,19 @@ const scroll = (type: 'left' | 'right' | 'start' | 'end') => {
|
|
|
86
100
|
itemsContainer.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
87
101
|
};
|
|
88
102
|
|
|
89
|
-
|
|
90
|
-
pageBar.value && resizeObserver.observe(pageBar.value);
|
|
91
|
-
});
|
|
103
|
+
const pageLength = computed(() => editorService?.get<number>('pageLength'));
|
|
92
104
|
|
|
93
|
-
|
|
94
|
-
|
|
105
|
+
watch(pageLength, (length = 0, preLength = 0) => {
|
|
106
|
+
setTimeout(() => {
|
|
107
|
+
setCanScroll();
|
|
108
|
+
if (length < preLength) {
|
|
109
|
+
scroll('start');
|
|
110
|
+
} else {
|
|
111
|
+
scroll('end');
|
|
112
|
+
}
|
|
113
|
+
});
|
|
95
114
|
});
|
|
96
115
|
|
|
97
|
-
const root = computed(() => editorService?.get<MApp>('root'));
|
|
98
|
-
|
|
99
|
-
watch(
|
|
100
|
-
() => root.value?.items.length,
|
|
101
|
-
(length = 0, preLength = 0) => {
|
|
102
|
-
setTimeout(() => {
|
|
103
|
-
setCanScroll();
|
|
104
|
-
if (length < preLength) {
|
|
105
|
-
scroll('start');
|
|
106
|
-
} else {
|
|
107
|
-
scroll('end');
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
},
|
|
111
|
-
);
|
|
112
|
-
|
|
113
116
|
const addPage = () => {
|
|
114
117
|
if (!editorService) return;
|
|
115
118
|
const pageConfig = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="m-editor-workspace" tabindex="1" ref="workspace">
|
|
2
|
+
<div class="m-editor-workspace" tabindex="-1" ref="workspace">
|
|
3
3
|
<slot name="stage">
|
|
4
4
|
<MagicStage :key="page?.id"></MagicStage>
|
|
5
5
|
</slot>
|
|
@@ -139,9 +139,9 @@ onMounted(() => {
|
|
|
139
139
|
e.inputEvent.preventDefault();
|
|
140
140
|
services?.uiService.zoom(-0.1);
|
|
141
141
|
})
|
|
142
|
-
.keydown([ctrl, '0'], (e) => {
|
|
142
|
+
.keydown([ctrl, '0'], async (e) => {
|
|
143
143
|
e.inputEvent.preventDefault();
|
|
144
|
-
services?.uiService.set('zoom', services.uiService.calcZoom());
|
|
144
|
+
services?.uiService.set('zoom', await services.uiService.calcZoom());
|
|
145
145
|
})
|
|
146
146
|
.keydown([ctrl, '1'], (e) => {
|
|
147
147
|
e.inputEvent.preventDefault();
|
package/src/services/editor.ts
CHANGED
|
@@ -297,7 +297,7 @@ class Editor extends BaseService {
|
|
|
297
297
|
throw new Error('app下不能添加组件');
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
if (parent.id !== curNode.id) {
|
|
300
|
+
if (parent.id !== curNode.id && node.type !== NodeType.PAGE) {
|
|
301
301
|
const index = parent.items.indexOf(curNode);
|
|
302
302
|
parent?.items?.splice(index + 1, 0, node);
|
|
303
303
|
} else {
|
|
@@ -315,9 +315,12 @@ class Editor extends BaseService {
|
|
|
315
315
|
root: cloneDeep(root),
|
|
316
316
|
});
|
|
317
317
|
|
|
318
|
-
|
|
318
|
+
const newStyle = fixNodePosition(node, parent, stage);
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
if (newStyle && (newStyle.top !== node.style.top || newStyle.left !== node.style.left)) {
|
|
321
|
+
node.style = newStyle;
|
|
322
|
+
await stage?.update({ config: cloneDeep(node), parentId: parent.id, root: cloneDeep(root) });
|
|
323
|
+
}
|
|
321
324
|
|
|
322
325
|
this.addModifiedNodeId(node.id);
|
|
323
326
|
|
package/src/services/ui.ts
CHANGED
|
@@ -16,28 +16,15 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { reactive
|
|
19
|
+
import { reactive } from 'vue';
|
|
20
20
|
|
|
21
21
|
import type StageCore from '@tmagic/stage';
|
|
22
22
|
|
|
23
23
|
import editorService from '../services/editor';
|
|
24
|
-
import type {
|
|
24
|
+
import type { StageRect, UiState } from '../type';
|
|
25
25
|
|
|
26
26
|
import BaseService from './BaseService';
|
|
27
27
|
|
|
28
|
-
const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
29
|
-
const MIN_LEFT_COLUMN_WIDTH = 45;
|
|
30
|
-
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
31
|
-
const MIN_RIGHT_COLUMN_WIDTH = 1;
|
|
32
|
-
|
|
33
|
-
const COLUMN_WIDTH_STORAGE_KEY = '$MagicEditorColumnWidthData';
|
|
34
|
-
|
|
35
|
-
const defaultColumnWidth = {
|
|
36
|
-
left: DEFAULT_LEFT_COLUMN_WIDTH,
|
|
37
|
-
center: globalThis.document.body.clientWidth - DEFAULT_LEFT_COLUMN_WIDTH - DEFAULT_RIGHT_COLUMN_WIDTH,
|
|
38
|
-
right: DEFAULT_RIGHT_COLUMN_WIDTH,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
28
|
const state = reactive<UiState>({
|
|
42
29
|
uiSelectMode: false,
|
|
43
30
|
showSrc: false,
|
|
@@ -50,7 +37,11 @@ const state = reactive<UiState>({
|
|
|
50
37
|
width: 375,
|
|
51
38
|
height: 817,
|
|
52
39
|
},
|
|
53
|
-
columnWidth:
|
|
40
|
+
columnWidth: {
|
|
41
|
+
left: 0,
|
|
42
|
+
right: 0,
|
|
43
|
+
center: 0,
|
|
44
|
+
},
|
|
54
45
|
showGuides: true,
|
|
55
46
|
showRule: true,
|
|
56
47
|
propsPanelSize: 'small',
|
|
@@ -59,22 +50,12 @@ const state = reactive<UiState>({
|
|
|
59
50
|
|
|
60
51
|
class Ui extends BaseService {
|
|
61
52
|
constructor() {
|
|
62
|
-
super([]);
|
|
63
|
-
globalThis.addEventListener('resize', () => {
|
|
64
|
-
this.setColumnWidth({
|
|
65
|
-
center: 'auto',
|
|
66
|
-
});
|
|
67
|
-
});
|
|
53
|
+
super(['zoom', 'calcZoom']);
|
|
68
54
|
}
|
|
69
55
|
|
|
70
56
|
public set<T = any>(name: keyof UiState, value: T) {
|
|
71
57
|
const mask = editorService.get<StageCore>('stage')?.mask;
|
|
72
58
|
|
|
73
|
-
if (name === 'columnWidth') {
|
|
74
|
-
this.setColumnWidth(value as unknown as SetColumnWidth);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
59
|
if (name === 'stageRect') {
|
|
79
60
|
this.setStageRect(value as unknown as StageRect);
|
|
80
61
|
return;
|
|
@@ -95,24 +76,12 @@ class Ui extends BaseService {
|
|
|
95
76
|
return (state as any)[name];
|
|
96
77
|
}
|
|
97
78
|
|
|
98
|
-
public
|
|
99
|
-
const columnWidthCacheData = globalThis.localStorage.getItem(COLUMN_WIDTH_STORAGE_KEY);
|
|
100
|
-
if (columnWidthCacheData) {
|
|
101
|
-
try {
|
|
102
|
-
const columnWidthCache = JSON.parse(columnWidthCacheData);
|
|
103
|
-
this.setColumnWidth(columnWidthCache);
|
|
104
|
-
} catch (e) {
|
|
105
|
-
console.error(e);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
public zoom(zoom: number) {
|
|
79
|
+
public async zoom(zoom: number) {
|
|
111
80
|
this.set('zoom', (this.get<number>('zoom') * 100 + zoom * 100) / 100);
|
|
112
81
|
if (this.get<number>('zoom') < 0.1) this.set('zoom', 0.1);
|
|
113
82
|
}
|
|
114
83
|
|
|
115
|
-
public calcZoom() {
|
|
84
|
+
public async calcZoom() {
|
|
116
85
|
const { stageRect, stageContainerRect } = state;
|
|
117
86
|
const { height, width } = stageContainerRect;
|
|
118
87
|
if (!width || !height) return 1;
|
|
@@ -132,42 +101,12 @@ class Ui extends BaseService {
|
|
|
132
101
|
this.removeAllListeners();
|
|
133
102
|
}
|
|
134
103
|
|
|
135
|
-
private
|
|
136
|
-
const columnWidth = {
|
|
137
|
-
...toRaw(this.get<GetColumnWidth>('columnWidth')),
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
if (left) {
|
|
141
|
-
columnWidth.left = Math.max(left, MIN_LEFT_COLUMN_WIDTH);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (right) {
|
|
145
|
-
columnWidth.right = Math.max(right, MIN_RIGHT_COLUMN_WIDTH);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (!center || center === 'auto') {
|
|
149
|
-
const bodyWidth = globalThis.document.body.clientWidth;
|
|
150
|
-
columnWidth.center = bodyWidth - (columnWidth?.left || 0) - (columnWidth?.right || 0);
|
|
151
|
-
if (columnWidth.center <= 0) {
|
|
152
|
-
columnWidth.left = defaultColumnWidth.left;
|
|
153
|
-
columnWidth.center = defaultColumnWidth.center;
|
|
154
|
-
columnWidth.right = defaultColumnWidth.right;
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
columnWidth.center = center;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
globalThis.localStorage.setItem(COLUMN_WIDTH_STORAGE_KEY, JSON.stringify(columnWidth));
|
|
161
|
-
|
|
162
|
-
state.columnWidth = columnWidth;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
private setStageRect(value: StageRect) {
|
|
104
|
+
private async setStageRect(value: StageRect) {
|
|
166
105
|
state.stageRect = {
|
|
167
106
|
...state.stageRect,
|
|
168
107
|
...value,
|
|
169
108
|
};
|
|
170
|
-
state.zoom = this.calcZoom();
|
|
109
|
+
state.zoom = await this.calcZoom();
|
|
171
110
|
}
|
|
172
111
|
}
|
|
173
112
|
|
|
@@ -8,7 +8,7 @@ declare const _default: {
|
|
|
8
8
|
eventType: 'mousedown' | 'mouseup' | 'click';
|
|
9
9
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
10
|
data?: MenuButton | MenuComponent | undefined;
|
|
11
|
-
eventType?: "
|
|
11
|
+
eventType?: "mousedown" | "click" | "mouseup" | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
data: () => {
|
|
14
14
|
type: string;
|
|
@@ -31,7 +31,7 @@ declare const _default: {
|
|
|
31
31
|
$el: any;
|
|
32
32
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
33
33
|
data?: MenuButton | MenuComponent | undefined;
|
|
34
|
-
eventType?: "
|
|
34
|
+
eventType?: "mousedown" | "click" | "mouseup" | undefined;
|
|
35
35
|
}>, {
|
|
36
36
|
data: () => {
|
|
37
37
|
type: string;
|
|
@@ -63,7 +63,7 @@ declare const _default: {
|
|
|
63
63
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
64
64
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
65
65
|
data?: MenuButton | MenuComponent | undefined;
|
|
66
|
-
eventType?: "
|
|
66
|
+
eventType?: "mousedown" | "click" | "mouseup" | undefined;
|
|
67
67
|
}>, {
|
|
68
68
|
data: () => {
|
|
69
69
|
type: string;
|
|
@@ -76,7 +76,7 @@ declare const _default: {
|
|
|
76
76
|
__isSuspense?: undefined;
|
|
77
77
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
78
78
|
data?: MenuButton | MenuComponent | undefined;
|
|
79
|
-
eventType?: "
|
|
79
|
+
eventType?: "mousedown" | "click" | "mouseup" | undefined;
|
|
80
80
|
}>, {
|
|
81
81
|
data: () => {
|
|
82
82
|
type: string;
|
|
@@ -1,23 +1,91 @@
|
|
|
1
|
-
declare const _default:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
model: any;
|
|
7
|
+
name: string;
|
|
8
|
+
config: {
|
|
9
|
+
language?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
prop: string;
|
|
12
|
+
}>>> & {
|
|
13
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
15
|
+
$attrs: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
};
|
|
18
|
+
$refs: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
$slots: Readonly<{
|
|
22
|
+
[name: string]: import("vue").Slot | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
25
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
26
|
+
$emit: (event: "change", ...args: any[]) => void;
|
|
27
|
+
$el: any;
|
|
28
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
29
|
+
model: any;
|
|
30
|
+
name: string;
|
|
31
|
+
config: {
|
|
32
|
+
language?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
prop: string;
|
|
35
|
+
}>>> & {
|
|
36
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], string, {}> & {
|
|
38
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
39
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
40
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
41
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
42
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
43
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
44
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
45
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
46
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
47
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
48
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
49
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
50
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
51
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
52
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
53
|
+
};
|
|
54
|
+
$forceUpdate: () => void;
|
|
55
|
+
$nextTick: typeof import("vue").nextTick;
|
|
56
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
57
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
58
|
+
model: any;
|
|
59
|
+
name: string;
|
|
60
|
+
config: {
|
|
61
|
+
language?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
prop: string;
|
|
64
|
+
}>>> & {
|
|
65
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
67
|
+
__isFragment?: undefined;
|
|
68
|
+
__isTeleport?: undefined;
|
|
69
|
+
__isSuspense?: undefined;
|
|
70
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
71
|
+
model: any;
|
|
72
|
+
name: string;
|
|
73
|
+
config: {
|
|
74
|
+
language?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
prop: string;
|
|
15
77
|
}>>> & {
|
|
16
78
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
}, {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly config?: any;
|
|
21
|
-
readonly prop?: any;
|
|
22
|
-
}>;
|
|
79
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
80
|
+
$slots: {};
|
|
81
|
+
});
|
|
23
82
|
export default _default;
|
|
83
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
84
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
85
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
86
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
87
|
+
} : {
|
|
88
|
+
type: import('vue').PropType<T[K]>;
|
|
89
|
+
required: true;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
@@ -1,52 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
config: {
|
|
7
|
+
type: 'code-link';
|
|
8
|
+
name: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
formTitle?: string;
|
|
11
|
+
};
|
|
12
|
+
model: any;
|
|
13
|
+
name: string;
|
|
14
|
+
prop: string;
|
|
15
|
+
}>>> & {
|
|
16
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
18
|
+
$attrs: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
$refs: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
$slots: Readonly<{
|
|
25
|
+
[name: string]: import("vue").Slot | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
28
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
29
|
+
$emit: (event: "change", ...args: any[]) => void;
|
|
30
|
+
$el: any;
|
|
31
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
32
|
+
config: {
|
|
33
|
+
type: 'code-link';
|
|
34
|
+
name: string;
|
|
35
|
+
text?: string;
|
|
36
|
+
formTitle?: string;
|
|
37
|
+
};
|
|
38
|
+
model: any;
|
|
39
|
+
name: string;
|
|
40
|
+
prop: string;
|
|
41
|
+
}>>> & {
|
|
42
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], string, {}> & {
|
|
44
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
45
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
46
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
47
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
48
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
49
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
50
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
51
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
52
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
53
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
54
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
55
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
56
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
57
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
58
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
59
|
+
};
|
|
60
|
+
$forceUpdate: () => void;
|
|
61
|
+
$nextTick: typeof import("vue").nextTick;
|
|
62
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
63
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
64
|
+
config: {
|
|
65
|
+
type: 'code-link';
|
|
66
|
+
name: string;
|
|
67
|
+
text?: string;
|
|
68
|
+
formTitle?: string;
|
|
69
|
+
};
|
|
70
|
+
model: any;
|
|
71
|
+
name: string;
|
|
72
|
+
prop: string;
|
|
73
|
+
}>>> & {
|
|
74
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
76
|
+
__isFragment?: undefined;
|
|
77
|
+
__isTeleport?: undefined;
|
|
78
|
+
__isSuspense?: undefined;
|
|
79
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
37
80
|
config: {
|
|
38
|
-
type:
|
|
81
|
+
type: 'code-link';
|
|
82
|
+
name: string;
|
|
83
|
+
text?: string;
|
|
84
|
+
formTitle?: string;
|
|
39
85
|
};
|
|
40
|
-
model:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
type: StringConstructor;
|
|
45
|
-
};
|
|
46
|
-
prop: {
|
|
47
|
-
type: StringConstructor;
|
|
48
|
-
};
|
|
49
|
-
}>> & {
|
|
86
|
+
model: any;
|
|
87
|
+
name: string;
|
|
88
|
+
prop: string;
|
|
89
|
+
}>>> & {
|
|
50
90
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
51
|
-
}, {}
|
|
91
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
92
|
+
$slots: {};
|
|
93
|
+
});
|
|
52
94
|
export default _default;
|
|
95
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
96
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
97
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
98
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
99
|
+
} : {
|
|
100
|
+
type: import('vue').PropType<T[K]>;
|
|
101
|
+
required: true;
|
|
102
|
+
};
|
|
103
|
+
};
|