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
|
File without changes
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ref, watch } from "vue";
|
|
2
|
+
import { MarkerType } from "@vue-flow/core";
|
|
3
|
+
import { useFlowApi, useFlowNodeApi, useFlowNodeLinkApi } from "#v/composables";
|
|
4
|
+
export function useFlow(options) {
|
|
5
|
+
const { flow, onUpdateModel } = options;
|
|
6
|
+
const GRID_SIZE = 16;
|
|
7
|
+
const DEFAULT_NODE_WIDTH = GRID_SIZE * 10;
|
|
8
|
+
const DEFAULT_NODE_HEIGHT = GRID_SIZE * 6;
|
|
9
|
+
const flowApi = useFlowApi();
|
|
10
|
+
const flowNodeApi = useFlowNodeApi();
|
|
11
|
+
const flowNodeLinkApi = useFlowNodeLinkApi();
|
|
12
|
+
const nodes = ref([]);
|
|
13
|
+
const edges = ref([]);
|
|
14
|
+
const cleanHandleId = (handleId) => handleId?.replace(/-(source|target)$/, "");
|
|
15
|
+
const refreshFlow = async () => {
|
|
16
|
+
if (!flow?.value?.id) return;
|
|
17
|
+
const { data } = await flowApi.getById(flow.value.id);
|
|
18
|
+
if (data.value?.data && onUpdateModel?.value) {
|
|
19
|
+
onUpdateModel.value(data.value.data);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const transformNode = (node, handlers) => ({
|
|
23
|
+
id: String(node.id),
|
|
24
|
+
type: "custom",
|
|
25
|
+
position: { x: node.positionX || 0, y: node.positionY || 0 },
|
|
26
|
+
label: node.name || "",
|
|
27
|
+
selectable: true,
|
|
28
|
+
style: {
|
|
29
|
+
width: node.width ? `${node.width}px` : void 0,
|
|
30
|
+
height: node.height ? `${node.height}px` : void 0
|
|
31
|
+
},
|
|
32
|
+
data: {
|
|
33
|
+
...node,
|
|
34
|
+
...handlers
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const transformEdge = (link, styleOptions) => ({
|
|
38
|
+
id: String(link.id),
|
|
39
|
+
type: "custom",
|
|
40
|
+
source: String(link.parentId),
|
|
41
|
+
sourceHandle: link.parentHandlePos ? cleanHandleId(link.parentHandlePos) : null,
|
|
42
|
+
target: String(link.childId),
|
|
43
|
+
targetHandle: link.childHandlePos ? cleanHandleId(link.childHandlePos) : null,
|
|
44
|
+
label: link.label || "",
|
|
45
|
+
selectable: true,
|
|
46
|
+
style: styleOptions?.strokeWidth ? { strokeWidth: styleOptions.strokeWidth } : void 0,
|
|
47
|
+
markerStart: styleOptions?.markerStart ? MarkerType.Arrow : void 0,
|
|
48
|
+
markerEnd: styleOptions?.markerEnd ? MarkerType.Arrow : void 0,
|
|
49
|
+
data: { ...link }
|
|
50
|
+
});
|
|
51
|
+
const syncNodes = (nodeHandlers) => {
|
|
52
|
+
if (!flow?.value) return;
|
|
53
|
+
nodes.value = (flow.value.nodes || []).map(
|
|
54
|
+
(node) => transformNode(node, nodeHandlers ? nodeHandlers(String(node.id)) : void 0)
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
const syncEdges = (styleOptions) => {
|
|
58
|
+
if (!flow?.value) return;
|
|
59
|
+
edges.value = (flow.value.links || []).map((link) => transformEdge(link, styleOptions));
|
|
60
|
+
};
|
|
61
|
+
const applyEdgeStyles = (styleOptions) => {
|
|
62
|
+
syncEdges(styleOptions);
|
|
63
|
+
};
|
|
64
|
+
const updateNode = async (updatedNode) => {
|
|
65
|
+
await flowNodeApi.update(updatedNode);
|
|
66
|
+
await refreshFlow();
|
|
67
|
+
};
|
|
68
|
+
const deleteNode = async (nodeId) => {
|
|
69
|
+
const node = flow?.value?.nodes?.find((n) => String(n.id) === nodeId);
|
|
70
|
+
if (!node?.id) return;
|
|
71
|
+
const relatedLinkIds = flow?.value?.links?.filter((link) => link.parentId === node.id || link.childId === node.id)?.map((link) => link.id)?.filter((id) => id !== void 0) || [];
|
|
72
|
+
if (relatedLinkIds.length > 0) {
|
|
73
|
+
await flowNodeLinkApi.batchDelete({ ids: relatedLinkIds });
|
|
74
|
+
}
|
|
75
|
+
await flowNodeApi.deleteById(node.id);
|
|
76
|
+
await refreshFlow();
|
|
77
|
+
};
|
|
78
|
+
const deleteEdge = async (edgeId) => {
|
|
79
|
+
const link = flow?.value?.links?.find((l) => String(l.id) === edgeId);
|
|
80
|
+
if (!link?.id) return;
|
|
81
|
+
await flowNodeLinkApi.deleteById(link.id);
|
|
82
|
+
await refreshFlow();
|
|
83
|
+
};
|
|
84
|
+
const createEdge = async (params) => {
|
|
85
|
+
if (!flow?.value) return;
|
|
86
|
+
const newLink = {
|
|
87
|
+
id: 0,
|
|
88
|
+
flowId: flow.value.id,
|
|
89
|
+
parentId: Number(params.source),
|
|
90
|
+
parentHandlePos: cleanHandleId(params.sourceHandle),
|
|
91
|
+
childId: Number(params.target),
|
|
92
|
+
childHandlePos: cleanHandleId(params.targetHandle),
|
|
93
|
+
label: ""
|
|
94
|
+
};
|
|
95
|
+
await flowNodeLinkApi.create(newLink);
|
|
96
|
+
await refreshFlow();
|
|
97
|
+
};
|
|
98
|
+
const updateNodePosition = async (nodeId, x, y) => {
|
|
99
|
+
const originalNode = flow?.value?.nodes?.find((n) => String(n.id) === nodeId);
|
|
100
|
+
if (!originalNode) return;
|
|
101
|
+
await flowNodeApi.update({
|
|
102
|
+
id: originalNode.id,
|
|
103
|
+
version: originalNode.version,
|
|
104
|
+
positionX: x,
|
|
105
|
+
positionY: y
|
|
106
|
+
});
|
|
107
|
+
await refreshFlow();
|
|
108
|
+
};
|
|
109
|
+
const updateNodeDimensions = async (nodeId, dimensions) => {
|
|
110
|
+
const node = flow?.value?.nodes?.find((n) => String(n.id) === nodeId);
|
|
111
|
+
if (!node) return;
|
|
112
|
+
await flowNodeApi.update({
|
|
113
|
+
id: node.id,
|
|
114
|
+
version: node.version,
|
|
115
|
+
...dimensions
|
|
116
|
+
});
|
|
117
|
+
await refreshFlow();
|
|
118
|
+
};
|
|
119
|
+
const createNode = async () => {
|
|
120
|
+
if (!flow?.value) return;
|
|
121
|
+
const nodeCount = flow.value.nodes?.length || 0;
|
|
122
|
+
const newNode = {
|
|
123
|
+
id: 0,
|
|
124
|
+
flowId: flow.value.id,
|
|
125
|
+
name: `\u8282\u70B9 ${nodeCount + 1}`,
|
|
126
|
+
positionX: GRID_SIZE * (10 + nodeCount * 3),
|
|
127
|
+
positionY: GRID_SIZE * (10 + nodeCount * 3),
|
|
128
|
+
width: DEFAULT_NODE_WIDTH,
|
|
129
|
+
height: DEFAULT_NODE_HEIGHT
|
|
130
|
+
};
|
|
131
|
+
await flowNodeApi.create(newNode);
|
|
132
|
+
await refreshFlow();
|
|
133
|
+
};
|
|
134
|
+
watch(
|
|
135
|
+
() => flow?.value,
|
|
136
|
+
(newFlow) => {
|
|
137
|
+
if (!newFlow) return;
|
|
138
|
+
syncEdges();
|
|
139
|
+
},
|
|
140
|
+
{ immediate: true, deep: true }
|
|
141
|
+
);
|
|
142
|
+
return {
|
|
143
|
+
// 状态
|
|
144
|
+
nodes,
|
|
145
|
+
edges,
|
|
146
|
+
GRID_SIZE,
|
|
147
|
+
// 前端操作方法(仅更新前端状态)
|
|
148
|
+
syncNodes,
|
|
149
|
+
syncEdges,
|
|
150
|
+
applyEdgeStyles,
|
|
151
|
+
transformNode,
|
|
152
|
+
// 后端操作方法(调用 API 更新后端)
|
|
153
|
+
refreshFlow,
|
|
154
|
+
updateNode,
|
|
155
|
+
updateNodePosition,
|
|
156
|
+
updateNodeDimensions,
|
|
157
|
+
createNode,
|
|
158
|
+
deleteNode,
|
|
159
|
+
deleteEdge,
|
|
160
|
+
createEdge
|
|
161
|
+
};
|
|
162
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
type EdgePosition = 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
3
|
+
type FlowResizeNode = {
|
|
4
|
+
id: string | number;
|
|
5
|
+
position: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
style?: any;
|
|
10
|
+
data?: Record<string, any>;
|
|
11
|
+
};
|
|
12
|
+
export interface UseFlowResizeDimensions {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
positionX: number;
|
|
16
|
+
positionY: number;
|
|
17
|
+
}
|
|
18
|
+
export interface UseFlowResizeOptions {
|
|
19
|
+
gridSize: number;
|
|
20
|
+
minWidth?: number;
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
minHeight?: number;
|
|
23
|
+
maxHeight?: number;
|
|
24
|
+
nodes: Ref<FlowResizeNode[]>;
|
|
25
|
+
getViewport: () => {
|
|
26
|
+
zoom: number;
|
|
27
|
+
} | undefined;
|
|
28
|
+
onResizeEnd?: (nodeId: string, dimensions: UseFlowResizeDimensions) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface UseFlowResizeReturn {
|
|
31
|
+
resizingNode: Ref<ResizeState | null>;
|
|
32
|
+
hoveredNodeId: Ref<string | null>;
|
|
33
|
+
hoveredNodeEdge: Ref<EdgePosition | null>;
|
|
34
|
+
detectEdge: (event: MouseEvent, element: HTMLElement) => EdgePosition | null;
|
|
35
|
+
getCursorStyle: (edge: EdgePosition | null) => string;
|
|
36
|
+
startResize: (event: MouseEvent, nodeId: string, nodeData: any, edge: EdgePosition) => void;
|
|
37
|
+
handleMouseMove: (event: MouseEvent) => void;
|
|
38
|
+
handleMouseUp: () => void;
|
|
39
|
+
createNodeHandlers: (nodeId: string) => {
|
|
40
|
+
onMouseEnter: () => void;
|
|
41
|
+
onMouseLeave: () => void;
|
|
42
|
+
onMouseMove: (event: MouseEvent, element: HTMLElement) => void;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
interface ResizeState {
|
|
46
|
+
id: string;
|
|
47
|
+
startX: number;
|
|
48
|
+
startY: number;
|
|
49
|
+
startWidth: number;
|
|
50
|
+
startHeight: number;
|
|
51
|
+
startPosX: number;
|
|
52
|
+
startPosY: number;
|
|
53
|
+
edge: EdgePosition;
|
|
54
|
+
}
|
|
55
|
+
export declare function useFlowResize(options: UseFlowResizeOptions): UseFlowResizeReturn;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
export function useFlowResize(options) {
|
|
3
|
+
const {
|
|
4
|
+
gridSize,
|
|
5
|
+
minWidth = gridSize * 2,
|
|
6
|
+
maxWidth = gridSize * 20,
|
|
7
|
+
minHeight = gridSize * 2,
|
|
8
|
+
maxHeight = gridSize * 20,
|
|
9
|
+
nodes,
|
|
10
|
+
getViewport,
|
|
11
|
+
onResizeEnd
|
|
12
|
+
} = options;
|
|
13
|
+
const EDGE_THRESHOLD = 8;
|
|
14
|
+
const CURSOR_MAP = {
|
|
15
|
+
"top": "ns-resize",
|
|
16
|
+
"bottom": "ns-resize",
|
|
17
|
+
"left": "ew-resize",
|
|
18
|
+
"right": "ew-resize",
|
|
19
|
+
"top-left": "nwse-resize",
|
|
20
|
+
"top-right": "nesw-resize",
|
|
21
|
+
"bottom-left": "nesw-resize",
|
|
22
|
+
"bottom-right": "nwse-resize"
|
|
23
|
+
};
|
|
24
|
+
const resizingNode = ref(null);
|
|
25
|
+
const hoveredNodeId = ref(null);
|
|
26
|
+
const hoveredNodeEdge = ref(null);
|
|
27
|
+
const detectEdge = (event, element) => {
|
|
28
|
+
const rect = element.getBoundingClientRect();
|
|
29
|
+
const x = event.clientX - rect.left;
|
|
30
|
+
const y = event.clientY - rect.top;
|
|
31
|
+
const nearTop = y <= EDGE_THRESHOLD;
|
|
32
|
+
const nearBottom = y >= rect.height - EDGE_THRESHOLD;
|
|
33
|
+
const nearLeft = x <= EDGE_THRESHOLD;
|
|
34
|
+
const nearRight = x >= rect.width - EDGE_THRESHOLD;
|
|
35
|
+
if (nearTop && nearLeft) return "top-left";
|
|
36
|
+
if (nearTop && nearRight) return "top-right";
|
|
37
|
+
if (nearBottom && nearLeft) return "bottom-left";
|
|
38
|
+
if (nearBottom && nearRight) return "bottom-right";
|
|
39
|
+
if (nearTop) return "top";
|
|
40
|
+
if (nearBottom) return "bottom";
|
|
41
|
+
if (nearLeft) return "left";
|
|
42
|
+
if (nearRight) return "right";
|
|
43
|
+
return null;
|
|
44
|
+
};
|
|
45
|
+
const getCursorStyle = (edge) => edge ? CURSOR_MAP[edge] : "default";
|
|
46
|
+
const snapToGrid = (value) => Math.round(value / gridSize) * gridSize;
|
|
47
|
+
const calculateNewDimensions = (edge, deltaX, deltaY, startWidth, startHeight, startPosX, startPosY) => {
|
|
48
|
+
let newWidth = startWidth;
|
|
49
|
+
let newHeight = startHeight;
|
|
50
|
+
let newPosX = startPosX;
|
|
51
|
+
let newPosY = startPosY;
|
|
52
|
+
if (edge.includes("left")) {
|
|
53
|
+
const rawWidth = startWidth - deltaX;
|
|
54
|
+
newWidth = snapToGrid(Math.max(minWidth, Math.min(maxWidth, rawWidth)));
|
|
55
|
+
newPosX = startPosX + (startWidth - newWidth);
|
|
56
|
+
} else if (edge.includes("right")) {
|
|
57
|
+
const rawWidth = startWidth + deltaX;
|
|
58
|
+
newWidth = snapToGrid(Math.max(minWidth, Math.min(maxWidth, rawWidth)));
|
|
59
|
+
}
|
|
60
|
+
if (edge.includes("top")) {
|
|
61
|
+
const rawHeight = startHeight - deltaY;
|
|
62
|
+
newHeight = snapToGrid(Math.max(minHeight, Math.min(maxHeight, rawHeight)));
|
|
63
|
+
newPosY = startPosY + (startHeight - newHeight);
|
|
64
|
+
} else if (edge.includes("bottom")) {
|
|
65
|
+
const rawHeight = startHeight + deltaY;
|
|
66
|
+
newHeight = snapToGrid(Math.max(minHeight, Math.min(maxHeight, rawHeight)));
|
|
67
|
+
}
|
|
68
|
+
return { newWidth, newHeight, newPosX, newPosY };
|
|
69
|
+
};
|
|
70
|
+
const startResize = (event, nodeId, nodeData, edge) => {
|
|
71
|
+
event.stopPropagation();
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
resizingNode.value = {
|
|
74
|
+
id: nodeId,
|
|
75
|
+
startX: event.clientX,
|
|
76
|
+
startY: event.clientY,
|
|
77
|
+
startWidth: nodeData.width || gridSize * 10,
|
|
78
|
+
startHeight: nodeData.height || gridSize * 6,
|
|
79
|
+
startPosX: nodeData.positionX || 0,
|
|
80
|
+
startPosY: nodeData.positionY || 0,
|
|
81
|
+
edge
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
const handleMouseMove = (event) => {
|
|
85
|
+
if (!resizingNode.value) return;
|
|
86
|
+
const viewport = getViewport();
|
|
87
|
+
const zoom = viewport?.zoom || 1;
|
|
88
|
+
const deltaX = (event.clientX - resizingNode.value.startX) / zoom;
|
|
89
|
+
const deltaY = (event.clientY - resizingNode.value.startY) / zoom;
|
|
90
|
+
const { newWidth, newHeight, newPosX, newPosY } = calculateNewDimensions(
|
|
91
|
+
resizingNode.value.edge,
|
|
92
|
+
deltaX,
|
|
93
|
+
deltaY,
|
|
94
|
+
resizingNode.value.startWidth,
|
|
95
|
+
resizingNode.value.startHeight,
|
|
96
|
+
resizingNode.value.startPosX,
|
|
97
|
+
resizingNode.value.startPosY
|
|
98
|
+
);
|
|
99
|
+
const nodeIndex = nodes.value.findIndex((n) => String(n.id) === resizingNode.value.id);
|
|
100
|
+
if (nodeIndex < 0) return;
|
|
101
|
+
const node = nodes.value[nodeIndex];
|
|
102
|
+
if (!node) return;
|
|
103
|
+
node.position = { x: newPosX, y: newPosY };
|
|
104
|
+
node.style = { ...node.style, width: `${newWidth}px`, height: `${newHeight}px` };
|
|
105
|
+
node.data = { ...node.data || {}, width: newWidth, height: newHeight, positionX: newPosX, positionY: newPosY };
|
|
106
|
+
};
|
|
107
|
+
const handleMouseUp = () => {
|
|
108
|
+
if (!resizingNode.value) return;
|
|
109
|
+
const updatedNode = nodes.value.find((n) => String(n.id) === resizingNode.value.id);
|
|
110
|
+
if (updatedNode && onResizeEnd) {
|
|
111
|
+
onResizeEnd(String(updatedNode.id), {
|
|
112
|
+
width: Number(updatedNode.data?.width ?? 0),
|
|
113
|
+
height: Number(updatedNode.data?.height ?? 0),
|
|
114
|
+
positionX: updatedNode.position.x,
|
|
115
|
+
positionY: updatedNode.position.y
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
resizingNode.value = null;
|
|
119
|
+
};
|
|
120
|
+
const createNodeHandlers = (nodeId) => ({
|
|
121
|
+
onMouseEnter: () => {
|
|
122
|
+
hoveredNodeId.value = nodeId;
|
|
123
|
+
},
|
|
124
|
+
onMouseLeave: () => {
|
|
125
|
+
hoveredNodeId.value = null;
|
|
126
|
+
hoveredNodeEdge.value = null;
|
|
127
|
+
},
|
|
128
|
+
onMouseMove: (event, element) => {
|
|
129
|
+
if (resizingNode.value) return;
|
|
130
|
+
const edge = detectEdge(event, element);
|
|
131
|
+
hoveredNodeEdge.value = edge;
|
|
132
|
+
element.style.cursor = getCursorStyle(edge);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
return {
|
|
136
|
+
// 状态
|
|
137
|
+
resizingNode,
|
|
138
|
+
hoveredNodeId,
|
|
139
|
+
hoveredNodeEdge,
|
|
140
|
+
// 方法
|
|
141
|
+
detectEdge,
|
|
142
|
+
getCursorStyle,
|
|
143
|
+
startResize,
|
|
144
|
+
handleMouseMove,
|
|
145
|
+
handleMouseUp,
|
|
146
|
+
createNodeHandlers
|
|
147
|
+
};
|
|
148
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow 样式设置 Composable
|
|
3
|
+
* 管理连接线和节点的样式配置
|
|
4
|
+
*/
|
|
5
|
+
export declare function useFlowStyles(): {
|
|
6
|
+
edgeStrokeWidth: import("@vueuse/core").RemovableRef<number>;
|
|
7
|
+
edgeMarkerStart: import("@vueuse/core").RemovableRef<boolean>;
|
|
8
|
+
edgeMarkerEnd: import("@vueuse/core").RemovableRef<boolean>;
|
|
9
|
+
nodeBorderWidth: import("@vueuse/core").RemovableRef<number>;
|
|
10
|
+
setEdgeStrokeWidth: (width: number) => void;
|
|
11
|
+
toggleEdgeMarkerStart: () => void;
|
|
12
|
+
toggleEdgeMarkerEnd: () => void;
|
|
13
|
+
setNodeBorderWidth: (width: number) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StorageKey } from "#v/types";
|
|
2
|
+
import { useLocalStorage } from "@vueuse/core";
|
|
3
|
+
export function useFlowStyles() {
|
|
4
|
+
const edgeStrokeWidth = useLocalStorage(StorageKey.FLOW_EDGE_STROKE_WIDTH, 2);
|
|
5
|
+
const edgeMarkerStart = useLocalStorage(StorageKey.FLOW_EDGE_MARKER_START, false);
|
|
6
|
+
const edgeMarkerEnd = useLocalStorage(StorageKey.FLOW_EDGE_MARKER_END, true);
|
|
7
|
+
const nodeBorderWidth = useLocalStorage(StorageKey.FLOW_NODE_BORDER_WIDTH, 2);
|
|
8
|
+
const setEdgeStrokeWidth = (width) => {
|
|
9
|
+
edgeStrokeWidth.value = Math.max(1, Math.min(5, width));
|
|
10
|
+
};
|
|
11
|
+
const toggleEdgeMarkerStart = () => {
|
|
12
|
+
edgeMarkerStart.value = !edgeMarkerStart.value;
|
|
13
|
+
};
|
|
14
|
+
const toggleEdgeMarkerEnd = () => {
|
|
15
|
+
edgeMarkerEnd.value = !edgeMarkerEnd.value;
|
|
16
|
+
};
|
|
17
|
+
const setNodeBorderWidth = (width) => {
|
|
18
|
+
nodeBorderWidth.value = Math.max(1, Math.min(5, width));
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
// 状态
|
|
22
|
+
edgeStrokeWidth,
|
|
23
|
+
edgeMarkerStart,
|
|
24
|
+
edgeMarkerEnd,
|
|
25
|
+
nodeBorderWidth,
|
|
26
|
+
// 方法
|
|
27
|
+
setEdgeStrokeWidth,
|
|
28
|
+
toggleEdgeMarkerStart,
|
|
29
|
+
toggleEdgeMarkerEnd,
|
|
30
|
+
setNodeBorderWidth
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export * from './flow/index.js';
|
|
3
|
+
export * from './table/index.js';
|
|
4
|
+
export * from './useApp.js';
|
|
5
|
+
export * from './useBoolean.js';
|
|
6
|
+
export * from './useDate.js';
|
|
7
|
+
export * from './useEChart.js';
|
|
8
|
+
export * from './useForm.js';
|
|
9
|
+
export * from './useTheme.js';
|
|
10
|
+
export * from './useSidebarMenu.js';
|
|
11
|
+
export * from './usePermission.js';
|
|
12
|
+
export * from './useRouterPush.js';
|
|
13
|
+
export * from './useAuth.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./api/index.js";
|
|
2
|
+
export * from "./flow/index.js";
|
|
3
|
+
export * from "./table/index.js";
|
|
4
|
+
export * from "./useApp.js";
|
|
5
|
+
export * from "./useBoolean.js";
|
|
6
|
+
export * from "./useDate.js";
|
|
7
|
+
export * from "./useEChart.js";
|
|
8
|
+
export * from "./useForm.js";
|
|
9
|
+
export * from "./useTheme.js";
|
|
10
|
+
export * from "./useSidebarMenu.js";
|
|
11
|
+
export * from "./usePermission.js";
|
|
12
|
+
export * from "./useRouterPush.js";
|
|
13
|
+
export * from "./useAuth.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './useTable.js';
|
|
2
|
+
export * from './useTableColumns.js';
|
|
3
|
+
export * from './useTableData.js';
|
|
4
|
+
export * from './useTableOpr.js';
|
|
5
|
+
export * from './useTablePagination.js';
|
|
6
|
+
export * from './useTableQuery.js';
|
|
7
|
+
export * from './useTableRowActions.js';
|
|
8
|
+
export * from './useTableRowSelection.js';
|
|
9
|
+
export * from './useTableView.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./useTable.js";
|
|
2
|
+
export * from "./useTableColumns.js";
|
|
3
|
+
export * from "./useTableData.js";
|
|
4
|
+
export * from "./useTableOpr.js";
|
|
5
|
+
export * from "./useTablePagination.js";
|
|
6
|
+
export * from "./useTableQuery.js";
|
|
7
|
+
export * from "./useTableRowActions.js";
|
|
8
|
+
export * from "./useTableRowSelection.js";
|
|
9
|
+
export * from "./useTableView.js";
|
|
File without changes
|