orion-design 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/index.js +14 -30
  3. package/dist/Throne/index.js.map +1 -1
  4. package/dist/components/Button/index.js +33 -40
  5. package/dist/components/Button/index.js.map +1 -1
  6. package/dist/components/Flex/index.js +89 -122
  7. package/dist/components/Flex/index.js.map +1 -1
  8. package/dist/components/Form/Form.js +2 -2
  9. package/dist/components/Form/Form.js.map +1 -1
  10. package/dist/components/Form/LovInput/LovInput.js +2 -2
  11. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  12. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  13. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  14. package/dist/components/Form/LovInput/index.js +4 -4
  15. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  16. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  17. package/dist/components/Form/hooks/index.js +68 -127
  18. package/dist/components/Form/hooks/index.js.map +1 -1
  19. package/dist/components/Form/index.js +656 -836
  20. package/dist/components/Form/index.js.map +1 -1
  21. package/dist/components/Form/utils/index.js +18 -30
  22. package/dist/components/Form/utils/index.js.map +1 -1
  23. package/dist/components/LovTable/LovPagetable.vue.d.ts +492 -0
  24. package/dist/components/LovTable/index.d.ts +246 -0
  25. package/dist/components/LovTable/index.js +106 -179
  26. package/dist/components/LovTable/index.js.map +1 -1
  27. package/dist/components/Modal/index.js +56 -111
  28. package/dist/components/Modal/index.js.map +1 -1
  29. package/dist/components/Modal/types.d.ts +1 -1
  30. package/dist/components/Modal/types.js +3 -4
  31. package/dist/components/Modal/types.js.map +1 -1
  32. package/dist/components/Modal/useModal.js +5 -5
  33. package/dist/components/Modal/useModal.js.map +1 -1
  34. package/dist/components/Pagetable/Pagetable.d.ts +92 -1
  35. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  36. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  37. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
  38. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  39. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  40. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  41. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  42. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  43. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  44. package/dist/components/Pagetable/index.d.ts +155 -0
  45. package/dist/components/Pagetable/index.js +596 -683
  46. package/dist/components/Pagetable/index.js.map +1 -1
  47. package/dist/components/Pagetable/utils/index.js +54 -92
  48. package/dist/components/Pagetable/utils/index.js.map +1 -1
  49. package/dist/components/Querytable/hooks/useColumns.js +74 -82
  50. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  51. package/dist/components/Querytable/index.js +469 -579
  52. package/dist/components/Querytable/index.js.map +1 -1
  53. package/dist/components/Querytable/utils/index.js +54 -92
  54. package/dist/components/Querytable/utils/index.js.map +1 -1
  55. package/dist/components/RichTextEditor/index.js +74 -100
  56. package/dist/components/RichTextEditor/index.js.map +1 -1
  57. package/dist/components/Tabs/constants.js +2 -2
  58. package/dist/components/Tabs/constants.js.map +1 -1
  59. package/dist/components/Tabs/index.js +358 -603
  60. package/dist/components/Tabs/index.js.map +1 -1
  61. package/dist/components/Tabs/tab-bar.js +6 -6
  62. package/dist/components/Tabs/tab-bar.js.map +1 -1
  63. package/dist/components/Tabs/tab-pane.js +3 -3
  64. package/dist/components/Tabs/tab-pane.js.map +1 -1
  65. package/dist/components/_constants/aria.js +2 -2
  66. package/dist/components/_constants/aria.js.map +1 -1
  67. package/dist/components/_constants/event.js +4 -6
  68. package/dist/components/_constants/event.js.map +1 -1
  69. package/dist/components/_constants/index.js +6 -6
  70. package/dist/components/_hooks/index.js +7 -7
  71. package/dist/components/_hooks/use-namespace/index.js +39 -74
  72. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  73. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  74. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  75. package/dist/components/_util/arrays.js +5 -9
  76. package/dist/components/_util/arrays.js.map +1 -1
  77. package/dist/components/_util/browser.js +6 -6
  78. package/dist/components/_util/browser.js.map +1 -1
  79. package/dist/components/_util/classNames.js +17 -22
  80. package/dist/components/_util/classNames.js.map +1 -1
  81. package/dist/components/_util/dom/aria.js +39 -74
  82. package/dist/components/_util/dom/aria.js.map +1 -1
  83. package/dist/components/_util/dom/element.js +8 -9
  84. package/dist/components/_util/dom/element.js.map +1 -1
  85. package/dist/components/_util/dom/event.js +7 -14
  86. package/dist/components/_util/dom/event.js.map +1 -1
  87. package/dist/components/_util/dom/index.js +36 -36
  88. package/dist/components/_util/dom/position.js +25 -49
  89. package/dist/components/_util/dom/position.js.map +1 -1
  90. package/dist/components/_util/dom/scroll.js +61 -103
  91. package/dist/components/_util/dom/scroll.js.map +1 -1
  92. package/dist/components/_util/dom/style.js +50 -65
  93. package/dist/components/_util/dom/style.js.map +1 -1
  94. package/dist/components/_util/easings.js +4 -8
  95. package/dist/components/_util/easings.js.map +1 -1
  96. package/dist/components/_util/error.js +11 -12
  97. package/dist/components/_util/error.js.map +1 -1
  98. package/dist/components/_util/functions.js +3 -3
  99. package/dist/components/_util/i18n.js +2 -2
  100. package/dist/components/_util/i18n.js.map +1 -1
  101. package/dist/components/_util/index.js +137 -137
  102. package/dist/components/_util/isValid.js +2 -4
  103. package/dist/components/_util/isValid.js.map +1 -1
  104. package/dist/components/_util/objects.js +14 -18
  105. package/dist/components/_util/objects.js.map +1 -1
  106. package/dist/components/_util/props-util/index.js +20 -46
  107. package/dist/components/_util/props-util/index.js.map +1 -1
  108. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  109. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  110. package/dist/components/_util/raf.js +4 -5
  111. package/dist/components/_util/raf.js.map +1 -1
  112. package/dist/components/_util/rand.js +3 -4
  113. package/dist/components/_util/rand.js.map +1 -1
  114. package/dist/components/_util/strings.js +8 -9
  115. package/dist/components/_util/strings.js.map +1 -1
  116. package/dist/components/_util/throttleByRaf.js +10 -16
  117. package/dist/components/_util/throttleByRaf.js.map +1 -1
  118. package/dist/components/_util/type.js +38 -41
  119. package/dist/components/_util/type.js.map +1 -1
  120. package/dist/components/_util/types.js +22 -41
  121. package/dist/components/_util/types.js.map +1 -1
  122. package/dist/components/_util/typescript.js +2 -2
  123. package/dist/components/_util/typescript.js.map +1 -1
  124. package/dist/components/_util/util.js +43 -85
  125. package/dist/components/_util/util.js.map +1 -1
  126. package/dist/components/_util/vue/global-node.js +15 -27
  127. package/dist/components/_util/vue/global-node.js.map +1 -1
  128. package/dist/components/_util/vue/icon.js +25 -29
  129. package/dist/components/_util/vue/icon.js.map +1 -1
  130. package/dist/components/_util/vue/index.js +41 -41
  131. package/dist/components/_util/vue/install.js +18 -35
  132. package/dist/components/_util/vue/install.js.map +1 -1
  133. package/dist/components/_util/vue/props/index.js +6 -6
  134. package/dist/components/_util/vue/props/runtime.js +30 -46
  135. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  136. package/dist/components/_util/vue/refs.js +6 -12
  137. package/dist/components/_util/vue/refs.js.map +1 -1
  138. package/dist/components/_util/vue/size.js +3 -5
  139. package/dist/components/_util/vue/size.js.map +1 -1
  140. package/dist/components/_util/vue/validator.js +4 -5
  141. package/dist/components/_util/vue/validator.js.map +1 -1
  142. package/dist/components/_util/vue/vnode.js +54 -100
  143. package/dist/components/_util/vue/vnode.js.map +1 -1
  144. package/dist/components/_util/vue-types/index.js +220 -231
  145. package/dist/components/_util/vue-types/index.js.map +1 -1
  146. package/dist/components/components.js +20 -20
  147. package/dist/components/index.js +35 -38
  148. package/dist/components/index.js.map +1 -1
  149. package/dist/error/OrionError.js +4 -8
  150. package/dist/error/OrionError.js.map +1 -1
  151. package/dist/index.css +1 -797
  152. package/dist/index.js +36 -36
  153. package/dist/print/LodopFuncs.js +43 -101
  154. package/dist/print/LodopFuncs.js.map +1 -1
  155. package/dist/print/index.js +108 -200
  156. package/dist/print/index.js.map +1 -1
  157. package/dist/request/ErrorHandlerChain.js +14 -17
  158. package/dist/request/ErrorHandlerChain.js.map +1 -1
  159. package/dist/request/RequestFilterChain.js +13 -16
  160. package/dist/request/RequestFilterChain.js.map +1 -1
  161. package/dist/request/ResponseParserChain.js +14 -17
  162. package/dist/request/ResponseParserChain.js.map +1 -1
  163. package/dist/request/disivion/DateSerializer.js +22 -47
  164. package/dist/request/disivion/DateSerializer.js.map +1 -1
  165. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  166. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  167. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  168. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  169. package/dist/request/disivion/index.js +201 -305
  170. package/dist/request/disivion/index.js.map +1 -1
  171. package/dist/request/error/BizExceptionResponseError.js +5 -11
  172. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  173. package/dist/request/error/ExceptionResponseError.js +5 -11
  174. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  175. package/dist/request/error/ResponseError.js +4 -9
  176. package/dist/request/error/ResponseError.js.map +1 -1
  177. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  178. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  179. package/dist/request/index.js +11 -11
  180. package/dist/utils/DateUtil.js +33 -48
  181. package/dist/utils/DateUtil.js.map +1 -1
  182. package/dist/utils/NumberUtil.js +6 -6
  183. package/dist/utils/NumberUtil.js.map +1 -1
  184. package/dist/utils/cloneDeep.js +2 -2
  185. package/dist/utils/delay.js +3 -3
  186. package/dist/utils/delay.js.map +1 -1
  187. package/dist/utils/functions.js +3 -3
  188. package/dist/utils/index.js +12 -12
  189. package/dist/utils/md5.js +93 -191
  190. package/dist/utils/md5.js.map +1 -1
  191. package/dist/utils/uuid.js +25 -35
  192. package/dist/utils/uuid.js.map +1 -1
  193. package/dist/version/index.js +2 -2
  194. package/dist/version/version.d.ts +1 -1
  195. package/dist/version/version.js +2 -2
  196. package/dist/version/version.js.map +1 -1
  197. package/package.json +1 -1
  198. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  199. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  200. package/dist/components-B3d9m_tn.js +0 -27
  201. package/dist/components-B3d9m_tn.js.map +0 -1
  202. package/dist/functions-BeMkokbY.js +0 -63
  203. package/dist/functions-BeMkokbY.js.map +0 -1
  204. package/dist/index-BOKLZnqH.js +0 -54
  205. package/dist/index-BOKLZnqH.js.map +0 -1
  206. package/dist/index-D1m0KTpK.js +0 -69
  207. package/dist/index-D1m0KTpK.js.map +0 -1
  208. package/dist/index-DR5ZP7mD.js +0 -160
  209. package/dist/index-DR5ZP7mD.js.map +0 -1
  210. package/dist/index-DkwIULcN.js +0 -200
  211. package/dist/index-DkwIULcN.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Pagetable/Pagetable.tsx","../../../src/components/Pagetable/columns/PagetableColumnIndex.tsx","../../../src/components/Pagetable/columns/PagetableColumnString.tsx","../../../src/components/Pagetable/columns/PagetableColumnLink.tsx","../../../src/components/Pagetable/columns/PagetableColumnNumber.tsx","../../../src/components/Pagetable/columns/PagetableColumnDate.tsx","../../../src/components/Pagetable/columns/PagetableColumnSingleselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnMultiselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnButtongroup.tsx","../../../src/components/Pagetable/columns/PagetableCellButton.tsx","../../../src/components/Pagetable/columns/PagetableColumngroup.tsx","../../../src/components/Pagetable/columns/PagetableColumnDiy.tsx","../../../src/components/Pagetable/index.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../_util/classNames'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\nimport type { TableColumnCtx } from 'element-plus'\r\n\r\nimport { formatDate, number2string, getSingleCodeContent, getMultiCodeContent } from './utils'\r\nimport dayjs from 'dayjs'\r\n\r\nimport Space from '../Space'\r\nimport OrionError from '../../error/OrionError'\r\n\r\nimport type { PageTableI } from './interface'\r\n\r\nimport useColumns from './hooks/useColumns'\r\n\r\nimport Throne from '../../Throne'\r\n\r\nexport const pagetableProps = () => ({\r\n data: arrayType<PageTableI['data']>(),\r\n tailData: objectType<Record<string, any>>(),\r\n pagination: objectType<PageTableI['pagination']>(),\r\n showRowNumber: booleanType(true),\r\n selectionMode: booleanType(false),\r\n currentRowMode: booleanType(false),\r\n size: stringType<'' | 'large' | 'default' | 'small'>(),\r\n})\r\n\r\nexport type PagetableProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableProps>>>\r\n\r\ninterface SummaryMethodProps<T = any> {\r\n columns: TableColumnCtx<T>[]\r\n data: T[]\r\n}\r\n\r\nexport default defineComponent({\r\n name: 'OPagetable',\r\n inheritAttrs: false,\r\n props: pagetableProps(),\r\n emits: ['selectionChange', 'currentRowChange', 'update:pagination', 'rowClick', 'rowDblclick', 'cellClick', 'cellDblclick'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const elTableRef = ref()\r\n\r\n const style = computed(() => {\r\n const rowStyle: CSSProperties = {}\r\n\r\n return rowStyle\r\n })\r\n\r\n const columns = useColumns(slots)\r\n\r\n const leafColumns4ShowSummary = computed(() => {\r\n let r = []\r\n if (props.showRowNumber) {\r\n r.push({ type: '__showRowNumber__' })\r\n }\r\n\r\n if (props.selectionMode) {\r\n r.push({ type: '__selectionMode__' })\r\n }\r\n\r\n function flat(columns) {\r\n if (!columns) {\r\n return\r\n }\r\n\r\n for (let i = 0; i < columns.length; i++) {\r\n const c = columns[i]\r\n if (c.type === 'OPagetableColumngroup') {\r\n flat(c.children)\r\n } else {\r\n r.push({\r\n ...c,\r\n })\r\n }\r\n }\r\n }\r\n flat(columns.value)\r\n\r\n return r\r\n })\r\n\r\n const showSummary = computed(() => {\r\n function existTail(columns) {\r\n if (!columns) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < columns.length; i++) {\r\n const c = columns[i]\r\n if (c.type === 'OPagetableColumngroup') {\r\n if (existTail(c.children)) {\r\n return true\r\n }\r\n } else {\r\n if (c.tail === '' || c.tail === true || c.tail) {\r\n return true\r\n }\r\n }\r\n }\r\n\r\n return false\r\n }\r\n\r\n return existTail(columns.value)\r\n })\r\n\r\n const clearSelection = () => {\r\n elTableRef.value.clearSelection()\r\n }\r\n\r\n const getSelectionRows = () => {\r\n return elTableRef.value.getSelectionRows()\r\n }\r\n\r\n const toggleRowSelection = (...args) => {\r\n return elTableRef.value.toggleRowSelection(...args)\r\n }\r\n\r\n const toggleAllSelection = () => {\r\n return elTableRef.value.toggleAllSelection()\r\n }\r\n\r\n const setCurrentRow = (...args) => {\r\n return elTableRef.value.setCurrentRow(...args)\r\n }\r\n\r\n const scrollTo = (...args) => {\r\n return elTableRef.value.scrollTo(...args)\r\n }\r\n\r\n expose({\r\n clearSelection,\r\n getSelectionRows,\r\n toggleRowSelection,\r\n toggleAllSelection,\r\n setCurrentRow,\r\n scrollTo,\r\n })\r\n\r\n return () => {\r\n const { data } = props\r\n const { selectionMode = false } = props\r\n const { pagination } = props\r\n const { showRowNumber = true } = props\r\n const { currentRowMode = false } = props\r\n const { size = 'default' } = props\r\n\r\n const getSummaries = (param: SummaryMethodProps) => {\r\n const tailData = computed(() => props.tailData)\r\n\r\n return leafColumns4ShowSummary.value.map((c) => {\r\n if (c.type === '__showRowNumber__') {\r\n return 'Σ'\r\n }\r\n\r\n if (c.type === '__selectionMode__') {\r\n return\r\n }\r\n\r\n if (!tailData.value) {\r\n return\r\n }\r\n\r\n const columnName = c.name\r\n const columnTail = c.tail\r\n\r\n // 没配置 tail\r\n if (columnTail == null) {\r\n return\r\n }\r\n\r\n // 明确不显示 tail\r\n if (columnTail === false) {\r\n return\r\n }\r\n\r\n if (columnTail === '' || columnTail === true) {\r\n if (tailData.value[columnName] != null) {\r\n return tailData.value[columnName]\r\n }\r\n } else if (typeof columnTail === 'string') {\r\n return columnTail.replace('{}', tailData.value[columnName])\r\n } else {\r\n throw new OrionError(`列[${columnName}]的tail属性配置错误,只能是 Boolean、String 类型,当前是[${typeof columnTail}]类型。`)\r\n }\r\n\r\n return\r\n })\r\n }\r\n\r\n const cn = classNames('orion-pagetbale')\r\n\r\n const renderIndexColumn = () => {\r\n return (\r\n <ElTableColumn\r\n type={'index'}\r\n label=\"No\"\r\n width={56}\r\n fixed={'left'}\r\n showOverflowTooltip={true}\r\n index={(index: number) => {\r\n return (pagination.currentPage - 1) * pagination.pageSize + index + 1\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSelectionColumn = () => {\r\n return <ElTableColumn type={'selection'} width={40} fixed={'left'}></ElTableColumn>\r\n }\r\n\r\n const renderStringColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n return <ElTableColumn label={head} headerAlign={headAlign} prop={name} width={width} fixed={fixed} showOverflowTooltip={true}></ElTableColumn>\r\n }\r\n\r\n const renderLinkColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n return <span class=\"cell-linkcolumn\">{row[column.property]}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderNumberColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { thousandsSeparator = true, precision = -1, percentage = false } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={'right'}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n return (\r\n <span class=\"cell-numbercolumn\">\r\n {number2string(row[column.property], thousandsSeparator, precision, percentage === true || percentage === '')}\r\n </span>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDateColumn = (column) => {\r\n const { name, head, headAlign, width, fixed, sourceFormat, format = 'YYYYMMDDHHmmss' } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n if (cellValue instanceof Date || dayjs.isDayjs(cellValue)) {\r\n return <div>{formatDate(cellValue, format)}</div>\r\n } else {\r\n if (sourceFormat && format) {\r\n return <div>{formatDate(cellValue, sourceFormat, format)}</div>\r\n } else {\r\n return <div>{cellValue}</div>\r\n }\r\n }\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSingleSelectColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getSingleCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getSingleCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-singleselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderMultiSelectColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getMultiCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getMultiCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-multiselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderButtongroupColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return (\r\n <div class=\"cell-buttongroup\">\r\n <Space>{children}</Space>\r\n </div>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumngroupColumn = (column) => {\r\n const { head, headAlign } = column\r\n const { children } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n v-slots={{\r\n default: (scope) => {\r\n return renderColumns(children)\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDiyColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return <div class=\"cell-diy\">{children} </div>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumns = (columns) => {\r\n return columns?.map((c) => {\r\n if (c.type === 'OPagetableColumnString') {\r\n return renderStringColumn(c)\r\n } else if (c.type === 'OPagetableColumnLink') {\r\n return renderLinkColumn(c)\r\n } else if (c.type === 'OPagetableColumnNumber') {\r\n return renderNumberColumn(c)\r\n } else if (c.type === 'OPagetableColumnDate') {\r\n return renderDateColumn(c)\r\n } else if (c.type === 'OPagetableColumnSingleselect') {\r\n return renderSingleSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnMultiselect') {\r\n return renderMultiSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnButtongroup') {\r\n return renderButtongroupColumn(c)\r\n } else if (c.type === 'OPagetableColumngroup') {\r\n return renderColumngroupColumn(c)\r\n } else if (c.type === 'OPagetableColumnDiy') {\r\n return renderDiyColumn(c)\r\n } else {\r\n throw new OrionError(`OPagetable不能正确渲染'${c.type.name}'子组件。`)\r\n }\r\n })\r\n }\r\n\r\n return (\r\n <div class={[cn, attrs.class]} style={[style.value, attrs.style as CSSProperties]}>\r\n <div class=\"pagetable-wrapper\">\r\n <ElTable\r\n showSummary={showSummary.value}\r\n summaryMethod={getSummaries}\r\n border\r\n ref={elTableRef}\r\n data={data}\r\n height={'100%'}\r\n style={{ width: '100%' }}\r\n onSelection-change={(rows) => emit('selectionChange', rows)}\r\n highlight-current-row={currentRowMode}\r\n onCurrent-change={(currentRow, oldCurrentRow) => emit('currentRowChange', currentRow, oldCurrentRow)}\r\n onRow-click={(row: any, column: any, event: Event) => emit('rowClick', row, { name: column.property, head: column.label }, event)}\r\n onRow-dblclick={(row: any, column: any, event: Event) => emit('rowDblclick', row, { name: column.property, head: column.label }, event)}\r\n onCell-click={(row: any, column: any, cell: any, event: Event) =>\r\n emit('cellClick', row, { name: column.property, head: column.label }, cell, event)\r\n }\r\n onCell-dblclick={(row: any, column: any, cell: any, event: Event) =>\r\n emit('cellDblclick', row, { name: column.property, head: column.label }, cell, event)\r\n }\r\n size={size}\r\n >\r\n {showRowNumber && renderIndexColumn()}\r\n {selectionMode && renderSelectionColumn()}\r\n {renderColumns(columns.value)}\r\n </ElTable>\r\n </div>\r\n\r\n <div class=\"pagination-wrapper\">\r\n <ElPagination\r\n currentPage={pagination.currentPage}\r\n onUpdate:current-page={(e) => {\r\n emit('update:pagination', {\r\n ...pagination,\r\n currentPage: e,\r\n })\r\n }}\r\n pageSize={pagination.pageSize}\r\n pageSizes={pagination.pageSizes}\r\n onUpdate:page-size={(e) => {\r\n emit('update:pagination', {\r\n ...pagination,\r\n pageSize: e,\r\n })\r\n }}\r\n total={pagination.total}\r\n layout=\"total, ->, sizes, prev, pager, next, jumper\"\r\n size={size}\r\n teleported={false}\r\n ></ElPagination>\r\n </div>\r\n </div>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnIndexProps = () => ({})\r\n\r\nexport type PagetableColumnIndexProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnIndexProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnIndex',\r\n inheritAttrs: false,\r\n props: pagetableColumnIndexProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnStringProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnStringProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnStringProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnString',\r\n inheritAttrs: false,\r\n props: pagetableColumnStringProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnLinkProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnLinkProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnLinkProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnLink',\r\n inheritAttrs: false,\r\n props: pagetableColumnLinkProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, numberType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnNumberProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n thousandsSeparator: booleanType(true),\r\n precision: numberType(-1),\r\n percentage: booleanType(false),\r\n})\r\n\r\nexport type PagetableColumnNumberProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnNumberProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnNumber',\r\n inheritAttrs: false,\r\n props: pagetableColumnNumberProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDateProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n // Date\r\n format: stringType(),\r\n sourceFormat: stringType(),\r\n})\r\n\r\nexport type PagetableColumnDateProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDateProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDate',\r\n inheritAttrs: false,\r\n props: pagetableColumnDateProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnSingleselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnSingleselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnSingleselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnSingleselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnSingleselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnMultiselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnMultiselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnMultiselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnMultiselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnMultiselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnButtongroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnButtongroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnButtongroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnButtongroup',\r\n inheritAttrs: false,\r\n props: pagetableColumnButtongroupProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableCellButtonProps = () => ({\r\n type: stringType(),\r\n})\r\n\r\nexport type PagetableCellButtonProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableCellButtonProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableCellButton',\r\n inheritAttrs: false,\r\n props: pagetableCellButtonProps(),\r\n emits: ['click'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const handleClick = (event: Event) => {\r\n emit('click', event)\r\n }\r\n\r\n return () => {\r\n const { type } = props\r\n const children = slots.default?.()\r\n\r\n return (\r\n <ElButton link type={type} size=\"small\" onClick={handleClick}>\r\n {children}\r\n </ElButton>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumngroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n})\r\n\r\nexport type PagetableColumngroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumngroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumngroup',\r\n inheritAttrs: false,\r\n props: pagetableColumngroupProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDiyProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnDiyProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDiyProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDiy',\r\n inheritAttrs: false,\r\n props: pagetableColumnDiyProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { withInstall } from '../_util'\r\n\r\nimport Pagetable from './Pagetable'\r\nimport PagetableColumnIndex from './columns/PagetableColumnIndex'\r\nimport PagetableColumnString from './columns/PagetableColumnString'\r\nimport PagetableColumnLink from './columns/PagetableColumnLink'\r\nimport PagetableColumnNumber from './columns/PagetableColumnNumber'\r\nimport PagetableColumnDate from './columns/PagetableColumnDate'\r\nimport PagetableColumnSingleselect from './columns/PagetableColumnSingleselect'\r\nimport PagetableColumnMultiselect from './columns/PagetableColumnMultiselect'\r\nimport PagetableColumnButtongroup from './columns/PagetableColumnButtongroup'\r\nimport PagetableCellButton from './columns/PagetableCellButton'\r\nimport PagetableColumngroup from './columns/PagetableColumngroup'\r\nimport PagetableColumnDiy from './columns/PagetableColumnDiy'\r\n\r\nexport type { PagetableProps } from './Pagetable'\r\n\r\nexport default withInstall<\r\n typeof Pagetable,\r\n {\r\n PagetableColumnIndex: typeof PagetableColumnIndex\r\n PagetableColumnString: typeof PagetableColumnString\r\n PagetableColumnLink: typeof PagetableColumnLink\r\n PagetableColumnNumber: typeof PagetableColumnNumber\r\n PagetableColumnDate: typeof PagetableColumnDate\r\n PagetableColumnSingleselect: typeof PagetableColumnSingleselect\r\n PagetableColumnMultiselect: typeof PagetableColumnMultiselect\r\n PagetableColumnButtongroup: typeof PagetableColumnButtongroup\r\n PagetableCellButton: typeof PagetableCellButton\r\n PagetableColumngroup: typeof PagetableColumngroup\r\n PagetableColumnDiy: typeof PagetableColumnDiy\r\n }\r\n>(Pagetable, {\r\n PagetableColumnIndex,\r\n PagetableColumnString,\r\n PagetableColumnLink,\r\n PagetableColumnNumber,\r\n PagetableColumnDate,\r\n PagetableColumnSingleselect,\r\n PagetableColumnMultiselect,\r\n PagetableColumnButtongroup,\r\n PagetableCellButton,\r\n PagetableColumngroup,\r\n PagetableColumnDiy,\r\n})\r\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","pagetableProps","data","arrayType","tailData","objectType","pagination","showRowNumber","booleanType","selectionMode","currentRowMode","size","stringType","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","rowStyle","columns","useColumns","leafColumns4ShowSummary","r","push","type","flat","i","length","c","children","value","showSummary","existTail","tail","clearSelection","getSelectionRows","toggleRowSelection","args","toggleAllSelection","setCurrentRow","scrollTo","getSummaries","param","map","columnName","columnTail","replace","OrionError","cn","classNames","renderIndexColumn","_createVNode","ElTableColumn","index","currentPage","pageSize","renderSelectionColumn","renderStringColumn","column","head","headAlign","width","fixed","renderLinkColumn","default","scope","row","property","renderNumberColumn","thousandsSeparator","precision","percentage","number2string","renderDateColumn","sourceFormat","format","cellValue","Date","dayjs","isDayjs","formatDate","renderSingleSelectColumn","code","codeName","codeData","codeContent","Throne","getCode","getSingleCodeContent","renderMultiSelectColumn","getMultiCodeContent","renderButtongroupColumn","rowData","rowIndex","$index","Space","renderColumngroupColumn","renderColumns","renderDiyColumn","_createTextVNode","class","ElTable","rows","onCurrent-change","currentRow","oldCurrentRow","onRow-click","event","label","onRow-dblclick","onCell-click","cell","onCell-dblclick","ElPagination","e","pageSizes","total","pagetableColumnIndexProps","pagetableColumnStringProps","someType","Boolean","String","pagetableColumnLinkProps","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","Pagetable"],"mappings":";;;;;;;;;;;;AAiBiC,SAAAA,UAAAC,GAAA;AAAA,SAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,QAAAL,CAAA;AAAA;AAE1B,MAAMM,iBAAiBA,OAAO;AAAA,EACnCC,MAAMC,UAA+B;AAAA,EACrCC,UAAUC,WAAiC;AAAA,EAC3CC,YAAYD,WAAsC;AAAA,EAClDE,eAAeC,YAAY,IAAI;AAAA,EAC/BC,eAAeD,YAAY,KAAK;AAAA,EAChCE,gBAAgBF,YAAY,KAAK;AAAA,EACjCG,MAAMC,WAA+C;AACvD;AASA,MAAeC,8CAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOf,eAAgB;AAAA,EACvBgB,OAAO,CAAC,mBAAmB,oBAAoB,qBAAqB,YAAY,eAAe,aAAa,cAAc;AAAA,EAC1HC,MAAMF,OAAO;AAAA,IAAEG;AAAAA,IAAOC;AAAAA,IAAOC;AAAAA,IAAMC;AAAAA,EAAO,GAAG;AAC3C,UAAMC,aAAaC;AAEnB,UAAMC,QAAQC,SAAS,MAAM;AAC3B,YAAMC,WAA0B,CAAA;AAEhC,aAAOA;AAAAA,IACT,CAAC;AAED,UAAMC,UAAUC,WAAWV,KAAK;AAEhC,UAAMW,0BAA0BJ,SAAS,MAAM;AAC7C,UAAIK,IAAI,CA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AA,EAClByD,WAAWzD,WAAyC;AAAA,EACpDE,MAAMF,WAAY;AAAA,EAClB0D,OAAO0D,SAA2B,CAACC,SAASC,MAAM,CAAC;AAAA,EACnD3D,OAAOyD,SAAoB,CAACC,SAASC,MAAM,CAAC;AAAA,EAC5CxF,MAAMsF,SAA2B,CAACC,SAASC,MAAM,CAAC;AACpD;AAIA,MAAerH,qDAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAO+H,wBAAyB;AAAA,EAChC5H,OAAOvB;AAAAA,EAGPsB,MAAMF,OAAO;AAAA,IAAEG;AAAAA,IAAOC;AAAAA,IAAOC;AAAAA,IAAMC;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC;ACbD,MAAe,YAAA,YAeb0H,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Pagetable/Pagetable.tsx","../../../src/components/Pagetable/columns/PagetableColumnIndex.tsx","../../../src/components/Pagetable/columns/PagetableColumnString.tsx","../../../src/components/Pagetable/columns/PagetableColumnLink.tsx","../../../src/components/Pagetable/columns/PagetableColumnNumber.tsx","../../../src/components/Pagetable/columns/PagetableColumnDate.tsx","../../../src/components/Pagetable/columns/PagetableColumnSingleselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnMultiselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnButtongroup.tsx","../../../src/components/Pagetable/columns/PagetableCellButton.tsx","../../../src/components/Pagetable/columns/PagetableColumngroup.tsx","../../../src/components/Pagetable/columns/PagetableColumnDiy.tsx","../../../src/components/Pagetable/index.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../_util/classNames'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\nimport type { TableColumnCtx } from 'element-plus'\r\n\r\nimport { formatDate, number2string, getSingleCodeContent, getMultiCodeContent } from './utils'\r\nimport dayjs from 'dayjs'\r\n\r\nimport Space from '../Space'\r\nimport OrionError from '../../error/OrionError'\r\n\r\nimport type { PageTableI } from './interface'\r\n\r\nimport useColumns from './hooks/useColumns'\r\n\r\nimport Throne from '../../Throne'\r\n\r\ntype rowClassNameFn = (data: { rowData: any; rowIndex: number }) => string\r\ntype rowStyleFn = (data: { rowData: any; rowIndex: number }) => CSSProperties\r\ntype cellClassNameFn = (data: { rowData: any; column: { name: string; head: string }; rowIndex: number; columnIndex: number }) => string\r\ntype cellStyleFn = (data: { rowData: any; column: { name: string; head: string }; rowIndex: number; columnIndex: number }) => CSSProperties\r\n\r\nexport const pagetableProps = () => ({\r\n data: arrayType<PageTableI['data']>(),\r\n tailData: objectType<Record<string, any>>(),\r\n pagination: objectType<PageTableI['pagination']>(),\r\n paginationTeleported: booleanType(true),\r\n showRowNumber: booleanType(true),\r\n selectionMode: booleanType(false),\r\n currentRowMode: booleanType(false),\r\n size: stringType<'' | 'large' | 'default' | 'small'>(),\r\n rowClassName: someType<string | rowClassNameFn>(),\r\n rowStyle: someType<CSSProperties | rowStyleFn>(),\r\n cellClassName: someType<string | cellClassNameFn>(),\r\n cellStyle: someType<CSSProperties | cellStyleFn>(),\r\n})\r\n\r\nexport type PagetableProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableProps>>>\r\n\r\ninterface SummaryMethodProps<T = any> {\r\n columns: TableColumnCtx<T>[]\r\n data: T[]\r\n}\r\n\r\nexport default defineComponent({\r\n name: 'OPagetable',\r\n inheritAttrs: false,\r\n props: pagetableProps(),\r\n emits: ['selectionChange', 'currentRowChange', 'update:pagination', 'rowClick', 'rowDblclick', 'cellClick', 'cellDblclick'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const elTableRef = ref()\r\n\r\n const style = computed(() => {\r\n const rowStyle: CSSProperties = {}\r\n\r\n return rowStyle\r\n })\r\n\r\n const columns = useColumns(slots)\r\n\r\n const leafColumns4ShowSummary = computed(() => {\r\n let r = []\r\n if (props.showRowNumber) {\r\n r.push({ type: '__showRowNumber__' })\r\n }\r\n\r\n if (props.selectionMode) {\r\n r.push({ type: '__selectionMode__' })\r\n }\r\n\r\n function flat(columns) {\r\n if (!columns) {\r\n return\r\n }\r\n\r\n for (let i = 0; i < columns.length; i++) {\r\n const c = columns[i]\r\n if (c.type === 'OPagetableColumngroup') {\r\n flat(c.children)\r\n } else {\r\n r.push({\r\n ...c,\r\n })\r\n }\r\n }\r\n }\r\n flat(columns.value)\r\n\r\n return r\r\n })\r\n\r\n const showSummary = computed(() => {\r\n function existTail(columns) {\r\n if (!columns) {\r\n return false\r\n }\r\n\r\n for (let i = 0; i < columns.length; i++) {\r\n const c = columns[i]\r\n if (c.type === 'OPagetableColumngroup') {\r\n if (existTail(c.children)) {\r\n return true\r\n }\r\n } else {\r\n if (c.tail === '' || c.tail === true || c.tail) {\r\n return true\r\n }\r\n }\r\n }\r\n\r\n return false\r\n }\r\n\r\n return existTail(columns.value)\r\n })\r\n\r\n const clearSelection = () => {\r\n elTableRef.value.clearSelection()\r\n }\r\n\r\n const getSelectionRows = () => {\r\n return elTableRef.value.getSelectionRows()\r\n }\r\n\r\n const toggleRowSelection = (...args) => {\r\n return elTableRef.value.toggleRowSelection(...args)\r\n }\r\n\r\n const toggleAllSelection = () => {\r\n return elTableRef.value.toggleAllSelection()\r\n }\r\n\r\n const setCurrentRow = (...args) => {\r\n return elTableRef.value.setCurrentRow(...args)\r\n }\r\n\r\n const scrollTo = (...args) => {\r\n return elTableRef.value.scrollTo(...args)\r\n }\r\n\r\n expose({\r\n clearSelection,\r\n getSelectionRows,\r\n toggleRowSelection,\r\n toggleAllSelection,\r\n setCurrentRow,\r\n scrollTo,\r\n })\r\n\r\n return () => {\r\n const { data } = props\r\n const { selectionMode = false } = props\r\n const { pagination, paginationTeleported } = props\r\n const { showRowNumber = true } = props\r\n const { currentRowMode = false } = props\r\n const { size = 'default' } = props\r\n const { rowClassName, rowStyle, cellClassName, cellStyle } = props\r\n\r\n const getSummaries = (param: SummaryMethodProps) => {\r\n const tailData = computed(() => props.tailData)\r\n\r\n return leafColumns4ShowSummary.value.map((c) => {\r\n if (c.type === '__showRowNumber__') {\r\n return 'Σ'\r\n }\r\n\r\n if (c.type === '__selectionMode__') {\r\n return\r\n }\r\n\r\n if (!tailData.value) {\r\n return\r\n }\r\n\r\n const columnName = c.name\r\n const columnTail = c.tail\r\n\r\n // 没配置 tail\r\n if (columnTail == null) {\r\n return\r\n }\r\n\r\n // 明确不显示 tail\r\n if (columnTail === false) {\r\n return\r\n }\r\n\r\n if (columnTail === '' || columnTail === true) {\r\n if (tailData.value[columnName] != null) {\r\n return tailData.value[columnName]\r\n }\r\n } else if (typeof columnTail === 'string') {\r\n return columnTail.replace('{}', tailData.value[columnName])\r\n } else {\r\n throw new OrionError(`列[${columnName}]的tail属性配置错误,只能是 Boolean、String 类型,当前是[${typeof columnTail}]类型。`)\r\n }\r\n\r\n return\r\n })\r\n }\r\n\r\n const cn = classNames('orion-pagetbale')\r\n\r\n const renderIndexColumn = () => {\r\n return (\r\n <ElTableColumn\r\n type={'index'}\r\n label=\"No\"\r\n width={56}\r\n fixed={'left'}\r\n showOverflowTooltip={true}\r\n index={(index: number) => {\r\n return (pagination.currentPage - 1) * pagination.pageSize + index + 1\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSelectionColumn = () => {\r\n return <ElTableColumn type={'selection'} width={40} fixed={'left'}></ElTableColumn>\r\n }\r\n\r\n const renderStringColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign, width, fixed } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderLinkColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign, width, fixed } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n return <span class=\"cell-linkcolumn\">{row[column.property]}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderNumberColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign = 'right', width, fixed } = column\r\n const { thousandsSeparator = true, precision = -1, percentage = false } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n return (\r\n <span class=\"cell-numbercolumn\">\r\n {number2string(row[column.property], thousandsSeparator, precision, percentage === true || percentage === '')}\r\n </span>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDateColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign, width, fixed, sourceFormat, format = 'YYYYMMDDHHmmss' } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n if (cellValue instanceof Date || dayjs.isDayjs(cellValue)) {\r\n return <div>{formatDate(cellValue, format)}</div>\r\n } else {\r\n if (sourceFormat && format) {\r\n return <div>{formatDate(cellValue, sourceFormat, format)}</div>\r\n } else {\r\n return <div>{cellValue}</div>\r\n }\r\n }\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSingleSelectColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getSingleCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getSingleCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-singleselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderMultiSelectColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getMultiCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getMultiCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-multiselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderButtongroupColumn = (column) => {\r\n const { name, head, headAlign, bodyAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={bodyAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return (\r\n <div class=\"cell-buttongroup\">\r\n <Space>{children}</Space>\r\n </div>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumngroupColumn = (column) => {\r\n const { head, headAlign } = column\r\n const { children } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n v-slots={{\r\n default: (scope) => {\r\n return renderColumns(children)\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDiyColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return <div class=\"cell-diy\">{children} </div>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumns = (columns) => {\r\n return columns?.map((c) => {\r\n if (c.type === 'OPagetableColumnString') {\r\n return renderStringColumn(c)\r\n } else if (c.type === 'OPagetableColumnLink') {\r\n return renderLinkColumn(c)\r\n } else if (c.type === 'OPagetableColumnNumber') {\r\n return renderNumberColumn(c)\r\n } else if (c.type === 'OPagetableColumnDate') {\r\n return renderDateColumn(c)\r\n } else if (c.type === 'OPagetableColumnSingleselect') {\r\n return renderSingleSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnMultiselect') {\r\n return renderMultiSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnButtongroup') {\r\n return renderButtongroupColumn(c)\r\n } else if (c.type === 'OPagetableColumngroup') {\r\n return renderColumngroupColumn(c)\r\n } else if (c.type === 'OPagetableColumnDiy') {\r\n return renderDiyColumn(c)\r\n } else {\r\n throw new OrionError(`OPagetable不能正确渲染'${c.type.name}'子组件。`)\r\n }\r\n })\r\n }\r\n\r\n return (\r\n <div class={[cn, attrs.class]} style={[style.value, attrs.style as CSSProperties]}>\r\n <div class=\"pagetable-wrapper\">\r\n <ElTable\r\n showSummary={showSummary.value}\r\n summaryMethod={getSummaries}\r\n border\r\n ref={elTableRef}\r\n data={data}\r\n height={'100%'}\r\n style={{ width: '100%' }}\r\n onSelection-change={(rows) => emit('selectionChange', rows)}\r\n highlight-current-row={currentRowMode}\r\n onCurrent-change={(currentRow, oldCurrentRow) => emit('currentRowChange', currentRow, oldCurrentRow)}\r\n onRow-click={(row: any, column: any, event: Event) => emit('rowClick', row, { name: column.property, head: column.label }, event)}\r\n onRow-dblclick={(row: any, column: any, event: Event) => emit('rowDblclick', row, { name: column.property, head: column.label }, event)}\r\n onCell-click={(row: any, column: any, cell: any, event: Event) =>\r\n emit('cellClick', row, { name: column.property, head: column.label }, cell, event)\r\n }\r\n onCell-dblclick={(row: any, column: any, cell: any, event: Event) =>\r\n emit('cellDblclick', row, { name: column.property, head: column.label }, cell, event)\r\n }\r\n size={size}\r\n rowClassName={(data: { row: any; rowIndex: number }) => {\r\n if (typeof rowClassName === 'string') {\r\n return rowClassName\r\n } else if (typeof rowClassName === 'function') {\r\n return rowClassName({ rowData: data.row, rowIndex: data.rowIndex })\r\n } else {\r\n return 'row-class-name_not_valid'\r\n }\r\n }}\r\n rowStyle={(data: { row: any; rowIndex: number }) => {\r\n if (typeof rowStyle === 'function') {\r\n return rowStyle({ rowData: data.row, rowIndex: data.rowIndex })\r\n } else if (typeof rowStyle === 'object') {\r\n return rowStyle\r\n } else {\r\n return {}\r\n }\r\n }}\r\n cellClassName={(data: { row: any; column: any; rowIndex: number; columnIndex: number }) => {\r\n if (typeof cellClassName === 'string') {\r\n return cellClassName\r\n } else if (typeof cellClassName === 'function') {\r\n return cellClassName({\r\n rowData: data.row,\r\n column: { name: data.column.property, head: data.column.label },\r\n rowIndex: data.rowIndex,\r\n columnIndex: data.columnIndex,\r\n })\r\n } else {\r\n return 'cell-class-name_not_valid'\r\n }\r\n }}\r\n cellStyle={(data: { row: any; column: any; rowIndex: number; columnIndex: number }) => {\r\n if (typeof cellStyle === 'function') {\r\n return cellStyle({\r\n rowData: data.row,\r\n column: { name: data.column.property, head: data.column.label },\r\n rowIndex: data.rowIndex,\r\n columnIndex: data.columnIndex,\r\n })\r\n } else if (typeof cellStyle === 'object') {\r\n return cellStyle\r\n } else {\r\n return {}\r\n }\r\n }}\r\n >\r\n {showRowNumber && renderIndexColumn()}\r\n {selectionMode && renderSelectionColumn()}\r\n {renderColumns(columns.value)}\r\n </ElTable>\r\n </div>\r\n\r\n <div class=\"pagination-wrapper\">\r\n <ElPagination\r\n currentPage={pagination.currentPage}\r\n onUpdate:current-page={(e) => {\r\n emit('update:pagination', {\r\n ...pagination,\r\n currentPage: e,\r\n })\r\n }}\r\n pageSize={pagination.pageSize}\r\n pageSizes={pagination.pageSizes}\r\n onUpdate:page-size={(e) => {\r\n emit('update:pagination', {\r\n ...pagination,\r\n pageSize: e,\r\n })\r\n }}\r\n total={pagination.total}\r\n layout=\"total, ->, sizes, prev, pager, next, jumper\"\r\n size={size}\r\n teleported={paginationTeleported}\r\n ></ElPagination>\r\n </div>\r\n </div>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnIndexProps = () => ({})\r\n\r\nexport type PagetableColumnIndexProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnIndexProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnIndex',\r\n inheritAttrs: false,\r\n props: pagetableColumnIndexProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnStringProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnStringProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnStringProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnString',\r\n inheritAttrs: false,\r\n props: pagetableColumnStringProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnLinkProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnLinkProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnLinkProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnLink',\r\n inheritAttrs: false,\r\n props: pagetableColumnLinkProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, numberType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnNumberProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n thousandsSeparator: booleanType(true),\r\n precision: numberType(-1),\r\n percentage: booleanType(false),\r\n})\r\n\r\nexport type PagetableColumnNumberProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnNumberProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnNumber',\r\n inheritAttrs: false,\r\n props: pagetableColumnNumberProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDateProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n // Date\r\n format: stringType(),\r\n sourceFormat: stringType(),\r\n})\r\n\r\nexport type PagetableColumnDateProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDateProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDate',\r\n inheritAttrs: false,\r\n props: pagetableColumnDateProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnSingleselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnSingleselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnSingleselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnSingleselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnSingleselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnMultiselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnMultiselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnMultiselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnMultiselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnMultiselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnButtongroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n bodyAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnButtongroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnButtongroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnButtongroup',\r\n inheritAttrs: false,\r\n props: pagetableColumnButtongroupProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableCellButtonProps = () => ({\r\n type: stringType(),\r\n})\r\n\r\nexport type PagetableCellButtonProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableCellButtonProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableCellButton',\r\n inheritAttrs: false,\r\n props: pagetableCellButtonProps(),\r\n emits: ['click'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const handleClick = (event: Event) => {\r\n emit('click', event)\r\n }\r\n\r\n return () => {\r\n const { type } = props\r\n const children = slots.default?.()\r\n\r\n return (\r\n <ElButton link type={type} size=\"small\" onClick={handleClick}>\r\n {children}\r\n </ElButton>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumngroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n})\r\n\r\nexport type PagetableColumngroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumngroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumngroup',\r\n inheritAttrs: false,\r\n props: pagetableColumngroupProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDiyProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n tail: someType<boolean | string>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnDiyProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDiyProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDiy',\r\n inheritAttrs: false,\r\n props: pagetableColumnDiyProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { withInstall } from '../_util'\r\n\r\nimport Pagetable from './Pagetable'\r\nimport PagetableColumnIndex from './columns/PagetableColumnIndex'\r\nimport PagetableColumnString from './columns/PagetableColumnString'\r\nimport PagetableColumnLink from './columns/PagetableColumnLink'\r\nimport PagetableColumnNumber from './columns/PagetableColumnNumber'\r\nimport PagetableColumnDate from './columns/PagetableColumnDate'\r\nimport PagetableColumnSingleselect from './columns/PagetableColumnSingleselect'\r\nimport PagetableColumnMultiselect from './columns/PagetableColumnMultiselect'\r\nimport PagetableColumnButtongroup from './columns/PagetableColumnButtongroup'\r\nimport PagetableCellButton from './columns/PagetableCellButton'\r\nimport PagetableColumngroup from './columns/PagetableColumngroup'\r\nimport PagetableColumnDiy from './columns/PagetableColumnDiy'\r\n\r\nexport type { PagetableProps } from './Pagetable'\r\n\r\nexport default withInstall<\r\n typeof Pagetable,\r\n {\r\n PagetableColumnIndex: typeof PagetableColumnIndex\r\n PagetableColumnString: typeof PagetableColumnString\r\n PagetableColumnLink: typeof PagetableColumnLink\r\n PagetableColumnNumber: typeof PagetableColumnNumber\r\n PagetableColumnDate: typeof PagetableColumnDate\r\n PagetableColumnSingleselect: typeof PagetableColumnSingleselect\r\n PagetableColumnMultiselect: typeof PagetableColumnMultiselect\r\n PagetableColumnButtongroup: typeof PagetableColumnButtongroup\r\n PagetableCellButton: typeof PagetableCellButton\r\n PagetableColumngroup: typeof PagetableColumngroup\r\n PagetableColumnDiy: typeof PagetableColumnDiy\r\n }\r\n>(Pagetable, {\r\n PagetableColumnIndex,\r\n PagetableColumnString,\r\n PagetableColumnLink,\r\n PagetableColumnNumber,\r\n PagetableColumnDate,\r\n PagetableColumnSingleselect,\r\n PagetableColumnMultiselect,\r\n PagetableColumnButtongroup,\r\n PagetableCellButton,\r\n PagetableColumngroup,\r\n PagetableColumnDiy,\r\n})\r\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","pagetableProps","data","arrayType","tailData","objectType","pagination","paginationTeleported","booleanType","showRowNumber","selectionMode","currentRowMode","size","stringType","rowClassName","someType","rowStyle","cellClassName","cellStyle","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","columns","useColumns","leafColumns4ShowSummary","r","push","type","flat","i","length","c","children","value","showSummary","existTail","tail","clearSelection","getSelectionRows","toggleRowSelection","args","toggleAllSelection","setCurrentRow","scrollTo","getSummaries","param","map","columnName","columnTail","replace","OrionError","cn","classNames","renderIndexColumn","_createVNode","ElTableColumn","index","currentPage","pageSize","renderSelectionColumn","renderStringColumn","column","head","headAlign","bodyAlign","width","fixed","renderLinkColumn","default","scope","row","property","renderNumberColumn","thousandsSeparator","precision","percentage","number2string","renderDateColumn","sourceFormat","format","cellValue","Date","dayjs","isDayjs","formatDate","renderSingleSelectColumn","code","codeName","codeData","codeContent","Throne","getCode","getSingleCodeContent","renderMultiSelectColumn","getMultiCodeContent","renderButtongroupColumn","rowData","rowIndex","$index","Space","renderColumngroupColumn","renderColumns","renderDiyColumn","_createTextVNode","class","ElTable","rows","onCurrent-change","currentRow","oldCurrentRow","onRow-click","event","label","onRow-dblclick","onCell-click","cell","onCell-dblclick","columnIndex","ElPagination","e","pageSizes","total","pagetableColumnIndexProps","pagetableColumnStringProps","Boolean","String","pagetableColumnLinkProps","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","Pagetable","withInstall","PagetableColumnIndex","PagetableColumnString","PagetableColumnLink","PagetableColumnNumber","PagetableColumnDate","PagetableColumnSingleselect","PagetableColumnMultiselect","PagetableColumnButtongroup","PagetableCellButton","PagetableColumngroup","PagetableColumnDiy"],"mappings":";;;;;;;;;;;;AAiBiC,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAO1B,MAAM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,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCbc0H,KAAAC,GAebD,IAAW;AAAA,EACX,sBAAAE;AAAA,EACA,uBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,6BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,oBAAAC;AACF,CAAC;"}
