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,81 @@
|
|
|
1
|
+
import { noDupPrimitiveArray } from "./array.js";
|
|
2
|
+
import { isObject } from "./type.js";
|
|
3
|
+
function comparePrimitiveArrays(arr1, arr2) {
|
|
4
|
+
if (!arr1 || !arr2)
|
|
5
|
+
return arr1 === arr2;
|
|
6
|
+
if (!Array.isArray(arr1) || !Array.isArray(arr2))
|
|
7
|
+
return false;
|
|
8
|
+
if (arr1.length !== arr2.length)
|
|
9
|
+
return false;
|
|
10
|
+
return arr1.every((item, index) => item === arr2[index]);
|
|
11
|
+
}
|
|
12
|
+
function getChangedFields(prev, cur) {
|
|
13
|
+
const fields = noDupPrimitiveArray([...Object.keys(prev), ...Object.keys(cur)]);
|
|
14
|
+
const changedFields = [];
|
|
15
|
+
for (const field of fields) {
|
|
16
|
+
if ((prev[field] === null || prev[field] === void 0) && (cur[field] === null || cur[field] === void 0)) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
if (Array.isArray(prev[field]) || Array.isArray(cur[field])) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (Object(prev[field]) !== prev[field] && prev[field] !== cur[field]) {
|
|
23
|
+
changedFields.push(field);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return changedFields;
|
|
27
|
+
}
|
|
28
|
+
export function compareObjArrays(arr1, arr2) {
|
|
29
|
+
if (!arr1 || !arr2)
|
|
30
|
+
return arr1 === arr2;
|
|
31
|
+
if (!Array.isArray(arr1) || !Array.isArray(arr2)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
if (arr1.length !== arr2.length) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
return arr1.every((item1, index) => {
|
|
38
|
+
const item2 = arr2[index];
|
|
39
|
+
const keys = Object.keys(item1);
|
|
40
|
+
return keys.every((key) => {
|
|
41
|
+
if (Array.isArray(item1[key]) && Array.isArray(item2[key])) {
|
|
42
|
+
return compareObjArrays(item1[key], item2[key]);
|
|
43
|
+
} else if (isObject(item1[key]) && isObject(item2[key])) {
|
|
44
|
+
return getChangedFields(item1[key], item2[key]).length === 0;
|
|
45
|
+
}
|
|
46
|
+
if ((item1[key] === null || item1[key] === void 0) && (item2[key] === null || item2[key] === void 0)) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return item1[key] === item2[key];
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export function getObjWithModifiedFields(initData, oldData, newData, arrayKeys = []) {
|
|
54
|
+
const changedFields = getChangedFields(oldData, newData);
|
|
55
|
+
const arrayChangedList = arrayKeys.map((key) => {
|
|
56
|
+
const oldArr = oldData[key];
|
|
57
|
+
const newArr = newData[key];
|
|
58
|
+
if (!Array.isArray(oldArr) && !Array.isArray(newArr)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
const hasItems = Array.isArray(oldArr) && oldArr.length > 0 || Array.isArray(newArr) && newArr.length > 0;
|
|
62
|
+
const firstItem = Array.isArray(oldArr) && oldArr.length > 0 ? oldArr[0] : Array.isArray(newArr) && newArr.length > 0 ? newArr[0] : null;
|
|
63
|
+
const isPrimitiveArray = !hasItems || firstItem !== null && firstItem !== void 0 && Object(firstItem) !== firstItem;
|
|
64
|
+
if (isPrimitiveArray) {
|
|
65
|
+
return !comparePrimitiveArrays(oldArr, newArr);
|
|
66
|
+
} else {
|
|
67
|
+
return !compareObjArrays(oldArr, newArr);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
if (changedFields.length === 0 && !arrayChangedList.some((changed) => changed)) {
|
|
71
|
+
return [initData, false];
|
|
72
|
+
}
|
|
73
|
+
for (const field of changedFields) {
|
|
74
|
+
initData[field] = newData[field];
|
|
75
|
+
}
|
|
76
|
+
arrayKeys.forEach((key, index) => {
|
|
77
|
+
if (arrayChangedList[index])
|
|
78
|
+
initData[key] = newData[key];
|
|
79
|
+
});
|
|
80
|
+
return [initData, true];
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tagA.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tagA.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function triggerFileDownload(data, filename) {
|
|
2
|
+
const link = document.createElement("a");
|
|
3
|
+
link.href = URL.createObjectURL(new Blob([data]));
|
|
4
|
+
link.download = filename;
|
|
5
|
+
document.body.appendChild(link);
|
|
6
|
+
link.click();
|
|
7
|
+
URL.revokeObjectURL(link.href);
|
|
8
|
+
document.body.removeChild(link);
|
|
9
|
+
}
|
|
10
|
+
export function triggerFileDownloadFromUrl(url, filename) {
|
|
11
|
+
fetch(url ?? "").then((response) => response.blob()).then((blob) => {
|
|
12
|
+
triggerFileDownload(blob, filename ?? "unknown");
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getEmojiFlag(locale: string): string;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export function getEmojiFlag(locale) {
|
|
2
|
+
const languageToCountry = {
|
|
3
|
+
ar: "sa",
|
|
4
|
+
// Arabic -> Saudi Arabia
|
|
5
|
+
bn: "bd",
|
|
6
|
+
// Bengali -> Bangladesh
|
|
7
|
+
ca: "es",
|
|
8
|
+
// Catalan -> Spain
|
|
9
|
+
ckb: "iq",
|
|
10
|
+
// Central Kurdish -> Iraq
|
|
11
|
+
cs: "cz",
|
|
12
|
+
// Czech -> Czech Republic (note: modern country code is actually 'cz')
|
|
13
|
+
da: "dk",
|
|
14
|
+
// Danish -> Denmark
|
|
15
|
+
el: "gr",
|
|
16
|
+
// Greek -> Greece
|
|
17
|
+
en: "gb",
|
|
18
|
+
// English -> Great Britain
|
|
19
|
+
et: "ee",
|
|
20
|
+
// Estonian -> Estonia
|
|
21
|
+
he: "il",
|
|
22
|
+
// Hebrew -> Israel
|
|
23
|
+
hi: "in",
|
|
24
|
+
// Hindi -> India
|
|
25
|
+
hy: "am",
|
|
26
|
+
// Armenian -> Armenia
|
|
27
|
+
ja: "jp",
|
|
28
|
+
// Japanese -> Japan
|
|
29
|
+
kk: "kz",
|
|
30
|
+
// Kazakh -> Kazakhstan
|
|
31
|
+
km: "kh",
|
|
32
|
+
// Khmer -> Cambodia
|
|
33
|
+
ko: "kr",
|
|
34
|
+
// Korean -> South Korea
|
|
35
|
+
ky: "kg",
|
|
36
|
+
// Kyrgyz -> Kyrgyzstan
|
|
37
|
+
lb: "lu",
|
|
38
|
+
// Luxembourgish -> Luxembourg
|
|
39
|
+
ms: "my",
|
|
40
|
+
// Malay -> Malaysia
|
|
41
|
+
nb: "no",
|
|
42
|
+
// Norwegian Bokmål -> Norway
|
|
43
|
+
sl: "si",
|
|
44
|
+
// Slovenian -> Slovenia
|
|
45
|
+
sv: "se",
|
|
46
|
+
// Swedish -> Sweden
|
|
47
|
+
uk: "ua",
|
|
48
|
+
// Ukrainian -> Ukraine
|
|
49
|
+
ur: "pk",
|
|
50
|
+
// Urdu -> Pakistan
|
|
51
|
+
vi: "vn"
|
|
52
|
+
// Vietnamese -> Vietnam
|
|
53
|
+
};
|
|
54
|
+
const baseLanguage = locale.split("-")[0]?.toLowerCase() || locale;
|
|
55
|
+
const countryCode = languageToCountry[baseLanguage] || locale.replace(/^.*-/, "").slice(0, 2);
|
|
56
|
+
return countryCode.toUpperCase().split("").map((char) => String.fromCodePoint(127397 + char.charCodeAt(0))).join("");
|
|
57
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { triggerFileDownload } from "./download/tagA.js";
|
|
2
|
+
export async function genTableExcel(columns, data, filenamePrefix) {
|
|
3
|
+
const ExcelJs = (await import("exceljs")).default;
|
|
4
|
+
const wb = new ExcelJs.Workbook();
|
|
5
|
+
const ws = wb.addWorksheet("Sheet1");
|
|
6
|
+
const titleRow = columns.map((col) => col.header);
|
|
7
|
+
const rows = [titleRow];
|
|
8
|
+
data.forEach((item) => {
|
|
9
|
+
const row = [];
|
|
10
|
+
columns.forEach((col) => {
|
|
11
|
+
if (!col["accessorKey"] && !col.cell && !col.exportCell) {
|
|
12
|
+
throw new Error("Column must have accessorKey or cell or exportCell for excel export");
|
|
13
|
+
}
|
|
14
|
+
if (col.exportCell) {
|
|
15
|
+
row.push(col.exportCell(item));
|
|
16
|
+
} else if (typeof col.cell === "function") {
|
|
17
|
+
try {
|
|
18
|
+
const ctx = {
|
|
19
|
+
row: { original: item },
|
|
20
|
+
getValue: () => col["accessorKey"] ? item[col["accessorKey"]] : void 0,
|
|
21
|
+
column: col
|
|
22
|
+
// 其他字段按需补充
|
|
23
|
+
};
|
|
24
|
+
const v = col.cell(ctx);
|
|
25
|
+
row.push(v == null ? "" : String(v));
|
|
26
|
+
return;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.warn("col.cell \u8C03\u7528\u5931\u8D25\uFF0C\u56DE\u9000\u5230 accessorKey", e);
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
row.push(item[col["accessorKey"]]);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
rows.push(row);
|
|
35
|
+
});
|
|
36
|
+
ws.addRows(rows);
|
|
37
|
+
for (let colIdx = 1; colIdx <= titleRow.length; colIdx++) {
|
|
38
|
+
let cellWidth = 10;
|
|
39
|
+
rows.forEach((_, rowIdx) => {
|
|
40
|
+
cellWidth = Math.max(cellWidth, getVisualWidth(String(ws.getCell(rowIdx + 1, colIdx).value)));
|
|
41
|
+
});
|
|
42
|
+
ws.getColumn(colIdx).width = cellWidth;
|
|
43
|
+
ws.getColumn(colIdx).font = { name: "\u5FAE\u8F6F\u96C5\u9ED1" };
|
|
44
|
+
}
|
|
45
|
+
const buffer = await wb.xlsx.writeBuffer();
|
|
46
|
+
const fileType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
47
|
+
const blob = new Blob([buffer], { type: fileType });
|
|
48
|
+
triggerFileDownload(blob, `${filenamePrefix}.xlsx`);
|
|
49
|
+
}
|
|
50
|
+
export function getVisualWidth(cellValue) {
|
|
51
|
+
if (!cellValue || Array.isArray(cellValue))
|
|
52
|
+
return 0;
|
|
53
|
+
let width = 0;
|
|
54
|
+
for (let i = 0; i < cellValue.length; i += 1) {
|
|
55
|
+
const charCode = cellValue.charCodeAt(i);
|
|
56
|
+
if (charCode >= 0 && charCode <= 128) {
|
|
57
|
+
width += 1.5;
|
|
58
|
+
} else {
|
|
59
|
+
width += 2.6;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return Math.round(width);
|
|
63
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
const colSpanClassMap = {
|
|
2
|
+
// 基础类名
|
|
3
|
+
"1": "col-span-1",
|
|
4
|
+
"2": "col-span-2",
|
|
5
|
+
"3": "col-span-3",
|
|
6
|
+
"4": "col-span-4",
|
|
7
|
+
"5": "col-span-5",
|
|
8
|
+
"6": "col-span-6",
|
|
9
|
+
"7": "col-span-7",
|
|
10
|
+
"8": "col-span-8",
|
|
11
|
+
"9": "col-span-9",
|
|
12
|
+
"10": "col-span-10",
|
|
13
|
+
"11": "col-span-11",
|
|
14
|
+
"12": "col-span-12",
|
|
15
|
+
"13": "col-span-13",
|
|
16
|
+
"14": "col-span-14",
|
|
17
|
+
"15": "col-span-15",
|
|
18
|
+
"16": "col-span-16",
|
|
19
|
+
"17": "col-span-17",
|
|
20
|
+
"18": "col-span-18",
|
|
21
|
+
"19": "col-span-19",
|
|
22
|
+
"20": "col-span-20",
|
|
23
|
+
"21": "col-span-21",
|
|
24
|
+
"22": "col-span-22",
|
|
25
|
+
"23": "col-span-23",
|
|
26
|
+
"24": "col-span-24",
|
|
27
|
+
// sm 响应式
|
|
28
|
+
"sm:1": "sm:col-span-1",
|
|
29
|
+
"sm:2": "sm:col-span-2",
|
|
30
|
+
"sm:3": "sm:col-span-3",
|
|
31
|
+
"sm:4": "sm:col-span-4",
|
|
32
|
+
"sm:5": "sm:col-span-5",
|
|
33
|
+
"sm:6": "sm:col-span-6",
|
|
34
|
+
"sm:7": "sm:col-span-7",
|
|
35
|
+
"sm:8": "sm:col-span-8",
|
|
36
|
+
"sm:9": "sm:col-span-9",
|
|
37
|
+
"sm:10": "sm:col-span-10",
|
|
38
|
+
"sm:11": "sm:col-span-11",
|
|
39
|
+
"sm:12": "sm:col-span-12",
|
|
40
|
+
"sm:13": "sm:col-span-13",
|
|
41
|
+
"sm:14": "sm:col-span-14",
|
|
42
|
+
"sm:15": "sm:col-span-15",
|
|
43
|
+
"sm:16": "sm:col-span-16",
|
|
44
|
+
"sm:17": "sm:col-span-17",
|
|
45
|
+
"sm:18": "sm:col-span-18",
|
|
46
|
+
"sm:19": "sm:col-span-19",
|
|
47
|
+
"sm:20": "sm:col-span-20",
|
|
48
|
+
"sm:21": "sm:col-span-21",
|
|
49
|
+
"sm:22": "sm:col-span-22",
|
|
50
|
+
"sm:23": "sm:col-span-23",
|
|
51
|
+
"sm:24": "sm:col-span-24",
|
|
52
|
+
// md 响应式
|
|
53
|
+
"md:1": "md:col-span-1",
|
|
54
|
+
"md:2": "md:col-span-2",
|
|
55
|
+
"md:3": "md:col-span-3",
|
|
56
|
+
"md:4": "md:col-span-4",
|
|
57
|
+
"md:5": "md:col-span-5",
|
|
58
|
+
"md:6": "md:col-span-6",
|
|
59
|
+
"md:7": "md:col-span-7",
|
|
60
|
+
"md:8": "md:col-span-8",
|
|
61
|
+
"md:9": "md:col-span-9",
|
|
62
|
+
"md:10": "md:col-span-10",
|
|
63
|
+
"md:11": "md:col-span-11",
|
|
64
|
+
"md:12": "md:col-span-12",
|
|
65
|
+
"md:13": "md:col-span-13",
|
|
66
|
+
"md:14": "md:col-span-14",
|
|
67
|
+
"md:15": "md:col-span-15",
|
|
68
|
+
"md:16": "md:col-span-16",
|
|
69
|
+
"md:17": "md:col-span-17",
|
|
70
|
+
"md:18": "md:col-span-18",
|
|
71
|
+
"md:19": "md:col-span-19",
|
|
72
|
+
"md:20": "md:col-span-20",
|
|
73
|
+
"md:21": "md:col-span-21",
|
|
74
|
+
"md:22": "md:col-span-22",
|
|
75
|
+
"md:23": "md:col-span-23",
|
|
76
|
+
"md:24": "md:col-span-24",
|
|
77
|
+
// lg 响应式
|
|
78
|
+
"lg:1": "lg:col-span-1",
|
|
79
|
+
"lg:2": "lg:col-span-2",
|
|
80
|
+
"lg:3": "lg:col-span-3",
|
|
81
|
+
"lg:4": "lg:col-span-4",
|
|
82
|
+
"lg:5": "lg:col-span-5",
|
|
83
|
+
"lg:6": "lg:col-span-6",
|
|
84
|
+
"lg:7": "lg:col-span-7",
|
|
85
|
+
"lg:8": "lg:col-span-8",
|
|
86
|
+
"lg:9": "lg:col-span-9",
|
|
87
|
+
"lg:10": "lg:col-span-10",
|
|
88
|
+
"lg:11": "lg:col-span-11",
|
|
89
|
+
"lg:12": "lg:col-span-12",
|
|
90
|
+
"lg:13": "lg:col-span-13",
|
|
91
|
+
"lg:14": "lg:col-span-14",
|
|
92
|
+
"lg:15": "lg:col-span-15",
|
|
93
|
+
"lg:16": "lg:col-span-16",
|
|
94
|
+
"lg:17": "lg:col-span-17",
|
|
95
|
+
"lg:18": "lg:col-span-18",
|
|
96
|
+
"lg:19": "lg:col-span-19",
|
|
97
|
+
"lg:20": "lg:col-span-20",
|
|
98
|
+
"lg:21": "lg:col-span-21",
|
|
99
|
+
"lg:22": "lg:col-span-22",
|
|
100
|
+
"lg:23": "lg:col-span-23",
|
|
101
|
+
"lg:24": "lg:col-span-24",
|
|
102
|
+
// xl 响应式
|
|
103
|
+
"xl:1": "xl:col-span-1",
|
|
104
|
+
"xl:2": "xl:col-span-2",
|
|
105
|
+
"xl:3": "xl:col-span-3",
|
|
106
|
+
"xl:4": "xl:col-span-4",
|
|
107
|
+
"xl:5": "xl:col-span-5",
|
|
108
|
+
"xl:6": "xl:col-span-6",
|
|
109
|
+
"xl:7": "xl:col-span-7",
|
|
110
|
+
"xl:8": "xl:col-span-8",
|
|
111
|
+
"xl:9": "xl:col-span-9",
|
|
112
|
+
"xl:10": "xl:col-span-10",
|
|
113
|
+
"xl:11": "xl:col-span-11",
|
|
114
|
+
"xl:12": "xl:col-span-12",
|
|
115
|
+
"xl:13": "xl:col-span-13",
|
|
116
|
+
"xl:14": "xl:col-span-14",
|
|
117
|
+
"xl:15": "xl:col-span-15",
|
|
118
|
+
"xl:16": "xl:col-span-16",
|
|
119
|
+
"xl:17": "xl:col-span-17",
|
|
120
|
+
"xl:18": "xl:col-span-18",
|
|
121
|
+
"xl:19": "xl:col-span-19",
|
|
122
|
+
"xl:20": "xl:col-span-20",
|
|
123
|
+
"xl:21": "xl:col-span-21",
|
|
124
|
+
"xl:22": "xl:col-span-22",
|
|
125
|
+
"xl:23": "xl:col-span-23",
|
|
126
|
+
"xl:24": "xl:col-span-24"
|
|
127
|
+
};
|
|
128
|
+
export const getColSpanClass = (colSpan) => {
|
|
129
|
+
return colSpanClassMap[String(colSpan)] ?? "col-span-6";
|
|
130
|
+
};
|
|
131
|
+
export const getColSpanClassFromResponsive = (colSpan) => {
|
|
132
|
+
if (!colSpan) return "";
|
|
133
|
+
const colSpanClasses = colSpan.split(" ").map((span) => {
|
|
134
|
+
const className = colSpanClassMap[span];
|
|
135
|
+
if (!className) {
|
|
136
|
+
console.warn(`Invalid colSpan format: ${span}`);
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
139
|
+
return className;
|
|
140
|
+
}).filter(Boolean);
|
|
141
|
+
return colSpanClasses.join(" ");
|
|
142
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './download/index.js';
|
|
2
|
+
export * from './array.js';
|
|
3
|
+
export * from './diff.js';
|
|
4
|
+
export * from './emoji.js';
|
|
5
|
+
export * from './excel.js';
|
|
6
|
+
export * from './form.js';
|
|
7
|
+
export * from './request.js';
|
|
8
|
+
export * from './string.js';
|
|
9
|
+
export * from './tree.js';
|
|
10
|
+
export * from './type.js';
|
|
11
|
+
export * from './vueuse.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./download/index.js";
|
|
2
|
+
export * from "./array.js";
|
|
3
|
+
export * from "./diff.js";
|
|
4
|
+
export * from "./emoji.js";
|
|
5
|
+
export * from "./excel.js";
|
|
6
|
+
export * from "./form.js";
|
|
7
|
+
export * from "./request.js";
|
|
8
|
+
export * from "./string.js";
|
|
9
|
+
export * from "./tree.js";
|
|
10
|
+
export * from "./type.js";
|
|
11
|
+
export * from "./vueuse.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function cloneJson<T>(obj: T): T;
|
|
2
|
+
export declare function isEmptyString(str: string | null | undefined): boolean;
|
|
3
|
+
export declare function onlyAllowNumberAndDot(value: string): boolean;
|
|
4
|
+
export declare function filterNumberAndDot(value: string | null): string;
|
|
5
|
+
export declare function uuid(): `${string}-${string}-${string}-${string}-${string}`;
|
|
6
|
+
export declare function stringsJoin(arr: (string | undefined | null)[], separator?: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function cloneJson(obj) {
|
|
2
|
+
return JSON.parse(JSON.stringify(obj));
|
|
3
|
+
}
|
|
4
|
+
export function isEmptyString(str) {
|
|
5
|
+
return str === null || str === void 0 || str.trim() === "";
|
|
6
|
+
}
|
|
7
|
+
export function onlyAllowNumberAndDot(value) {
|
|
8
|
+
return !value || /^[0-9]+(\.[0-9]+)?\.?$/.test(value);
|
|
9
|
+
}
|
|
10
|
+
export function filterNumberAndDot(value) {
|
|
11
|
+
return value.replace(/[^\d.]/g, "");
|
|
12
|
+
}
|
|
13
|
+
export function uuid() {
|
|
14
|
+
return crypto.randomUUID();
|
|
15
|
+
}
|
|
16
|
+
export function stringsJoin(arr, separator = ", ") {
|
|
17
|
+
return arr.filter((item) => !isEmptyString(item)).join(separator);
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TreeItem } from '@nuxt/ui';
|
|
2
|
+
export declare function treeifyModels<T>(data: T[], rowKey: keyof T, treeifyColName: keyof T, treeifyColValue?: number): (T & {
|
|
3
|
+
children: T[];
|
|
4
|
+
})[];
|
|
5
|
+
export declare function flattenTree<T extends {
|
|
6
|
+
children?: T[];
|
|
7
|
+
}>(tree: T[]): T[];
|
|
8
|
+
export declare function treeifyOptions<T extends Record<string, any>>(data: T[], onSelect: (newVal: number) => void, labelField: string, valueField: string, parentValueField: string, excludedValue?: number, disabledIds?: number[], defaultExpanded?: boolean, visited?: Set<number>): TreeItem[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export function treeifyModels(data, rowKey, treeifyColName, treeifyColValue = 0) {
|
|
2
|
+
return data.filter((row) => row[treeifyColName] === treeifyColValue).map((row) => ({
|
|
3
|
+
...row,
|
|
4
|
+
children: treeifyModels(data, rowKey, treeifyColName, row[rowKey])
|
|
5
|
+
}));
|
|
6
|
+
}
|
|
7
|
+
export function flattenTree(tree) {
|
|
8
|
+
return tree.reduce((acc, item) => {
|
|
9
|
+
acc.push(item);
|
|
10
|
+
if (item.children) {
|
|
11
|
+
acc.push(...flattenTree(item.children));
|
|
12
|
+
}
|
|
13
|
+
return acc;
|
|
14
|
+
}, []);
|
|
15
|
+
}
|
|
16
|
+
export function treeifyOptions(data, onSelect, labelField, valueField, parentValueField, excludedValue = 0, disabledIds = [], defaultExpanded = true, visited = /* @__PURE__ */ new Set()) {
|
|
17
|
+
const allIds = new Set(data.map((item) => item[valueField]));
|
|
18
|
+
const rootItems = data.filter(
|
|
19
|
+
(item) => (!allIds.has(item[parentValueField]) || item[parentValueField] === excludedValue) && item[valueField] !== excludedValue
|
|
20
|
+
);
|
|
21
|
+
function buildNode(node, visited2) {
|
|
22
|
+
const nodeId = node[valueField];
|
|
23
|
+
if (visited2.has(nodeId)) {
|
|
24
|
+
return {
|
|
25
|
+
defaultExpanded,
|
|
26
|
+
label: node[labelField],
|
|
27
|
+
value: nodeId,
|
|
28
|
+
onSelect: (e) => {
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
onSelect(nodeId);
|
|
31
|
+
},
|
|
32
|
+
disabled: disabledIds.includes(nodeId)
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const newVisited = new Set(visited2);
|
|
36
|
+
newVisited.add(nodeId);
|
|
37
|
+
const children = data.filter((item) => item[parentValueField] === nodeId && item[valueField] !== excludedValue).map((child) => buildNode(child, newVisited));
|
|
38
|
+
const treeItem = {
|
|
39
|
+
defaultExpanded,
|
|
40
|
+
label: node[labelField],
|
|
41
|
+
value: nodeId,
|
|
42
|
+
onSelect: (e) => {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
onSelect(nodeId);
|
|
45
|
+
},
|
|
46
|
+
disabled: disabledIds.includes(nodeId)
|
|
47
|
+
};
|
|
48
|
+
if (children.length) {
|
|
49
|
+
treeItem.children = children;
|
|
50
|
+
}
|
|
51
|
+
return treeItem;
|
|
52
|
+
}
|
|
53
|
+
return rootItems.map((root) => buildNode(root, visited));
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isObject(value: unknown): value is object;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCnTimeAgo: (time: string | Date) => import("vue").ComputedRef<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useTimeAgo } from "@vueuse/core";
|
|
2
|
+
export const useCnTimeAgo = (time) => {
|
|
3
|
+
return useTimeAgo(time, {
|
|
4
|
+
messages: {
|
|
5
|
+
justNow: "\u521A\u521A",
|
|
6
|
+
past: (n) => `${n}\u524D`,
|
|
7
|
+
future: (n) => `${n}\u540E`,
|
|
8
|
+
month: (n) => `${n}\u4E2A\u6708`,
|
|
9
|
+
year: (n) => `${n}\u5E74`,
|
|
10
|
+
day: (n) => `${n}\u5929`,
|
|
11
|
+
week: (n) => `${n}\u5468`,
|
|
12
|
+
hour: (n) => `${n}\u5C0F\u65F6`,
|
|
13
|
+
minute: (n) => `${n}\u5206\u949F`,
|
|
14
|
+
second: (n) => `${n}\u79D2`,
|
|
15
|
+
invalid: "\u65E0\u6548\u65F6\u95F4"
|
|
16
|
+
},
|
|
17
|
+
updateInterval: 1e3
|
|
18
|
+
// 每秒更新一次
|
|
19
|
+
});
|
|
20
|
+
};
|
package/dist/types.d.mts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "v-nuxt-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Veken UI Component Library - Reusable Nuxt UI components, composables, and utilities for enterprise applications",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"style": "./dist/runtime/index.css",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/types.d.mts",
|
|
10
|
+
"style": "./dist/runtime/index.css",
|
|
11
|
+
"import": "./dist/module.mjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/module.mjs",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"prepack": "nuxt-module-build build",
|
|
20
|
+
"dev": "nuxi dev playground",
|
|
21
|
+
"dev:build": "nuxi build playground",
|
|
22
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
|
|
23
|
+
"build": "nuxt-module-build build",
|
|
24
|
+
"lint": "eslint .",
|
|
25
|
+
"lint:fix": "eslint . --fix",
|
|
26
|
+
"typecheck": "nuxi typecheck playground"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@nuxt/content": "^3.12.0",
|
|
30
|
+
"@nuxt/kit": "^4.3.1",
|
|
31
|
+
"@nuxtjs/mdc": "^0.20.2",
|
|
32
|
+
"@tanstack/table-core": "^8.21.3",
|
|
33
|
+
"@vueuse/core": "^14.2.1",
|
|
34
|
+
"better-sqlite3": "^12.8.0",
|
|
35
|
+
"dayjs": "^1.11.19",
|
|
36
|
+
"defu": "^6.1.4",
|
|
37
|
+
"fflate": "^0.8.2",
|
|
38
|
+
"json5": "^2.2.3",
|
|
39
|
+
"maska": "^3.2.0",
|
|
40
|
+
"monaco-editor": "^0.55.1",
|
|
41
|
+
"ohash": "^2.0.11",
|
|
42
|
+
"reka-ui": "^2.9.2",
|
|
43
|
+
"scule": "^1.3.0",
|
|
44
|
+
"sql-formatter": "^15.7.2",
|
|
45
|
+
"vue-router": "^5.0.4"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@nuxt/ui": "^4.5.0",
|
|
49
|
+
"@nuxtjs/i18n": "^10.2.3",
|
|
50
|
+
"@vueuse/nuxt": "^14.2.1",
|
|
51
|
+
"nuxt": "^4.3.1",
|
|
52
|
+
"zod": "^4.3.6"
|
|
53
|
+
},
|
|
54
|
+
"peerDependenciesMeta": {
|
|
55
|
+
"zod": {
|
|
56
|
+
"optional": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"optionalDependencies": {
|
|
60
|
+
"@vue-flow/core": "^1.42.2",
|
|
61
|
+
"cronstrue": "^3.12.0",
|
|
62
|
+
"echarts": "^6.0.0",
|
|
63
|
+
"exceljs": "^4.4.0",
|
|
64
|
+
"vue-draggable-plus": "^0.6.1",
|
|
65
|
+
"vue-echarts": "^8.0.1"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@iconify-json/lucide": "^1.2.94",
|
|
69
|
+
"@internationalized/date": "^3.12.0",
|
|
70
|
+
"@nuxt/eslint": "^1.15.2",
|
|
71
|
+
"@nuxt/eslint-config": "^1.15.2",
|
|
72
|
+
"@nuxt/fonts": "^0.12.1",
|
|
73
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
74
|
+
"@nuxt/ui": "^4.6.0",
|
|
75
|
+
"@nuxtjs/i18n": "^10.2.4",
|
|
76
|
+
"@types/sortablejs": "^1.15.9",
|
|
77
|
+
"@vueuse/nuxt": "^14.2.1",
|
|
78
|
+
"cronstrue": "^3.12.0",
|
|
79
|
+
"echarts": "^6.0.0",
|
|
80
|
+
"eslint": "^9.39.3",
|
|
81
|
+
"exceljs": "^4.4.0",
|
|
82
|
+
"nuxt": "^4.3.1",
|
|
83
|
+
"shiki": "^3.23.0",
|
|
84
|
+
"sortablejs": "^1.15.7",
|
|
85
|
+
"tailwindcss": "^4.2.2",
|
|
86
|
+
"typescript": "^5.9.3",
|
|
87
|
+
"vue": "^3.5.0",
|
|
88
|
+
"vue-draggable-plus": "^0.6.1",
|
|
89
|
+
"vue-echarts": "^8.0.1",
|
|
90
|
+
"vue-tsc": "^3.2.5",
|
|
91
|
+
"zod": "^4.3.6"
|
|
92
|
+
},
|
|
93
|
+
"packageManager": "pnpm@10.29.2",
|
|
94
|
+
"pnpm": {
|
|
95
|
+
"onlyBuiltDependencies": [
|
|
96
|
+
"@parcel/watcher",
|
|
97
|
+
"esbuild",
|
|
98
|
+
"unrs-resolver",
|
|
99
|
+
"vue-demi"
|
|
100
|
+
],
|
|
101
|
+
"ignoredBuiltDependencies": [
|
|
102
|
+
"@parcel/watcher",
|
|
103
|
+
"esbuild",
|
|
104
|
+
"unrs-resolver",
|
|
105
|
+
"vue-demi"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
}
|