v-nuxt-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +153 -0
- package/dist/module.d.mts +13 -0
- package/dist/module.json +15 -0
- package/dist/module.mjs +45 -0
- package/dist/runtime/assets/css/main.css +1 -0
- package/dist/runtime/assets/css/transition.css +1 -0
- package/dist/runtime/components/CircleProgress.d.vue.ts +17 -0
- package/dist/runtime/components/CircleProgress.vue +75 -0
- package/dist/runtime/components/CircleProgress.vue.d.ts +17 -0
- package/dist/runtime/components/DeleteModal.d.vue.ts +14 -0
- package/dist/runtime/components/DeleteModal.vue +57 -0
- package/dist/runtime/components/DeleteModal.vue.d.ts +14 -0
- package/dist/runtime/components/Dnd.client.d.vue.ts +25 -0
- package/dist/runtime/components/Dnd.client.vue +47 -0
- package/dist/runtime/components/Dnd.client.vue.d.ts +25 -0
- package/dist/runtime/components/EChart.client.d.vue.ts +19 -0
- package/dist/runtime/components/EChart.client.vue +72 -0
- package/dist/runtime/components/EChart.client.vue.d.ts +19 -0
- package/dist/runtime/components/Empty.d.vue.ts +12 -0
- package/dist/runtime/components/Empty.vue +26 -0
- package/dist/runtime/components/Empty.vue.d.ts +12 -0
- package/dist/runtime/components/PermissionWrapper.d.vue.ts +23 -0
- package/dist/runtime/components/PermissionWrapper.vue +51 -0
- package/dist/runtime/components/PermissionWrapper.vue.d.ts +23 -0
- package/dist/runtime/components/ScrollArea.d.vue.ts +26 -0
- package/dist/runtime/components/ScrollArea.vue +201 -0
- package/dist/runtime/components/ScrollArea.vue.d.ts +26 -0
- package/dist/runtime/components/Spin.d.vue.ts +16 -0
- package/dist/runtime/components/Spin.vue +22 -0
- package/dist/runtime/components/Spin.vue.d.ts +16 -0
- package/dist/runtime/components/SqlEditor.d.vue.ts +23 -0
- package/dist/runtime/components/SqlEditor.vue +255 -0
- package/dist/runtime/components/SqlEditor.vue.d.ts +23 -0
- package/dist/runtime/components/Watermark.d.vue.ts +44 -0
- package/dist/runtime/components/Watermark.vue +162 -0
- package/dist/runtime/components/Watermark.vue.d.ts +44 -0
- package/dist/runtime/components/badge/CodeModal.client.d.vue.ts +11 -0
- package/dist/runtime/components/badge/CodeModal.client.vue +77 -0
- package/dist/runtime/components/badge/CodeModal.client.vue.d.ts +11 -0
- package/dist/runtime/components/badge/CodeTooltip.client.d.vue.ts +9 -0
- package/dist/runtime/components/badge/CodeTooltip.client.vue +57 -0
- package/dist/runtime/components/badge/CodeTooltip.client.vue.d.ts +9 -0
- package/dist/runtime/components/button/Dropdown.d.vue.ts +31 -0
- package/dist/runtime/components/button/Dropdown.vue +123 -0
- package/dist/runtime/components/button/Dropdown.vue.d.ts +31 -0
- package/dist/runtime/components/button/Theme.d.vue.ts +19 -0
- package/dist/runtime/components/button/Theme.vue +45 -0
- package/dist/runtime/components/button/Theme.vue.d.ts +19 -0
- package/dist/runtime/components/date-picker/Input.d.vue.ts +18 -0
- package/dist/runtime/components/date-picker/Input.vue +39 -0
- package/dist/runtime/components/date-picker/Input.vue.d.ts +18 -0
- package/dist/runtime/components/date-picker/index.d.vue.ts +26 -0
- package/dist/runtime/components/date-picker/index.vue +223 -0
- package/dist/runtime/components/date-picker/index.vue.d.ts +26 -0
- package/dist/runtime/components/flow/FlowEdge.client.d.vue.ts +5 -0
- package/dist/runtime/components/flow/FlowEdge.client.vue +110 -0
- package/dist/runtime/components/flow/FlowEdge.client.vue.d.ts +5 -0
- package/dist/runtime/components/flow/FlowNode.client.d.vue.ts +8 -0
- package/dist/runtime/components/flow/FlowNode.client.vue +79 -0
- package/dist/runtime/components/flow/FlowNode.client.vue.d.ts +8 -0
- package/dist/runtime/components/flow/FlowStats.d.vue.ts +7 -0
- package/dist/runtime/components/flow/FlowStats.vue +17 -0
- package/dist/runtime/components/flow/FlowStats.vue.d.ts +7 -0
- package/dist/runtime/components/flow/FlowToolbar.d.vue.ts +14 -0
- package/dist/runtime/components/flow/FlowToolbar.vue +113 -0
- package/dist/runtime/components/flow/FlowToolbar.vue.d.ts +14 -0
- package/dist/runtime/components/form/create-modal-template/WithApi.d.vue.ts +19 -0
- package/dist/runtime/components/form/create-modal-template/WithApi.vue +36 -0
- package/dist/runtime/components/form/create-modal-template/WithApi.vue.d.ts +19 -0
- package/dist/runtime/components/form/create-modal-template/index.d.vue.ts +19 -0
- package/dist/runtime/components/form/create-modal-template/index.vue +75 -0
- package/dist/runtime/components/form/create-modal-template/index.vue.d.ts +19 -0
- package/dist/runtime/components/form/field/AsyncObjectSelect.d.vue.ts +23 -0
- package/dist/runtime/components/form/field/AsyncObjectSelect.vue +46 -0
- package/dist/runtime/components/form/field/AsyncObjectSelect.vue.d.ts +23 -0
- package/dist/runtime/components/form/field/AsyncSelect.d.vue.ts +26 -0
- package/dist/runtime/components/form/field/AsyncSelect.vue +140 -0
- package/dist/runtime/components/form/field/AsyncSelect.vue.d.ts +26 -0
- package/dist/runtime/components/form/field/AsyncTreeSelect.d.vue.ts +27 -0
- package/dist/runtime/components/form/field/AsyncTreeSelect.vue +130 -0
- package/dist/runtime/components/form/field/AsyncTreeSelect.vue.d.ts +27 -0
- package/dist/runtime/components/form/field/ButtonSwitch.d.vue.ts +19 -0
- package/dist/runtime/components/form/field/ButtonSwitch.vue +29 -0
- package/dist/runtime/components/form/field/ButtonSwitch.vue.d.ts +19 -0
- package/dist/runtime/components/form/field/DatePicker.d.vue.ts +26 -0
- package/dist/runtime/components/form/field/DatePicker.vue +89 -0
- package/dist/runtime/components/form/field/DatePicker.vue.d.ts +26 -0
- package/dist/runtime/components/form/field/DynamicInput.d.vue.ts +14 -0
- package/dist/runtime/components/form/field/DynamicInput.vue +52 -0
- package/dist/runtime/components/form/field/DynamicInput.vue.d.ts +14 -0
- package/dist/runtime/components/form/field/DynamicObjectInput.d.vue.ts +20 -0
- package/dist/runtime/components/form/field/DynamicObjectInput.vue +82 -0
- package/dist/runtime/components/form/field/DynamicObjectInput.vue.d.ts +20 -0
- package/dist/runtime/components/form/field/Input.d.vue.ts +17 -0
- package/dist/runtime/components/form/field/Input.vue +41 -0
- package/dist/runtime/components/form/field/Input.vue.d.ts +17 -0
- package/dist/runtime/components/form/field/InputPassword.d.vue.ts +17 -0
- package/dist/runtime/components/form/field/InputPassword.vue +40 -0
- package/dist/runtime/components/form/field/InputPassword.vue.d.ts +17 -0
- package/dist/runtime/components/form/field/InputStringNumber.d.vue.ts +16 -0
- package/dist/runtime/components/form/field/InputStringNumber.vue +56 -0
- package/dist/runtime/components/form/field/InputStringNumber.vue.d.ts +16 -0
- package/dist/runtime/components/form/field/Select.d.vue.ts +16 -0
- package/dist/runtime/components/form/field/Select.vue +29 -0
- package/dist/runtime/components/form/field/Select.vue.d.ts +16 -0
- package/dist/runtime/components/form/field/SqlEditor.d.vue.ts +10 -0
- package/dist/runtime/components/form/field/SqlEditor.vue +28 -0
- package/dist/runtime/components/form/field/SqlEditor.vue.d.ts +10 -0
- package/dist/runtime/components/form/field/TreeSelectTransfer.d.vue.ts +4 -0
- package/dist/runtime/components/form/field/TreeSelectTransfer.vue +89 -0
- package/dist/runtime/components/form/field/TreeSelectTransfer.vue.d.ts +4 -0
- package/dist/runtime/components/form/field/index.d.vue.ts +26 -0
- package/dist/runtime/components/form/field/index.vue +212 -0
- package/dist/runtime/components/form/field/index.vue.d.ts +26 -0
- package/dist/runtime/components/form/index.d.vue.ts +21 -0
- package/dist/runtime/components/form/index.vue +77 -0
- package/dist/runtime/components/form/index.vue.d.ts +21 -0
- package/dist/runtime/components/layout/ModuleMenu.d.vue.ts +6 -0
- package/dist/runtime/components/layout/ModuleMenu.vue +48 -0
- package/dist/runtime/components/layout/ModuleMenu.vue.d.ts +6 -0
- package/dist/runtime/components/layout/ThemePicker.d.vue.ts +3 -0
- package/dist/runtime/components/layout/ThemePicker.vue +100 -0
- package/dist/runtime/components/layout/ThemePicker.vue.d.ts +3 -0
- package/dist/runtime/components/layout/UserMenu.d.vue.ts +7 -0
- package/dist/runtime/components/layout/UserMenu.vue +77 -0
- package/dist/runtime/components/layout/UserMenu.vue.d.ts +7 -0
- package/dist/runtime/components/layout/default.d.vue.ts +13 -0
- package/dist/runtime/components/layout/default.vue +82 -0
- package/dist/runtime/components/layout/default.vue.d.ts +13 -0
- package/dist/runtime/components/placeholder/Svg.d.vue.ts +3 -0
- package/dist/runtime/components/placeholder/Svg.vue +22 -0
- package/dist/runtime/components/placeholder/Svg.vue.d.ts +3 -0
- package/dist/runtime/components/simple-table/index.d.vue.ts +21 -0
- package/dist/runtime/components/simple-table/index.vue +159 -0
- package/dist/runtime/components/simple-table/index.vue.d.ts +21 -0
- package/dist/runtime/components/table/ExcelExportModal.d.vue.ts +28 -0
- package/dist/runtime/components/table/ExcelExportModal.vue +82 -0
- package/dist/runtime/components/table/ExcelExportModal.vue.d.ts +28 -0
- package/dist/runtime/components/table/Page.d.vue.ts +26 -0
- package/dist/runtime/components/table/Page.vue +130 -0
- package/dist/runtime/components/table/Page.vue.d.ts +26 -0
- package/dist/runtime/components/table/Pagination.d.vue.ts +19 -0
- package/dist/runtime/components/table/Pagination.vue +51 -0
- package/dist/runtime/components/table/Pagination.vue.d.ts +19 -0
- package/dist/runtime/components/table/TooltipCell.d.vue.ts +7 -0
- package/dist/runtime/components/table/TooltipCell.vue +23 -0
- package/dist/runtime/components/table/TooltipCell.vue.d.ts +7 -0
- package/dist/runtime/components/table/column/ActionHeader.d.vue.ts +21 -0
- package/dist/runtime/components/table/column/ActionHeader.vue +155 -0
- package/dist/runtime/components/table/column/ActionHeader.vue.d.ts +21 -0
- package/dist/runtime/components/table/expansion/Field.d.vue.ts +18 -0
- package/dist/runtime/components/table/expansion/Field.vue +33 -0
- package/dist/runtime/components/table/expansion/Field.vue.d.ts +18 -0
- package/dist/runtime/components/table/expansion/Layout.d.vue.ts +13 -0
- package/dist/runtime/components/table/expansion/Layout.vue +8 -0
- package/dist/runtime/components/table/expansion/Layout.vue.d.ts +13 -0
- package/dist/runtime/components/table/header/index.d.vue.ts +19 -0
- package/dist/runtime/components/table/header/index.vue +221 -0
- package/dist/runtime/components/table/header/index.vue.d.ts +19 -0
- package/dist/runtime/components/table/header/settings/columns/DndList.d.vue.ts +32 -0
- package/dist/runtime/components/table/header/settings/columns/DndList.vue +46 -0
- package/dist/runtime/components/table/header/settings/columns/DndList.vue.d.ts +32 -0
- package/dist/runtime/components/table/header/settings/columns/Item.d.vue.ts +18 -0
- package/dist/runtime/components/table/header/settings/columns/Item.vue +59 -0
- package/dist/runtime/components/table/header/settings/columns/Item.vue.d.ts +18 -0
- package/dist/runtime/components/table/header/settings/columns/index.d.vue.ts +24 -0
- package/dist/runtime/components/table/header/settings/columns/index.vue +143 -0
- package/dist/runtime/components/table/header/settings/columns/index.vue.d.ts +24 -0
- package/dist/runtime/components/table/header/settings/index.d.vue.ts +25 -0
- package/dist/runtime/components/table/header/settings/index.vue +35 -0
- package/dist/runtime/components/table/header/settings/index.vue.d.ts +25 -0
- package/dist/runtime/components/table/index.d.vue.ts +26 -0
- package/dist/runtime/components/table/index.vue +121 -0
- package/dist/runtime/components/table/index.vue.d.ts +26 -0
- package/dist/runtime/components/table/query/order/Item.d.vue.ts +28 -0
- package/dist/runtime/components/table/query/order/Item.vue +85 -0
- package/dist/runtime/components/table/query/order/Item.vue.d.ts +28 -0
- package/dist/runtime/components/table/query/order/Newer.d.vue.ts +25 -0
- package/dist/runtime/components/table/query/order/Newer.vue +50 -0
- package/dist/runtime/components/table/query/order/Newer.vue.d.ts +25 -0
- package/dist/runtime/components/table/query/order/index.d.vue.ts +19 -0
- package/dist/runtime/components/table/query/order/index.vue +108 -0
- package/dist/runtime/components/table/query/order/index.vue.d.ts +19 -0
- package/dist/runtime/components/table/query/where/Newer.d.vue.ts +14 -0
- package/dist/runtime/components/table/query/where/Newer.vue +44 -0
- package/dist/runtime/components/table/query/where/Newer.vue.d.ts +14 -0
- package/dist/runtime/components/table/query/where/index.d.vue.ts +21 -0
- package/dist/runtime/components/table/query/where/index.vue +108 -0
- package/dist/runtime/components/table/query/where/index.vue.d.ts +21 -0
- package/dist/runtime/components/table/query/where/simple/index.d.vue.ts +7 -0
- package/dist/runtime/components/table/query/where/simple/index.vue +47 -0
- package/dist/runtime/components/table/query/where/simple/index.vue.d.ts +7 -0
- package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.d.vue.ts +27 -0
- package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue +65 -0
- package/dist/runtime/components/table/query/where/simple/item/ColumnPicker.vue.d.ts +27 -0
- package/dist/runtime/components/table/query/where/simple/item/OprPicker.d.vue.ts +27 -0
- package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue +68 -0
- package/dist/runtime/components/table/query/where/simple/item/OprPicker.vue.d.ts +27 -0
- package/dist/runtime/components/table/query/where/simple/item/index.d.vue.ts +20 -0
- package/dist/runtime/components/table/query/where/simple/item/index.vue +56 -0
- package/dist/runtime/components/table/query/where/simple/item/index.vue.d.ts +20 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.d.vue.ts +29 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue +152 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/AsyncSelect.vue.d.ts +29 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.d.vue.ts +27 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue +232 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/DatePicker.vue.d.ts +27 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/Input.d.vue.ts +29 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue +57 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/Input.vue.d.ts +29 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.d.vue.ts +29 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue +45 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/InputNumber.vue.d.ts +29 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/Select.d.vue.ts +28 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue +62 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/Select.vue.d.ts +28 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/index.d.vue.ts +19 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/index.vue +72 -0
- package/dist/runtime/components/table/query/where/simple/item/opr/index.vue.d.ts +19 -0
- package/dist/runtime/composables/api/flow/index.d.ts +3 -0
- package/dist/runtime/composables/api/flow/index.js +3 -0
- package/dist/runtime/composables/api/flow/useFlowApi.d.ts +1 -0
- package/dist/runtime/composables/api/flow/useFlowApi.js +1 -0
- package/dist/runtime/composables/api/flow/useFlowNodeApi.d.ts +1 -0
- package/dist/runtime/composables/api/flow/useFlowNodeApi.js +1 -0
- package/dist/runtime/composables/api/flow/useFlowNodeLinkApi.d.ts +1 -0
- package/dist/runtime/composables/api/flow/useFlowNodeLinkApi.js +1 -0
- package/dist/runtime/composables/api/index.d.ts +4 -0
- package/dist/runtime/composables/api/index.js +4 -0
- package/dist/runtime/composables/api/sys/index.d.ts +9 -0
- package/dist/runtime/composables/api/sys/index.js +9 -0
- package/dist/runtime/composables/api/sys/useAuthApi.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useAuthApi.js +13 -0
- package/dist/runtime/composables/api/sys/useCompanyApi.d.ts +1 -0
- package/dist/runtime/composables/api/sys/useCompanyApi.js +3 -0
- package/dist/runtime/composables/api/sys/useDepartmentApi.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useDepartmentApi.js +30 -0
- package/dist/runtime/composables/api/sys/useJobTitleApi.d.ts +1 -0
- package/dist/runtime/composables/api/sys/useJobTitleApi.js +3 -0
- package/dist/runtime/composables/api/sys/useLoginApi.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useLoginApi.js +13 -0
- package/dist/runtime/composables/api/sys/useMenuApi.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useMenuApi.js +32 -0
- package/dist/runtime/composables/api/sys/useRoleApi.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useRoleApi.js +20 -0
- package/dist/runtime/composables/api/sys/useRowRecord.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useRowRecord.js +8 -0
- package/dist/runtime/composables/api/sys/useUserApi.d.ts +0 -0
- package/dist/runtime/composables/api/sys/useUserApi.js +39 -0
- package/dist/runtime/composables/api/useApi.d.ts +0 -0
- package/dist/runtime/composables/api/useApi.js +103 -0
- package/dist/runtime/composables/api/useModel.d.ts +3 -0
- package/dist/runtime/composables/api/useModel.js +4 -0
- package/dist/runtime/composables/flow/index.d.ts +3 -0
- package/dist/runtime/composables/flow/index.js +3 -0
- package/dist/runtime/composables/flow/useFlow.d.ts +0 -0
- package/dist/runtime/composables/flow/useFlow.js +162 -0
- package/dist/runtime/composables/flow/useFlowResize.d.ts +56 -0
- package/dist/runtime/composables/flow/useFlowResize.js +148 -0
- package/dist/runtime/composables/flow/useFlowStyles.d.ts +14 -0
- package/dist/runtime/composables/flow/useFlowStyles.js +32 -0
- package/dist/runtime/composables/index.d.ts +13 -0
- package/dist/runtime/composables/index.js +13 -0
- package/dist/runtime/composables/table/index.d.ts +9 -0
- package/dist/runtime/composables/table/index.js +9 -0
- package/dist/runtime/composables/table/useTable.d.ts +0 -0
- package/dist/runtime/composables/table/useTable.js +340 -0
- package/dist/runtime/composables/table/useTableColumns.d.ts +30 -0
- package/dist/runtime/composables/table/useTableColumns.js +214 -0
- package/dist/runtime/composables/table/useTableData.d.ts +29 -0
- package/dist/runtime/composables/table/useTableData.js +92 -0
- package/dist/runtime/composables/table/useTableOpr.d.ts +8 -0
- package/dist/runtime/composables/table/useTableOpr.js +91 -0
- package/dist/runtime/composables/table/useTablePagination.d.ts +7 -0
- package/dist/runtime/composables/table/useTablePagination.js +29 -0
- package/dist/runtime/composables/table/useTableQuery.d.ts +23 -0
- package/dist/runtime/composables/table/useTableQuery.js +131 -0
- package/dist/runtime/composables/table/useTableRowActions.d.ts +18 -0
- package/dist/runtime/composables/table/useTableRowActions.js +154 -0
- package/dist/runtime/composables/table/useTableRowSelection.d.ts +6 -0
- package/dist/runtime/composables/table/useTableRowSelection.js +26 -0
- package/dist/runtime/composables/table/useTableView.d.ts +0 -0
- package/dist/runtime/composables/table/useTableView.js +150 -0
- package/dist/runtime/composables/useApp.d.ts +22 -0
- package/dist/runtime/composables/useApp.js +83 -0
- package/dist/runtime/composables/useAuth.d.ts +14 -0
- package/dist/runtime/composables/useAuth.js +92 -0
- package/dist/runtime/composables/useBoolean.d.ts +58 -0
- package/dist/runtime/composables/useBoolean.js +71 -0
- package/dist/runtime/composables/useDate.d.ts +25 -0
- package/dist/runtime/composables/useDate.js +157 -0
- package/dist/runtime/composables/useEChart.d.ts +103 -0
- package/dist/runtime/composables/useEChart.js +120 -0
- package/dist/runtime/composables/useForm.d.ts +0 -0
- package/dist/runtime/composables/useForm.js +60 -0
- package/dist/runtime/composables/usePermission.d.ts +10 -0
- package/dist/runtime/composables/usePermission.js +53 -0
- package/dist/runtime/composables/useRouterPush.d.ts +8 -0
- package/dist/runtime/composables/useRouterPush.js +37 -0
- package/dist/runtime/composables/useSidebarMenu.d.ts +36 -0
- package/dist/runtime/composables/useSidebarMenu.js +131 -0
- package/dist/runtime/composables/useTheme.d.ts +20 -0
- package/dist/runtime/composables/useTheme.js +94 -0
- package/dist/runtime/constants/columns.d.ts +3 -0
- package/dist/runtime/constants/columns.js +52 -0
- package/dist/runtime/constants/flow.d.ts +12 -0
- package/dist/runtime/constants/flow.js +24 -0
- package/dist/runtime/constants/index.d.ts +6 -0
- package/dist/runtime/constants/index.js +6 -0
- package/dist/runtime/constants/menu.d.ts +9 -0
- package/dist/runtime/constants/menu.js +11 -0
- package/dist/runtime/constants/options.d.ts +8 -0
- package/dist/runtime/constants/options.js +15 -0
- package/dist/runtime/constants/time.d.ts +7 -0
- package/dist/runtime/constants/time.js +12 -0
- package/dist/runtime/constants/user.d.ts +7 -0
- package/dist/runtime/constants/user.js +7 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/plugins/01.nuxtUIEnhancement.d.ts +18 -0
- package/dist/runtime/plugins/01.nuxtUIEnhancement.js +52 -0
- package/dist/runtime/plugins/02.dayjs.d.ts +13 -0
- package/dist/runtime/plugins/02.dayjs.js +9 -0
- package/dist/runtime/plugins/03.theme.d.ts +2 -0
- package/dist/runtime/plugins/03.theme.js +33 -0
- package/dist/runtime/plugins/04.head.d.ts +2 -0
- package/dist/runtime/plugins/04.head.js +29 -0
- package/dist/runtime/types/app.d.ts +42 -0
- package/dist/runtime/types/app.js +0 -0
- package/dist/runtime/types/cmds/login.d.ts +23 -0
- package/dist/runtime/types/cmds/sys.d.ts +10 -0
- package/dist/runtime/types/cmds/user.d.ts +8 -0
- package/dist/runtime/types/components/date.d.ts +5 -0
- package/dist/runtime/types/components/date.js +0 -0
- package/dist/runtime/types/components/dnd.d.ts +14 -0
- package/dist/runtime/types/components/dnd.js +0 -0
- package/dist/runtime/types/components/form/field.d.ts +102 -0
- package/dist/runtime/types/components/form/field.js +0 -0
- package/dist/runtime/types/components/form/index.d.ts +27 -0
- package/dist/runtime/types/components/form/index.js +1 -0
- package/dist/runtime/types/components/index.d.ts +4 -0
- package/dist/runtime/types/components/index.js +4 -0
- package/dist/runtime/types/components/table/column.d.ts +35 -0
- package/dist/runtime/types/components/table/column.js +0 -0
- package/dist/runtime/types/components/table/header.d.ts +33 -0
- package/dist/runtime/types/components/table/header.js +0 -0
- package/dist/runtime/types/components/table/index.d.ts +103 -0
- package/dist/runtime/types/components/table/index.js +4 -0
- package/dist/runtime/types/components/table/pagination.d.ts +14 -0
- package/dist/runtime/types/components/table/pagination.js +0 -0
- package/dist/runtime/types/components/table/query/index.d.ts +2 -0
- package/dist/runtime/types/components/table/query/index.js +2 -0
- package/dist/runtime/types/components/table/query/order.d.ts +16 -0
- package/dist/runtime/types/components/table/query/order.js +0 -0
- package/dist/runtime/types/components/table/query/where.d.ts +26 -0
- package/dist/runtime/types/components/table/query/where.js +0 -0
- package/dist/runtime/types/constants/time.d.ts +5 -0
- package/dist/runtime/types/index.d.ts +14 -0
- package/dist/runtime/types/index.js +6 -0
- package/dist/runtime/types/localStorage.d.ts +15 -0
- package/dist/runtime/types/locale.d.ts +81 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/models/base.d.ts +16 -0
- package/dist/runtime/types/models/flow.d.ts +31 -0
- package/dist/runtime/types/models/sys.d.ts +107 -0
- package/dist/runtime/types/query.d.ts +45 -0
- package/dist/runtime/types/query.js +1 -0
- package/dist/runtime/types/request.d.ts +55 -0
- package/dist/runtime/types/request.js +22 -0
- package/dist/runtime/types/storage.d.ts +10 -0
- package/dist/runtime/types/storage.js +11 -0
- package/dist/runtime/utils/array.d.ts +1 -0
- package/dist/runtime/utils/array.js +3 -0
- package/dist/runtime/utils/diff.d.ts +2 -0
- package/dist/runtime/utils/diff.js +81 -0
- package/dist/runtime/utils/download/index.d.ts +1 -0
- package/dist/runtime/utils/download/index.js +1 -0
- package/dist/runtime/utils/download/tagA.d.ts +2 -0
- package/dist/runtime/utils/download/tagA.js +14 -0
- package/dist/runtime/utils/emoji.d.ts +1 -0
- package/dist/runtime/utils/emoji.js +57 -0
- package/dist/runtime/utils/excel.d.ts +3 -0
- package/dist/runtime/utils/excel.js +63 -0
- package/dist/runtime/utils/form.d.ts +2 -0
- package/dist/runtime/utils/form.js +142 -0
- package/dist/runtime/utils/index.d.ts +11 -0
- package/dist/runtime/utils/index.js +11 -0
- package/dist/runtime/utils/request.d.ts +3 -0
- package/dist/runtime/utils/request.js +3 -0
- package/dist/runtime/utils/string.d.ts +6 -0
- package/dist/runtime/utils/string.js +18 -0
- package/dist/runtime/utils/tree.d.ts +8 -0
- package/dist/runtime/utils/tree.js +54 -0
- package/dist/runtime/utils/type.d.ts +1 -0
- package/dist/runtime/utils/type.js +3 -0
- package/dist/runtime/utils/vueuse.d.ts +1 -0
- package/dist/runtime/utils/vueuse.js +20 -0
- package/dist/types.d.mts +3 -0
- package/package.json +108 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useAuth, useApp } from "#v/composables";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
4
|
+
import { getEmojiFlag } from "#v/utils";
|
|
5
|
+
defineProps({
|
|
6
|
+
collapsed: { type: Boolean, required: false },
|
|
7
|
+
headerMode: { type: Boolean, required: false }
|
|
8
|
+
});
|
|
9
|
+
const auth = useAuth();
|
|
10
|
+
const app = useApp();
|
|
11
|
+
const route = useRoute();
|
|
12
|
+
const items = computed(() => [
|
|
13
|
+
[
|
|
14
|
+
{
|
|
15
|
+
type: "label",
|
|
16
|
+
label: auth.loginUser.value?.nickname,
|
|
17
|
+
icon: "i-lucide-user-circle"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
label: "\u4E2A\u4EBA\u8D44\u6599",
|
|
23
|
+
icon: "i-lucide-user",
|
|
24
|
+
disabled: true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "\u8BBE\u7F6E",
|
|
28
|
+
icon: "i-lucide-settings",
|
|
29
|
+
to: "/settings/theme"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
{
|
|
34
|
+
label: "\u9000\u51FA\u767B\u5F55",
|
|
35
|
+
icon: "i-lucide-log-out",
|
|
36
|
+
onSelect: () => auth.logout(route)
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
]);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<UDropdownMenu
|
|
44
|
+
:items="items"
|
|
45
|
+
:content="{ align: 'center', collisionPadding: 12 }"
|
|
46
|
+
:ui="{ content: collapsed || headerMode ? 'w-48' : 'w-(--reka-dropdown-menu-trigger-width)' }"
|
|
47
|
+
>
|
|
48
|
+
<UButton
|
|
49
|
+
:label="collapsed || headerMode && app.isMobile.value ? void 0 : auth.loginUser.value?.nickname ?? 'Hello'"
|
|
50
|
+
leading-icon="i-lucide-user-circle"
|
|
51
|
+
:trailing-icon="collapsed || headerMode ? void 0 : 'i-lucide-chevrons-up-down'"
|
|
52
|
+
color="neutral"
|
|
53
|
+
variant="ghost"
|
|
54
|
+
block
|
|
55
|
+
:square="collapsed || headerMode"
|
|
56
|
+
class="data-[state=open]:bg-elevated"
|
|
57
|
+
:ui="{
|
|
58
|
+
trailingIcon: 'text-dimmed'
|
|
59
|
+
}"
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
<template #locale-leading="{ item }">
|
|
63
|
+
<span>
|
|
64
|
+
{{ getEmojiFlag(item.locale) }}
|
|
65
|
+
</span>
|
|
66
|
+
</template>
|
|
67
|
+
<template #chip-leading="{ item }">
|
|
68
|
+
<span
|
|
69
|
+
:style="{
|
|
70
|
+
'--chip-light': item.chip === 'black' ? 'black' : `var(--color-${item.chip}-500)`,
|
|
71
|
+
'--chip-dark': item.chip === 'black' ? 'white' : `var(--color-${item.chip}-400)`
|
|
72
|
+
}"
|
|
73
|
+
class="ms-0.5 size-2 rounded-full bg-(--chip-light) dark:bg-(--chip-dark)"
|
|
74
|
+
/>
|
|
75
|
+
</template>
|
|
76
|
+
</UDropdownMenu>
|
|
77
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
collapsed?: boolean;
|
|
3
|
+
headerMode?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_49: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_49) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useApp, useSidebarMenus, useAuth } from "#v/composables";
|
|
3
|
+
import { useRoute } from "nuxt/app";
|
|
4
|
+
import { stringsJoin } from "#v/utils";
|
|
5
|
+
import UDashboardGroup from "@nuxt/ui/components/DashboardGroup.vue";
|
|
6
|
+
import UDashboardSidebar from "@nuxt/ui/components/DashboardSidebar.vue";
|
|
7
|
+
import UNavigationMenu from "@nuxt/ui/components/NavigationMenu.vue";
|
|
8
|
+
import ScrollArea from "#v/components/ScrollArea.vue";
|
|
9
|
+
import LayoutModuleMenu from "#v/components/layout/ModuleMenu.vue";
|
|
10
|
+
import LayoutThemePicker from "#v/components/layout/ThemePicker.vue";
|
|
11
|
+
import LayoutUserMenu from "#v/components/layout/UserMenu.vue";
|
|
12
|
+
import Watermark from "#v/components/Watermark.vue";
|
|
13
|
+
const open = ref(false);
|
|
14
|
+
const app = useApp();
|
|
15
|
+
const loginUser = useAuth().loginUser;
|
|
16
|
+
const route = useRoute();
|
|
17
|
+
const { sidebarMenus, expandSidebarMenu, breadcrumbs, getBreadcrumbs } = useSidebarMenus();
|
|
18
|
+
watch(() => route.path, (newPath) => {
|
|
19
|
+
expandSidebarMenu(newPath);
|
|
20
|
+
}, { immediate: true });
|
|
21
|
+
watch(
|
|
22
|
+
() => [route.fullPath, sidebarMenus.value],
|
|
23
|
+
() => {
|
|
24
|
+
if (route.fullPath) {
|
|
25
|
+
breadcrumbs.value = getBreadcrumbs(route.fullPath);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{ immediate: true, deep: true }
|
|
29
|
+
);
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<UDashboardGroup unit="rem">
|
|
34
|
+
<UDashboardSidebar
|
|
35
|
+
id="sidebar"
|
|
36
|
+
v-model:open="open"
|
|
37
|
+
collapsible
|
|
38
|
+
resizable
|
|
39
|
+
:min-size="app.appConfig.value.siderMinWidth"
|
|
40
|
+
:max-size="app.appConfig.value.siderMaxWidth"
|
|
41
|
+
:ui="{
|
|
42
|
+
root: 'bg-muted min-w-[65px]',
|
|
43
|
+
// 64 + 1: 1 is border-r
|
|
44
|
+
footer: 'lg:border-t lg:border-default sm:px-4',
|
|
45
|
+
body: 'px-0 sm:px-0',
|
|
46
|
+
header: 'border-b border-default sm:px-4'
|
|
47
|
+
}"
|
|
48
|
+
>
|
|
49
|
+
<template #header="{ collapsed }">
|
|
50
|
+
<LayoutModuleMenu :collapsed="collapsed" />
|
|
51
|
+
<LayoutThemePicker v-if="!collapsed" class="ml-auto" />
|
|
52
|
+
</template>
|
|
53
|
+
<template #default="{ collapsed }">
|
|
54
|
+
<ScrollArea>
|
|
55
|
+
<div class="px-4 flex flex-col gap-2">
|
|
56
|
+
<UNavigationMenu
|
|
57
|
+
:items="sidebarMenus"
|
|
58
|
+
:collapsed="collapsed"
|
|
59
|
+
trailing-icon="i-lucide-chevron-down"
|
|
60
|
+
orientation="vertical"
|
|
61
|
+
tooltip
|
|
62
|
+
popover
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</ScrollArea>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<template #footer="{ collapsed }">
|
|
69
|
+
<LayoutUserMenu :collapsed="collapsed" />
|
|
70
|
+
</template>
|
|
71
|
+
</UDashboardSidebar>
|
|
72
|
+
|
|
73
|
+
<Watermark
|
|
74
|
+
:text="stringsJoin([
|
|
75
|
+
loginUser?.nickname ?? loginUser?.username,
|
|
76
|
+
loginUser?.department?.company?.nickname ?? loginUser?.department?.name
|
|
77
|
+
], '@')"
|
|
78
|
+
>
|
|
79
|
+
<slot />
|
|
80
|
+
</Watermark>
|
|
81
|
+
</UDashboardGroup>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_49: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_49) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg class="absolute inset-0 h-full w-full stroke-inverted/5" fill="none">
|
|
3
|
+
<defs>
|
|
4
|
+
<pattern
|
|
5
|
+
id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
|
|
6
|
+
x="0"
|
|
7
|
+
y="0"
|
|
8
|
+
width="10"
|
|
9
|
+
height="10"
|
|
10
|
+
patternUnits="userSpaceOnUse"
|
|
11
|
+
>
|
|
12
|
+
<path d="M-3 13 15-5M-5 5l18-18M-1 21 17 3" />
|
|
13
|
+
</pattern>
|
|
14
|
+
</defs>
|
|
15
|
+
<rect
|
|
16
|
+
stroke="none"
|
|
17
|
+
fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)"
|
|
18
|
+
width="100%"
|
|
19
|
+
height="100%"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VTableProps } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "singleRow" | "singleColumn" | "hideLastRowBorder"> & {
|
|
4
|
+
data: T[];
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import("vue").VNode & {
|
|
13
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, useTemplateRef, h, onMounted, onUnmounted, watch, nextTick } from "vue";
|
|
3
|
+
import UButton from "@nuxt/ui/components/Button.vue";
|
|
4
|
+
import UBadge from "@nuxt/ui/components/Badge.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
singleRow: { type: Boolean, required: false, default: true },
|
|
7
|
+
singleColumn: { type: Boolean, required: false, default: false },
|
|
8
|
+
hideLastRowBorder: { type: Boolean, required: false },
|
|
9
|
+
bizColumns: { type: Array, required: true },
|
|
10
|
+
data: { type: Array, required: true }
|
|
11
|
+
});
|
|
12
|
+
const thClass = computed(() => {
|
|
13
|
+
const classList = [];
|
|
14
|
+
if (!props.singleRow) {
|
|
15
|
+
classList.push("[&:has([role=checkbox])]:pe-2");
|
|
16
|
+
}
|
|
17
|
+
if (!props.singleColumn) {
|
|
18
|
+
classList.push("border-b");
|
|
19
|
+
}
|
|
20
|
+
return classList.join(" ");
|
|
21
|
+
});
|
|
22
|
+
const tdClass = computed(() => {
|
|
23
|
+
const classList = ["py-1.5"];
|
|
24
|
+
if (!props.singleRow) {
|
|
25
|
+
classList.push("border-l first:border-l-0 [&:has([role=checkbox])]:pe-2");
|
|
26
|
+
}
|
|
27
|
+
if (!props.singleColumn) {
|
|
28
|
+
classList.push("group-has-[td:not(:empty)]:border-b");
|
|
29
|
+
if (props.hideLastRowBorder) {
|
|
30
|
+
classList.push("[tr:last-child_td]:border-b-0");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return classList.join(" ");
|
|
34
|
+
});
|
|
35
|
+
const tableWidth = ref(0);
|
|
36
|
+
const tableDiv = useTemplateRef("table");
|
|
37
|
+
let resizeObserver = null;
|
|
38
|
+
let scrollContainer = null;
|
|
39
|
+
const showLeftPinnedShadow = ref(false);
|
|
40
|
+
const showRightPinnedShadow = ref(false);
|
|
41
|
+
const PINNED_SHADOW_CLASSES = {
|
|
42
|
+
left: {
|
|
43
|
+
base: "[&_th[data-pinned=left]]:after:absolute [&_th[data-pinned=left]]:after:top-0 [&_th[data-pinned=left]]:after:right-0 [&_th[data-pinned=left]]:after:bottom-0 [&_th[data-pinned=left]]:after:w-[30px] [&_th[data-pinned=left]]:after:translate-x-full [&_th[data-pinned=left]]:after:transition-opacity [&_th[data-pinned=left]]:after:duration-300 [&_th[data-pinned=left]]:after:pointer-events-none [&_th[data-pinned=left]]:after:shadow-[inset_10px_0_8px_-8px_rgba(0,0,0,0.15)] [&_td[data-pinned=left]]:after:absolute [&_td[data-pinned=left]]:after:top-0 [&_td[data-pinned=left]]:after:right-0 [&_td[data-pinned=left]]:after:bottom-0 [&_td[data-pinned=left]]:after:w-[30px] [&_td[data-pinned=left]]:after:translate-x-full [&_td[data-pinned=left]]:after:transition-opacity [&_td[data-pinned=left]]:after:duration-200 [&_td[data-pinned=left]]:after:pointer-events-none [&_td[data-pinned=left]]:after:shadow-[inset_10px_0_8px_-8px_rgba(0,0,0,0.15)]",
|
|
44
|
+
show: "[&_th[data-pinned=left]]:after:opacity-100 [&_td[data-pinned=left]]:after:opacity-100",
|
|
45
|
+
hide: "[&_th[data-pinned=left]]:after:opacity-0 [&_td[data-pinned=left]]:after:opacity-0"
|
|
46
|
+
},
|
|
47
|
+
right: {
|
|
48
|
+
base: "[&_th[data-pinned=right]]:before:absolute [&_th[data-pinned=right]]:before:top-0 [&_th[data-pinned=right]]:before:left-0 [&_th[data-pinned=right]]:before:bottom-0 [&_th[data-pinned=right]]:before:w-[30px] [&_th[data-pinned=right]]:before:-translate-x-full [&_th[data-pinned=right]]:before:transition-opacity [&_th[data-pinned=right]]:before:duration-300 [&_th[data-pinned=right]]:before:pointer-events-none [&_th[data-pinned=right]]:before:shadow-[inset_-10px_0_8px_-8px_rgba(0,0,0,0.15)] [&_td[data-pinned=right]]:before:absolute [&_td[data-pinned=right]]:before:top-0 [&_td[data-pinned=right]]:before:left-0 [&_td[data-pinned=right]]:before:bottom-0 [&_td[data-pinned=right]]:before:w-[30px] [&_td[data-pinned=right]]:before:-translate-x-full [&_td[data-pinned=right]]:before:transition-opacity [&_td[data-pinned=right]]:before:duration-200 [&_td[data-pinned=right]]:before:pointer-events-none [&_td[data-pinned=right]]:before:shadow-[inset_-10px_0_8px_-8px_rgba(0,0,0,0.15)]",
|
|
49
|
+
show: "[&_th[data-pinned=right]]:before:opacity-100 [&_td[data-pinned=right]]:before:opacity-100",
|
|
50
|
+
hide: "[&_th[data-pinned=right]]:before:opacity-0 [&_td[data-pinned=right]]:before:opacity-0"
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const pinnedShadowClasses = computed(() => [
|
|
54
|
+
PINNED_SHADOW_CLASSES.left.base,
|
|
55
|
+
PINNED_SHADOW_CLASSES.right.base,
|
|
56
|
+
showLeftPinnedShadow.value ? PINNED_SHADOW_CLASSES.left.show : PINNED_SHADOW_CLASSES.left.hide,
|
|
57
|
+
showRightPinnedShadow.value ? PINNED_SHADOW_CLASSES.right.show : PINNED_SHADOW_CLASSES.right.hide
|
|
58
|
+
]);
|
|
59
|
+
function updateTableWidth() {
|
|
60
|
+
if (tableDiv.value) {
|
|
61
|
+
tableWidth.value = tableDiv.value.offsetWidth;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function checkShadowVisibility() {
|
|
65
|
+
if (!scrollContainer) return;
|
|
66
|
+
const { scrollLeft, scrollWidth, clientWidth } = scrollContainer;
|
|
67
|
+
showLeftPinnedShadow.value = scrollLeft > 0;
|
|
68
|
+
showRightPinnedShadow.value = scrollLeft + clientWidth < scrollWidth - 1;
|
|
69
|
+
}
|
|
70
|
+
function handleScroll(e) {
|
|
71
|
+
const target = e.target;
|
|
72
|
+
const { scrollLeft, scrollWidth, clientWidth } = target;
|
|
73
|
+
showLeftPinnedShadow.value = scrollLeft > 0;
|
|
74
|
+
showRightPinnedShadow.value = scrollLeft + clientWidth < scrollWidth - 1;
|
|
75
|
+
}
|
|
76
|
+
onMounted(() => {
|
|
77
|
+
nextTick(() => {
|
|
78
|
+
if (!tableDiv.value) return;
|
|
79
|
+
const selectors = [".overflow-x-auto", "[data-scroll-container]", ".overflow-auto", 'div[style*="overflow"]'];
|
|
80
|
+
for (const selector of selectors) {
|
|
81
|
+
scrollContainer = tableDiv.value.querySelector(selector);
|
|
82
|
+
if (scrollContainer) break;
|
|
83
|
+
}
|
|
84
|
+
if (scrollContainer) {
|
|
85
|
+
scrollContainer.addEventListener("scroll", handleScroll, { passive: true });
|
|
86
|
+
}
|
|
87
|
+
if (tableDiv.value) {
|
|
88
|
+
resizeObserver = new ResizeObserver(() => {
|
|
89
|
+
updateTableWidth();
|
|
90
|
+
nextTick(() => checkShadowVisibility());
|
|
91
|
+
});
|
|
92
|
+
resizeObserver.observe(tableDiv.value);
|
|
93
|
+
updateTableWidth();
|
|
94
|
+
checkShadowVisibility();
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
watch(props.data, () => {
|
|
99
|
+
nextTick(() => checkShadowVisibility());
|
|
100
|
+
}, { flush: "post" });
|
|
101
|
+
onUnmounted(() => {
|
|
102
|
+
if (resizeObserver && tableDiv.value) {
|
|
103
|
+
resizeObserver.unobserve(tableDiv.value);
|
|
104
|
+
resizeObserver.disconnect();
|
|
105
|
+
resizeObserver = null;
|
|
106
|
+
}
|
|
107
|
+
if (scrollContainer) {
|
|
108
|
+
scrollContainer.removeEventListener("scroll", handleScroll);
|
|
109
|
+
scrollContainer = null;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const columnsWithHeader = computed(() => props.bizColumns.map((col) => ({
|
|
113
|
+
...col,
|
|
114
|
+
header: () => {
|
|
115
|
+
return h(UButton, {
|
|
116
|
+
label: col.header,
|
|
117
|
+
color: "neutral",
|
|
118
|
+
variant: "link",
|
|
119
|
+
class: "px-4 font-bold w-full text-highlighted"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
})) || []);
|
|
123
|
+
const columnsWithFilterOptions = computed(() => {
|
|
124
|
+
return columnsWithHeader.value.map((col) => {
|
|
125
|
+
if (!col.filterOption) {
|
|
126
|
+
return col;
|
|
127
|
+
}
|
|
128
|
+
switch (col.filterOption.type) {
|
|
129
|
+
case "select":
|
|
130
|
+
if (col.cell) return col;
|
|
131
|
+
return {
|
|
132
|
+
...col,
|
|
133
|
+
cell: ({ cell }) => {
|
|
134
|
+
const item = col.filterOption?.["items"].find((item2) => item2.value === cell.getValue());
|
|
135
|
+
return item ? h(UBadge, { color: item?.color ?? "neutral", variant: col.filterOption?.["variant"] ?? "outline" }, () => item?.label ?? "\u672A\u77E5\u503C") : "";
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
default:
|
|
139
|
+
return col;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<template>
|
|
146
|
+
<div ref="table" class="flex flex-col h-full">
|
|
147
|
+
<UTable
|
|
148
|
+
class="flex-1"
|
|
149
|
+
:data="data"
|
|
150
|
+
:columns="columnsWithFilterOptions"
|
|
151
|
+
:class="pinnedShadowClasses"
|
|
152
|
+
:ui="{
|
|
153
|
+
th: thClass,
|
|
154
|
+
td: tdClass
|
|
155
|
+
}"
|
|
156
|
+
@resize="updateTableWidth"
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VTableProps } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<Pick<VTableProps<T>, "bizColumns" | "singleRow" | "singleColumn" | "hideLastRowBorder"> & {
|
|
4
|
+
data: T[];
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import("vue").VNode & {
|
|
13
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ListApi, VColumn, WhereQuery, WhereQueryOption } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
filename?: string;
|
|
5
|
+
filenameWithDateTime?: boolean;
|
|
6
|
+
columns: VColumn<any>[];
|
|
7
|
+
whereQueryOptions: WhereQueryOption<any>[];
|
|
8
|
+
extraWhereQueryInitValues?: WhereQuery<any>;
|
|
9
|
+
listFn?: ListApi<any>;
|
|
10
|
+
} & {
|
|
11
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: (evt: "close", args_0: boolean) => void;
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { now } from "@internationalized/date";
|
|
4
|
+
import { defu } from "defu";
|
|
5
|
+
import { useExporting } from "#v/composables/useBoolean";
|
|
6
|
+
import { useDate } from "#v/composables/useDate";
|
|
7
|
+
import { dateFormat, TIME_ZONE } from "#v/constants";
|
|
8
|
+
import { genTableExcel } from "#v/utils";
|
|
9
|
+
import TableQueryWhere from "#v/components/table/query/where/index.vue";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
filename: { type: String, required: false },
|
|
12
|
+
filenameWithDateTime: { type: Boolean, required: false },
|
|
13
|
+
columns: { type: Array, required: true },
|
|
14
|
+
whereQueryOptions: { type: Array, required: true },
|
|
15
|
+
extraWhereQueryInitValues: { type: Object, required: false },
|
|
16
|
+
listFn: { type: Function, required: false }
|
|
17
|
+
});
|
|
18
|
+
const whereQuery = ref();
|
|
19
|
+
const emit = defineEmits(["close"]);
|
|
20
|
+
const { exporting, startExporting, endExporting } = useExporting();
|
|
21
|
+
const exportExcel = async () => {
|
|
22
|
+
if (!props.listFn) {
|
|
23
|
+
throw new Error("listFn is required for exporting Excel");
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
startExporting();
|
|
27
|
+
const { data } = await props.listFn({
|
|
28
|
+
pagination: {
|
|
29
|
+
pageNum: 0,
|
|
30
|
+
pageSize: 0
|
|
31
|
+
},
|
|
32
|
+
whereQuery: defu(whereQuery.value, props.extraWhereQueryInitValues)
|
|
33
|
+
});
|
|
34
|
+
if (data.value.data) {
|
|
35
|
+
const filename = props.filenameWithDateTime ? `${props.filename || "\u5BFC\u51FA\u6570\u636E"}-${useDate().dateValueToDayjs(now(TIME_ZONE))?.format(dateFormat)}` : `${props.filename || "\u5BFC\u51FA\u6570\u636E"}`;
|
|
36
|
+
await genTableExcel(props.columns, data.value.data.list, filename);
|
|
37
|
+
emit("close", true);
|
|
38
|
+
}
|
|
39
|
+
} finally {
|
|
40
|
+
endExporting();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<UModal
|
|
47
|
+
title="导出Excel文件"
|
|
48
|
+
description="根据当前表格列导出Excel文件"
|
|
49
|
+
:close="{ onClick: () => emit('close', false) }"
|
|
50
|
+
:dismissible="false"
|
|
51
|
+
>
|
|
52
|
+
<template #body>
|
|
53
|
+
<UFormField label="筛选条件">
|
|
54
|
+
<TableQueryWhere
|
|
55
|
+
:where-query="whereQuery"
|
|
56
|
+
:where-options="whereQueryOptions"
|
|
57
|
+
:trigger-fetching="async () => {
|
|
58
|
+
}"
|
|
59
|
+
hide-query-button
|
|
60
|
+
@update-where-query="(newWhereQuery) => whereQuery = newWhereQuery"
|
|
61
|
+
/>
|
|
62
|
+
</UFormField>
|
|
63
|
+
</template>
|
|
64
|
+
<template #footer>
|
|
65
|
+
<UButton
|
|
66
|
+
label="取消"
|
|
67
|
+
color="neutral"
|
|
68
|
+
variant="subtle"
|
|
69
|
+
icon="i-lucide-x"
|
|
70
|
+
@click="emit('close', false)"
|
|
71
|
+
/>
|
|
72
|
+
<UButton
|
|
73
|
+
label="导出"
|
|
74
|
+
color="primary"
|
|
75
|
+
variant="solid"
|
|
76
|
+
icon="i-lucide-sheet"
|
|
77
|
+
:loading="exporting"
|
|
78
|
+
@click="exportExcel"
|
|
79
|
+
/>
|
|
80
|
+
</template>
|
|
81
|
+
</UModal>
|
|
82
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ListApi, VColumn, WhereQuery, WhereQueryOption } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
filename?: string;
|
|
5
|
+
filenameWithDateTime?: boolean;
|
|
6
|
+
columns: VColumn<any>[];
|
|
7
|
+
whereQueryOptions: WhereQueryOption<any>[];
|
|
8
|
+
extraWhereQueryInitValues?: WhereQuery<any>;
|
|
9
|
+
listFn?: ListApi<any>;
|
|
10
|
+
} & {
|
|
11
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: (evt: "close", args_0: boolean) => void;
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { VTableProps } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<VTableProps<T>> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
7
|
+
createRow: (model: T) => number;
|
|
8
|
+
updateRow: (model: T) => void;
|
|
9
|
+
deleteRow: (model: T) => void;
|
|
10
|
+
refresh: (fromStart?: boolean) => Promise<void>;
|
|
11
|
+
stats: import("vue").Ref<import("#v/types").StatsItem[][], import("#v/types").StatsItem[][]>;
|
|
12
|
+
data: import("vue").Ref<T[], T[]>;
|
|
13
|
+
}>) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {};
|
|
16
|
+
emit: {};
|
|
17
|
+
}>) => import("vue").VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} : {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
}) & {};
|