orion-design 0.1.28 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/README.md +5 -5
  2. package/dist/components/Form/index.js +308 -306
  3. package/dist/components/Form/index.js.map +1 -1
  4. package/dist/components/LovTable/LovPagetable.vue.d.ts +44 -0
  5. package/dist/components/LovTable/index.d.ts +22 -0
  6. package/dist/components/Modal/Modal.d.ts +2 -0
  7. package/dist/components/Modal/ModalLocator.vue.d.ts +20 -0
  8. package/dist/components/Modal/index.d.ts +4 -1
  9. package/dist/components/Modal/index.js +72 -0
  10. package/dist/components/Modal/index.js.map +1 -0
  11. package/dist/components/Modal/types.d.ts +18 -0
  12. package/dist/components/Modal/types.js +6 -0
  13. package/dist/components/Modal/types.js.map +1 -0
  14. package/dist/components/Modal/useModal.d.ts +1 -3
  15. package/dist/components/Modal/useModal.js +4 -3
  16. package/dist/components/Modal/useModal.js.map +1 -1
  17. package/dist/components/Pagetable/Pagetable.d.ts +20 -0
  18. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  19. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  20. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +13 -0
  21. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +88 -0
  22. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  23. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  24. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  25. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  26. package/dist/components/Pagetable/hooks/useColumns.js +36 -30
  27. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  28. package/dist/components/Pagetable/index.d.ts +16 -0
  29. package/dist/components/Pagetable/index.js +436 -321
  30. package/dist/components/Pagetable/index.js.map +1 -1
  31. package/dist/components/Pagetable/interface.d.ts +1 -0
  32. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +75 -0
  33. package/dist/components/Querytable/hooks/useColumns.js +6 -6
  34. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  35. package/dist/components/Querytable/index.d.ts +2 -0
  36. package/dist/components/Querytable/index.js +227 -180
  37. package/dist/components/Querytable/index.js.map +1 -1
  38. package/dist/components/_util/arrays.js.map +1 -1
  39. package/dist/components/_util/browser.js.map +1 -1
  40. package/dist/components/_util/dom/aria.js.map +1 -1
  41. package/dist/components/_util/dom/element.js.map +1 -1
  42. package/dist/components/_util/dom/event.js.map +1 -1
  43. package/dist/components/_util/dom/position.js.map +1 -1
  44. package/dist/components/_util/dom/scroll.js.map +1 -1
  45. package/dist/components/_util/dom/style.js.map +1 -1
  46. package/dist/components/_util/easings.js.map +1 -1
  47. package/dist/components/_util/error.js.map +1 -1
  48. package/dist/components/_util/i18n.js.map +1 -1
  49. package/dist/components/_util/objects.js.map +1 -1
  50. package/dist/components/_util/raf.js.map +1 -1
  51. package/dist/components/_util/rand.js.map +1 -1
  52. package/dist/components/_util/strings.js.map +1 -1
  53. package/dist/components/_util/throttleByRaf.js.map +1 -1
  54. package/dist/components/_util/types.js.map +1 -1
  55. package/dist/components/_util/typescript.js.map +1 -1
  56. package/dist/components/_util/vue/global-node.js.map +1 -1
  57. package/dist/components/_util/vue/icon.js.map +1 -1
  58. package/dist/components/_util/vue/install.js.map +1 -1
  59. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  60. package/dist/components/_util/vue/refs.js.map +1 -1
  61. package/dist/components/_util/vue/size.js.map +1 -1
  62. package/dist/components/_util/vue/validator.js.map +1 -1
  63. package/dist/components/_util/vue/vnode.js.map +1 -1
  64. package/dist/components/components.js +8 -8
  65. package/dist/components/index.js +21 -21
  66. package/dist/components-8oZ2kpUC.js +27 -0
  67. package/dist/components-8oZ2kpUC.js.map +1 -0
  68. package/dist/index.css +1 -1
  69. package/dist/index.js +3 -3
  70. package/dist/version/version.d.ts +1 -1
  71. package/dist/version/version.js +1 -1
  72. package/dist/version/version.js.map +1 -1
  73. package/package.json +1 -1
  74. package/dist/components-0PErqPHo.js +0 -72
  75. package/dist/components-0PErqPHo.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/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\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 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\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 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 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 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 === '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 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 total={pagination.total}\r\n layout=\"total, ->, prev, pager, next, jumper\"\r\n size={size}\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})\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, 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\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\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\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\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})\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})\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 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 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 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","pagination","objectType","showRowNumber","booleanType","selectionMode","currentRowMode","size","stringType","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","columns","useColumns","clearSelection","value","getSelectionRows","toggleRowSelection","args","toggleAllSelection","setCurrentRow","scrollTo","cn","classNames","renderIndexColumn","_createVNode","ElTableColumn","index","currentPage","pageSize","renderSelectionColumn","renderStringColumn","column","head","headAlign","width","fixed","renderNumberColumn","thousandsSeparator","precision","percentage","default","scope","row","number2string","property","renderDateColumn","sourceFormat","format","cellValue","Date","dayjs","isDayjs","formatDate","renderSingleSelectColumn","code","codeName","codeData","codeContent","Throne","getCode","getSingleCodeContent","renderMultiSelectColumn","getMultiCodeContent","renderButtongroupColumn","children","rowData","rowIndex","$index","Space","renderColumngroupColumn","renderColumns","renderDiyColumn","_createTextVNode","map","c","type","OrionError","class","ElTable","rows","onCurrent-change","currentRow","oldCurrentRow","onRow-click","event","label","onRow-dblclick","onCell-click","cell","onCell-dblclick","ElPagination","e","total","pagetableColumnIndexProps","pagetableColumnStringProps","someType","Boolean","String","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","Pagetable","withInstall","PagetableColumnIndex","PagetableColumnString","PagetableColumnNumber","PagetableColumnDate","PagetableColumnSingleselect","PagetableColumnMultiselect","PagetableColumnButtongroup","PagetableCellButton","PagetableColumngroup","PagetableColumnDiy"],"mappings":";;;;;;;;;;;;AAgBiC,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAE1B,MAAMM,KAAiBA,OAAO;AAAA,EACnCC,MAAMC,GAA+B;AAAA,EACrCC,YAAYC,GAAsC;AAAA,EAClDC,eAAeC,EAAY,EAAI;AAAA,EAC/BC,eAAeD,EAAY,EAAK;AAAA,EAChCE,gBAAgBF,EAAY,EAAK;AAAA,EACjCG,MAAMC,EAA+C;AACvD,IAIeC,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOd,GAAgB;AAAA,EACvBe,OAAO,CAAC,mBAAmB,oBAAoB,qBAAqB,YAAY,eAAe,aAAa,cAAc;AAAA,EAC1HC,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,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,OAAO4G,GAA2B;AAAA,EAClC1G,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCdYuG,KAA0BA,OAAO;AAAA,EAC5C7E,MAAMpC,EAAY;AAAA,EAClBqC,WAAWrC,EAAyC;AAAA,EACpDE,MAAMF,EAAY;AAAA,EAClBsC,OAAO6D,EAA2B,CAACC,SAASC,MAAM,CAAC;AAAA,EACnD9D,OAAO4D,EAAoB,CAACC,SAASC,MAAM,CAAC;AAC9C,IAIepG,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAO6G,GAAyB;AAAA,EAChC1G,OAAOtB;AAAAA,EAGPqB,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCbcwG,KAAAC,GAcbD,IAAW;AAAA,EACX,sBAAAE;AAAA,EACA,uBAAAC;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
