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,130 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useProTableView } from "#v/composables/table/useTableView";
|
|
3
|
+
import TableHeader from "#v/components/table/header/index.vue";
|
|
4
|
+
import TableQueryWhere from "#v/components/table/query/where/index.vue";
|
|
5
|
+
import TablePagination from "#v/components/table/Pagination.vue";
|
|
6
|
+
import ScrollArea from "#v/components/ScrollArea.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
name: { type: String, required: true },
|
|
9
|
+
cnName: { type: String, required: true },
|
|
10
|
+
disableCreation: { type: Boolean, required: false },
|
|
11
|
+
disableRefresh: { type: Boolean, required: false },
|
|
12
|
+
disableBatchDeletion: { type: Boolean, required: false },
|
|
13
|
+
disableSettings: { type: Boolean, required: false },
|
|
14
|
+
disablePagination: { type: Boolean, required: false },
|
|
15
|
+
disableFetchOnMounted: { type: Boolean, required: false },
|
|
16
|
+
useApiGroup: { type: Function, required: false },
|
|
17
|
+
apiListFn: { type: Function, required: false },
|
|
18
|
+
fetchAll: { type: Boolean, required: false },
|
|
19
|
+
onEditRowFromModal: { type: Function, required: false },
|
|
20
|
+
singleColumn: { type: Boolean, required: false, default: false },
|
|
21
|
+
hideLastRowBorder: { type: Boolean, required: false },
|
|
22
|
+
singleRow: { type: Boolean, required: false, default: true },
|
|
23
|
+
exportExcel: { type: Object, required: false },
|
|
24
|
+
extraButtons: { type: Array, required: false },
|
|
25
|
+
onNew: { type: Function, required: false },
|
|
26
|
+
disableWhereQuery: { type: Boolean, required: false },
|
|
27
|
+
whereQueryOpen: { type: Boolean, required: false },
|
|
28
|
+
onUpdateWhereQueryOpen: { type: Function, required: false },
|
|
29
|
+
extraWhereQueryOptions: { type: Array, required: false },
|
|
30
|
+
extraWhereQueryInitValues: { type: Object, required: false },
|
|
31
|
+
disableOrderQuery: { type: Boolean, required: false },
|
|
32
|
+
extraOrderQueryOptions: { type: Array, required: false },
|
|
33
|
+
bizColumns: { type: Array, required: true },
|
|
34
|
+
extraRowActions: { type: Array, required: false },
|
|
35
|
+
treeifyColName: { type: null, required: false },
|
|
36
|
+
commonColumnProps: { type: Object, required: false },
|
|
37
|
+
rowKey: { type: null, required: false },
|
|
38
|
+
disableRowActions: { type: Boolean, required: false },
|
|
39
|
+
disableRowUpdate: { type: Boolean, required: false },
|
|
40
|
+
disableRowCopy: { type: Boolean, required: false },
|
|
41
|
+
disableRowDeletion: { type: Boolean, required: false },
|
|
42
|
+
disableRowSelection: { type: Boolean, required: false },
|
|
43
|
+
expandable: { type: Boolean, required: false },
|
|
44
|
+
expandVNode: { type: Function, required: false },
|
|
45
|
+
rowSpanColumns: { type: Array, required: false },
|
|
46
|
+
customRowCopyFn: { type: Function, required: false }
|
|
47
|
+
});
|
|
48
|
+
const {
|
|
49
|
+
// data
|
|
50
|
+
data,
|
|
51
|
+
createRow,
|
|
52
|
+
updateRow,
|
|
53
|
+
deleteRow,
|
|
54
|
+
stats,
|
|
55
|
+
// crud
|
|
56
|
+
fetchList,
|
|
57
|
+
// row selection
|
|
58
|
+
rowSelection,
|
|
59
|
+
onUpdateRowSelection,
|
|
60
|
+
// props
|
|
61
|
+
tblProps,
|
|
62
|
+
tblWhereQueryProps,
|
|
63
|
+
tblHeaderProps,
|
|
64
|
+
tblPaginationProps,
|
|
65
|
+
// others
|
|
66
|
+
tblContextMenuItems,
|
|
67
|
+
// view
|
|
68
|
+
tableWidth,
|
|
69
|
+
updateTableWidth,
|
|
70
|
+
tblClasses,
|
|
71
|
+
tblUi
|
|
72
|
+
} = useProTableView(props);
|
|
73
|
+
defineExpose({ createRow, updateRow, deleteRow, refresh: fetchList, stats, data });
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<UDashboardPanel :id="name" :ui="{ body: 'p-0!' }">
|
|
78
|
+
<template #header>
|
|
79
|
+
<UDashboardNavbar :title="cnName" class="px-2.5!">
|
|
80
|
+
<template #leading>
|
|
81
|
+
<UDashboardSidebarCollapse />
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<template #right>
|
|
85
|
+
<TableHeader v-bind="tblHeaderProps" />
|
|
86
|
+
</template>
|
|
87
|
+
</UDashboardNavbar>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
<template #body>
|
|
91
|
+
<div ref="table" class="flex flex-col h-full">
|
|
92
|
+
<UCollapsible :open="tblHeaderProps.whereQueryProps.whereQueryOpen">
|
|
93
|
+
<template #content>
|
|
94
|
+
<TableQueryWhere ref="proTableQueryWhere" v-bind="tblWhereQueryProps" class="border-b border-default" />
|
|
95
|
+
</template>
|
|
96
|
+
</UCollapsible>
|
|
97
|
+
|
|
98
|
+
<!-- table -->
|
|
99
|
+
<UContextMenu :items="tblContextMenuItems">
|
|
100
|
+
<ScrollArea class="flex-1">
|
|
101
|
+
<UTable
|
|
102
|
+
v-bind="tblProps"
|
|
103
|
+
:row-selection="rowSelection"
|
|
104
|
+
:class="tblClasses"
|
|
105
|
+
:ui="tblUi"
|
|
106
|
+
@resize="updateTableWidth"
|
|
107
|
+
@update:row-selection="onUpdateRowSelection"
|
|
108
|
+
>
|
|
109
|
+
<template v-if="expandable" #expanded="{ row }">
|
|
110
|
+
<div
|
|
111
|
+
class="px-1 py-3 sticky inset-4 overflow-hidden"
|
|
112
|
+
:style="{
|
|
113
|
+
width: `${tableWidth - 38}px`
|
|
114
|
+
}"
|
|
115
|
+
>
|
|
116
|
+
<KeepAlive>
|
|
117
|
+
<component :is="expandVNode?.(row.original)" :key="row.original[rowKey]" role="expand-row" />
|
|
118
|
+
</KeepAlive>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
121
|
+
</UTable>
|
|
122
|
+
</ScrollArea>
|
|
123
|
+
</UContextMenu>
|
|
124
|
+
|
|
125
|
+
<!-- pagination -->
|
|
126
|
+
<TablePagination v-bind="tblPaginationProps" />
|
|
127
|
+
</div>
|
|
128
|
+
</template>
|
|
129
|
+
</UDashboardPanel>
|
|
130
|
+
</template>
|
|
@@ -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
|
+
}) & {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TablePaginationProps } 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<TablePaginationProps<T>> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {};
|
|
9
|
+
emit: {};
|
|
10
|
+
}>) => import("vue").VNode & {
|
|
11
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
16
|
+
[K in keyof T]: T[K];
|
|
17
|
+
} : {
|
|
18
|
+
[K in keyof T as K]: T[K];
|
|
19
|
+
}) & {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useApp } from "#v/composables/useApp";
|
|
3
|
+
defineProps({
|
|
4
|
+
data: { type: Array, required: true },
|
|
5
|
+
selectedIds: { type: Array, required: false },
|
|
6
|
+
pageNum: { type: Number, required: true },
|
|
7
|
+
pageSize: { type: Number, required: true },
|
|
8
|
+
total: { type: Number, required: true },
|
|
9
|
+
onUpdatePage: { type: Function, required: true },
|
|
10
|
+
pageSizeDropdownMenuItems: { type: Array, required: true },
|
|
11
|
+
hidePagination: { type: Boolean, required: false },
|
|
12
|
+
fetching: { type: Boolean, required: false },
|
|
13
|
+
size: { type: null, required: false, default: "sm" }
|
|
14
|
+
});
|
|
15
|
+
const isMobile = useApp().isMobile;
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="flex items-center justify-between gap-3 h-(--ui-footer-height) border-t border-default p-3">
|
|
20
|
+
<div v-if="!isMobile" class="text-sm text-muted truncate">
|
|
21
|
+
{{ selectedIds?.length ?? 0 }} of
|
|
22
|
+
{{ data.length }} 行已选择
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div v-if="!hidePagination" class="flex items-center gap-1 ml-auto">
|
|
26
|
+
<div v-if="!isMobile" class="text-sm text-muted truncate mr-3">
|
|
27
|
+
共 {{ total }} 条
|
|
28
|
+
</div>
|
|
29
|
+
<UPagination
|
|
30
|
+
:page="pageNum"
|
|
31
|
+
:items-per-page="pageSize"
|
|
32
|
+
:total="total"
|
|
33
|
+
:size="size"
|
|
34
|
+
variant="outline"
|
|
35
|
+
active-variant="subtle"
|
|
36
|
+
:disabled="fetching"
|
|
37
|
+
:sibling-count="isMobile ? 1 : 2"
|
|
38
|
+
@update:page="onUpdatePage"
|
|
39
|
+
/>
|
|
40
|
+
<UDropdownMenu :disabled="fetching" :items="pageSizeDropdownMenuItems">
|
|
41
|
+
<UButton
|
|
42
|
+
:label="`${pageSize} / \u9875`"
|
|
43
|
+
color="neutral"
|
|
44
|
+
variant="outline"
|
|
45
|
+
trailing-icon="i-lucide-chevron-down"
|
|
46
|
+
:size="size"
|
|
47
|
+
/>
|
|
48
|
+
</UDropdownMenu>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TablePaginationProps } 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<TablePaginationProps<T>> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {};
|
|
9
|
+
emit: {};
|
|
10
|
+
}>) => import("vue").VNode & {
|
|
11
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
16
|
+
[K in keyof T]: T[K];
|
|
17
|
+
} : {
|
|
18
|
+
[K in keyof T as K]: T[K];
|
|
19
|
+
}) & {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: string | null | undefined;
|
|
3
|
+
tooltipText: string | null | undefined;
|
|
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,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
value: { type: null, required: true },
|
|
4
|
+
tooltipText: { type: null, required: true }
|
|
5
|
+
});
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div class="flex items-center">
|
|
10
|
+
<div>
|
|
11
|
+
{{ value }}
|
|
12
|
+
</div>
|
|
13
|
+
<UTooltip :text="tooltipText ?? ''" :content="{ side: 'top' }">
|
|
14
|
+
<UButton
|
|
15
|
+
icon="i-lucide-circle-question-mark"
|
|
16
|
+
color="neutral"
|
|
17
|
+
size="xs"
|
|
18
|
+
variant="link"
|
|
19
|
+
class="cursor-default"
|
|
20
|
+
/>
|
|
21
|
+
</UTooltip>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: string | null | undefined;
|
|
3
|
+
tooltipText: string | null | undefined;
|
|
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,21 @@
|
|
|
1
|
+
import type { OrderQueryOpr } from '#v/types';
|
|
2
|
+
import type { ColumnPinningPosition } from '@tanstack/table-core';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
accessorKey: string;
|
|
6
|
+
fetchList: () => Promise<void>;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
enableOrder?: boolean;
|
|
9
|
+
isOrdered?: boolean;
|
|
10
|
+
orderOpr?: OrderQueryOpr;
|
|
11
|
+
orderIndex?: number;
|
|
12
|
+
onUpdateOrderOpr: (opr: OrderQueryOpr) => void;
|
|
13
|
+
isPinned: ColumnPinningPosition;
|
|
14
|
+
onUpdatePinned: (position: 'left' | 'right' | 'unfixed') => void;
|
|
15
|
+
enableFilter?: boolean;
|
|
16
|
+
onFilterClick?: (field: string) => void;
|
|
17
|
+
onHideColumn?: (accessorKey: string) => void;
|
|
18
|
+
};
|
|
19
|
+
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>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
label: { type: String, required: true },
|
|
5
|
+
accessorKey: { type: String, required: true },
|
|
6
|
+
fetchList: { type: Function, required: true },
|
|
7
|
+
disabled: { type: Boolean, required: false },
|
|
8
|
+
enableOrder: { type: Boolean, required: false },
|
|
9
|
+
isOrdered: { type: Boolean, required: false },
|
|
10
|
+
orderOpr: { type: [String, null], required: false },
|
|
11
|
+
orderIndex: { type: Number, required: false },
|
|
12
|
+
onUpdateOrderOpr: { type: Function, required: true },
|
|
13
|
+
isPinned: { type: [Boolean, String], required: true },
|
|
14
|
+
onUpdatePinned: { type: Function, required: true },
|
|
15
|
+
enableFilter: { type: Boolean, required: false },
|
|
16
|
+
onFilterClick: { type: Function, required: false },
|
|
17
|
+
onHideColumn: { type: Function, required: false }
|
|
18
|
+
});
|
|
19
|
+
const isOrderedAsc = computed(() => props.isOrdered && props.orderOpr === "asc");
|
|
20
|
+
const isOrderedDesc = computed(() => props.isOrdered && props.orderOpr === "desc");
|
|
21
|
+
const onClickAsc = async () => {
|
|
22
|
+
props.onUpdateOrderOpr(isOrderedAsc.value ? null : "asc");
|
|
23
|
+
await props.fetchList();
|
|
24
|
+
};
|
|
25
|
+
const onClickDesc = async () => {
|
|
26
|
+
props.onUpdateOrderOpr(isOrderedDesc.value ? null : "desc");
|
|
27
|
+
await props.fetchList();
|
|
28
|
+
};
|
|
29
|
+
const dropdownItems = computed(() => {
|
|
30
|
+
const groups = [];
|
|
31
|
+
if (props.enableFilter) {
|
|
32
|
+
groups.push({
|
|
33
|
+
label: "\u7B5B\u9009",
|
|
34
|
+
icon: "i-lucide-list-filter",
|
|
35
|
+
onSelect: () => props.onFilterClick?.(props.accessorKey)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
groups.push({
|
|
39
|
+
label: "\u9690\u85CF\u5217",
|
|
40
|
+
icon: "i-lucide-eye-off",
|
|
41
|
+
onSelect: () => props.onHideColumn?.(props.accessorKey)
|
|
42
|
+
});
|
|
43
|
+
groups.push({
|
|
44
|
+
label: "\u56FA\u5B9A\u5217",
|
|
45
|
+
icon: "i-lucide-pin",
|
|
46
|
+
children: [
|
|
47
|
+
{
|
|
48
|
+
label: "\u56FA\u5B9A\u5728\u5DE6\u4FA7",
|
|
49
|
+
icon: "i-lucide-panel-left",
|
|
50
|
+
type: "checkbox",
|
|
51
|
+
checked: props.isPinned === "left",
|
|
52
|
+
onSelect: () => props.onUpdatePinned(props.isPinned === "left" ? "unfixed" : "left")
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "\u56FA\u5B9A\u5728\u53F3\u4FA7",
|
|
56
|
+
icon: "i-lucide-panel-right",
|
|
57
|
+
type: "checkbox",
|
|
58
|
+
checked: props.isPinned === "right",
|
|
59
|
+
onSelect: () => props.onUpdatePinned(props.isPinned === "right" ? "unfixed" : "right")
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
if (props.enableOrder) {
|
|
64
|
+
const isAsc = isOrderedAsc.value;
|
|
65
|
+
const isDesc = isOrderedDesc.value;
|
|
66
|
+
groups.push({
|
|
67
|
+
label: "\u6392\u5E8F",
|
|
68
|
+
icon: "i-lucide-arrow-up-down",
|
|
69
|
+
children: [
|
|
70
|
+
{
|
|
71
|
+
label: "\u5347\u5E8F",
|
|
72
|
+
icon: "i-lucide-arrow-up",
|
|
73
|
+
type: "checkbox",
|
|
74
|
+
checked: isAsc,
|
|
75
|
+
onSelect: async () => {
|
|
76
|
+
props.onUpdateOrderOpr(isAsc ? null : "asc");
|
|
77
|
+
await props.fetchList();
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: "\u964D\u5E8F",
|
|
82
|
+
icon: "i-lucide-arrow-down",
|
|
83
|
+
type: "checkbox",
|
|
84
|
+
checked: isDesc,
|
|
85
|
+
onSelect: async () => {
|
|
86
|
+
props.onUpdateOrderOpr(isDesc ? null : "desc");
|
|
87
|
+
await props.fetchList();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return groups;
|
|
94
|
+
});
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<template>
|
|
98
|
+
<div class="flex">
|
|
99
|
+
<UDropdownMenu
|
|
100
|
+
:items="dropdownItems"
|
|
101
|
+
:content="{ align: 'start', side: 'bottom' }"
|
|
102
|
+
>
|
|
103
|
+
<UButton
|
|
104
|
+
:label="label"
|
|
105
|
+
:color="isOrdered ? 'primary' : 'neutral'"
|
|
106
|
+
:variant="isOrdered ? 'soft' : 'ghost'"
|
|
107
|
+
:disabled="disabled"
|
|
108
|
+
:icon="isPinned ? 'i-lucide-pin' : void 0"
|
|
109
|
+
class="px-4 font-bold rounded-none h-(--ui-table-header-height) w-full"
|
|
110
|
+
:ui="{
|
|
111
|
+
leadingIcon: 'text-neutral-400 size-4',
|
|
112
|
+
trailingIcon: 'size-3 text-dimmed'
|
|
113
|
+
}"
|
|
114
|
+
/>
|
|
115
|
+
</UDropdownMenu>
|
|
116
|
+
<div v-if="isOrdered" class="flex flex-col">
|
|
117
|
+
<UChip
|
|
118
|
+
size="xl"
|
|
119
|
+
:text="orderIndex"
|
|
120
|
+
inset
|
|
121
|
+
:show="isOrderedAsc && orderIndex !== void 0"
|
|
122
|
+
>
|
|
123
|
+
<UButton
|
|
124
|
+
:color="isOrdered ? 'primary' : 'neutral'"
|
|
125
|
+
:variant="isOrdered ? 'soft' : 'ghost'"
|
|
126
|
+
:disabled="disabled"
|
|
127
|
+
trailing-icon="i-lucide-arrow-up-narrow-wide"
|
|
128
|
+
class="px-2 font-bold rounded-none w-full h-[calc(var(--ui-table-header-height)/2)]"
|
|
129
|
+
:ui="{
|
|
130
|
+
trailingIcon: `${!isOrderedAsc ? 'text-neutral-300 dark:text-neutral-500' : ''} size-4 transition-all`
|
|
131
|
+
}"
|
|
132
|
+
@click="onClickAsc"
|
|
133
|
+
/>
|
|
134
|
+
</UChip>
|
|
135
|
+
<UChip
|
|
136
|
+
size="xl"
|
|
137
|
+
:text="orderIndex"
|
|
138
|
+
inset
|
|
139
|
+
:show="isOrderedDesc && orderIndex !== void 0"
|
|
140
|
+
>
|
|
141
|
+
<UButton
|
|
142
|
+
:color="isOrdered ? 'primary' : 'neutral'"
|
|
143
|
+
:variant="isOrdered ? 'soft' : 'ghost'"
|
|
144
|
+
:disabled="disabled"
|
|
145
|
+
trailing-icon="i-lucide-arrow-down-wide-narrow"
|
|
146
|
+
class="px-2 font-bold rounded-none w-full h-[calc(var(--ui-table-header-height)/2)]"
|
|
147
|
+
:ui="{
|
|
148
|
+
trailingIcon: `${!isOrderedDesc ? 'text-neutral-300 dark:text-neutral-500' : ''} size-4 transition-all`
|
|
149
|
+
}"
|
|
150
|
+
@click="onClickDesc"
|
|
151
|
+
/>
|
|
152
|
+
</UChip>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OrderQueryOpr } from '#v/types';
|
|
2
|
+
import type { ColumnPinningPosition } from '@tanstack/table-core';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
accessorKey: string;
|
|
6
|
+
fetchList: () => Promise<void>;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
enableOrder?: boolean;
|
|
9
|
+
isOrdered?: boolean;
|
|
10
|
+
orderOpr?: OrderQueryOpr;
|
|
11
|
+
orderIndex?: number;
|
|
12
|
+
onUpdateOrderOpr: (opr: OrderQueryOpr) => void;
|
|
13
|
+
isPinned: ColumnPinningPosition;
|
|
14
|
+
onUpdatePinned: (position: 'left' | 'right' | 'unfixed') => void;
|
|
15
|
+
enableFilter?: boolean;
|
|
16
|
+
onFilterClick?: (field: string) => void;
|
|
17
|
+
onHideColumn?: (accessorKey: string) => void;
|
|
18
|
+
};
|
|
19
|
+
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>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string | null | undefined;
|
|
4
|
+
desc?: string;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_12: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_12) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: 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>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { isEmptyString } from "#v/utils";
|
|
3
|
+
defineProps({
|
|
4
|
+
label: { type: String, required: true },
|
|
5
|
+
value: { type: null, required: false },
|
|
6
|
+
desc: { type: String, required: false }
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="flex flex-col gap-1">
|
|
12
|
+
<!-- label and tooltip -->
|
|
13
|
+
<div class="flex items-center gap-0.5">
|
|
14
|
+
<h2 class="text-sm font-medium text-highlighted">
|
|
15
|
+
{{ label }}
|
|
16
|
+
</h2>
|
|
17
|
+
<UTooltip
|
|
18
|
+
v-if="desc"
|
|
19
|
+
:text="desc"
|
|
20
|
+
:content="{ side: 'top' }"
|
|
21
|
+
:ui="{ text: 'whitespace-pre-line', content: 'h-fit' }"
|
|
22
|
+
>
|
|
23
|
+
<UIcon name="i-lucide-circle-question-mark" />
|
|
24
|
+
</UTooltip>
|
|
25
|
+
</div>
|
|
26
|
+
<!-- value: 可通过具名 slot "value" 自定义渲染,未提供时回退到 props.value -->
|
|
27
|
+
<div class="text-sm text-muted h-full whitespace-pre-wrap">
|
|
28
|
+
<slot>
|
|
29
|
+
{{ isEmptyString(value) ? "/" : value }}
|
|
30
|
+
</slot>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string | null | undefined;
|
|
4
|
+
desc?: string;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_12: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_12) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: 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>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => 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,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => 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,19 @@
|
|
|
1
|
+
import type { TableHeaderProps } 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<TableHeaderProps<T>> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {};
|
|
9
|
+
emit: {};
|
|
10
|
+
}>) => import("vue").VNode & {
|
|
11
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
16
|
+
[K in keyof T]: T[K];
|
|
17
|
+
} : {
|
|
18
|
+
[K in keyof T as K]: T[K];
|
|
19
|
+
}) & {};
|