2025-04-27 00:05:18 +08:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { EditorService } from '@core/editor.service';
|
|
|
|
import { onMounted, provide, shallowRef } from 'vue';
|
|
|
|
|
|
|
|
const EDITOR_KEY = Symbol('editor-key');
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
id: string;
|
|
|
|
};
|
|
|
|
const props = defineProps<Props>();
|
|
|
|
|
|
|
|
const container = shallowRef<HTMLDivElement>();
|
|
|
|
const editor = shallowRef<EditorService>();
|
|
|
|
provide(EDITOR_KEY, editor);
|
|
|
|
onMounted(() => {
|
|
|
|
editor.value = new EditorService(container.value!);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<a-layout class="full">
|
|
|
|
<a-layout-header>header</a-layout-header>
|
|
|
|
|
|
|
|
<a-layout>
|
|
|
|
<a-layout-sider>
|
|
|
|
<RobotList v-if="editor" :editor="EDITOR_KEY" />
|
|
|
|
</a-layout-sider>
|
|
|
|
<a-layout-content>
|
|
|
|
<div ref="container" class="full"></div>
|
|
|
|
</a-layout-content>
|
2025-04-28 00:43:33 +08:00
|
|
|
<a-layout-sider>{{ $t('查询') }}</a-layout-sider>
|
2025-04-27 00:05:18 +08:00
|
|
|
</a-layout>
|
|
|
|
</a-layout>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<!-- <style scoped lang="scss"></style> -->
|