+ {"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 ></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","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","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;AAE1B,MAAMM,KAAiBA,OAAO;AAAA,EACnCC,MAAMC,GAA+B;AAAA,EACrCC,UAAUC,EAAiC;AAAA,EAC3CC,YAAYD,EAAsC;AAAA,EAClDE,eAAeC,EAAY,EAAI;AAAA,EAC/BC,eAAeD,EAAY,EAAK;AAAA,EAChCE,gBAAgBF,EAAY,EAAK;AAAA,EACjCG,MAAMC,EAA+C;AACvD,IASeC,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOf,GAAgB;AAAA,EACvB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ClBwD,WAAWxD,EAAyC;AAAA,EACpDE,MAAMF,EAAY;AAAA,EAClByD,OAAO0D,EAA2B,CAACC,SAASC,MAAM,CAAC;AAAA,EACnD3D,OAAOyD,EAAoB,CAACC,SAASC,MAAM,CAAC;AAAA,EAC5CxF,MAAMsF,EAA2B,CAACC,SAASC,MAAM,CAAC;AACpD,IAIepH,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAO8H,GAAyB;AAAA,EAChC3H,OAAOvB;AAAAA,EAGPsB,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCbcyH,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;"}
@@ -5,6 +5,7 @@ export interface PageTableI<RecordType = DefaultRecordType> {
5
5
  pagination: {
6
6
  currentPage?: number;
7
7
  pageSize?: number;
8
+ pageSizes?: number[];
8
9
  total?: number;
9
10
  };
10
11
  }
