element-plus
Version:
A Component Library for Vue 3
1 lines • 2.17 kB
Source Map (JSON)
{"version":3,"file":"common.mjs","sources":["../../../../../../packages/components/table-v2/src/common.ts"],"sourcesContent":["import { definePropType, mutable } from '@element-plus/utils'\n\nimport type { CSSProperties } from 'vue'\nimport type { Column, KeyType } from './types'\n\nexport type AnyColumn = Column<any>\n\n/**\n * @Note even though we can use `string[] | string` as the type but for\n * convenience here we only use `string` as the acceptable value here.\n */\nexport const classType = String\n\nexport const columns = {\n type: definePropType<AnyColumn[]>(Array),\n required: true,\n} as const\n\nexport const column = {\n type: definePropType<AnyColumn>(Object),\n} as const\n\nexport const fixedDataType = {\n type: definePropType<any[]>(Array),\n} as const\n\nexport const dataType = {\n ...fixedDataType,\n required: true,\n} as const\n\nexport const expandColumnKey = String\n\nexport const expandKeys = {\n type: definePropType<KeyType[]>(Array),\n default: () => mutable([]),\n} as const\n\nexport const requiredNumber = {\n type: Number,\n required: true,\n} as const\n\nexport const rowKey = {\n type: definePropType<KeyType>([String, Number, Symbol]),\n default: 'id',\n} as const\n\n/**\n * @note even though we can use `StyleValue` but that would be difficult for us to mapping them,\n * so we only use `CSSProperties` as the acceptable value here.\n */\nexport const styleType = {\n type: definePropType<CSSProperties>(Object),\n}\n"],"names":[],"mappings":";;;AAWO,MAAM,SAAA,GAAY;AAElB,MAAM,OAAA,GAAU;AAAA,EACrB,IAAA,EAAM,eAA4B,KAAK,CAAA;AAAA,EACvC,QAAA,EAAU;AACZ;AAEO,MAAM,MAAA,GAAS;AAAA,EACpB,IAAA,EAAM,eAA0B,MAAM;AACxC;AAEO,MAAM,aAAA,GAAgB;AAAA,EAC3B,IAAA,EAAM,eAAsB,KAAK;AACnC;AAEO,MAAM,QAAA,GAAW;AAAA,EACtB,GAAG,aAAA;AAAA,EACH,QAAA,EAAU;AACZ;AAEO,MAAM,eAAA,GAAkB;AAExB,MAAM,UAAA,GAAa;AAAA,EACxB,IAAA,EAAM,eAA0B,KAAK,CAAA;AAAA,EACrC,OAAA,EAAS,MAAM,OAAA,CAAQ,EAAE;AAC3B;AAEO,MAAM,cAAA,GAAiB;AAAA,EAC5B,IAAA,EAAM,MAAA;AAAA,EACN,QAAA,EAAU;AACZ;AAEO,MAAM,MAAA,GAAS;AAAA,EACpB,MAAM,cAAA,CAAwB,CAAC,MAAA,EAAQ,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,EACtD,OAAA,EAAS;AACX;AAMO,MAAM,SAAA,GAAY;AAAA,EACvB,IAAA,EAAM,eAA8B,MAAM;AAC5C;;;;"}