import { useEditor } from "@/modules/editor";
import { Button } from "ant-design-vue";
import { defineUI, queenApi } from "queenjs";
import { TipIcons } from "../../TipIcons";
import PreviewDesignModal from "./PreviewDesignModal";
import PublishDesignModal from "./PublishDesignModal";
export default defineUI({
setup() {
const editor = useEditor();
const { store, actions, controls } = editor;
function showPreviewModal() {
controls.screenCtrl.saveScreenPage();
const rootPage = controls.pageCtrl.rootPage;
rootPage.value.pageMode = controls.screenCtrl.state.screen.pageMode;
rootPage.value.pageSizeType =
controls.screenCtrl.state.screen.pageSizeType;
queenApi.dialog(
,
{
fullscreen: true,
closable: false,
}
);
}
function showPublishModal() {
controls.screenCtrl.saveScreenPage();
const rootPage = controls.pageCtrl.rootPage;
rootPage.value.pageMode = controls.screenCtrl.state.screen.pageMode;
rootPage.value.pageSizeType =
controls.screenCtrl.state.screen.pageSizeType;
queenApi.dialog(
,
{
fullscreen: true,
title: "作品信息",
}
);
}
return () => (
);
},
});