UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 3.46 kB
{"version":3,"file":"col.mjs","sources":["../../../../../../packages/components/col/src/col.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes<typeof colProps>\nexport type ColPropsPublic = ExtractPublicPropTypes<typeof colProps>\nexport type ColInstance = InstanceType<typeof Col> & unknown\n"],"names":[],"mappings":";;;AAaO,MAAM,WAAW,UAAW,CAAA;AAAA,EAIjC,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN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