@@ -1,104 +1,66 @@
1
- import Decimal from "decimal.js";
2
- import { l as lib } from "../../../index-DR5ZP7mD.js";
3
- import dayjs from "dayjs";
4
- import OrionError from "../../../error/OrionError.js";
5
- const formatDate = (p1, p2, p3) => {
6
- if (!p1) {
7
- return p1;
8
- }
9
- if (p1 instanceof Date && typeof p2 === "string") {
10
- const value = p1;
11
- const format = p2;
12
- if (!value) {
13
- throw new OrionError("value is null.");
14
- }
15
- if (!format) {
16
- throw new OrionError("format is null.");
17
- }
18
- return dayjs(value).format(format);
19
- } else if (typeof p1 === "string" && typeof p2 === "string" && typeof p3 === "string") {
20
- const value = p1;
21
- const sourceFormat = p2;
22
- const targetFormat = p3;
23
- if (!value || !sourceFormat || !targetFormat) {
24
- throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`);
25
- }
26
- if (dayjs(value, sourceFormat, true).isValid()) {
27
- return dayjs(value, sourceFormat).format(targetFormat);
28
- } else {
29
- throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`);
30
- }
31
- } else {
32
- throw new OrionError(`入参数量[${arguments.length}]不正确。`);
33
- }
1
+ import a from "decimal.js";
2
+ import { l as c } from "../../../index-CC0EuWhe.js";
3
+ import s from "dayjs";
4
+ import i from "../../../error/OrionError.js";
5
+ const $ = (t, r, o) => {
6
+ if (!t)
7
+ return t;
8
+ if (t instanceof Date && typeof r == "string") {
9
+ const n = t, e = r;
10
+ if (!n)
11
+ throw new i("value is null.");
12
+ if (!e)
13
+ throw new i("format is null.");
14
+ return s(n).format(e);
15
+ } else if (typeof t == "string" && typeof r == "string" && typeof o == "string") {
16
+ const n = t, e = r, f = o;
17
+ if (!n || !e || !f)
18
+ throw new i(`Invalid arguments: ${n}, ${e}, ${f}`);
19
+ if (s(n, e, !0).isValid())
20
+ return s(n, e).format(f);
21
+ throw new i(`日期[${n}]与格式[${e}]不匹配。`);
22
+ } else
23
+ throw new i(`入参数量[${arguments.length}]不正确。`);
34
24
  };