@@ -0,0 +1,75 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ import { FixedType } from '../interface';
3
+ export declare const querytableColumnLinkProps: () => {
4
+ head: {
5
+ type: PropType<string>;
6
+ default: string;
7
+ };
8
+ headAlign: {
9
+ type: PropType<"center" | "left" | "right">;
10
+ default: "center" | "left" | "right";
11
+ };
12
+ name: {
13
+ type: PropType<string>;
14
+ default: string;
15
+ };
16
+ width: {
17
+ type: PropType<string | boolean>;
18
+ default: string | boolean;
19
+ };
20
+ fixed: {
21
+ type: PropType<FixedType>;
22
+ default: FixedType;
23
+ };
24
+ };
25
+ export type QuerytableColumnLinkProps = Partial<ExtractPropTypes<ReturnType<typeof querytableColumnLinkProps>>>;
26
+ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
27
+ head: {
28
+ type: PropType<string>;
29
+ default: string;
30
+ };
31
+ headAlign: {
32
+ type: PropType<"center" | "left" | "right">;
33
+ default: "center" | "left" | "right";
34
+ };
35
+ name: {
36
+ type: PropType<string>;
37
+ default: string;
38
+ };
39
+ width: {
40
+ type: PropType<string | boolean>;
41
+ default: string | boolean;
42
+ };
43
+ fixed: {
44
+ type: PropType<FixedType>;
45
+ default: FixedType;
46
+ };
47
+ }>, () => null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ExtractPropTypes<{
48
+ head: {
49
+ type: PropType<string>;
50
+ default: string;
51
+ };
52
+ headAlign: {
53
+ type: PropType<"center" | "left" | "right">;
54
+ default: "center" | "left" | "right";
55
+ };
56
+ name: {
57
+ type: PropType<string>;
58
+ default: string;
59
+ };
60
+ width: {
61
+ type: PropType<string | boolean>;
62
+ default: string | boolean;
63
+ };
64
+ fixed: {
65
+ type: PropType<FixedType>;
66
+ default: FixedType;
67
+ };
68
+ }>> & Readonly<{}>, {
69
+ fixed: FixedType;
70
+ head: string;
71
+ width: string | boolean;
72
+ name: string;
73
+ headAlign: "center" | "left" | "right";
74
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
75
+ export default _default;
@@ -1,18 +1,18 @@
1
1
  import { computed as y } from "vue";
2
2
  import f from "../../../error/OrionError.js";
3
3
  import { camelize as g } from "../../_util/util.js";
4
- import { filterEmpty as m } from "../../_util/props-util/index.js";
4
+ import { filterEmpty as d } from "../../_util/props-util/index.js";
5
5
  function l(t) {
6
6
  return t == null ? void 0 : t.map((n) => {
7
7
  var a, i;
8
8
  const e = { ...n.props || {} };
9
- for (const [d, h] of Object.entries(e))
10
- delete e[d], e[g(d)] = h;
9
+ for (const [m, h] of Object.entries(e))
10
+ delete e[m], e[g(m)] = h;
11
11
  if (n.type.name === "OQuerytableColumnIndex")
12
12
  return {
13
13
  type: n.type.name
14
14
  };
15
- if (n.type.name === "OQuerytableColumnString")
15
+ if (n.type.name === "OQuerytableColumnString" || n.type.name === "OQuerytableColumnLink")
16
16
  return {
17
17
  type: n.type.name,
18
18
  head: e == null ? void 0 : e.head,
@@ -69,7 +69,7 @@ function l(t) {
69
69
  type: n.type.name,
70
70
  head: e == null ? void 0 : e.head,
71
71
  headAlign: e == null ? void 0 : e.headAlign,
72
- children: l(m((i = (a = n.children) == null ? void 0 : a.default) == null ? void 0 : i.call(a)))
72
+ children: l(d((i = (a = n.children) == null ? void 0 : a.default) == null ? void 0 : i.call(a)))
73
73
  };
74
74
  if (n.type.name === "OQuerytableColumnDiy")
75
75
  return {
@@ -87,7 +87,7 @@ function l(t) {
87
87
  function A(t) {
88
88
  return y(() => {
89
89
  var i;
90
- const n = (i = t.default) == null ? void 0 : i.call(t), e = m(n);
90
+ const n = (i = t.default) == null ? void 0 : i.call(t), e = d(n);
91
91
  return l(e);
92
92
  });
93
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Querytable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\nimport { filterEmpty } from '../../_util/props-util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OQuerytableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnString') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnSingleselect' || c.type.name === 'OQuerytableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(filterEmpty(c.children?.default?.())),\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OQuerytable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const non_empty_children = filterEmpty(children)\r\n\r\n const tableColumns = genColumns(non_empty_children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":["genColumns","children","c","props","k","v","camelize","filterEmpty","_b","_a","OrionError","useColumns","slots","computed","non_empty_children"],"mappings":";;;;AAMA,SAASA,EAAWC,GAAU;AAiGrB,SAhGcA,KAAA,gBAAAA,EAAU,IAAI,CAACC,MAAM;;AACxC,UAAMC,IAAQ,EAAE,GAAID,EAAE,SAAS,CAAI,EAAA;AACnC,eAAW,CAACE,GAAGC,CAAC,KAAK,OAAO,QAAQF,CAAK;AACvC,aAAOA,EAAMC,CAAC,GACRD,EAAAG,EAASF,CAAC,CAAC,IAAIC;AAGnB,QAAAH,EAAE,KAAK,SAAS;AACX,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,MAAA;AAEN,QAAAA,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QACb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,MAAA;AAEP,QAAAD,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QACb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QAEd,oBAAoBA,KAAA,gBAAAA,EAAO;AAAA,QAC3B,WAAW,OAAOA,KAAA,gBAAAA,EAAO,SAAS;AAAA,QAClC,YAAYA,KAAA,gBAAAA,E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AAE,aAAF,gBAAAO,EAAY,YAAZ,gBAAAD,EAAA,KAAAC,EAAuB,CAAC;AAAA,MAAA;AAElD,QAAAP,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QAEb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QAEd,UAAUD,EAAE;AAAA,MAAA;AAGd,UAAM,IAAIQ,EAAW,qBAAqBR,EAAE,KAAK,IAAI,OAAO;AAAA,EAC9D;AAIJ;AAEA,SAAwBS,EAAWC,GAAO;AAWjC,SAVSC,EAAS,MAAM;;AACvB,UAAAZ,KAAWQ,IAAAG,EAAM,YAAN,gBAAAH,EAAA,KAAAG,IAEXE,IAAqBP,EAAYN,CAAQ;AAIxC,WAFcD,EAAWc,CAAkB;AAAA,EAE3C,CACR;AAGH;"}
1
+ {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Querytable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\nimport { filterEmpty } from '../../_util/props-util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OQuerytableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnString' || c.type.name === 'OQuerytableColumnLink') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnSingleselect' || c.type.name === 'OQuerytableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OQuerytableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(filterEmpty(c.children?.default?.())),\r\n }\r\n } else if (c.type.name === 'OQuerytableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OQuerytable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const non_empty_children = filterEmpty(children)\r\n\r\n const tableColumns = genColumns(non_empty_children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":["genColumns","children","c","props","k","v","camelize","filterEmpty","_b","_a","OrionError","useColumns","slots","computed","non_empty_children"],"mappings":";;;;AAMA,SAASA,EAAWC,GAAU;AAiGrB,SAhGcA,KAAA,gBAAAA,EAAU,IAAI,CAACC,MAAM;;AACxC,UAAMC,IAAQ,EAAE,GAAID,EAAE,SAAS,CAAI,EAAA;AACnC,eAAW,CAACE,GAAGC,CAAC,KAAK,OAAO,QAAQF,CAAK;AACvC,aAAOA,EAAMC,CAAC,GACRD,EAAAG,EAASF,CAAC,CAAC,IAAIC;AAGnB,QAAAH,EAAE,KAAK,SAAS;AACX,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,MAAA;AAEjB,QAAWA,EAAE,KAAK,SAAS,6BAA6BA,EAAE,KAAK,SAAS;AAC/D,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QACb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,MAAA;AAEP,QAAAD,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QACb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QAEd,oBAAoBA,KAAA,gBAAAA,EAAO;AAAA,QAC3B,WAAW,OAAOA,KAAA,gBAAAA,EAAO,SAAS;AAAA,QAClC,YAAYA,KAAA,gBAAAA,EAAO;AAAA,MAAA;AAE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AAY,YAAZ,gBAAAD,EAAA,KAAAC,EAAuB,CAAC;AAAA,MAAA;AAElD,QAAAP,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QAEb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QAEd,UAAUD,EAAE;AAAA,MAAA;AAGd,UAAM,IAAIQ,EAAW,qBAAqBR,EAAE,KAAK,IAAI,OAAO;AAAA,EAC9D;AAIJ;AAEA,SAAwBS,EAAWC,GAAO;AAWjC,SAVSC,EAAS,MAAM;;AACvB,UAAAZ,KAAWQ,IAAAG,EAAM,YAAN,gBAAAH,EAAA,KAAAG,IAEXE,IAAqBP,EAAYN,CAAQ;AAIxC,WAFcD,EAAWc,CAAkB;AAAA,EAE3C,CACR;AAGH;"}
@@ -1,5 +1,6 @@
1
1
  import { default as QuerytableColumnIndex } from './columns/QuerytableColumnIndex';
2
2
  import { default as QuerytableColumnString } from './columns/QuerytableColumnString';
3
+ import { default as QuerytableColumnLink } from './columns/QuerytableColumnLink';
3
4
  import { default as QuerytableColumnNumber } from './columns/QuerytableColumnNumber';
4
5
  import { default as QuerytableColumnDate } from './columns/QuerytableColumnDate';
5
6
  import { default as QuerytableColumnSingleselect } from './columns/QuerytableColumnSingleselect';
@@ -67,6 +68,7 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
67
68
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>> & {
68
69
  QuerytableColumnIndex: typeof QuerytableColumnIndex;
69
70
  QuerytableColumnString: typeof QuerytableColumnString;
71
+ QuerytableColumnLink: typeof QuerytableColumnLink;
70
72
  QuerytableColumnNumber: typeof QuerytableColumnNumber;
71
73
  QuerytableColumnDate: typeof QuerytableColumnDate;
72
74
  QuerytableColumnSingleselect: typeof QuerytableColumnSingleselect;