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,35 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import TableHeaderSettingsColumns from "#v/components/table/header/settings/columns/index.vue";
|
|
3
|
+
defineProps({
|
|
4
|
+
tblName: { type: String, required: true },
|
|
5
|
+
rawBizColumns: { type: Array, required: true },
|
|
6
|
+
onUpdateBizColumns: { type: Function, required: true }
|
|
7
|
+
});
|
|
8
|
+
const emit = defineEmits(["close"]);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<USlideover
|
|
13
|
+
:title="`${tblName}\u8BBE\u7F6E`"
|
|
14
|
+
description="配置表格列的显示与顺序"
|
|
15
|
+
inset
|
|
16
|
+
:close="{ onClick: () => emit('close', false) }"
|
|
17
|
+
>
|
|
18
|
+
<template #body>
|
|
19
|
+
<TableHeaderSettingsColumns
|
|
20
|
+
:raw-biz-columns="rawBizColumns"
|
|
21
|
+
:tbl-name="tblName"
|
|
22
|
+
@update-biz-columns="onUpdateBizColumns"
|
|
23
|
+
/>
|
|
24
|
+
</template>
|
|
25
|
+
<template #footer>
|
|
26
|
+
<UButton
|
|
27
|
+
label="取消"
|
|
28
|
+
color="neutral"
|
|
29
|
+
variant="subtle"
|
|
30
|
+
icon="i-lucide-x"
|
|
31
|
+
@click="emit('close', false)"
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
</USlideover>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { VColumn } 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
|
+
tblName: string;
|
|
5
|
+
rawBizColumns: VColumn<T>[];
|
|
6
|
+
onUpdateBizColumns: (cols: VColumn<T>[]) => void;
|
|
7
|
+
} & {
|
|
8
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
+
} ? P : {});
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: (evt: "close", args_0: boolean) => void;
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -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,121 @@
|
|
|
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
|
+
<div ref="table" class="flex flex-col h-full">
|
|
78
|
+
<!-- header -->
|
|
79
|
+
<div class="flex flex-col">
|
|
80
|
+
<div class="flex items-center gap-1 py-2 px-3 h-(--ui-header-height) border-b border-default">
|
|
81
|
+
<div class="font-semibold text-highlighted truncate">
|
|
82
|
+
{{ cnName }}
|
|
83
|
+
</div>
|
|
84
|
+
<TableHeader v-bind="tblHeaderProps" class="ml-auto" />
|
|
85
|
+
</div>
|
|
86
|
+
<UCollapsible :open="tblHeaderProps.whereQueryProps.whereQueryOpen">
|
|
87
|
+
<template #content>
|
|
88
|
+
<TableQueryWhere ref="proTableQueryWhere" v-bind="tblWhereQueryProps" class="border-b border-default" />
|
|
89
|
+
</template>
|
|
90
|
+
</UCollapsible>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<!-- table -->
|
|
94
|
+
<UContextMenu :items="tblContextMenuItems">
|
|
95
|
+
<ScrollArea class="flex-1">
|
|
96
|
+
<UTable
|
|
97
|
+
v-bind="tblProps"
|
|
98
|
+
:row-selection="rowSelection"
|
|
99
|
+
:class="tblClasses"
|
|
100
|
+
:ui="tblUi"
|
|
101
|
+
@resize="updateTableWidth"
|
|
102
|
+
@update:row-selection="onUpdateRowSelection"
|
|
103
|
+
>
|
|
104
|
+
<template v-if="expandable" #expanded="{ row }">
|
|
105
|
+
<div
|
|
106
|
+
class="px-1 py-3 sticky inset-4 overflow-hidden"
|
|
107
|
+
:style="{
|
|
108
|
+
width: `${tableWidth - 38}px`
|
|
109
|
+
}"
|
|
110
|
+
>
|
|
111
|
+
<component :is="() => expandVNode?.(row.original)" role="expand-row" />
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
</UTable>
|
|
115
|
+
</ScrollArea>
|
|
116
|
+
</UContextMenu>
|
|
117
|
+
|
|
118
|
+
<!-- pagination -->
|
|
119
|
+
<TablePagination v-bind="tblPaginationProps" />
|
|
120
|
+
</div>
|
|
121
|
+
</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,28 @@
|
|
|
1
|
+
import type { OrderQueryOpr, OrderQueryOption, VColumn } 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
|
+
field: string;
|
|
5
|
+
bizColumns: VColumn<T>[];
|
|
6
|
+
opr: OrderQueryOpr;
|
|
7
|
+
orderOptions: OrderQueryOption<any>[];
|
|
8
|
+
unselectedFields: string[];
|
|
9
|
+
} & {
|
|
10
|
+
onChange?: ((args_0: string, args_1: OrderQueryOpr) => any) | undefined;
|
|
11
|
+
onRemove?: (() => 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: "change", args_0: string, args_1: OrderQueryOpr) => void) & ((evt: "remove") => 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,85 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
field: { type: String, required: true },
|
|
5
|
+
bizColumns: { type: Array, required: true },
|
|
6
|
+
opr: { type: [String, null], required: true },
|
|
7
|
+
orderOptions: { type: Array, required: true },
|
|
8
|
+
unselectedFields: { type: Array, required: true }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits(["change", "remove"]);
|
|
11
|
+
const selectedValue = computed({
|
|
12
|
+
get() {
|
|
13
|
+
return props.field;
|
|
14
|
+
},
|
|
15
|
+
set(newField) {
|
|
16
|
+
emit("change", newField, props.opr);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const selectedLabel = computed(() => {
|
|
20
|
+
const option = props.orderOptions.find((option2) => option2.field === props.field);
|
|
21
|
+
const column = props.bizColumns.find((column2) => column2["accessorKey"] === props.field);
|
|
22
|
+
return column?.header || option?.label || props.field;
|
|
23
|
+
});
|
|
24
|
+
const unselectedOptions = computed(() => {
|
|
25
|
+
const options = [props.field].concat(props.unselectedFields).map((field) => {
|
|
26
|
+
const option = props.orderOptions.find((option2) => option2.field === field);
|
|
27
|
+
const column = props.bizColumns.find((column2) => column2["accessorKey"] === field);
|
|
28
|
+
return {
|
|
29
|
+
type: "checkbox",
|
|
30
|
+
value: field,
|
|
31
|
+
checked: selectedValue.value === field,
|
|
32
|
+
label: column?.header || option?.label || field,
|
|
33
|
+
onSelect: () => selectedValue.value = field
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
options.unshift({
|
|
37
|
+
type: "label",
|
|
38
|
+
label: "\u66FF\u6362\u6392\u5E8F\u6761\u4EF6"
|
|
39
|
+
});
|
|
40
|
+
return options;
|
|
41
|
+
});
|
|
42
|
+
const onToggleOrderType = () => {
|
|
43
|
+
emit("change", props.field, props.opr === "asc" ? "desc" : "asc");
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<div class="flex items-center gap-3 px-2.5">
|
|
49
|
+
<div class="order-query-handle cursor-move flex">
|
|
50
|
+
<UIcon name="i-lucide-grip-vertical" />
|
|
51
|
+
</div>
|
|
52
|
+
<UDropdownMenu
|
|
53
|
+
:items="unselectedOptions"
|
|
54
|
+
:ui="{ content: 'w-54' }"
|
|
55
|
+
>
|
|
56
|
+
<UButton
|
|
57
|
+
variant="outline"
|
|
58
|
+
color="neutral"
|
|
59
|
+
size="sm"
|
|
60
|
+
trailing-icon="i-lucide-chevron-down"
|
|
61
|
+
>
|
|
62
|
+
{{ selectedLabel }}
|
|
63
|
+
</UButton>
|
|
64
|
+
</UDropdownMenu>
|
|
65
|
+
<UButton
|
|
66
|
+
:icon="props.opr === 'asc' ? 'i-lucide-arrow-up-narrow-wide' : 'i-lucide-arrow-down-wide-narrow'"
|
|
67
|
+
color="neutral"
|
|
68
|
+
variant="outline"
|
|
69
|
+
size="sm"
|
|
70
|
+
@click="onToggleOrderType"
|
|
71
|
+
>
|
|
72
|
+
{{ props.opr === "asc" ? "\u5347\u5E8F" : "\u964D\u5E8F" }}
|
|
73
|
+
</UButton>
|
|
74
|
+
<UTooltip text="删除该排序条件" :content="{ side: 'top' }">
|
|
75
|
+
<UButton
|
|
76
|
+
size="xs"
|
|
77
|
+
icon="i-lucide-x"
|
|
78
|
+
variant="ghost"
|
|
79
|
+
color="neutral"
|
|
80
|
+
class="ml-auto"
|
|
81
|
+
@click="emit('remove')"
|
|
82
|
+
/>
|
|
83
|
+
</UTooltip>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { OrderQueryOpr, OrderQueryOption, VColumn } 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
|
+
field: string;
|
|
5
|
+
bizColumns: VColumn<T>[];
|
|
6
|
+
opr: OrderQueryOpr;
|
|
7
|
+
orderOptions: OrderQueryOption<any>[];
|
|
8
|
+
unselectedFields: string[];
|
|
9
|
+
} & {
|
|
10
|
+
onChange?: ((args_0: string, args_1: OrderQueryOpr) => any) | undefined;
|
|
11
|
+
onRemove?: (() => 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: "change", args_0: string, args_1: OrderQueryOpr) => void) & ((evt: "remove") => 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,25 @@
|
|
|
1
|
+
import type { OrderQueryOption, VColumn } 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
|
+
options: OrderQueryOption<T>[];
|
|
5
|
+
unselectedFields: string[];
|
|
6
|
+
bizColumns: VColumn<T>[];
|
|
7
|
+
} & {
|
|
8
|
+
onNew?: ((args_0: string) => any) | undefined;
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
+
} ? P : {});
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: (evt: "new", args_0: string) => void;
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
options: { type: Array, required: true },
|
|
5
|
+
unselectedFields: { type: Array, required: true },
|
|
6
|
+
bizColumns: { type: Array, required: true }
|
|
7
|
+
});
|
|
8
|
+
const emit = defineEmits(["new"]);
|
|
9
|
+
const popoverOpen = ref(false);
|
|
10
|
+
const unselectedOptions = computed(() => {
|
|
11
|
+
const options = [
|
|
12
|
+
{
|
|
13
|
+
id: "unselected-fields",
|
|
14
|
+
label: "\u65B0\u589E\u67E5\u8BE2\u5B57\u6BB5",
|
|
15
|
+
items: props.unselectedFields.map((field) => {
|
|
16
|
+
const option = props.options.find((option2) => option2.field === field);
|
|
17
|
+
const column = props.bizColumns.find((column2) => column2["accessorKey"] === field);
|
|
18
|
+
return {
|
|
19
|
+
label: column?.header || option?.label || field,
|
|
20
|
+
onSelect: () => {
|
|
21
|
+
emit("new", field);
|
|
22
|
+
popoverOpen.value = false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
return options;
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<UPopover v-model:open="popoverOpen">
|
|
34
|
+
<UButton
|
|
35
|
+
size="sm"
|
|
36
|
+
icon="i-lucide-plus"
|
|
37
|
+
variant="ghost"
|
|
38
|
+
>
|
|
39
|
+
新增排序条件
|
|
40
|
+
</UButton>
|
|
41
|
+
|
|
42
|
+
<template #content>
|
|
43
|
+
<UCommandPalette
|
|
44
|
+
:groups="unselectedOptions"
|
|
45
|
+
:ui="{ input: '[&>input]:h-8 [&>input]:text-sm' }"
|
|
46
|
+
placeholder="搜索未选字段"
|
|
47
|
+
/>
|
|
48
|
+
</template>
|
|
49
|
+
</UPopover>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OrderQueryOption, VColumn } 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
|
+
options: OrderQueryOption<T>[];
|
|
5
|
+
unselectedFields: string[];
|
|
6
|
+
bizColumns: VColumn<T>[];
|
|
7
|
+
} & {
|
|
8
|
+
onNew?: ((args_0: string) => any) | undefined;
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
+
} ? P : {});
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: (evt: "new", args_0: string) => void;
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OrderQueryProps } 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<OrderQueryProps<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,108 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { compareObjArrays } from "#v/utils";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
|
+
import Dnd from "#v/components/Dnd.client.vue";
|
|
5
|
+
import TableQueryOrderItem from "#v/components/table/query/order/Item.vue";
|
|
6
|
+
import TableQueryOrderNewer from "#v/components/table/query/order/Newer.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
orderOptions: { type: Array, required: true },
|
|
9
|
+
defaultOrderQuery: { type: Array, required: false },
|
|
10
|
+
orderQuery: { type: Array, required: true },
|
|
11
|
+
onUpdateOrderQuery: { type: Function, required: true },
|
|
12
|
+
fetching: { type: Boolean, required: false },
|
|
13
|
+
triggerFetching: { type: Function, required: true },
|
|
14
|
+
bizColumns: { type: Array, required: true },
|
|
15
|
+
size: { type: null, required: false }
|
|
16
|
+
});
|
|
17
|
+
const isOrderQueryDefault = computed(() => compareObjArrays(props.orderQuery, props.defaultOrderQuery));
|
|
18
|
+
const unselectedOrderFields = computed(() => {
|
|
19
|
+
const selectedFields = props.orderQuery.map((query) => query.field);
|
|
20
|
+
return props.orderOptions.filter((option) => !selectedFields.includes(option.field)).map((option) => option.field);
|
|
21
|
+
});
|
|
22
|
+
const onUpdateAndTriggerFetching = async (newOrderQuery) => {
|
|
23
|
+
props.onUpdateOrderQuery(newOrderQuery);
|
|
24
|
+
await props.triggerFetching();
|
|
25
|
+
};
|
|
26
|
+
const onNewField = (field) => {
|
|
27
|
+
onUpdateAndTriggerFetching([...props.orderQuery, { field, order: "desc" }]);
|
|
28
|
+
};
|
|
29
|
+
const onChangeField = (oldField, newField, opr) => {
|
|
30
|
+
const oldIdx = props.orderQuery.findIndex((query) => query.field === oldField);
|
|
31
|
+
if (oldIdx !== -1) {
|
|
32
|
+
onUpdateAndTriggerFetching(
|
|
33
|
+
props.orderQuery.map((query, idx) => idx === oldIdx ? { field: newField, order: opr } : query)
|
|
34
|
+
);
|
|
35
|
+
} else {
|
|
36
|
+
onUpdateAndTriggerFetching([...props.orderQuery, { field: newField, order: opr }]);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const onRemoveField = (field) => {
|
|
40
|
+
onUpdateAndTriggerFetching(props.orderQuery.filter((query) => query.field !== field));
|
|
41
|
+
};
|
|
42
|
+
const dragOrderQuery = computed({
|
|
43
|
+
get() {
|
|
44
|
+
return props.orderQuery;
|
|
45
|
+
},
|
|
46
|
+
set(newOrderQuery) {
|
|
47
|
+
onUpdateAndTriggerFetching(newOrderQuery);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const open = ref(false);
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<UPopover v-model:open="open" mode="click">
|
|
55
|
+
<UChip :show="!isOrderQueryDefault">
|
|
56
|
+
<UButton
|
|
57
|
+
icon="i-lucide-arrow-up-down"
|
|
58
|
+
:color="open ? 'primary' : 'neutral'"
|
|
59
|
+
:loading="fetching"
|
|
60
|
+
variant="outline"
|
|
61
|
+
:size="size"
|
|
62
|
+
>
|
|
63
|
+
排序
|
|
64
|
+
</UButton>
|
|
65
|
+
</UChip>
|
|
66
|
+
<template #content>
|
|
67
|
+
<div class="flex flex-col gap-2 p-2">
|
|
68
|
+
<!-- items -->
|
|
69
|
+
<Dnd
|
|
70
|
+
v-if="dragOrderQuery.length > 0"
|
|
71
|
+
v-model="dragOrderQuery"
|
|
72
|
+
handle=".order-query-handle"
|
|
73
|
+
class="flex flex-col gap-2"
|
|
74
|
+
>
|
|
75
|
+
<TableQueryOrderItem
|
|
76
|
+
v-for="item in dragOrderQuery"
|
|
77
|
+
:key="item.field"
|
|
78
|
+
:field="item.field"
|
|
79
|
+
:biz-columns="bizColumns"
|
|
80
|
+
:opr="item.order"
|
|
81
|
+
:order-options="orderOptions"
|
|
82
|
+
:unselected-fields="unselectedOrderFields"
|
|
83
|
+
@change="(newField, orderType) => onChangeField(item.field, newField, orderType)"
|
|
84
|
+
@remove="onRemoveField(item.field)"
|
|
85
|
+
/>
|
|
86
|
+
</Dnd>
|
|
87
|
+
<div class="flex flex-col">
|
|
88
|
+
<TableQueryOrderNewer
|
|
89
|
+
:options="orderOptions"
|
|
90
|
+
:unselected-fields="unselectedOrderFields"
|
|
91
|
+
:biz-columns="bizColumns"
|
|
92
|
+
@new="onNewField"
|
|
93
|
+
/>
|
|
94
|
+
<UButton
|
|
95
|
+
size="sm"
|
|
96
|
+
color="neutral"
|
|
97
|
+
variant="ghost"
|
|
98
|
+
:disabled="isOrderQueryDefault || fetching"
|
|
99
|
+
icon="i-lucide-timer-reset"
|
|
100
|
+
@click="() => onUpdateAndTriggerFetching(defaultOrderQuery ?? [])"
|
|
101
|
+
>
|
|
102
|
+
重置
|
|
103
|
+
</UButton>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
</UPopover>
|
|
108
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { OrderQueryProps } 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<OrderQueryProps<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,14 @@
|
|
|
1
|
+
import type { WhereQueryOption, VColumn, Size } from '#v/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: WhereQueryOption<any>[];
|
|
4
|
+
unselectedFields: string[];
|
|
5
|
+
bizColumns: VColumn<any>[];
|
|
6
|
+
size?: Size;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
new: (args_0: string) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onNew?: ((args_0: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|