35
- function round(value, how) {
36
- const dec = new Decimal(value);
37
- return dec.toFixed(how, 4);
25
+ function u(t, r) {
26
+ return new a(t).toFixed(r, 4);
38
27
  }
39
- function number2string(num, thousandsSeparatorValue, precisionValue, percentageValue) {
40
- if (num === null || num === void 0) {
28
+ function y(t, r, o, n) {
29
+ if (t == null)
41
30
  return "";
42
- } else if (typeof num === "number" || typeof num === "string") {
43
- let result;
44
- if (precisionValue >= 0) {
45
- result = round(percentageValue ? num * 100 : num, precisionValue);
46
- } else {
47
- result = String(percentageValue ? num * 100 : num);
48
- }
49
- if (percentageValue) {
50
- if (thousandsSeparatorValue) {
51
- result = lib.comma(result);
52
- }
53
- result += "%";
54
- } else if (thousandsSeparatorValue) {
55
- result = lib.comma(result);
56
- }
57
- return result;
58
- } else {
59
- throw new OrionError(`num [${num}]:[${typeof num}] is neither a number nor null.`);
60
- }
31
+ if (typeof t == "number" || typeof t == "string") {
32
+ let e;
33
+ return o >= 0 ? e = u(n ? t * 100 : t, o) : e = String(n ? t * 100 : t), n ? (r && (e = c.comma(e)), e += "%") : r && (e = c.comma(e)), e;
34
+ } else
35
+ throw new i(`num [${t}]:[${typeof t}] is neither a number nor null.`);
61
36
  }
62
- const getSingleCodeContent = (options, curValue) => {
63
- if (!curValue) {
37
+ const v = (t, r) => {
38
+ if (!r)
64
39
  return null;
40
+ if (!t)
41
+ return r + "(?)";
42
+ for (let o = 0; o < t.length; o++) {
43
+ const { value: n, content: e } = t[o];
44
+ if (n == r)
45
+ return e;
65
46
  }
66
- if (!options) {
67
- return curValue + "(?)";
68
- }
69
- for (let i = 0; i < options.length; i++) {
70
- const { value, content } = options[i];
71
- if (value == curValue) {
72
- return content;
73
- }
74
- }
75
- return curValue + "(?)";
76
- };
77
- const getMultiCodeContent = (options, curValue) => {
78
- if (!curValue) {
47
+ return r + "(?)";
48
+ }, b = (t, r) => {
49
+ if (!r)
79
50
  return null;
80
- }
81
- let content = "";
82
- const data = curValue.split(",");
83
- data.forEach((selectValue, valueIndex) => {
84
- const index = options.findIndex((item) => {
85
- if (item.value == selectValue) return true;
51
+ let o = "";
52
+ const n = r.split(",");
53
+ return n.forEach((e, f) => {
54
+ const l = t.findIndex((m) => {
55
+ if (m.value == e) return !0;
86
56
  });
87
- if (index == -1) {
88
- content += `${selectValue}(?)`;
89
- } else {
90
- content += options[index].content;
91
- }
92
- if (valueIndex != data.length - 1) {
93
- content += ",";
94
- }
95
- });
96
- return content;
57
+ l == -1 ? o += `${e}(?)` : o += t[l].content, f != n.length - 1 && (o += ",");
58
+ }), o;
97
59
  };
98
60
  export {
99
- formatDate,
100
- getMultiCodeContent,
101
- getSingleCodeContent,
102
- number2string
61
+ $ as formatDate,
62
+ b as getMultiCodeContent,
63
+ v as getSingleCodeContent,
64
+ y as number2string
103
65
  };
104
66
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Pagetable/utils/index.ts"],"sourcesContent":["import Decimal from 'decimal.js'\r\nimport { comma } from 'number-magic'\r\nimport dayjs from 'dayjs'\r\n\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ninterface formatI {\r\n format(value: Date, targetFormat: string): string\r\n format(value: string, sourceFormat: string, targetFormat: string): string\r\n}\r\n\r\nexport const formatDate: formatI['format'] = (p1: Date | string, p2: string, p3?: string) => {\r\n if (!p1) {\r\n return p1\r\n }\r\n\r\n if (p1 instanceof Date && typeof p2 === 'string') {\r\n const value = p1\r\n const format = p2\r\n\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n return dayjs(value).format(format)\r\n } else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {\r\n const value = p1\r\n const sourceFormat = p2\r\n const targetFormat = p3\r\n\r\n if (!value || !sourceFormat || !targetFormat) {\r\n throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`)\r\n }\r\n\r\n if (dayjs(value, sourceFormat, true).isValid()) {\r\n return dayjs(value, sourceFormat).format(targetFormat)\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`)\r\n }\r\n } else {\r\n throw new OrionError(`入参数量[${arguments.length}]不正确。`)\r\n }\r\n}\r\n\r\nfunction round(value: number, how: number) {\r\n const dec = new Decimal(value)\r\n return dec.toFixed(how, 4)\r\n}\r\n\r\nexport function number2string(num: number | null | undefined, thousandsSeparatorValue: boolean, precisionValue: number, percentageValue: boolean): string {\r\n if (num === null || num === undefined) {\r\n return ''\r\n } else if (typeof num === 'number' || typeof num === 'string') {\r\n let result\r\n\r\n // 基础:先实现精度化\r\n if (precisionValue >= 0) {\r\n result = round(percentageValue ? num * 100 : num, precisionValue)\r\n } else {\r\n result = String(percentageValue ? num * 100 : num)\r\n }\r\n\r\n // 百分比优先级高于千分位,先实现百分比,再实现千分位\r\n if (percentageValue) {\r\n if (thousandsSeparatorValue) {\r\n // 千分位\r\n result = comma(result)\r\n }\r\n\r\n result += '%'\r\n } else if (thousandsSeparatorValue) {\r\n // 千分位\r\n // 小数精度优先级最高\r\n result = comma(result)\r\n }\r\n\r\n return result\r\n } else {\r\n throw new OrionError(`num [${num}]:[${typeof num}] is neither a number nor null.`)\r\n }\r\n}\r\n\r\nexport const getSingleCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n if (!options) {\r\n return curValue + '(?)'\r\n }\r\n\r\n for (let i = 0; i < options.length; i++) {\r\n const { value, content } = options[i]\r\n if (value == curValue) {\r\n return content\r\n }\r\n }\r\n\r\n return curValue + '(?)'\r\n}\r\n\r\nexport const getMultiCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n let content = ''\r\n\r\n const data = curValue.split(',')\r\n data.forEach((selectValue, valueIndex) => {\r\n const index = options.findIndex((item) => {\r\n if (item.value == selectValue) return true\r\n })\r\n\r\n if (index == -1) {\r\n content += `${selectValue}(?)`\r\n } else {\r\n content += options[index].content\r\n }\r\n\r\n if (valueIndex != data.length - 1) {\r\n content += ','\r\n }\r\n })\r\n\r\n return content\r\n}\r\n"],"names":["comma"],"mappings":";;;;AAWO,MAAM,aAAgC,CAAC,IAAmB,IAAY,OAAgB;AAC3F,MAAI,CAAC,IAAI;AACA,WAAA;AAAA,EACT;AAEA,MAAI,cAAc,QAAQ,OAAO,OAAO,UAAU;AAChD,UAAM,QAAQ;AACd,UAAM,SAAS;AAEf,QAAI,CAAC,OAAO;AACJ,YAAA,IAAI,WAAW,gBAAgB;AAAA,IACvC;AAEA,QAAI,CAAC,QAAQ;AACL,YAAA,IAAI,WAAW,iBAAiB;AAAA,IACxC;AAEA,WAAO,MAAM,KAAK,EAAE,OAAO,MAAM;AAAA,EAAA,WACxB,OAAO,OAAO,YAAY,OAAO,OAAO,YAAY,OAAO,OAAO,UAAU;AACrF,UAAM,QAAQ;AACd,UAAM,eAAe;AACrB,UAAM,eAAe;AAErB,QAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,cAAc;AACtC,YAAA,IAAI,WAAW,sBAAsB,KAAK,KAAK,YAAY,KAAK,YAAY,EAAE;AAAA,IACtF;AAEA,QAAI,MAAM,OAAO,cAAc,IAAI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SAAO,WAAW;AACpB;AAEa,MAAA,sBAAsB,CACjC,SAIA,aACG;AACH,MAAI,CAAC,UAAU;AACN,WAAA;AAAA,EACT;AAEA,MAAI,UAAU;AAER,QAAA,OAAO,SAAS,MAAM,GAAG;AAC1B,OAAA,QAAQ,CAAC,aAAa,eAAe;AACxC,UAAM,QAAQ,QAAQ,UAAU,CAAC,SAAS;AACpC,UAAA,KAAK,SAAS,YAAoB,QAAA;AAAA,IAAA,CACvC;AAED,QAAI,SAAS,IAAI;AACf,iBAAW,GAAG,WAAW;AAAA,IAAA,OACpB;AACM,iBAAA,QAAQ,KAAK,EAAE;AAAA,IAC5B;AAEI,QAAA,cAAc,KAAK,SAAS,GAAG;AACtB,iBAAA;AAAA,IACb;AAAA,EAAA,CACD;AAEM,SAAA;AACT;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Pagetable/utils/index.ts"],"sourcesContent":["import Decimal from 'decimal.js'\r\nimport { comma } from 'number-magic'\r\nimport dayjs from 'dayjs'\r\n\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ninterface formatI {\r\n format(value: Date, targetFormat: string): string\r\n format(value: string, sourceFormat: string, targetFormat: string): string\r\n}\r\n\r\nexport const formatDate: formatI['format'] = (p1: Date | string, p2: string, p3?: string) => {\r\n if (!p1) {\r\n return p1\r\n }\r\n\r\n if (p1 instanceof Date && typeof p2 === 'string') {\r\n const value = p1\r\n const format = p2\r\n\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n return dayjs(value).format(format)\r\n } else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {\r\n const value = p1\r\n const sourceFormat = p2\r\n const targetFormat = p3\r\n\r\n if (!value || !sourceFormat || !targetFormat) {\r\n throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`)\r\n }\r\n\r\n if (dayjs(value, sourceFormat, true).isValid()) {\r\n return dayjs(value, sourceFormat).format(targetFormat)\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`)\r\n }\r\n } else {\r\n throw new OrionError(`入参数量[${arguments.length}]不正确。`)\r\n }\r\n}\r\n\r\nfunction round(value: number, how: number) {\r\n const dec = new Decimal(value)\r\n return dec.toFixed(how, 4)\r\n}\r\n\r\nexport function number2string(num: number | null | undefined, thousandsSeparatorValue: boolean, precisionValue: number, percentageValue: boolean): string {\r\n if (num === null || num === undefined) {\r\n return ''\r\n } else if (typeof num === 'number' || typeof num === 'string') {\r\n let result\r\n\r\n // 基础:先实现精度化\r\n if (precisionValue >= 0) {\r\n result = round(percentageValue ? num * 100 : num, precisionValue)\r\n } else {\r\n result = String(percentageValue ? num * 100 : num)\r\n }\r\n\r\n // 百分比优先级高于千分位,先实现百分比,再实现千分位\r\n if (percentageValue) {\r\n if (thousandsSeparatorValue) {\r\n // 千分位\r\n result = comma(result)\r\n }\r\n\r\n result += '%'\r\n } else if (thousandsSeparatorValue) {\r\n // 千分位\r\n // 小数精度优先级最高\r\n result = comma(result)\r\n }\r\n\r\n return result\r\n } else {\r\n throw new OrionError(`num [${num}]:[${typeof num}] is neither a number nor null.`)\r\n }\r\n}\r\n\r\nexport const getSingleCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n if (!options) {\r\n return curValue + '(?)'\r\n }\r\n\r\n for (let i = 0; i < options.length; i++) {\r\n const { value, content } = options[i]\r\n if (value == curValue) {\r\n return content\r\n }\r\n }\r\n\r\n return curValue + '(?)'\r\n}\r\n\r\nexport const getMultiCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n let content = ''\r\n\r\n const data = curValue.split(',')\r\n data.forEach((selectValue, valueIndex) => {\r\n const index = options.findIndex((item) => {\r\n if (item.value == selectValue) return true\r\n })\r\n\r\n if (index == -1) {\r\n content += `${selectValue}(?)`\r\n } else {\r\n content += options[index].content\r\n }\r\n\r\n if (valueIndex != data.length - 1) {\r\n content += ','\r\n }\r\n })\r\n\r\n return content\r\n}\r\n"],"names":["formatDate","p1","p2","p3","value","format","OrionError","dayjs","sourceFormat","targetFormat","round","how","Decimal","number2string","num","thousandsSeparatorValue","precisionValue","percentageValue","result","comma","getSingleCodeContent","options","curValue","i","content","getMultiCodeContent","data","selectValue","valueIndex","index","item"],"mappings":";;;;AAWO,MAAMA,IAAgC,CAACC,GAAmBC,GAAYC,MAAgB;AAC3F,MAAI,CAACF;AACI,WAAAA;AAGT,MAAIA,aAAc,QAAQ,OAAOC,KAAO,UAAU;AAChD,UAAME,IAAQH,GACRI,IAASH;AAEf,QAAI,CAACE;AACG,YAAA,IAAIE,EAAW,gBAAgB;AAGvC,QAAI,CAACD;AACG,YAAA,IAAIC,EAAW,iBAAiB;AAGxC,WAAOC,EAAMH,CAAK,EAAE,OAAOC,CAAM;AAAA,EAAA,WACxB,OAAOJ,KAAO,YAAY,OAAOC,KAAO,YAAY,OAAOC,KAAO,UAAU;AACrF,UAAMC,IAAQH,GACRO,IAAeN,GACfO,IAAeN;AAErB,QAAI,CAACC,KAAS,CAACI,KAAgB,CAACC;AACxB,YAAA,IAAIH,EAAW,sBAAsBF,CAAK,KAAKI,CAAY,KAAKC,CAAY,EAAE;AAGtF,QAAIF,EAAMH,GAAOI,GAAc,EAAI,EAAE;AACnC,aAAOD,EAAMH,GAAOI,CAAY,EAAE,OAAOC,CAAY;AAErD,UAAM,IAAIH,EAAW,MAAMF,CAAK,QAAQI,CAAY,OAAO;AAAA,EAC7D;AAEA,UAAM,IAAIF,EAAW,QAAQ,UAAU,MAAM,OAAO;AAExD;AAEA,SAASI,EAAMN,GAAeO,GAAa;AAElC,SADK,IAAIC,EAAQR,CAAK,EAClB,QAAQO,GAAK,CAAC;AAC3B;AAEO,SAASE,EAAcC,GAAgCC,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