element-plus
Version:
A Component Library for Vue 3
1 lines • 2.25 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,SAAY,GAAA,OAAA;AAElB,MAAM,OAAU,GAAA;AAAA,EACrB,IAAA,EAAM,eAA4B,KAAK,CAAA;AAAA,EACvC,QAAU,EAAA,IAAA;AACZ,EAAA;AAEO,MAAM,MAAS,GAAA;AAAA,EACpB,IAAA,EAAM,eAA0B,MAAM,CAAA;AACxC,EAAA;AAEO,MAAM,aAAgB,GAAA;AAAA,EAC3B,IAAA,EAAM,eAAsB,KAAK,CAAA;AACnC,EAAA;AAEO,MAAM,QAAW,GAAA;AAAA,EACtB,GAAG,aAAA;AAAA,EACH,QAAU,EAAA,IAAA;AACZ,EAAA;AAEO,MAAM,eAAkB,GAAA,OAAA;AAExB,MAAM,UAAa,GAAA;AAAA,EACxB,IAAA,EAAM,eAA0B,KAAK,CAAA;AAAA,EACrC,OAAS,EAAA,MAAM,OAAQ,CAAA,EAAE,CAAA;AAC3B,EAAA;AAEO,MAAM,cAAiB,GAAA;AAAA,EAC5B,IAAM,EAAA,MAAA;AAAA,EACN,QAAU,EAAA,IAAA;AACZ,EAAA;AAEO,MAAM,MAAS,GAAA;AAAA,EACpB,MAAM,cAAwB,CAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,EACtD,OAAS,EAAA,IAAA;AACX,EAAA;AAMO,MAAM,SAAY,GAAA;AAAA,EACvB,IAAA,EAAM,eAA8B,MAAM,CAAA;AAC5C;;;;"}