|
@@ -1,47 +1,20 @@
|
|
|
import { defineComponent, inject, ref, watch, unref } from "vue";
|
|
|
-import { FormConfig, PageSearch } from "../../PageSearch";
|
|
|
-import type { Events, Hooks } from "./types";
|
|
|
+import { PageContent } from "/@/components/PageContent";
|
|
|
+import { PageSearch } from "../../PageSearch";
|
|
|
+import { type Hooks, props } from "./types";
|
|
|
|
|
|
-import { type ModalConfig, PageModal } from "../../PageModal";
|
|
|
-
|
|
|
-import {
|
|
|
- PageContent,
|
|
|
- type ContentConfig,
|
|
|
- type PageContentInstance
|
|
|
-} from "/@/components/PageContent";
|
|
|
+import { PageModal } from "../../PageModal";
|
|
|
+import { any } from "vue-types";
|
|
|
|
|
|
const PageContainer = defineComponent({
|
|
|
name: "PageContainer",
|
|
|
- props: {
|
|
|
- pageName: {
|
|
|
- type: String,
|
|
|
- default: ""
|
|
|
- },
|
|
|
- contentConfig: {
|
|
|
- type: Object as PropType<ContentConfig>
|
|
|
- },
|
|
|
- searchConfig: {
|
|
|
- type: Object as PropType<FormConfig>
|
|
|
- },
|
|
|
- modalConfig: {
|
|
|
- type: Object as PropType<ModalConfig>
|
|
|
- },
|
|
|
- getContentRef: {
|
|
|
- type: Function as PropType<(ref: PageContentInstance) => any>
|
|
|
- },
|
|
|
- getModalRef: {
|
|
|
- type: Function as PropType<(ref: PageContentInstance) => any>
|
|
|
- },
|
|
|
- hooks: {
|
|
|
- type: Object as PropType<Hooks>,
|
|
|
- default: () => ({})
|
|
|
- },
|
|
|
- events: {
|
|
|
- type: Object as PropType<Events>,
|
|
|
- default: () => ({})
|
|
|
- }
|
|
|
+
|
|
|
+ props: props,
|
|
|
+
|
|
|
+ emits: {
|
|
|
+ "content-select-change": (value: any) => any
|
|
|
},
|
|
|
- emits: ["content-select-change"],
|
|
|
+
|
|
|
setup(props, { slots, emit, expose }) {
|
|
|
const { pageSearchHook, pageModalHook } = props.hooks as Hooks;
|
|
|
const search = pageSearchHook ? pageSearchHook() : ({} as any);
|