mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* feat(types): [utils] add ExtractPublicPropTypes type * feat(types): [components] add props public type * chore(types): use type-only import for Prop from 'vue' Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com> --------- Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
52 lines
1.0 KiB
TypeScript
52 lines
1.0 KiB
TypeScript
import { buildProps } from '@element-plus/utils'
|
|
|
|
import type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'
|
|
import type Row from './row.vue'
|
|
|
|
export const RowJustify = [
|
|
'start',
|
|
'center',
|
|
'end',
|
|
'space-around',
|
|
'space-between',
|
|
'space-evenly',
|
|
] as const
|
|
|
|
export const RowAlign = ['top', 'middle', 'bottom'] as const
|
|
|
|
export const rowProps = buildProps({
|
|
/**
|
|
* @description custom element tag
|
|
*/
|
|
tag: {
|
|
type: String,
|
|
default: 'div',
|
|
},
|
|
/**
|
|
* @description grid spacing
|
|
*/
|
|
gutter: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
/**
|
|
* @description horizontal alignment of flex layout
|
|
*/
|
|
justify: {
|
|
type: String,
|
|
values: RowJustify,
|
|
default: 'start',
|
|
},
|
|
/**
|
|
* @description vertical alignment of flex layout
|
|
*/
|
|
align: {
|
|
type: String,
|
|
values: RowAlign,
|
|
},
|
|
} as const)
|
|
|
|
export type RowProps = ExtractPropTypes<typeof rowProps>
|
|
export type RowPropsPublic = __ExtractPublicPropTypes<typeof rowProps>
|
|
export type RowInstance = InstanceType<typeof Row> & unknown
|