mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-16 18:09:22 +08:00
chore(editor): export Layout
This commit is contained in:
parent
66e727838b
commit
6fdc28e121
@ -23,7 +23,7 @@
|
|||||||
<script lang="ts" setup name="MEditorLayout">
|
<script lang="ts" setup name="MEditorLayout">
|
||||||
import { onMounted, onUnmounted, ref } from 'vue';
|
import { onMounted, onUnmounted, ref } from 'vue';
|
||||||
|
|
||||||
import Resizer from './Resizer.vue';
|
import Resizer from '../layouts/Resizer.vue';
|
||||||
|
|
||||||
const emit = defineEmits(['update:left', 'change', 'update:right']);
|
const emit = defineEmits(['update:left', 'change', 'update:right']);
|
||||||
|
|
@ -48,6 +48,7 @@ export { default as PropsPanel } from './layouts/PropsPanel.vue';
|
|||||||
export { default as ToolButton } from './components/ToolButton.vue';
|
export { default as ToolButton } from './components/ToolButton.vue';
|
||||||
export { default as ContentMenu } from './components/ContentMenu.vue';
|
export { default as ContentMenu } from './components/ContentMenu.vue';
|
||||||
export { default as Icon } from './components/Icon.vue';
|
export { default as Icon } from './components/Icon.vue';
|
||||||
|
export { default as Layout } from './components/Layout.vue';
|
||||||
|
|
||||||
const defaultInstallOpt: InstallOptions = {
|
const defaultInstallOpt: InstallOptions = {
|
||||||
// @todo, 自定义图片上传方法等编辑器依赖的外部选项
|
// @todo, 自定义图片上传方法等编辑器依赖的外部选项
|
||||||
|
@ -48,10 +48,10 @@ import { computed, inject, ref, watch } from 'vue';
|
|||||||
import { TMagicScrollbar } from '@tmagic/design';
|
import { TMagicScrollbar } from '@tmagic/design';
|
||||||
import type { MApp } from '@tmagic/schema';
|
import type { MApp } from '@tmagic/schema';
|
||||||
|
|
||||||
|
import Layout from '../components/Layout.vue';
|
||||||
import { GetColumnWidth, Services } from '../type';
|
import { GetColumnWidth, Services } from '../type';
|
||||||
|
|
||||||
import AddPageBox from './AddPageBox.vue';
|
import AddPageBox from './AddPageBox.vue';
|
||||||
import Layout from './Layout.vue';
|
|
||||||
|
|
||||||
const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
const DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
||||||
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
:before-close="saveAndClose"
|
:before-close="saveAndClose"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
>
|
>
|
||||||
<layout v-model:left="left" :min-left="45" class="code-editor-layout">
|
<Layout v-model:left="left" :min-left="45" class="code-editor-layout">
|
||||||
<!-- 左侧列表 -->
|
<!-- 左侧列表 -->
|
||||||
<template #left v-if="mode === CodeEditorMode.LIST">
|
<template #left v-if="mode === CodeEditorMode.LIST">
|
||||||
<TMagicTree
|
<TMagicTree
|
||||||
@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="m-editor-wrapper">
|
<div class="m-editor-wrapper">
|
||||||
<magic-code-editor
|
<MagicCodeEditor
|
||||||
v-if="codeConfig"
|
v-if="codeConfig"
|
||||||
ref="codeEditor"
|
ref="codeEditor"
|
||||||
class="m-editor-container"
|
class="m-editor-container"
|
||||||
@ -65,7 +65,7 @@
|
|||||||
formatOnPaste: true,
|
formatOnPaste: true,
|
||||||
readOnly: !editable,
|
readOnly: !editable,
|
||||||
}"
|
}"
|
||||||
></magic-code-editor>
|
></MagicCodeEditor>
|
||||||
<div class="m-editor-content-bottom" v-if="editable">
|
<div class="m-editor-content-bottom" v-if="editable">
|
||||||
<TMagicButton type="primary" class="button" @click="saveCode">保存</TMagicButton>
|
<TMagicButton type="primary" class="button" @click="saveCode">保存</TMagicButton>
|
||||||
<TMagicButton type="primary" class="button" @click="saveAndClose">关闭</TMagicButton>
|
<TMagicButton type="primary" class="button" @click="saveAndClose">关闭</TMagicButton>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
</TMagicCard>
|
</TMagicCard>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</layout>
|
</Layout>
|
||||||
</TMagicDialog>
|
</TMagicDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ import type * as monaco from 'monaco-editor';
|
|||||||
|
|
||||||
import { TMagicButton, TMagicCard, TMagicDialog, TMagicInput, tMagicMessage, TMagicTree } from '@tmagic/design';
|
import { TMagicButton, TMagicCard, TMagicDialog, TMagicInput, tMagicMessage, TMagicTree } from '@tmagic/design';
|
||||||
|
|
||||||
|
import Layout from '../../../components/Layout.vue';
|
||||||
import type { CodeBlockContent, CodeDslList, ListState, Services } from '../../../type';
|
import type { CodeBlockContent, CodeDslList, ListState, Services } from '../../../type';
|
||||||
import { CodeEditorMode } from '../../../type';
|
import { CodeEditorMode } from '../../../type';
|
||||||
import MagicCodeEditor from '../../CodeEditor.vue';
|
import MagicCodeEditor from '../../CodeEditor.vue';
|
||||||
import Layout from '../../Layout.vue';
|
|
||||||
|
|
||||||
const services = inject<Services>('services');
|
const services = inject<Services>('services');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user