orion-design 0.1.9 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/components/Button/index.js +11 -10
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Form/FileInput/FileInput.vue.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +1 -0
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.d.ts +20 -0
- package/dist/components/Form/LovInput/LovInput.js +5 -0
- package/dist/components/Form/LovInput/LovInput.js.map +1 -0
- package/dist/components/Form/LovInput/LovInput.vue.d.ts +5351 -0
- package/dist/components/Form/LovInput/hooks/useLov.d.ts +1 -0
- package/dist/components/Form/LovInput/hooks/useLov.js +9 -0
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -0
- package/dist/components/Form/LovInput/index.d.ts +2 -0
- package/dist/components/Form/LovInput/index.js +7 -0
- package/dist/components/Form/LovInput/index.js.map +1 -0
- package/dist/components/Form/hooks/FormItemValidateTrigger.d.ts +15 -0
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +18 -0
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -0
- package/dist/components/Form/hooks/index.d.ts +10 -0
- package/dist/components/Form/hooks/index.js +83 -0
- package/dist/components/Form/hooks/index.js.map +1 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Form/index.js +328 -244
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Pagetable/Pagetable.d.ts +16 -1
- package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +7 -7
- package/dist/components/Pagetable/index.d.ts +12 -1
- package/dist/components/Pagetable/index.js +243 -236
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +51 -154
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/Querytable.d.ts +64 -0
- package/dist/components/Querytable/columns/QuerytableCellButton.d.ts +24 -0
- package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +78 -0
- package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +101 -0
- package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +78 -0
- package/dist/components/Querytable/columns/QuerytableColumnIndex.d.ts +5 -0
- package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +109 -0
- package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +114 -0
- package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +109 -0
- package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +75 -0
- package/dist/components/Querytable/columns/QuerytableColumngroup.d.ts +35 -0
- package/dist/components/Querytable/hooks/useColumns.d.ts +1 -0
- package/dist/components/Querytable/hooks/useColumns.js +96 -0
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -0
- package/dist/components/Querytable/index.d.ts +66 -0
- package/dist/components/Querytable/index.js +510 -0
- package/dist/components/Querytable/index.js.map +1 -0
- package/dist/components/Querytable/interface.d.ts +10 -0
- package/dist/components/Querytable/interface.js +2 -0
- package/dist/components/Querytable/interface.js.map +1 -0
- package/dist/components/Querytable/utils/index.d.ts +15 -0
- package/dist/components/Querytable/utils/index.js +66 -0
- package/dist/components/Querytable/utils/index.js.map +1 -0
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/components.d.ts +2 -0
- package/dist/components/components.js +8 -6
- package/dist/components/components.js.map +1 -1
- package/dist/components/index.js +15 -13
- package/dist/components/index.js.map +1 -1
- package/dist/{components-CutWiB7Q.js → components-OIbu7HLW.js} +26 -24
- package/dist/{components-CutWiB7Q.js.map → components-OIbu7HLW.js.map} +1 -1
- package/dist/index-CC0EuWhe.js +108 -0
- package/dist/index-CC0EuWhe.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Form/hooks/useForm.d.ts +0 -10
- package/dist/components/Form/hooks/useForm.js +0 -82
- package/dist/components/Form/hooks/useForm.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})\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'],\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 expose({\r\n clearSelection,\r\n getSelectionRows,\r\n toggleRowSelection,\r\n toggleAllSelection,\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\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 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}></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 <span class=\"cell-numbercolumn\">{number2string(row[column.property], thousandsSeparator, precision, percentage)}</span>\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 } = 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\r\n if (sourceFormat && format) {\r\n return (\r\n <div>\r\n {row[column.property] instanceof Date || dayjs.isDayjs(row[column.property])\r\n ? formatDate(row[column.property], format)\r\n : formatDate(row[column.property], sourceFormat, format)}\r\n </div>\r\n )\r\n } else {\r\n return <div>{row[column.property]}</div>\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 ref={elTableRef} data={data} height={'100%'} style={{ width: '100%' }} onSelection-change={(rows) => emit('selectionChange', rows)}>\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 ></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('primary'),\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 = 'primary' } = 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","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","columns","useColumns","clearSelection","value","getSelectionRows","toggleRowSelection","args","toggleAllSelection","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","Date","dayjs","isDayjs","formatDate","renderSingleSelectColumn","code","cellValue","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","ElPagination","e","total","pagetableColumnIndexProps","pagetableColumnStringProps","stringType","someType","Boolean","String","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","event","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","withInstall","Pagetable","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;AAClC,IAIeE,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOX,GAAgB;AAAA,EACvBY,OAAO,CAAC,iBAAiB;AAAA,EACzBC,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,UAAMC,IAAaC,KAEbC,IAAQC,EAAS,OACW,CAAA,EAGjC,GAEKC,IAAUC,GAAWT,CAAK;AAkBhCG,WAAAA,EAAO;AAAA,MACLO,gBAjBqBA,MAAM;AAC3BN,QAAAA,EAAWO,MAAMD;;MAiBjBE,kBAduBA,MAChBR,EAAWO,MAAMC;MAcxBC,oBAXyBA,IAAIC,MACtBV,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WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCdY6F,KAA0BA,OAAO;AAAA,EAC5CrE,MAAMqD,EAAY;AAAA,EAClBpD,WAAWoD,EAAyC;AAAA,EACpDrF,MAAMqF,EAAY;AAAA,EAClBnD,OAAOoD,EAA2B,CAACC,SAASC,MAAM,CAAC;AAAA,EACnDrD,OAAOmD,EAAoB,CAACC,SAASC,MAAM,CAAC;AAC9C,IAIezF,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOmG,GAAyB;AAAA,EAChChG,OAAOnB;AAAAA,EAGPkB,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCbckB,KAAA4E,EAcbC,IAAW;AAAA,EACX,sBAAAC;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/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})\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'],\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 expose({\r\n clearSelection,\r\n getSelectionRows,\r\n toggleRowSelection,\r\n toggleAllSelection,\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\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 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 >\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 ></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","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","columns","useColumns","clearSelection","value","getSelectionRows","toggleRowSelection","args","toggleAllSelection","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","ElPagination","e","total","pagetableColumnIndexProps","pagetableColumnStringProps","stringType","someType","Boolean","String","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","event","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","withInstall","Pagetable","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;AACnC,IAIeG,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOZ,GAAgB;AAAA,EACvBa,OAAO,CAAC,mBAAmB,oBAAoB,mBAAmB;AAAA,EAClEC,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAA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,169 +1,66 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
var t = String(r).split(".");
|
11
|
-
return t[0] = t[0].replace(new RegExp("(\\d)(?=(\\d{" + e + "})+$)", "ig"), "$1,"), t.join(".");
|
12
|
-
}
|
13
|
-
v.comma = j;
|
14
|
-
var d = {}, c = {};
|
15
|
-
Object.defineProperty(c, "__esModule", { value: !0 });
|
16
|
-
c.precise = void 0;
|
17
|
-
function N(r, e) {
|
18
|
-
return e === void 0 && (e = 12), parseFloat(r.toPrecision(e));
|
19
|
-
}
|
20
|
-
c.precise = N;
|
21
|
-
Object.defineProperty(d, "__esModule", { value: !0 });
|
22
|
-
d.toFixed = void 0;
|
23
|
-
var y = c;
|
24
|
-
function O(r, e) {
|
25
|
-
e === void 0 && (e = 2);
|
26
|
-
var t = parseFloat("" + r), n = Math.pow(10, e);
|
27
|
-
return t = y.precise(t * n + 0.5), t = parseInt("" + t, 10) / n, y.precise(t).toFixed(e);
|
28
|
-
}
|
29
|
-
d.toFixed = O;
|
30
|
-
var _ = {};
|
31
|
-
Object.defineProperty(_, "__esModule", { value: !0 });
|
32
|
-
_.capital = void 0;
|
33
|
-
function E(r) {
|
34
|
-
var e = String(r);
|
35
|
-
if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(e))
|
36
|
-
return "";
|
37
|
-
var t = "千百拾亿千百拾万千百拾元角分", n = "";
|
38
|
-
e += "00";
|
39
|
-
var i = e.indexOf(".");
|
40
|
-
i >= 0 && (e = e.substring(0, i) + e.substr(i + 1, 2)), t = t.substr(t.length - e.length);
|
41
|
-
for (var o = 0; o < e.length; o++)
|
42
|
-
n += "零壹贰叁肆伍陆柒捌玖".charAt(Number(e.charAt(o))) + t.charAt(o);
|
43
|
-
return n.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
|
44
|
-
}
|
45
|
-
_.capital = E;
|
46
|
-
var m = {}, l = {}, f = {};
|
47
|
-
Object.defineProperty(f, "__esModule", { value: !0 });
|
48
|
-
f.MIN_SAFETY_NUMBER = f.MAX_SAFETY_NUMBER = void 0;
|
49
|
-
f.MAX_SAFETY_NUMBER = Math.pow(2, 53) - 1;
|
50
|
-
f.MIN_SAFETY_NUMBER = -1 * Math.pow(2, 53) + 1;
|
51
|
-
Object.defineProperty(l, "__esModule", { value: !0 });
|
52
|
-
l.isNumber = void 0;
|
53
|
-
var h = f;
|
54
|
-
function A(r, e) {
|
55
|
-
e === void 0 && (e = !1);
|
56
|
-
var t = typeof r == "number" && isFinite(r);
|
57
|
-
return t && e ? r <= h.MAX_SAFETY_NUMBER && r >= h.MIN_SAFETY_NUMBER : t;
|
58
|
-
}
|
59
|
-
l.isNumber = A;
|
60
|
-
Object.defineProperty(m, "__esModule", { value: !0 });
|
61
|
-
m.percentage = void 0;
|
62
|
-
var P = l, I = d;
|
63
|
-
function S(r, e) {
|
64
|
-
e === void 0 && (e = 2);
|
65
|
-
var t = Number(r);
|
66
|
-
return P.isNumber(t) ? I.toFixed(t * 100, e) + "%" : r;
|
67
|
-
}
|
68
|
-
m.percentage = S;
|
69
|
-
var g = {};
|
70
|
-
Object.defineProperty(g, "__esModule", { value: !0 });
|
71
|
-
g.idxList = void 0;
|
72
|
-
function B(r, e) {
|
73
|
-
return e === void 0 && (e = 0), Array.from(Array(r), function(t, n) {
|
74
|
-
return n + e;
|
75
|
-
});
|
76
|
-
}
|
77
|
-
g.idxList = B;
|
78
|
-
var b = {};
|
79
|
-
Object.defineProperty(b, "__esModule", { value: !0 });
|
80
|
-
b.randomInt = void 0;
|
81
|
-
function R(r, e) {
|
82
|
-
return e === void 0 && (e = r), r = Math.round(r + 0.4999999), e = Math.round(e - 0.5), r < 0 || r > e ? -1 : Math.round((e - r) * Math.random()) + r;
|
83
|
-
}
|
84
|
-
b.randomInt = R;
|
85
|
-
var p = {};
|
86
|
-
Object.defineProperty(p, "__esModule", { value: !0 });
|
87
|
-
p.sum = void 0;
|
88
|
-
function T() {
|
89
|
-
for (var r = [], e = 0; e < arguments.length; e++)
|
90
|
-
r[e] = arguments[e];
|
91
|
-
return r.reduce(function(t, n) {
|
92
|
-
return t += n;
|
93
|
-
}, 0);
|
94
|
-
}
|
95
|
-
p.sum = T;
|
96
|
-
(function(r) {
|
97
|
-
var e = s && s.__createBinding || (Object.create ? function(n, i, o, a) {
|
98
|
-
a === void 0 && (a = o), Object.defineProperty(n, a, { enumerable: !0, get: function() {
|
99
|
-
return i[o];
|
100
|
-
} });
|
101
|
-
} : function(n, i, o, a) {
|
102
|
-
a === void 0 && (a = o), n[a] = i[o];
|
103
|
-
}), t = s && s.__exportStar || function(n, i) {
|
104
|
-
for (var o in n) o !== "default" && !i.hasOwnProperty(o) && e(i, n, o);
|
105
|
-
};
|
106
|
-
Object.defineProperty(r, "__esModule", { value: !0 }), t(v, r), t(d, r), t(_, r), t(m, r), t(g, r), t(b, r), t(c, r), t(l, r), t(p, r);
|
107
|
-
})($);
|
108
|
-
const D = (r, e, t) => {
|
109
|
-
if (!r)
|
110
|
-
return r;
|
111
|
-
if (r instanceof Date && typeof e == "string") {
|
112
|
-
const n = r, i = e;
|
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;
|
113
10
|
if (!n)
|
114
|
-
throw new
|
115
|
-
if (!
|
116
|
-
throw new
|
117
|
-
return
|
118
|
-
} else if (typeof
|
119
|
-
const n =
|
120
|
-
if (!n || !
|
121
|
-
throw new
|
122
|
-
if (
|
123
|
-
return
|
124
|
-
throw new
|
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}]不匹配。`);
|
125
22
|
} else
|
126
|
-
throw new
|
23
|
+
throw new i(`入参数量[${arguments.length}]不正确。`);
|
127
24
|
};
|
128
|
-
function
|
129
|
-
return new
|
25
|
+
function u(t, r) {
|
26
|
+
return new a(t).toFixed(r, 4);
|
130
27
|
}
|
131
|
-
function
|
132
|
-
if (
|
28
|
+
function y(t, r, o, n) {
|
29
|
+
if (t == null)
|
133
30
|
return "";
|
134
|
-
if (typeof
|
135
|
-
let
|
136
|
-
return
|
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;
|
137
34
|
} else
|
138
|
-
throw new
|
35
|
+
throw new i(`num [${t}]:[${typeof t}] is neither a number nor null.`);
|
139
36
|
}
|
140
|
-
const
|
141
|
-
if (!e)
|
142
|
-
return null;
|
37
|
+
const v = (t, r) => {
|
143
38
|
if (!r)
|
144
|
-
return
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
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;
|
149
46
|
}
|
150
|
-
return
|
151
|
-
},
|
152
|
-
if (!
|
47
|
+
return r + "(?)";
|
48
|
+
}, b = (t, r) => {
|
49
|
+
if (!r)
|
153
50
|
return null;
|
154
|
-
let
|
155
|
-
const n =
|
156
|
-
return n.forEach((
|
157
|
-
const
|
158
|
-
if (
|
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;
|
159
56
|
});
|
160
|
-
|
161
|
-
}),
|
57
|
+
l == -1 ? o += `${e}(?)` : o += t[l].content, f != n.length - 1 && (o += ",");
|
58
|
+
}), o;
|
162
59
|
};
|
163
60
|
export {
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
61
|
+
$ as formatDate,
|
62
|
+
b as getMultiCodeContent,
|
63
|
+
v as getSingleCodeContent,
|
64
|
+
y as number2string
|
168
65
|
};
|
169
66
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/number-magic/lib/comma.js","../../../../node_modules/number-magic/lib/precise.js","../../../../node_modules/number-magic/lib/toFixed.js","../../../../node_modules/number-magic/lib/capital.js","../../../../node_modules/number-magic/lib/utils/constants.js","../../../../node_modules/number-magic/lib/isNumber.js","../../../../node_modules/number-magic/lib/percentage.js","../../../../node_modules/number-magic/lib/idxList.js","../../../../node_modules/number-magic/lib/randomInt.js","../../../../node_modules/number-magic/lib/sum.js","../../../../node_modules/number-magic/lib/index.js","../../../../src/components/Pagetable/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.comma = void 0;\nfunction comma(source, length) {\n if (length === void 0) { length = 3; }\n var arr = String(source).split('.');\n arr[0] = arr[0].replace(new RegExp('(\\\\d)(?=(\\\\d{' + length + '})+$)', 'ig'), '$1,');\n return arr.join('.');\n}\nexports.comma = comma;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.precise = void 0;\nfunction precise(source, precision) {\n if (precision === void 0) { precision = 12; }\n return parseFloat(source.toPrecision(precision));\n}\nexports.precise = precise;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toFixed = void 0;\nvar precise_1 = require(\"./precise\");\nfunction toFixed(source, digits) {\n if (digits === void 0) { digits = 2; }\n var num = parseFloat(\"\" + source);\n var times = Math.pow(10, digits);\n num = precise_1.precise(num * times + 0.5);\n num = parseInt(\"\" + num, 10) / times;\n return precise_1.precise(num).toFixed(digits);\n}\nexports.toFixed = toFixed;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.capital = void 0;\nfunction capital(source) {\n var numbStr = String(source);\n if (!/^(0|[1-9]\\d*)(\\.\\d+)?$/.test(numbStr))\n return '';\n var unit = '千百拾亿千百拾万千百拾元角分';\n var str = '';\n numbStr += '00';\n var p = numbStr.indexOf('.');\n if (p >= 0)\n numbStr = numbStr.substring(0, p) + numbStr.substr(p + 1, 2);\n unit = unit.substr(unit.length - numbStr.length);\n for (var i = 0; i < numbStr.length; i++) {\n str += '零壹贰叁肆伍陆柒捌玖'.charAt(Number(numbStr.charAt(i))) + unit.charAt(i);\n }\n return str\n .replace(/零(千|百|拾|角)/g, '零')\n .replace(/(零)+/g, '零')\n .replace(/零(万|亿|元)/g, '$1')\n .replace(/(亿)万|壹(拾)/g, '$1$2')\n .replace(/^元零?|零分/g, '')\n .replace(/元$/g, '元整');\n}\nexports.capital = capital;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MIN_SAFETY_NUMBER = exports.MAX_SAFETY_NUMBER = void 0;\nexports.MAX_SAFETY_NUMBER = Math.pow(2, 53) - 1;\nexports.MIN_SAFETY_NUMBER = -1 * Math.pow(2, 53) + 1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isNumber = void 0;\nvar constants_1 = require(\"./utils/constants\");\nfunction isNumber(source, checkSafetyNumber) {\n if (checkSafetyNumber === void 0) { checkSafetyNumber = false; }\n var isNumb = typeof source === 'number' && isFinite(source);\n if (isNumb && checkSafetyNumber)\n return source <= constants_1.MAX_SAFETY_NUMBER && source >= constants_1.MIN_SAFETY_NUMBER;\n return isNumb;\n}\nexports.isNumber = isNumber;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.percentage = void 0;\nvar isNumber_1 = require(\"./isNumber\");\nvar toFixed_1 = require(\"./toFixed\");\nfunction percentage(source, digits) {\n if (digits === void 0) { digits = 2; }\n var numb = Number(source);\n if (!isNumber_1.isNumber(numb))\n return source;\n return toFixed_1.toFixed(numb * 100, digits) + '%';\n}\nexports.percentage = percentage;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.idxList = void 0;\nfunction idxList(len, delta) {\n if (delta === void 0) { delta = 0; }\n return Array.from(Array(len), function (_v, k) { return k + delta; });\n}\nexports.idxList = idxList;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomInt = void 0;\nfunction randomInt(min, max) {\n if (max === void 0) { max = min; }\n min = Math.round(min + 0.4999999);\n max = Math.round(max - 0.5);\n if (min < 0 || min > max)\n return -1;\n return Math.round((max - min) * Math.random()) + min;\n}\nexports.randomInt = randomInt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sum = void 0;\nfunction sum() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return args.reduce(function (finalValue, current) {\n return (finalValue += current);\n }, 0);\n}\nexports.sum = sum;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./comma\"), exports);\n__exportStar(require(\"./toFixed\"), exports);\n__exportStar(require(\"./capital\"), exports);\n__exportStar(require(\"./percentage\"), exports);\n__exportStar(require(\"./idxList\"), exports);\n__exportStar(require(\"./randomInt\"), exports);\n__exportStar(require(\"./precise\"), exports);\n__exportStar(require(\"./isNumber\"), exports);\n__exportStar(require(\"./sum\"), exports);\n","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 = String(num)\r\n\r\n // 基础:先实现精度化\r\n if (precisionValue >= 0) {\r\n result = round(num, precisionValue)\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_1","comma","source","length","arr","precise_1","precise","precision","toFixed_1","require$$0","toFixed","digits","num","times","capital_1","capital","numbStr","unit","str","p","i","constants","isNumber_1","constants_1","isNumber","checkSafetyNumber","isNumb","percentage_1","require$$1","percentage","numb","idxList_1","idxList","len","delta","_v","k","randomInt_1","randomInt","min","max","sum_1","sum","args","_i","finalValue","current","__createBinding","this","o","m","k2","__exportStar","exports","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","formatDate","p1","p2","p3","value","format","OrionError","dayjs","sourceFormat","targetFormat","round","how","Decimal","number2string","thousandsSeparatorValue","precisionValue","percentageValue","result","getSingleCodeContent","options","curValue","content","getMultiCodeContent","data","selectValue","valueIndex","index","item"],"mappings":";;;;;AACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC/CA,EAAA,QAAG;AAChB,SAASC,EAAMC,GAAQC,GAAQ;AAC3B,EAAIA,MAAW,WAAUA,IAAS;AAClC,MAAIC,IAAM,OAAOF,CAAM,EAAE,MAAM,GAAG;AAClC,SAAAE,EAAI,CAAC,IAAIA,EAAI,CAAC,EAAE,QAAQ,IAAI,OAAO,kBAAkBD,IAAS,SAAS,IAAI,GAAG,KAAK,GAC5EC,EAAI,KAAK,GAAG;AACvB;AACAJ,EAAA,QAAgBC;;ACRhB,OAAO,eAAeI,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,SAASC,EAAQJ,GAAQK,GAAW;AAChC,SAAIA,MAAc,WAAUA,IAAY,KACjC,WAAWL,EAAO,YAAYK,CAAS,CAAC;AACnD;AACAF,EAAA,UAAkBC;ACNlB,OAAO,eAAeE,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,IAAIH,IAAYI;AAChB,SAASC,EAAQR,GAAQS,GAAQ;AAC7B,EAAIA,MAAW,WAAUA,IAAS;AAClC,MAAIC,IAAM,WAAW,KAAKV,CAAM,GAC5BW,IAAQ,KAAK,IAAI,IAAIF,CAAM;AAC/B,SAAAC,IAAMP,EAAU,QAAQO,IAAMC,IAAQ,GAAG,GACzCD,IAAM,SAAS,KAAKA,GAAK,EAAE,IAAIC,GACxBR,EAAU,QAAQO,CAAG,EAAE,Q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AGA,IAAI4D,EAAQ,QAAQ5D,KAAK;AACvC,UAAM,EAAE,OAAA6C,GAAO,SAAAiB,EAAQ,IAAIF,EAAQ5D,CAAC;AACpC,QAAI6C,KAASgB;AACJ,aAAAC;AAAA,EAEX;AAEA,SAAOD,IAAW;AACpB,GAEaE,IAAsB,CACjCH,GAIAC,MACG;AACH,MAAI,CAACA;AACI,WAAA;AAGT,MAAIC,IAAU;AAER,QAAAE,IAAOH,EAAS,MAAM,GAAG;AAC1B,SAAAG,EAAA,QAAQ,CAACC,GAAaC,MAAe;AACxC,UAAMC,IAAQP,EAAQ,UAAU,CAACQ,MAAS;AACpC,UAAAA,EAAK,SAASH,EAAoB,QAAA;AAAA,IAAA,CACvC;AAED,IAAIE,KAAS,KACXL,KAAW,GAAGG,CAAW,QAEdH,KAAAF,EAAQO,CAAK,EAAE,SAGxBD,KAAcF,EAAK,SAAS,MACnBF,KAAA;AAAA,EACb,CACD,GAEMA;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
|
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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D,KAAcF,EAAK,SAAS,MACnBF,KAAA;AAAA,EACb,CACD,GAEMA;AACT;"}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
2
|
+
export declare const querytableProps: () => {
|
3
|
+
data: {
|
4
|
+
type: PropType<any[]>;
|
5
|
+
default: any[];
|
6
|
+
};
|
7
|
+
showRowNumber: {
|
8
|
+
type: BooleanConstructor;
|
9
|
+
default: boolean;
|
10
|
+
};
|
11
|
+
selectionMode: {
|
12
|
+
type: BooleanConstructor;
|
13
|
+
default: boolean;
|
14
|
+
};
|
15
|
+
currentRowMode: {
|
16
|
+
type: BooleanConstructor;
|
17
|
+
default: boolean;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export type QuerytableProps = Partial<ExtractPropTypes<ReturnType<typeof querytableProps>>>;
|
21
|
+
declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
|
22
|
+
data: {
|
23
|
+
type: PropType<any[]>;
|
24
|
+
default: any[];
|
25
|
+
};
|
26
|
+
showRowNumber: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
selectionMode: {
|
31
|
+
type: BooleanConstructor;
|
32
|
+
default: boolean;
|
33
|
+
};
|
34
|
+
currentRowMode: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("selectionChange" | "currentRowChange")[], "selectionChange" | "currentRowChange", import('vue').PublicProps, Readonly<ExtractPropTypes<{
|
39
|
+
data: {
|
40
|
+
type: PropType<any[]>;
|
41
|
+
default: any[];
|
42
|
+
};
|
43
|
+
showRowNumber: {
|
44
|
+
type: BooleanConstructor;
|
45
|
+
default: boolean;
|
46
|
+
};
|
47
|
+
selectionMode: {
|
48
|
+
type: BooleanConstructor;
|
49
|
+
default: boolean;
|
50
|
+
};
|
51
|
+
currentRowMode: {
|
52
|
+
type: BooleanConstructor;
|
53
|
+
default: boolean;
|
54
|
+
};
|
55
|
+
}>> & Readonly<{
|
56
|
+
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
57
|
+
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
58
|
+
}>, {
|
59
|
+
data: any[];
|
60
|
+
showRowNumber: boolean;
|
61
|
+
selectionMode: boolean;
|
62
|
+
currentRowMode: boolean;
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
64
|
+
export default _default;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
2
|
+
export declare const querytableCellButtonProps: () => {
|
3
|
+
type: {
|
4
|
+
type: PropType<string>;
|
5
|
+
default: string;
|
6
|
+
};
|
7
|
+
};
|
8
|
+
export type QuerytableCellButtonProps = Partial<ExtractPropTypes<ReturnType<typeof querytableCellButtonProps>>>;
|
9
|
+
declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
|
10
|
+
type: {
|
11
|
+
type: PropType<string>;
|
12
|
+
default: string;
|
13
|
+
};
|
14
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<ExtractPropTypes<{
|
15
|
+
type: {
|
16
|
+
type: PropType<string>;
|
17
|
+
default: string;
|
18
|
+
};
|
19
|
+
}>> & Readonly<{
|
20
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
21
|
+
}>, {
|
22
|
+
type: string;
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
24
|
+
export default _default;
|