You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
902 B
TypeScript
33 lines
902 B
TypeScript
import type { FunctionalComponent } from 'vue'
|
|
import { Layout } from 'ant-design-vue'
|
|
|
|
export interface WrapContentProps {
|
|
isChildrenLayout?: boolean
|
|
location?: any
|
|
contentHeight?: number | string
|
|
ErrorBoundary?: any
|
|
}
|
|
|
|
// TODO 异常处理
|
|
const WrapContent: FunctionalComponent<WrapContentProps> = (props, { slots, attrs }) => {
|
|
// const ErrorComponent = props.ErrorBoundary || ErrorBoundary
|
|
return (
|
|
// {props.ErrorBoundary === false ? (
|
|
// <Layout.Content class={className} style={style}>
|
|
// {slots.default}
|
|
// </Layout.Content>
|
|
// ) : (
|
|
// <ErrorComponent>
|
|
// <Layout.Content class={className} style={style}>
|
|
// {children}
|
|
// </Layout.Content>
|
|
// </ErrorComponent>
|
|
// )}
|
|
<Layout.Content class={attrs.class} style={attrs.style}>
|
|
{slots.default?.()}
|
|
</Layout.Content>
|
|
)
|
|
}
|
|
|
|
export default WrapContent
|