chore(types): update Layout types (#2705)
parent
69509e9c38
commit
1294220965
|
@ -7,3 +7,4 @@ es/
|
||||||
lib/
|
lib/
|
||||||
_site/
|
_site/
|
||||||
dist/
|
dist/
|
||||||
|
types/
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { CSSProperties } from 'vue';
|
||||||
// Project: https://github.com/vueComponent/ant-design-vue
|
// Project: https://github.com/vueComponent/ant-design-vue
|
||||||
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
||||||
// Copy from: akki-jat <https://github.com/akki-jat>
|
// Copy from: akki-jat <https://github.com/akki-jat>
|
||||||
|
@ -5,23 +6,27 @@
|
||||||
|
|
||||||
import { AntdComponent } from '../component';
|
import { AntdComponent } from '../component';
|
||||||
|
|
||||||
export default class LayoutContent extends AntdComponent {
|
export interface LayoutContentProps {
|
||||||
/**
|
/**
|
||||||
* container className
|
* container className
|
||||||
* @default undefined
|
* @default undefined
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
class: string;
|
class?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to customize the styles
|
* to customize the styles
|
||||||
* @type string | object
|
* @type CSSProperties
|
||||||
*/
|
*/
|
||||||
style: string | object;
|
style?: CSSProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
hasSider: boolean;
|
hasSider?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class LayoutContent extends AntdComponent {
|
||||||
|
$props: LayoutContentProps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { CSSProperties } from 'vue';
|
||||||
// Project: https://github.com/vueComponent/ant-design-vue
|
// Project: https://github.com/vueComponent/ant-design-vue
|
||||||
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
||||||
// Copy from: akki-jat <https://github.com/akki-jat>
|
// Copy from: akki-jat <https://github.com/akki-jat>
|
||||||
|
@ -5,23 +6,27 @@
|
||||||
|
|
||||||
import { AntdComponent } from '../component';
|
import { AntdComponent } from '../component';
|
||||||
|
|
||||||
export default class LayoutFooter extends AntdComponent {
|
export interface LayoutFooterProps {
|
||||||
/**
|
/**
|
||||||
* container className
|
* container className
|
||||||
* @default undefined
|
* @default undefined
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
class: string;
|
class?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to customize the styles
|
* to customize the styles
|
||||||
* @type string | object
|
* @type CSSProperties
|
||||||
*/
|
*/
|
||||||
style: string | object;
|
style?: CSSProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
hasSider: boolean;
|
hasSider?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class LayoutFooter extends AntdComponent {
|
||||||
|
$props: LayoutFooterProps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { CSSProperties } from 'vue';
|
||||||
// Project: https://github.com/vueComponent/ant-design-vue
|
// Project: https://github.com/vueComponent/ant-design-vue
|
||||||
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
// Definitions by: Pythonfo <https://github.com/Pythonfo>
|
||||||
// Copy from: akki-jat <https://github.com/akki-jat>
|
// Copy from: akki-jat <https://github.com/akki-jat>
|
||||||
|
@ -5,23 +6,27 @@
|
||||||
|
|
||||||
import { AntdComponent } from '../component';
|
import { AntdComponent } from '../component';
|
||||||
|
|
||||||
export default class LayoutHeader extends AntdComponent {
|
export interface LayoutHeaderProps {
|
||||||
/**
|
/**
|
||||||
* container className
|
* container className
|
||||||
* @default undefined
|
* @default undefined
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
class: string;
|
class?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to customize the styles
|
* to customize the styles
|
||||||
* @type string | object
|
* @type CSSProperties
|
||||||
*/
|
*/
|
||||||
style: string | object;
|
style?: CSSProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
hasSider: boolean;
|
hasSider?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class LayoutHeader extends AntdComponent {
|
||||||
|
$props: LayoutHeaderProps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,79 +1,84 @@
|
||||||
|
import { CSSProperties, Slot, VNodeChild } from 'vue';
|
||||||
// Project: https://github.com/vueComponent/ant-design-vue
|
// Project: https://github.com/vueComponent/ant-design-vue
|
||||||
// Definitions by: akki-jat <https://github.com/akki-jat>
|
// Definitions by: akki-jat <https://github.com/akki-jat>
|
||||||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||||
|
|
||||||
import { AntdComponent } from '../component';
|
import { AntdComponent } from '../component';
|
||||||
|
|
||||||
export declare class LayoutSider extends AntdComponent {
|
export interface LayoutSiderProps {
|
||||||
/**
|
/**
|
||||||
* container className
|
* container className
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
class: string;
|
class?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether can be collapsed
|
* whether can be collapsed
|
||||||
* @default false
|
* @default false
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
collapsible: boolean;
|
collapsible?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to set the current status
|
* to set the current status
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
collapsed: boolean;
|
collapsed?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to set the initial status
|
* to set the initial status
|
||||||
* @default false
|
* @default false
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
defaultCollapsed: boolean;
|
defaultCollapsed?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reverse direction of arrow, for a sider that expands from the right
|
* reverse direction of arrow, for a sider that expands from the right
|
||||||
* @default false
|
* @default false
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
reverseArrow: boolean;
|
reverseArrow?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to customize the styles
|
* to customize the styles
|
||||||
* @type object | string
|
* @type CSSProperties
|
||||||
*/
|
*/
|
||||||
style: object | string;
|
style?: CSSProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* specify the customized trigger, set to null to hide the trigger
|
* specify the customized trigger, set to null to hide the trigger
|
||||||
* @type string | slot
|
* @type string | | VNodeChild | JSX.Element
|
||||||
*/
|
*/
|
||||||
trigger: any;
|
trigger?: string | VNodeChild | JSX.Element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* width of the sidebar
|
* width of the sidebar
|
||||||
* @default 200
|
* @default 200
|
||||||
* @type number | string
|
* @type number | string
|
||||||
*/
|
*/
|
||||||
width: number | string;
|
width?: number | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* width of the collapsed sidebar, by setting to 0 a special trigger will appear
|
* width of the collapsed sidebar, by setting to 0 a special trigger will appear
|
||||||
* @default 80
|
* @default 80
|
||||||
* @type number
|
* @type number
|
||||||
*/
|
*/
|
||||||
collapsedWidth: number;
|
collapsedWidth?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* breakpoints of the responsive layout
|
* breakpoints of the responsive layout
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
breakpoint: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* color theme of the sidebar
|
* color theme of the sidebar
|
||||||
* @default 'dark'
|
* @default 'dark'
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
theme: 'light' | 'dark';
|
theme?: 'light' | 'dark';
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare class LayoutSider extends AntdComponent {
|
||||||
|
$props: LayoutSiderProps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,28 @@ import { LayoutSider } from './layout-sider';
|
||||||
import LayoutHeader from './layout-header';
|
import LayoutHeader from './layout-header';
|
||||||
import LayoutContent from './layout-content';
|
import LayoutContent from './layout-content';
|
||||||
import LayoutFooter from './layout-footer';
|
import LayoutFooter from './layout-footer';
|
||||||
|
import { CSSProperties } from 'vue';
|
||||||
|
|
||||||
|
export interface LayoutProps {
|
||||||
|
/**
|
||||||
|
* container className
|
||||||
|
* @default undefined
|
||||||
|
* @type string
|
||||||
|
*/
|
||||||
|
class?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* to customize the styles
|
||||||
|
* @type CSSProperties
|
||||||
|
*/
|
||||||
|
style?: CSSProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
||||||
|
* @type boolean
|
||||||
|
*/
|
||||||
|
hasSider?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export declare class Layout extends AntdComponent {
|
export declare class Layout extends AntdComponent {
|
||||||
static Header: typeof LayoutHeader;
|
static Header: typeof LayoutHeader;
|
||||||
|
@ -14,22 +36,5 @@ export declare class Layout extends AntdComponent {
|
||||||
static Footer: typeof LayoutFooter;
|
static Footer: typeof LayoutFooter;
|
||||||
static Sider: typeof LayoutSider;
|
static Sider: typeof LayoutSider;
|
||||||
|
|
||||||
/**
|
$props: LayoutProps;
|
||||||
* container className
|
|
||||||
* @default undefined
|
|
||||||
* @type string
|
|
||||||
*/
|
|
||||||
class: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* to customize the styles
|
|
||||||
* @type string | object
|
|
||||||
*/
|
|
||||||
style: string | object;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
|
|
||||||
* @type boolean
|
|
||||||
*/
|
|
||||||
hasSider: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue