orion-design 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/index.js +30 -14
- package/dist/Throne/index.js.map +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
- package/dist/components/Button/index.js +40 -33
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +122 -89
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.js +2 -2
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
- package/dist/components/Form/LovInput/index.js +4 -4
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
- package/dist/components/Form/hooks/index.js +128 -66
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +836 -656
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +30 -18
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/index.js +179 -105
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/index.js +111 -56
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.js +4 -3
- package/dist/components/Modal/types.js.map +1 -1
- package/dist/components/Modal/useModal.js +5 -5
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/hooks/useColumns.js +88 -80
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.js +687 -542
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +92 -54
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +82 -74
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +579 -469
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +92 -54
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +100 -74
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Tabs/constants.js +2 -2
- package/dist/components/Tabs/constants.js.map +1 -1
- package/dist/components/Tabs/index.js +603 -358
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-bar.js +6 -6
- package/dist/components/Tabs/tab-bar.js.map +1 -1
- package/dist/components/Tabs/tab-pane.js +3 -3
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/_constants/aria.js +2 -2
- package/dist/components/_constants/aria.js.map +1 -1
- package/dist/components/_constants/event.js +6 -4
- package/dist/components/_constants/event.js.map +1 -1
- package/dist/components/_constants/index.js +6 -6
- package/dist/components/_hooks/index.js +7 -7
- package/dist/components/_hooks/use-namespace/index.js +74 -39
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +29 -19
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +9 -5
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +6 -6
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/classNames.js +22 -17
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +74 -39
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +9 -8
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +14 -7
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/index.js +36 -36
- package/dist/components/_util/dom/position.js +49 -25
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +103 -61
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +65 -50
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +8 -4
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +12 -11
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/functions.js +3 -3
- package/dist/components/_util/i18n.js +2 -2
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +137 -137
- package/dist/components/_util/isValid.js +4 -2
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +18 -14
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +46 -20
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +18 -10
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +5 -4
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +4 -3
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +9 -8
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +16 -10
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +41 -38
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +41 -22
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js +2 -2
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/util.js +85 -43
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +27 -15
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +29 -25
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/index.js +41 -41
- package/dist/components/_util/vue/install.js +35 -18
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/index.js +6 -6
- package/dist/components/_util/vue/props/runtime.js +46 -30
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +12 -6
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +5 -3
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +5 -4
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +100 -54
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +231 -220
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +38 -35
- package/dist/components/index.js.map +1 -1
- package/dist/components-B3d9m_tn.js +27 -0
- package/dist/components-B3d9m_tn.js.map +1 -0
- package/dist/error/OrionError.js +8 -4
- package/dist/error/OrionError.js.map +1 -1
- package/dist/functions-BeMkokbY.js +63 -0
- package/dist/functions-BeMkokbY.js.map +1 -0
- package/dist/index-BOKLZnqH.js +54 -0
- package/dist/index-BOKLZnqH.js.map +1 -0
- package/dist/index-D1m0KTpK.js +69 -0
- package/dist/index-D1m0KTpK.js.map +1 -0
- package/dist/index-DR5ZP7mD.js +160 -0
- package/dist/index-DR5ZP7mD.js.map +1 -0
- package/dist/index-DkwIULcN.js +200 -0
- package/dist/index-DkwIULcN.js.map +1 -0
- package/dist/index.css +797 -1
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +101 -43
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +200 -108
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +17 -14
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +16 -13
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +17 -14
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +47 -22
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +40 -25
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +16 -10
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +305 -201
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +11 -5
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +11 -5
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +9 -4
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +11 -5
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +48 -33
- package/dist/utils/DateUtil.js.map +1 -1
- package/dist/utils/NumberUtil.js +6 -6
- package/dist/utils/NumberUtil.js.map +1 -1
- package/dist/utils/cloneDeep.js +2 -2
- package/dist/utils/delay.js +3 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/functions.js +3 -3
- package/dist/utils/index.js +12 -12
- package/dist/utils/md5.js +191 -93
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +35 -25
- package/dist/utils/uuid.js.map +1 -1
- package/dist/version/index.js +2 -2
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +2 -2
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/LovTable/LovQuerytable.vue","../../../src/components/LovTable/LovPagetable.vue","../../../src/components/LovTable/index.ts"],"sourcesContent":["<template>\r\n <querytable ref=\"table\" :data=\"data\" @row-click=\"onRowClick\" current-row-mode @current-row-change=\"handleCurrentRowChange\" size=\"small\">\r\n <slot></slot>\r\n </querytable>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { ref, useTemplateRef, watch } from 'vue'\r\nimport Querytable from '../Querytable'\r\nimport { useLov } from '../Form'\r\nimport { findIndex } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OLovQuerytable', inheritAttrs: true })\r\n\r\nconst { data } = defineProps<{ data: any[] }>()\r\nconst tableRef = useTemplateRef('table')\r\nconst currentRowIndex = ref()\r\nconst currentRowData = ref()\r\n\r\nconst lov = useLov()\r\nlov?.registerKeydownHandler((code) => {\r\n if (code == 'ArrowUp') {\r\n let nextRow: any\r\n if (currentRowIndex.value == 0) {\r\n nextRow = data[data.length - 1]\r\n } else {\r\n nextRow = data[currentRowIndex.value - 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'ArrowDown') {\r\n let nextRow: any\r\n if (currentRowIndex.value == data.length - 1) {\r\n nextRow = data[0]\r\n } else {\r\n nextRow = data[currentRowIndex.value + 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'Enter') {\r\n currentRowData.value && lov?.backfill(currentRowData.value)\r\n }\r\n})\r\n\r\nconst scrollToRow = (index: number) => {\r\n const $table = tableRef.value?.$el\r\n const $row = $table.querySelectorAll('.el-table__row')[index]\r\n $row.scrollIntoViewIfNeeded()\r\n}\r\n\r\nconst onRowClick = (row: any) => {\r\n lov?.backfill(row)\r\n}\r\n\r\nconst handleCurrentRowChange = (row: any) => {\r\n const index = findIndex(data, row)\r\n if (index == -1) {\r\n currentRowIndex.value = 0\r\n currentRowData.value = data[0]\r\n } else {\r\n currentRowIndex.value = index\r\n currentRowData.value = row\r\n }\r\n}\r\n\r\nwatch(\r\n () => data,\r\n () => {\r\n if (data.length > 0) {\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(data[0])\r\n }\r\n }\r\n)\r\n</script>\r\n","<template>\r\n <pagetable\r\n ref=\"table\"\r\n :data=\"data\"\r\n @row-click=\"onRowClick\"\r\n current-row-mode\r\n @current-row-change=\"handleCurrentRowChange\"\r\n :pagination=\"pagination\"\r\n @update:pagination=\"onUpdatePagination\"\r\n size=\"small\"\r\n >\r\n <slot></slot>\r\n </pagetable>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport Pagetable from '../Pagetable'\r\nimport { useLov } from '../Form'\r\nimport { ref, useTemplateRef, watch } from 'vue'\r\nimport { findIndex } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OLovPagetable', inheritAttrs: true })\r\n\r\nconst { data, pagination } = defineProps<{\r\n data: any[]\r\n pagination: {\r\n currentPage?: number\r\n pageSize?: number\r\n total?: number\r\n }\r\n}>()\r\n\r\nconst emits = defineEmits(['update:pagination'])\r\nconst onUpdatePagination = (data: any) => {\r\n emits('update:pagination', data)\r\n}\r\n\r\nconst tableRef = useTemplateRef('table')\r\nconst currentRowIndex = ref()\r\nconst currentRowData = ref()\r\n\r\nconst lov = useLov()\r\nlov?.registerKeydownHandler((code) => {\r\n if (code == 'ArrowUp') {\r\n let nextRow: any\r\n if (currentRowIndex.value == 0) {\r\n nextRow = data[data.length - 1]\r\n } else {\r\n nextRow = data[currentRowIndex.value - 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'ArrowDown') {\r\n let nextRow: any\r\n if (currentRowIndex.value == data.length - 1) {\r\n nextRow = data[0]\r\n } else {\r\n nextRow = data[currentRowIndex.value + 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'Enter') {\r\n currentRowData.value && lov?.backfill(currentRowData.value)\r\n } else if (code == 'ArrowLeft') {\r\n const currentPage = pagination?.currentPage\r\n const pageSize = pagination?.pageSize\r\n const total = pagination?.total\r\n if (!currentPage || !pageSize || !total) {\r\n return\r\n }\r\n if (currentPage > 1) {\r\n emits('update:pagination', {\r\n ...pagination,\r\n currentPage: currentPage - 1,\r\n })\r\n }\r\n } else if (code == 'ArrowRight') {\r\n const currentPage = pagination?.currentPage\r\n const pageSize = pagination?.pageSize\r\n const total = pagination?.total\r\n if (!currentPage || !pageSize || !total) {\r\n return\r\n }\r\n const totalPage = Math.ceil(total / pageSize)\r\n if (currentPage < totalPage) {\r\n emits('update:pagination', {\r\n ...pagination,\r\n currentPage: currentPage + 1,\r\n })\r\n }\r\n }\r\n})\r\n\r\nconst scrollToRow = (index: number) => {\r\n const $table = tableRef.value?.$el\r\n const $row = $table.querySelectorAll('.el-table__row')[index]\r\n $row.scrollIntoViewIfNeeded()\r\n}\r\n\r\nconst onRowClick = (row: any) => {\r\n lov?.backfill(row)\r\n}\r\n\r\nconst handleCurrentRowChange = (row: any) => {\r\n const index = findIndex(data, row)\r\n if (index == -1) {\r\n currentRowIndex.value = 0\r\n currentRowData.value = data[0]\r\n } else {\r\n currentRowIndex.value = index\r\n currentRowData.value = row\r\n }\r\n}\r\n\r\nwatch(\r\n () => data,\r\n () => {\r\n if (data.length > 0) {\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(data[0])\r\n }\r\n }\r\n)\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport LovQuerytable from './LovQuerytable.vue'\r\nimport LovPagetable from './LovPagetable.vue'\r\n\r\nexport default withInstall(\r\n {},\r\n {\r\n LovQuerytable,\r\n LovPagetable,\r\n }\r\n)\r\n"],"names":["
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/LovTable/LovQuerytable.vue","../../../src/components/LovTable/LovPagetable.vue","../../../src/components/LovTable/index.ts"],"sourcesContent":["<template>\r\n <querytable ref=\"table\" :data=\"data\" @row-click=\"onRowClick\" current-row-mode @current-row-change=\"handleCurrentRowChange\" size=\"small\">\r\n <slot></slot>\r\n </querytable>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { ref, useTemplateRef, watch } from 'vue'\r\nimport Querytable from '../Querytable'\r\nimport { useLov } from '../Form'\r\nimport { findIndex } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OLovQuerytable', inheritAttrs: true })\r\n\r\nconst { data } = defineProps<{ data: any[] }>()\r\nconst tableRef = useTemplateRef('table')\r\nconst currentRowIndex = ref()\r\nconst currentRowData = ref()\r\n\r\nconst lov = useLov()\r\nlov?.registerKeydownHandler((code) => {\r\n if (code == 'ArrowUp') {\r\n let nextRow: any\r\n if (currentRowIndex.value == 0) {\r\n nextRow = data[data.length - 1]\r\n } else {\r\n nextRow = data[currentRowIndex.value - 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'ArrowDown') {\r\n let nextRow: any\r\n if (currentRowIndex.value == data.length - 1) {\r\n nextRow = data[0]\r\n } else {\r\n nextRow = data[currentRowIndex.value + 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'Enter') {\r\n currentRowData.value && lov?.backfill(currentRowData.value)\r\n }\r\n})\r\n\r\nconst scrollToRow = (index: number) => {\r\n const $table = tableRef.value?.$el\r\n const $row = $table.querySelectorAll('.el-table__row')[index]\r\n $row.scrollIntoViewIfNeeded()\r\n}\r\n\r\nconst onRowClick = (row: any) => {\r\n lov?.backfill(row)\r\n}\r\n\r\nconst handleCurrentRowChange = (row: any) => {\r\n const index = findIndex(data, row)\r\n if (index == -1) {\r\n currentRowIndex.value = 0\r\n currentRowData.value = data[0]\r\n } else {\r\n currentRowIndex.value = index\r\n currentRowData.value = row\r\n }\r\n}\r\n\r\nwatch(\r\n () => data,\r\n () => {\r\n if (data.length > 0) {\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(data[0])\r\n }\r\n }\r\n)\r\n</script>\r\n","<template>\r\n <pagetable\r\n ref=\"table\"\r\n :data=\"data\"\r\n @row-click=\"onRowClick\"\r\n current-row-mode\r\n @current-row-change=\"handleCurrentRowChange\"\r\n :pagination=\"pagination\"\r\n @update:pagination=\"onUpdatePagination\"\r\n size=\"small\"\r\n >\r\n <slot></slot>\r\n </pagetable>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport Pagetable from '../Pagetable'\r\nimport { useLov } from '../Form'\r\nimport { ref, useTemplateRef, watch } from 'vue'\r\nimport { findIndex } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OLovPagetable', inheritAttrs: true })\r\n\r\nconst { data, pagination } = defineProps<{\r\n data: any[]\r\n pagination: {\r\n currentPage?: number\r\n pageSize?: number\r\n total?: number\r\n }\r\n}>()\r\n\r\nconst emits = defineEmits(['update:pagination'])\r\nconst onUpdatePagination = (data: any) => {\r\n emits('update:pagination', data)\r\n}\r\n\r\nconst tableRef = useTemplateRef('table')\r\nconst currentRowIndex = ref()\r\nconst currentRowData = ref()\r\n\r\nconst lov = useLov()\r\nlov?.registerKeydownHandler((code) => {\r\n if (code == 'ArrowUp') {\r\n let nextRow: any\r\n if (currentRowIndex.value == 0) {\r\n nextRow = data[data.length - 1]\r\n } else {\r\n nextRow = data[currentRowIndex.value - 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'ArrowDown') {\r\n let nextRow: any\r\n if (currentRowIndex.value == data.length - 1) {\r\n nextRow = data[0]\r\n } else {\r\n nextRow = data[currentRowIndex.value + 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'Enter') {\r\n currentRowData.value && lov?.backfill(currentRowData.value)\r\n } else if (code == 'ArrowLeft') {\r\n const currentPage = pagination?.currentPage\r\n const pageSize = pagination?.pageSize\r\n const total = pagination?.total\r\n if (!currentPage || !pageSize || !total) {\r\n return\r\n }\r\n if (currentPage > 1) {\r\n emits('update:pagination', {\r\n ...pagination,\r\n currentPage: currentPage - 1,\r\n })\r\n }\r\n } else if (code == 'ArrowRight') {\r\n const currentPage = pagination?.currentPage\r\n const pageSize = pagination?.pageSize\r\n const total = pagination?.total\r\n if (!currentPage || !pageSize || !total) {\r\n return\r\n }\r\n const totalPage = Math.ceil(total / pageSize)\r\n if (currentPage < totalPage) {\r\n emits('update:pagination', {\r\n ...pagination,\r\n currentPage: currentPage + 1,\r\n })\r\n }\r\n }\r\n})\r\n\r\nconst scrollToRow = (index: number) => {\r\n const $table = tableRef.value?.$el\r\n const $row = $table.querySelectorAll('.el-table__row')[index]\r\n $row.scrollIntoViewIfNeeded()\r\n}\r\n\r\nconst onRowClick = (row: any) => {\r\n lov?.backfill(row)\r\n}\r\n\r\nconst handleCurrentRowChange = (row: any) => {\r\n const index = findIndex(data, row)\r\n if (index == -1) {\r\n currentRowIndex.value = 0\r\n currentRowData.value = data[0]\r\n } else {\r\n currentRowIndex.value = index\r\n currentRowData.value = row\r\n }\r\n}\r\n\r\nwatch(\r\n () => data,\r\n () => {\r\n if (data.length > 0) {\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(data[0])\r\n }\r\n }\r\n)\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport LovQuerytable from './LovQuerytable.vue'\r\nimport LovPagetable from './LovPagetable.vue'\r\n\r\nexport default withInstall(\r\n {},\r\n {\r\n LovQuerytable,\r\n LovPagetable,\r\n }\r\n)\r\n"],"names":["index","LovQuerytable","LovPagetable"],"mappings":";;;;;;;;;;;;;;;AAcM,UAAA,WAAW,eAAe,OAAO;AACvC,UAAM,kBAAkB;AACxB,UAAM,iBAAiB;AAEvB,UAAM,MAAM;AACP,+BAAA,uBAAuB,CAAC,SAAS;AACpC,UAAI,QAAQ,WAAW;AACjB,YAAA;AACA,YAAA,gBAAgB,SAAS,GAAG;AAC9B,oBAAU,QAAI,KAAC,QAAI,KAAC,SAAS,CAAC;AAAA,QAAA,OACzB;AACL,oBAAU,aAAK,gBAAgB,QAAQ,CAAC;AAAA,QAC1C;AAES,iBAAA,MAAM,cAAc,OAAO;AACpC,oBAAY,gBAAgB,KAAK;AAAA,MAAA,WACxB,Q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A,CAC5B;AAAA,QACH;AAAA,MACF;AAAA,IAAA;AAGI,UAAA,cAAc,CAACA,WAAkB;;AAC/B,YAAA,UAAS,cAAS,UAAT,mBAAgB;AAC/B,YAAM,OAAO,OAAO,iBAAiB,gBAAgB,EAAEA,MAAK;AAC5D,WAAK,uBAAuB;AAAA,IAAA;AAGxB,UAAA,aAAa,CAAC,QAAa;AAC/B,iCAAK,SAAS;AAAA,IAAG;AAGb,UAAA,yBAAyB,CAAC,QAAa;AAC3C,YAAMA,SAAQ,UAAU,QAAI,MAAE,GAAG;AACjC,UAAIA,UAAS,IAAI;AACf,wBAAgB,QAAQ;AACT,uBAAA,QAAQ,QAAA,KAAK,CAAC;AAAA,MAAA,OACxB;AACL,wBAAgB,QAAQA;AACxB,uBAAe,QAAQ;AAAA,MACzB;AAAA,IAAA;AAGF;AAAA,MACE,MAAM,QAAI;AAAA,MACV,MAAM;AACA,YAAA,QAAI,KAAC,SAAS,GAAG;AAEnB,mBAAS,MAAM,cAAc,QAAA,KAAK,CAAC,CAAC;AAAA,QACtC;AAAA,MACF;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;ACrHF,MAAA,QAAe;AAAA,EACb,CAAC;AAAA,EACD;AAAA,IAAA,eACEC;AAAAA,IAAA,cACAC;AAAAA,EACF;AACF;"}
|
@@ -1,72 +1,127 @@
|
|
1
1
|
import "lodash-es";
|
2
|
-
import { defineComponent
|
3
|
-
import { withInstall
|
4
|
-
import { ElDialog
|
5
|
-
import { addUnit
|
6
|
-
import { modalLocatorContextKey
|
7
|
-
const
|
2
|
+
import { defineComponent, inject, ref, shallowRef, provide, createVNode, Fragment, useTemplateRef, openBlock, createElementBlock, renderSlot } from "vue";
|
3
|
+
import { withInstall } from "../_util/vue/install.js";
|
4
|
+
import { ElDialog } from "element-plus";
|
5
|
+
import { addUnit } from "../_util/dom/style.js";
|
6
|
+
import { modalLocatorContextKey, modalContextKey } from "./types.js";
|
7
|
+
const Modal = /* @__PURE__ */ defineComponent({
|
8
8
|
name: "OModal",
|
9
|
-
setup(
|
10
|
-
slots
|
11
|
-
attrs
|
12
|
-
emit
|
13
|
-
expose
|
9
|
+
setup(props, {
|
10
|
+
slots,
|
11
|
+
attrs,
|
12
|
+
emit,
|
13
|
+
expose
|
14
14
|
}) {
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
const modalLocator = inject(modalLocatorContextKey);
|
16
|
+
const show = ref(false);
|
17
|
+
const title = ref();
|
18
|
+
const content = shallowRef();
|
19
|
+
const contentProps = ref();
|
20
|
+
const width = ref();
|
21
|
+
const height = ref();
|
22
|
+
const __resolve = ref();
|
23
|
+
const showClose = ref(true);
|
24
|
+
const appendTo = ref();
|
25
|
+
const _open = async (options) => {
|
26
|
+
show.value = true;
|
27
|
+
title.value = options.title;
|
28
|
+
content.value = options.content;
|
29
|
+
if (options.contentProps) {
|
30
|
+
contentProps.value = options.contentProps;
|
31
|
+
} else {
|
32
|
+
contentProps.value = {};
|
33
|
+
}
|
34
|
+
if (options.width) {
|
35
|
+
width.value = options.width;
|
36
|
+
}
|
37
|
+
if (options.height) {
|
38
|
+
height.value = addUnit(options.height);
|
39
|
+
}
|
40
|
+
if (options.showClose != void 0 && options.showClose == false) {
|
41
|
+
showClose.value = false;
|
42
|
+
}
|
43
|
+
if (options.locator) {
|
44
|
+
appendTo.value = options.locator;
|
45
|
+
} else {
|
46
|
+
if (modalLocator && modalLocator.locator.value) {
|
47
|
+
appendTo.value = modalLocator.locator.value;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
const promise = new Promise((resolve, reject) => {
|
51
|
+
__resolve.value = resolve;
|
52
|
+
});
|
53
|
+
return promise;
|
54
|
+
};
|
55
|
+
expose({
|
56
|
+
open: _open
|
20
57
|
});
|
21
|
-
const
|
22
|
-
const
|
23
|
-
|
58
|
+
const _close = (options) => {
|
59
|
+
const resolve = __resolve.value;
|
60
|
+
show.value = false;
|
61
|
+
title.value = void 0;
|
62
|
+
content.value = void 0;
|
63
|
+
contentProps.value = void 0;
|
64
|
+
width.value = void 0;
|
65
|
+
height.value = void 0;
|
66
|
+
__resolve.value = void 0;
|
67
|
+
showClose.value = true;
|
68
|
+
appendTo.value = void 0;
|
69
|
+
resolve && resolve(options);
|
24
70
|
};
|
25
|
-
|
26
|
-
close:
|
27
|
-
})
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
71
|
+
provide(modalContextKey, {
|
72
|
+
close: _close
|
73
|
+
});
|
74
|
+
return () => {
|
75
|
+
const Children = content.value;
|
76
|
+
return show.value ? createVNode(ElDialog, {
|
77
|
+
"title": title.value,
|
78
|
+
"width": width.value,
|
79
|
+
"modelValue": show.value,
|
80
|
+
"beforeClose": _close,
|
81
|
+
"draggable": true,
|
82
|
+
"closeOnClickModal": false,
|
83
|
+
"closeOnPressEscape": false,
|
84
|
+
"showClose": showClose.value,
|
85
|
+
"alignCenter": true,
|
86
|
+
"style": {
|
87
|
+
height: height.value
|
41
88
|
},
|
42
|
-
appendTo:
|
89
|
+
"appendTo": appendTo.value
|
43
90
|
}, {
|
44
|
-
default: () => [
|
45
|
-
}) :
|
91
|
+
default: () => [createVNode(Children, contentProps.value, null)]
|
92
|
+
}) : createVNode(Fragment, null, null);
|
46
93
|
};
|
47
94
|
}
|
48
|
-
})
|
95
|
+
});
|
96
|
+
const _hoisted_1 = {
|
49
97
|
ref: "modal-locator",
|
50
98
|
class: "orion-modal-locator"
|
51
|
-
}
|
52
|
-
|
53
|
-
inheritAttrs:
|
99
|
+
};
|
100
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
101
|
+
...{ name: "OModalLocator", inheritAttrs: true },
|
54
102
|
__name: "ModalLocator",
|
55
|
-
setup(
|
56
|
-
const
|
57
|
-
|
58
|
-
locator
|
59
|
-
})
|
60
|
-
|
61
|
-
|
103
|
+
setup(__props) {
|
104
|
+
const locator = useTemplateRef("modal-locator");
|
105
|
+
provide(modalLocatorContextKey, {
|
106
|
+
locator
|
107
|
+
});
|
108
|
+
return (_ctx, _cache) => {
|
109
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
110
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
111
|
+
], 512);
|
112
|
+
};
|
113
|
+
}
|
114
|
+
});
|
115
|
+
const _export_sfc = (sfc, props) => {
|
116
|
+
const target = sfc.__vccOpts || sfc;
|
117
|
+
for (const [key, val] of props) {
|
118
|
+
target[key] = val;
|
62
119
|
}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
return t;
|
68
|
-
}, F = /* @__PURE__ */ D(A, [["__scopeId", "data-v-0fd5a1a9"]]), J = j(R, { ModalLocator: F });
|
120
|
+
return target;
|
121
|
+
};
|
122
|
+
const ModalLocator = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0fd5a1a9"]]);
|
123
|
+
const index = withInstall(Modal, { ModalLocator });
|
69
124
|
export {
|
70
|
-
|
125
|
+
index as default
|
71
126
|
};
|
72
127
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Modal/Modal.tsx","../../../src/components/Modal/ModalLocator.vue","../../../src/components/Modal/index.ts"],"sourcesContent":["import { defineComponent, inject, provide, ref, shallowRef } from 'vue'\r\nimport { ElDialog } from 'element-plus'\r\nimport { addUnit } from '../_util'\r\nimport { modalContextKey, modalLocatorContextKey, ModalOptions } from './types'\r\n\r\nconst Modal = defineComponent({\r\n name: 'OModal',\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const modalLocator = inject(modalLocatorContextKey)\r\n\r\n const show = ref(false)\r\n const title = ref<string>()\r\n const content = shallowRef()\r\n const contentProps = ref<Record<string, any>>()\r\n const width = ref<number | string>()\r\n const height = ref<number | string>()\r\n const __resolve = ref<(value: Record<string, any> | PromiseLike<Record<string, any>>) => void>()\r\n const showClose = ref(true)\r\n const appendTo = ref<string | HTMLElement>()\r\n\r\n const _open: (options: ModalOptions) => Promise<Record<string, any>> = async (options) => {\r\n show.value = true\r\n title.value = options.title\r\n content.value = options.content\r\n if (options.contentProps) {\r\n contentProps.value = options.contentProps\r\n } else {\r\n contentProps.value = {}\r\n }\r\n if (options.width) {\r\n width.value = options.width\r\n }\r\n if (options.height) {\r\n height.value = addUnit(options.height)\r\n }\r\n if (options.showClose != undefined && options.showClose == false) {\r\n showClose.value = false\r\n }\r\n if (options.locator) {\r\n appendTo.value = options.locator\r\n } else {\r\n if (modalLocator && modalLocator.locator.value) {\r\n appendTo.value = modalLocator.locator.value\r\n }\r\n }\r\n\r\n const promise = new Promise<Record<string, any>>((resolve, reject) => {\r\n __resolve.value = resolve\r\n })\r\n\r\n return promise\r\n }\r\n expose({\r\n open: _open,\r\n })\r\n\r\n const _close: (options: Record<string, any>) => void = (options) => {\r\n const resolve = __resolve.value\r\n\r\n show.value = false\r\n title.value = undefined\r\n content.value = undefined\r\n contentProps.value = undefined\r\n width.value = undefined\r\n height.value = undefined\r\n __resolve.value = undefined\r\n showClose.value = true\r\n appendTo.value = undefined\r\n\r\n resolve && resolve(options)\r\n }\r\n provide(modalContextKey, { close: _close })\r\n\r\n return () => {\r\n const Children = content.value\r\n return show.value ? (\r\n <ElDialog\r\n title={title.value}\r\n width={width.value}\r\n modelValue={show.value}\r\n beforeClose={_close}\r\n draggable={true}\r\n closeOnClickModal={false}\r\n closeOnPressEscape={false}\r\n showClose={showClose.value}\r\n alignCenter={true}\r\n style={{ height: height.value }}\r\n appendTo={appendTo.value}\r\n >\r\n <Children {...contentProps.value}></Children>\r\n </ElDialog>\r\n ) : (\r\n <></>\r\n )\r\n }\r\n },\r\n})\r\n\r\nexport default Modal\r\n","<template>\r\n <div ref=\"modal-locator\" class=\"orion-modal-locator\"><slot></slot></div>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { provide, useTemplateRef } from 'vue'\r\nimport { modalLocatorContextKey } from './types'\r\n\r\ndefineOptions({ name: 'OModalLocator', inheritAttrs: true })\r\nconst locator = useTemplateRef('modal-locator')\r\n\r\nprovide(modalLocatorContextKey, {\r\n locator,\r\n})\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.orion-modal-locator {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n box-sizing: border-box;\r\n position: relative;\r\n\r\n :deep(> .el-overlay) {\r\n position: absolute;\r\n\r\n > .el-overlay-dialog {\r\n position: absolute;\r\n }\r\n }\r\n}\r\n</style>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Modal from './Modal'\r\nimport ModalLocator from './ModalLocator.vue'\r\n\r\nexport default withInstall<typeof Modal, { ModalLocator: typeof ModalLocator }>(Modal, { ModalLocator })\r\n"],"names":["Modal","defineComponent","name","setup","props","slots","attrs","emit","expose","modalLocator","inject","modalLocatorContextKey","show","ref","title","content","shallowRef","contentProps","width","height","__resolve","showClose","appendTo","
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Modal/Modal.tsx","../../../src/components/Modal/ModalLocator.vue","../../../src/components/Modal/index.ts"],"sourcesContent":["import { defineComponent, inject, provide, ref, shallowRef } from 'vue'\r\nimport { ElDialog } from 'element-plus'\r\nimport { addUnit } from '../_util'\r\nimport { modalContextKey, modalLocatorContextKey, ModalOptions } from './types'\r\n\r\nconst Modal = defineComponent({\r\n name: 'OModal',\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const modalLocator = inject(modalLocatorContextKey)\r\n\r\n const show = ref(false)\r\n const title = ref<string>()\r\n const content = shallowRef()\r\n const contentProps = ref<Record<string, any>>()\r\n const width = ref<number | string>()\r\n const height = ref<number | string>()\r\n const __resolve = ref<(value: Record<string, any> | PromiseLike<Record<string, any>>) => void>()\r\n const showClose = ref(true)\r\n const appendTo = ref<string | HTMLElement>()\r\n\r\n const _open: (options: ModalOptions) => Promise<Record<string, any>> = async (options) => {\r\n show.value = true\r\n title.value = options.title\r\n content.value = options.content\r\n if (options.contentProps) {\r\n contentProps.value = options.contentProps\r\n } else {\r\n contentProps.value = {}\r\n }\r\n if (options.width) {\r\n width.value = options.width\r\n }\r\n if (options.height) {\r\n height.value = addUnit(options.height)\r\n }\r\n if (options.showClose != undefined && options.showClose == false) {\r\n showClose.value = false\r\n }\r\n if (options.locator) {\r\n appendTo.value = options.locator\r\n } else {\r\n if (modalLocator && modalLocator.locator.value) {\r\n appendTo.value = modalLocator.locator.value\r\n }\r\n }\r\n\r\n const promise = new Promise<Record<string, any>>((resolve, reject) => {\r\n __resolve.value = resolve\r\n })\r\n\r\n return promise\r\n }\r\n expose({\r\n open: _open,\r\n })\r\n\r\n const _close: (options: Record<string, any>) => void = (options) => {\r\n const resolve = __resolve.value\r\n\r\n show.value = false\r\n title.value = undefined\r\n content.value = undefined\r\n contentProps.value = undefined\r\n width.value = undefined\r\n height.value = undefined\r\n __resolve.value = undefined\r\n showClose.value = true\r\n appendTo.value = undefined\r\n\r\n resolve && resolve(options)\r\n }\r\n provide(modalContextKey, { close: _close })\r\n\r\n return () => {\r\n const Children = content.value\r\n return show.value ? (\r\n <ElDialog\r\n title={title.value}\r\n width={width.value}\r\n modelValue={show.value}\r\n beforeClose={_close}\r\n draggable={true}\r\n closeOnClickModal={false}\r\n closeOnPressEscape={false}\r\n showClose={showClose.value}\r\n alignCenter={true}\r\n style={{ height: height.value }}\r\n appendTo={appendTo.value}\r\n >\r\n <Children {...contentProps.value}></Children>\r\n </ElDialog>\r\n ) : (\r\n <></>\r\n )\r\n }\r\n },\r\n})\r\n\r\nexport default Modal\r\n","<template>\r\n <div ref=\"modal-locator\" class=\"orion-modal-locator\"><slot></slot></div>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { provide, useTemplateRef } from 'vue'\r\nimport { modalLocatorContextKey } from './types'\r\n\r\ndefineOptions({ name: 'OModalLocator', inheritAttrs: true })\r\nconst locator = useTemplateRef('modal-locator')\r\n\r\nprovide(modalLocatorContextKey, {\r\n locator,\r\n})\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.orion-modal-locator {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n box-sizing: border-box;\r\n position: relative;\r\n\r\n :deep(> .el-overlay) {\r\n position: absolute;\r\n\r\n > .el-overlay-dialog {\r\n position: absolute;\r\n }\r\n }\r\n}\r\n</style>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Modal from './Modal'\r\nimport ModalLocator from './ModalLocator.vue'\r\n\r\nexport default withInstall<typeof Modal, { ModalLocator: typeof ModalLocator }>(Modal, { ModalLocator })\r\n"],"names":["Modal","defineComponent","name","setup","props","slots","attrs","emit","expose","modalLocator","inject","modalLocatorContextKey","show","ref","title","content","shallowRef","contentProps","width","height","__resolve","showClose","appendTo","_open","options","value","addUnit","undefined","locator","promise","Promise","resolve","reject","open","_close","provide","modalContextKey","close","Children","_createVNode","ElDialog","default","_Fragment"],"mappings":";;;;;;AAKA,MAAMA,QAAQC,gCAAgB;AAAA,EAC5BC,MAAM;AAAA,EACNC,MAAMC,OAAO;AAAA,IAAEC;AAAAA,IAAOC;AAAAA,IAAOC;AAAAA,IAAMC;AAAAA,EAAO,GAAG;AAC3C,UAAMC,eAAeC,OAAOC,sBAAsB;AAElD,UAAMC,OAAOC,IAAI,KAAK;AACtB,UAAMC,QAAQD;AACd,UAAME,UAAUC;AAChB,UAAMC,eAAeJ;AACrB,UAAMK,QAAQL;AACd,UAAMM,SAASN;AACf,UAAMO,YAAYP;AAClB,UAAMQ,YAAYR,IAAI,IAAI;AAC1B,UAAMS,WAAWT;AAEjB,UAAMU,QAAiE,OAAOC,YAAY;AACxFZ,WAAKa,QAAQ;AACbX,YAAMW,QAAQD,QAAQV;AACtBC,cAAQU,QAAQD,QAAQT;AACxB,UAAIS,QAAQP,cAAc;AACxBA,qBAAaQ,QAAQD,QAAQP;AAAAA,MAC/B,OAAO;AACLA,qBAAaQ,QAAQ;MACvB;AACA,UAAID,QAAQN,OAAO;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AOM;AAAAA,QAAO;AAAA,QAAA,YACrBH,SAASG;AAAAA,MAAK,GAAA;AAAA,QAAAgB,SAAAA,MAAAF,CAAAA,YAAAD,UAEVrB,aAAaQ,OAAK,IAAA,CAAA;AAAA,MAAAc,CAAAA,IAAAA,YAAAG,UAInC,MAAA,IAAA;AAAA;EAEL;AACF,CAAC;;;;;;;;;ACxFK,UAAA,UAAU,eAAe,eAAe;AAE9C,YAAQ,wBAAwB;AAAA,MAC9B;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;ACPD,MAAA,QAAe,YAAiE,OAAO,EAAE,cAAc;"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
const
|
1
|
+
const modalContextKey = Symbol("modalContextKey");
|
2
|
+
const modalLocatorContextKey = Symbol("modalLocatorContextKey");
|
2
3
|
export {
|
3
|
-
|
4
|
-
|
4
|
+
modalContextKey,
|
5
|
+
modalLocatorContextKey
|
5
6
|
};
|
6
7
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/components/Modal/types.ts"],"sourcesContent":["import { InjectionKey, ShallowRef, VNode } from 'vue'\r\n\r\nexport interface ModalOptions {\r\n title: string\r\n content: VNode\r\n contentProps?: Record<string, any>\r\n width?: number | string\r\n height?: number | string\r\n showClose?: boolean\r\n locator?: string | HTMLElement\r\n}\r\n\r\nexport interface ModalContext {\r\n close: (options: Record<string, any>) => void\r\n}\r\n\r\nexport const modalContextKey: InjectionKey<ModalContext> = Symbol('modalContextKey')\r\n\r\nexport interface ModalLocatorContext {\r\n locator: ShallowRef<HTMLElement | null>\r\n}\r\n\r\nexport const modalLocatorContextKey: InjectionKey<ModalLocatorContext> = Symbol('modalLocatorContextKey')\r\n"],"names":[
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/Modal/types.ts"],"sourcesContent":["import { InjectionKey, ShallowRef, VNode } from 'vue'\r\n\r\nexport interface ModalOptions {\r\n title: string\r\n content: VNode\r\n contentProps?: Record<string, any>\r\n width?: number | string\r\n height?: number | string\r\n showClose?: boolean\r\n locator?: string | HTMLElement\r\n}\r\n\r\nexport interface ModalContext {\r\n close: (options: Record<string, any>) => void\r\n}\r\n\r\nexport const modalContextKey: InjectionKey<ModalContext> = Symbol('modalContextKey')\r\n\r\nexport interface ModalLocatorContext {\r\n locator: ShallowRef<HTMLElement | null>\r\n}\r\n\r\nexport const modalLocatorContextKey: InjectionKey<ModalLocatorContext> = Symbol('modalLocatorContextKey')\r\n"],"names":[],"mappings":"AAgBa,MAAA,kBAA8C,OAAO,iBAAiB;AAMtE,MAAA,yBAA4D,OAAO,wBAAwB;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { inject
|
2
|
-
import { modalContextKey
|
3
|
-
function
|
4
|
-
return
|
1
|
+
import { inject } from "vue";
|
2
|
+
import { modalContextKey } from "./types.js";
|
3
|
+
function useModal() {
|
4
|
+
return inject(modalContextKey);
|
5
5
|
}
|
6
6
|
export {
|
7
|
-
|
7
|
+
useModal as default
|
8
8
|
};
|
9
9
|
//# sourceMappingURL=useModal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useModal.js","sources":["../../../src/components/Modal/useModal.ts"],"sourcesContent":["import { inject } from 'vue'\r\nimport { modalContextKey } from './types'\r\n\r\nexport default function useModal() {\r\n return inject(modalContextKey)\r\n}\r\n"],"names":[
|
1
|
+
{"version":3,"file":"useModal.js","sources":["../../../src/components/Modal/useModal.ts"],"sourcesContent":["import { inject } from 'vue'\r\nimport { modalContextKey } from './types'\r\n\r\nexport default function useModal() {\r\n return inject(modalContextKey)\r\n}\r\n"],"names":[],"mappings":";;AAGA,SAAwB,WAAW;AACjC,SAAO,OAAO,eAAe;AAC/B;"}
|
@@ -1,103 +1,111 @@
|
|
1
|
-
import { computed
|
2
|
-
import
|
3
|
-
import { camelize
|
4
|
-
import { filterEmpty
|
5
|
-
function
|
6
|
-
|
7
|
-
var
|
8
|
-
const
|
9
|
-
for (const [
|
10
|
-
delete
|
11
|
-
|
1
|
+
import { computed } from "vue";
|
2
|
+
import OrionError from "../../../error/OrionError.js";
|
3
|
+
import { camelize } from "../../_util/util.js";
|
4
|
+
import { filterEmpty } from "../../_util/props-util/index.js";
|
5
|
+
function genColumns(children) {
|
6
|
+
const tableColumns = children == null ? void 0 : children.map((c) => {
|
7
|
+
var _a, _b;
|
8
|
+
const props = { ...c.props || {} };
|
9
|
+
for (const [k, v] of Object.entries(props)) {
|
10
|
+
delete props[k];
|
11
|
+
props[camelize(k)] = v;
|
12
|
+
}
|
13
|
+
if (c.type.name === "OPagetableColumnIndex") {
|
12
14
|
return {
|
13
|
-
type:
|
15
|
+
type: c.type.name
|
14
16
|
};
|
15
|
-
if (
|
17
|
+
} else if (c.type.name === "OPagetableColumnString" || c.type.name === "OPagetableColumnLink") {
|
16
18
|
return {
|
17
|
-
type:
|
18
|
-
head:
|
19
|
-
headAlign:
|
20
|
-
name:
|
21
|
-
width:
|
22
|
-
fixed:
|
23
|
-
tail:
|
19
|
+
type: c.type.name,
|
20
|
+
head: props == null ? void 0 : props.head,
|
21
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
22
|
+
name: props == null ? void 0 : props.name,
|
23
|
+
width: props == null ? void 0 : props.width,
|
24
|
+
fixed: props == null ? void 0 : props.fixed,
|
25
|
+
tail: props == null ? void 0 : props.tail
|
24
26
|
};
|
25
|
-
if (
|
27
|
+
} else if (c.type.name === "OPagetableColumnNumber") {
|
26
28
|
return {
|
27
|
-
type:
|
28
|
-
head:
|
29
|
-
headAlign:
|
30
|
-
name:
|
31
|
-
width:
|
32
|
-
fixed:
|
33
|
-
tail:
|
34
|
-
thousandsSeparator:
|
35
|
-
precision: Number(
|
36
|
-
percentage:
|
29
|
+
type: c.type.name,
|
30
|
+
head: props == null ? void 0 : props.head,
|
31
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
32
|
+
name: props == null ? void 0 : props.name,
|
33
|
+
width: props == null ? void 0 : props.width,
|
34
|
+
fixed: props == null ? void 0 : props.fixed,
|
35
|
+
tail: props == null ? void 0 : props.tail,
|
36
|
+
thousandsSeparator: props == null ? void 0 : props.thousandsSeparator,
|
37
|
+
precision: Number(props == null ? void 0 : props.precision),
|
38
|
+
percentage: props == null ? void 0 : props.percentage
|
37
39
|
};
|
38
|
-
if (
|
40
|
+
} else if (c.type.name === "OPagetableColumnDate") {
|
39
41
|
return {
|
40
|
-
type:
|
41
|
-
head:
|
42
|
-
headAlign:
|
43
|
-
name:
|
44
|
-
width:
|
45
|
-
fixed:
|
46
|
-
tail:
|
47
|
-
format:
|
48
|
-
sourceFormat:
|
42
|
+
type: c.type.name,
|
43
|
+
head: props == null ? void 0 : props.head,
|
44
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
45
|
+
name: props == null ? void 0 : props.name,
|
46
|
+
width: props == null ? void 0 : props.width,
|
47
|
+
fixed: props == null ? void 0 : props.fixed,
|
48
|
+
tail: props == null ? void 0 : props.tail,
|
49
|
+
format: props == null ? void 0 : props.format,
|
50
|
+
sourceFormat: props == null ? void 0 : props.sourceFormat
|
49
51
|
};
|
50
|
-
if (
|
52
|
+
} else if (c.type.name === "OPagetableColumnSingleselect" || c.type.name === "OPagetableColumnMultiselect") {
|
51
53
|
return {
|
52
|
-
type:
|
53
|
-
head:
|
54
|
-
headAlign:
|
55
|
-
name:
|
56
|
-
width:
|
57
|
-
fixed:
|
58
|
-
tail:
|
59
|
-
code:
|
54
|
+
type: c.type.name,
|
55
|
+
head: props == null ? void 0 : props.head,
|
56
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
57
|
+
name: props == null ? void 0 : props.name,
|
58
|
+
width: props == null ? void 0 : props.width,
|
59
|
+
fixed: props == null ? void 0 : props.fixed,
|
60
|
+
tail: props == null ? void 0 : props.tail,
|
61
|
+
code: props == null ? void 0 : props.code
|
60
62
|
};
|
61
|
-
if (
|
63
|
+
} else if (c.type.name === "OPagetableColumnButtongroup") {
|
62
64
|
return {
|
63
|
-
type:
|
64
|
-
head:
|
65
|
-
headAlign:
|
66
|
-
name:
|
67
|
-
width:
|
68
|
-
fixed:
|
69
|
-
tail:
|
70
|
-
children:
|
65
|
+
type: c.type.name,
|
66
|
+
head: props == null ? void 0 : props.head,
|
67
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
68
|
+
name: props == null ? void 0 : props.name,
|
69
|
+
width: props == null ? void 0 : props.width,
|
70
|
+
fixed: props == null ? void 0 : props.fixed,
|
71
|
+
tail: props == null ? void 0 : props.tail,
|
72
|
+
children: c.children
|
71
73
|
};
|
72
|
-
if (
|
74
|
+
} else if (c.type.name === "OPagetableColumngroup") {
|
73
75
|
return {
|
74
|
-
type:
|
75
|
-
head:
|
76
|
-
headAlign:
|
77
|
-
children:
|
76
|
+
type: c.type.name,
|
77
|
+
head: props == null ? void 0 : props.head,
|
78
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
79
|
+
children: genColumns(filterEmpty((_b = (_a = c.children) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a)))
|
78
80
|
};
|
79
|
-
if (
|
81
|
+
} else if (c.type.name === "OPagetableColumnDiy") {
|
80
82
|
return {
|
81
|
-
type:
|
82
|
-
head:
|
83
|
-
headAlign:
|
84
|
-
name:
|
85
|
-
width:
|
86
|
-
fixed:
|
87
|
-
tail:
|
88
|
-
children:
|
83
|
+
type: c.type.name,
|
84
|
+
head: props == null ? void 0 : props.head,
|
85
|
+
headAlign: props == null ? void 0 : props.headAlign,
|
86
|
+
name: props == null ? void 0 : props.name,
|
87
|
+
width: props == null ? void 0 : props.width,
|
88
|
+
fixed: props == null ? void 0 : props.fixed,
|
89
|
+
tail: props == null ? void 0 : props.tail,
|
90
|
+
children: c.children
|
89
91
|
};
|
90
|
-
|
92
|
+
} else {
|
93
|
+
throw new OrionError(`OPagetable不能正确解析'${c.type.name}'子组件。`);
|
94
|
+
}
|
91
95
|
});
|
96
|
+
return tableColumns;
|
92
97
|
}
|
93
|
-
function
|
94
|
-
|
95
|
-
var
|
96
|
-
const
|
97
|
-
|
98
|
+
function useColumns(slots) {
|
99
|
+
const columns = computed(() => {
|
100
|
+
var _a;
|
101
|
+
const children = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
102
|
+
const non_empty_children = filterEmpty(children);
|
103
|
+
const tableColumns = genColumns(non_empty_children);
|
104
|
+
return tableColumns;
|
98
105
|
});
|
106
|
+
return columns;
|
99
107
|
}
|
100
108
|
export {
|
101
|
-
|
109
|
+
useColumns as default
|
102
110
|
};
|
103
111
|
//# sourceMappingURL=useColumns.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useColumns.js","sources":["../../../../src/components/Pagetable/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 === 'OPagetableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnString' || c.type.name === 'OPagetableColumnLink') {\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 tail: props?.tail,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnNumber') {\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 tail: props?.tail,\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 === 'OPagetableColumnDate') {\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 tail: props?.tail,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnSingleselect' || c.type.name === 'OPagetableColumnMultiselect') {\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 tail: props?.tail,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnButtongroup') {\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 tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OPagetableColumngroup') {\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 === 'OPagetableColumnDiy') {\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 tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OPagetable不能正确解析'${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":[
|
1
|
+
{"version":3,"file":"useColumns.js","sources":["../../../../src/components/Pagetable/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 === 'OPagetableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnString' || c.type.name === 'OPagetableColumnLink') {\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 tail: props?.tail,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnNumber') {\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 tail: props?.tail,\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 === 'OPagetableColumnDate') {\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 tail: props?.tail,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnSingleselect' || c.type.name === 'OPagetableColumnMultiselect') {\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 tail: props?.tail,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnButtongroup') {\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 tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OPagetableColumngroup') {\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 === 'OPagetableColumnDiy') {\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 tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OPagetable不能正确解析'${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":[],"mappings":";;;;AAMA,SAAS,WAAW,UAAU;AAC5B,QAAM,eAAe,qCAAU,IAAI,CAAC,MAAM;;AACxC,UAAM,QAAQ,EAAE,GAAI,EAAE,SAAS,CAAI,EAAA;AACnC,eAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC1C,aAAO,MAAM,CAAC;AACR,YAAA,SAAS,CAAC,CAAC,IAAI;AAAA,IACvB;AAEI,QAAA,EAAE,KAAK,SAAS,yBAAyB;AACpC,aAAA;AAAA,QACL,MAAM,EAAE,KAAK;AAAA,MAAA;AAAA,IACf,WACS,EAAE,KAAK,SAAS,4BAA4B,EAAE,KAAK,SAAS,wBAAwB;AACtF,aAAA;AAAA,QACL,MAAM,EAAE,KAAK;AAAA,QACb,MAAM,+BAAO;AAAA,QACb,WAAW,+BAAO;AAAA,QAClB,MAAM,+BAAO;AAAA,QACb,OAAO,+BAAO;AAAA,QACd,OAAO,+BAAO;AAAA,QACd,MAAM,+BAAO;AAAA,MAAA;AAAA,IAEN,W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