UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.42 kB
{"version":3,"file":"column.mjs","sources":["../../../../../../packages/components/table-v2/src/column.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { CSSProperties, Component, ExtractPropTypes } from 'vue'\nimport type {\n Alignment,\n CellRenderer,\n CellRendererParams,\n FixedDirection,\n HeaderCellRenderer,\n HeaderCellRendererParams,\n} from './types'\n\nconst widthType = {\n type: Number,\n default: undefined,\n} as const\n\nexport const tableV2ColumnProps = buildProps({\n /**\n * Attributes\n */\n align: {\n type: definePropType<Alignment>(String),\n default: 'left',\n },\n class: String,\n fixed: {\n type: definePropType<boolean | FixedDirection>([String, Boolean]),\n default: false,\n },\n headerClass: String,\n hidden: Boolean,\n resizable: Boolean,\n style: {\n type: definePropType<CSSProperties>(Object),\n },\n sortable: Boolean,\n title: String,\n\n maxWidth: widthType,\n minWidth: widthType,\n width: {\n type: Number,\n required: true,\n },\n\n // getters & renderers\n cellRenderer: {\n type: definePropType<\n CellRenderer<any> | Component<CellRendererParams<any>>\n >([Function, Object]),\n },\n\n headerRenderer: {\n type: definePropType<\n HeaderCellRenderer<any> | Component<HeaderCellRendererParams<any>>\n >([Function, Object]),\n },\n} as const)\n\nexport type TableV2ColumnProps = ExtractPropTypes<typeof tableV2ColumnProps>\n"],"names":[],"mappings":";;;AACA,MAAM,SAAS,GAAG;AAClB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,KAAK,CAAC;AACjB,CAAC,CAAC;AACU,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,QAAQ,EAAE,SAAS;AACrB,EAAE,QAAQ,EAAE,SAAS;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,GAAG;AACH,CAAC;;;;"}