feat: 优化编辑器位置

master
绝弹 2023-10-23 21:57:45 +08:00
parent 09a0295c6f
commit d7da0bd5f9
3 changed files with 11 additions and 9 deletions

View File

@ -5,13 +5,9 @@
<component v-else :is="Component"></component>
</router-view>
</a-config-provider>
<div v-if="true">
<my-editor></my-editor>
</div>
</template>
<script setup lang="ts">
import MyEditor from "@/components/editor/index.vue";
</script>
<style scoped></style>

View File

@ -1,5 +1,5 @@
<template>
<a-modal :visible="true" :fullscreen="true" :footer="false" class="ani-modal">
<a-modal :visible="visible" :fullscreen="true" :footer="false" class="ani-modal">
<div class="w-full h-full bg-slate-100 grid grid-rows-[auto_1fr] select-none">
<div class="h-13 bg-white border-b border-slate-200 z-10">
<panel-header></panel-header>
@ -28,6 +28,7 @@ import PanelMain from "./panel-main/index.vue";
import PanelRight from "./panel-right/index.vue";
import AppnifyPreview from "./preview/index.vue";
const visible = defineModel("visible", { default: false });
const preview = ref(false);
/**

View File

@ -3,7 +3,12 @@
<div class="">
<div class="">
<a-alert :closable="true" class="mb-4"> 仅展示近 90 天内的数据如需查看更多数据请联系管理员 </a-alert>
<Table v-bind="table"></Table>
<Table v-bind="table">
<template #action>
<a-button type="primary" @click="visible = true">添加</a-button>
<ani-editor v-model:visible="visible"></ani-editor>
</template>
</Table>
</div>
</div>
</BreadPage>
@ -12,8 +17,10 @@
<script setup lang="tsx">
import { api } from "@/api";
import { Table, useTable } from "@/components";
import aniEditor from "@/components/editor/index.vue";
import dayjs from "dayjs";
const visible = ref(false);
const table = useTable({
data: async (model, paging) => {
return api.log.getLoginLogs({ ...model, ...paging });
@ -27,9 +34,7 @@ const table = useTable({
return (
<div class="flex flex-col overflow-hidden">
<span>{record.nickname}</span>
<span class="text-gray-400 text-xs truncate">
{dayjs(record.createdAt).format()}
</span>
<span class="text-gray-400 text-xs truncate">{dayjs(record.createdAt).format()}</span>
</div>
);
},