element-plus
Version:
A Component Library for Vue 3
1 lines • 4.61 kB
Source Map (JSON)
{"version":3,"file":"col.mjs","sources":["../../../../../../packages/components/col/src/col.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\n\nimport type { 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 interface ColProps {\n /**\n * @description custom element tag\n */\n tag?: string\n /**\n * @description number of column the grid spans\n */\n span?: number\n /**\n * @description number of spacing on the left side of the grid\n */\n offset?: number\n /**\n * @description number of columns that grid moves to the left\n */\n pull?: number\n /**\n * @description number of columns that grid moves to the right\n */\n push?: number\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs?: ColSize\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm?: ColSize\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md?: ColSize\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg?: ColSize\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl?: ColSize\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `ColProps` instead.\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)\n\n/**\n * @deprecated Removed after 3.0.0, Use `ColProps` instead.\n */\nexport type ColPropsPublic = ExtractPublicPropTypes<typeof colProps>\nexport type ColInstance = InstanceType<typeof Col> & unknown\n"],"names":[],"mappings":";;;AA2DO,MAAM,WAAW,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIjC,GAAA,EAAK;AAAA,IACH,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,cAAA,CAAwB,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IAC9C,OAAA,EAAS,MAAM,OAAA,CAAQ,EAAW;AAAA,GACpC;AAAA;AAAA;AAAA;AAAA,EAIA,EAAA,EAAI;AAAA,IACF,IAAA,EAAM,cAAA,CAAwB,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA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