UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 1.96 kB
{"version":3,"file":"common.mjs","names":[],"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"],"mappings":";;;;;;;;AAWA,MAAa,YAAY;AAEzB,MAAa,UAAU;CACrB,MAAM,eAA4B,MAAM;CACxC,UAAU;CACX;AAED,MAAa,SAAS,EACpB,MAAM,eAA0B,OAAO,EACxC;AAED,MAAa,gBAAgB,EAC3B,MAAM,eAAsB,MAAM,EACnC;AAED,MAAa,WAAW;CACtB,GAAG;CACH,UAAU;CACX;AAED,MAAa,kBAAkB;AAE/B,MAAa,aAAa;CACxB,MAAM,eAA0B,MAAM;CACtC,eAAe,QAAQ,EAAE,CAAC;CAC3B;AAED,MAAa,iBAAiB;CAC5B,MAAM;CACN,UAAU;CACX;AAED,MAAa,SAAS;CACpB,MAAM,eAAwB;EAAC;EAAQ;EAAQ;EAAO,CAAC;CACvD,SAAS;CACV;;;;;AAMD,MAAa,YAAY,EACvB,MAAM,eAA8B,OAAO,EAC5C"}