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,44 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed } from "vue";
|
|
3
|
+
import ButtonDropdown from "#v/components/button/Dropdown.vue";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
options: { type: Array, required: true },
|
|
6
|
+
unselectedFields: { type: Array, required: true },
|
|
7
|
+
bizColumns: { type: Array, required: true },
|
|
8
|
+
size: { type: null, required: false }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits(["new"]);
|
|
11
|
+
const popoverOpen = ref(false);
|
|
12
|
+
const unselectedOptions = computed(() => {
|
|
13
|
+
const options = [
|
|
14
|
+
{
|
|
15
|
+
id: "unselected-fields",
|
|
16
|
+
label: "\u65B0\u589E\u67E5\u8BE2\u5B57\u6BB5",
|
|
17
|
+
items: props.unselectedFields.map((field) => {
|
|
18
|
+
const option = props.options.find((option2) => option2.field === field);
|
|
19
|
+
const column = props.bizColumns.find((column2) => column2["accessorKey"] === field);
|
|
20
|
+
return {
|
|
21
|
+
label: column?.header || option?.label || field,
|
|
22
|
+
onSelect: () => {
|
|
23
|
+
emit("new", field);
|
|
24
|
+
popoverOpen.value = false;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
return options;
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<!-- NOTE: 自己实现DropdownMenu, 原生DropdownMenu的Focus有问题,会让查询字段打开的Popover关闭 -->
|
|
36
|
+
<ButtonDropdown :groups="unselectedOptions">
|
|
37
|
+
<UButton
|
|
38
|
+
:size="size"
|
|
39
|
+
color="neutral"
|
|
40
|
+
variant="soft"
|
|
41
|
+
icon="i-lucide-list-filter-plus"
|
|
42
|
+
/>
|
|
43
|
+
</ButtonDropdown>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WhereQueryOption, VColumn, Size } from '#v/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: WhereQueryOption<any>[];
|
|
4
|
+
unselectedFields: string[];
|
|
5
|
+
bizColumns: VColumn<any>[];
|
|
6
|
+
size?: Size;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
new: (args_0: string) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onNew?: ((args_0: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WhereQueryProps } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<WhereQueryProps<T>> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
7
|
+
focusField: (field: string) => boolean;
|
|
8
|
+
}>) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import("vue").VNode & {
|
|
13
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useTemplateRef, nextTick } from "vue";
|
|
3
|
+
import { useTableOpr } from "#v/composables/table/useTableOpr";
|
|
4
|
+
import { useToast } from "@nuxt/ui/composables";
|
|
5
|
+
import TableQueryWhereSimple from "#v/components/table/query/where/simple/index.vue";
|
|
6
|
+
import TableQueryWhereNewer from "#v/components/table/query/where/Newer.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
whereOptions: { type: Array, required: true },
|
|
9
|
+
defaultWhereQuery: { type: Object, required: false },
|
|
10
|
+
whereQuery: { type: null, required: true },
|
|
11
|
+
onUpdateWhereQuery: { type: Function, required: true },
|
|
12
|
+
whereQueryOpen: { type: Boolean, required: false },
|
|
13
|
+
onUpdateWhereQueryOpen: { type: Function, required: false },
|
|
14
|
+
isWhereQueryValueEmpty: { type: Boolean, required: false },
|
|
15
|
+
fetching: { type: Boolean, required: false },
|
|
16
|
+
triggerFetching: { type: Function, required: true },
|
|
17
|
+
bizColumns: { type: Array, required: false },
|
|
18
|
+
hideQueryButton: { type: Boolean, required: false }
|
|
19
|
+
});
|
|
20
|
+
const selectedWhereFields = computed(() => {
|
|
21
|
+
return props.whereQuery?.items?.map((query) => query.field) ?? [];
|
|
22
|
+
});
|
|
23
|
+
const unselectedWhereFields = computed(() => {
|
|
24
|
+
return props.whereOptions.map((option) => option.field).filter((field) => !selectedWhereFields.value.includes(field));
|
|
25
|
+
});
|
|
26
|
+
const simpleWhereQueryRef = useTemplateRef("simpleWhereQuery");
|
|
27
|
+
const onNewField = (field) => {
|
|
28
|
+
const option = props.whereOptions.find((option2) => option2.field === field);
|
|
29
|
+
if (!option || !option.type) {
|
|
30
|
+
useToast().add({
|
|
31
|
+
title: "\u65E0\u6CD5\u6DFB\u52A0\u67E5\u8BE2\u6761\u4EF6",
|
|
32
|
+
description: `\u65E0\u6CD5\u627E\u5230\u5B57\u6BB5 ${field} \u7684\u9009\u9879\uFF0C\u6216\u8BE5\u9009\u9879\u7F3A\u5C11\u7C7B\u578B\u4FE1\u606F`,
|
|
33
|
+
color: "warning"
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
props.onUpdateWhereQuery({
|
|
38
|
+
...props.whereQuery,
|
|
39
|
+
items: [...props.whereQuery?.items ?? [], {
|
|
40
|
+
field,
|
|
41
|
+
opr: option.defaultOpr ?? useTableOpr().getDefaultOprByType(option.type),
|
|
42
|
+
value: null,
|
|
43
|
+
custom: option.custom
|
|
44
|
+
}]
|
|
45
|
+
});
|
|
46
|
+
nextTick(() => {
|
|
47
|
+
simpleWhereQueryRef.value?.focusItem(field);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const isWhereQueryEmpty = computed(() => {
|
|
51
|
+
return !props.whereQuery || Object.keys(props.whereQuery ?? {}).length === 0 || // 仅检查有对应option的item的值是否为空
|
|
52
|
+
(props.whereQuery?.items?.filter((query) => props.whereOptions.find((option) => option.field === query.field)).length ?? 0) === 0 && (props.whereQuery?.groups?.length ?? 0) === 0;
|
|
53
|
+
});
|
|
54
|
+
const focusField = (field) => {
|
|
55
|
+
return simpleWhereQueryRef.value?.focusItem(field) ?? false;
|
|
56
|
+
};
|
|
57
|
+
defineExpose({ focusField });
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<div class="flex items-start gap-2 pl-4 pr-2.5 py-2.5">
|
|
62
|
+
<!-- conditions -->
|
|
63
|
+
<div class="flex flex-wrap gap-2.5">
|
|
64
|
+
<TableQueryWhereSimple
|
|
65
|
+
v-if="!isWhereQueryEmpty"
|
|
66
|
+
v-bind="props"
|
|
67
|
+
ref="simpleWhereQuery"
|
|
68
|
+
:items="whereQuery?.items"
|
|
69
|
+
@update-items="(newItems) => onUpdateWhereQuery({
|
|
70
|
+
...whereQuery,
|
|
71
|
+
items: newItems
|
|
72
|
+
})"
|
|
73
|
+
/>
|
|
74
|
+
<TableQueryWhereNewer
|
|
75
|
+
:options="whereOptions"
|
|
76
|
+
:unselected-fields="unselectedWhereFields"
|
|
77
|
+
:biz-columns="bizColumns ?? []"
|
|
78
|
+
size="sm"
|
|
79
|
+
@new="onNewField"
|
|
80
|
+
/>
|
|
81
|
+
<UButton
|
|
82
|
+
v-if="!hideQueryButton"
|
|
83
|
+
color="neutral"
|
|
84
|
+
variant="soft"
|
|
85
|
+
size="sm"
|
|
86
|
+
:loading="fetching"
|
|
87
|
+
icon="i-lucide-search"
|
|
88
|
+
@click="async () => {
|
|
89
|
+
await triggerFetching(true);
|
|
90
|
+
}"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<!-- buttons -->
|
|
95
|
+
<div class="flex gap-2.5 items-center ml-auto shrink-0">
|
|
96
|
+
<USeparator orientation="vertical" class="h-6" />
|
|
97
|
+
<UButton
|
|
98
|
+
color="neutral"
|
|
99
|
+
variant="outline"
|
|
100
|
+
size="sm"
|
|
101
|
+
:disabled="fetching"
|
|
102
|
+
@click="() => onUpdateWhereQuery(defaultWhereQuery)"
|
|
103
|
+
>
|
|
104
|
+
重置
|
|
105
|
+
</UButton>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WhereQueryProps } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<WhereQueryProps<T>> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
7
|
+
focusField: (field: string) => boolean;
|
|
8
|
+
}>) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import("vue").VNode & {
|
|
13
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WhereSimpleQueryProps } from '#v/types';
|
|
2
|
+
type __VLS_Props = WhereSimpleQueryProps<any>;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
4
|
+
focusItem: (field: string) => boolean;
|
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import TableQueryWhereSimpleItem from "#v/components/table/query/where/simple/item/index.vue";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
items: { type: Array, required: false },
|
|
6
|
+
onUpdateItems: { type: Function, required: true },
|
|
7
|
+
whereOptions: { type: Array, required: true },
|
|
8
|
+
fetching: { type: Boolean, required: false },
|
|
9
|
+
triggerFetching: { type: Function, required: true },
|
|
10
|
+
bizColumns: { type: Array, required: false }
|
|
11
|
+
});
|
|
12
|
+
const onRemoveFilter = (field) => {
|
|
13
|
+
props.onUpdateItems(props.items?.filter((query) => query.field !== field) ?? []);
|
|
14
|
+
};
|
|
15
|
+
const itemRefMap = ref(/* @__PURE__ */ new Map());
|
|
16
|
+
defineExpose({
|
|
17
|
+
focusItem: (field) => {
|
|
18
|
+
const item = itemRefMap.value.get(field);
|
|
19
|
+
if (item) {
|
|
20
|
+
item.focus();
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div class="flex flex-wrap gap-2.5">
|
|
30
|
+
<!-- key如果是field,那么field修改后,不能聚焦后面的组件,所以这里的key用idx代替 -->
|
|
31
|
+
<TableQueryWhereSimpleItem
|
|
32
|
+
v-for="(item, idx) in items"
|
|
33
|
+
:ref="(el) => itemRefMap.set(item.field, el)"
|
|
34
|
+
:key="idx"
|
|
35
|
+
:where-query-item="item"
|
|
36
|
+
:options="whereOptions"
|
|
37
|
+
:fetching="fetching"
|
|
38
|
+
:trigger-fetching="() => triggerFetching(true)"
|
|
39
|
+
@remove="onRemoveFilter"
|
|
40
|
+
@update:where-query-item="(newWhereQueryItem) => {
|
|
41
|
+
const updatedItems = [...props.items ?? []];
|
|
42
|
+
updatedItems[idx] = newWhereQueryItem;
|
|
43
|
+
props.onUpdateItems(updatedItems);
|
|
44
|
+
}"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WhereSimpleQueryProps } from '#v/types';
|
|
2
|
+
type __VLS_Props = WhereSimpleQueryProps<any>;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
4
|
+
focusItem: (field: string) => boolean;
|
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WhereQueryItem, WhereQueryOption } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
options: WhereQueryOption<T>[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
focus?: () => void;
|
|
7
|
+
} & {
|
|
8
|
+
whereQueryItem: WhereQueryItem<T>;
|
|
9
|
+
}) & {
|
|
10
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<T>) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: (event: "update:whereQueryItem", value: WhereQueryItem<T>) => void;
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, nextTick } from "vue";
|
|
3
|
+
import { useTableOpr } from "#v/composables/table/useTableOpr";
|
|
4
|
+
import ButtonDropdown from "#v/components/button/Dropdown.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
options: { type: Array, required: true },
|
|
7
|
+
disabled: { type: Boolean, required: false },
|
|
8
|
+
focus: { type: Function, required: false }
|
|
9
|
+
});
|
|
10
|
+
const whereQueryItem = defineModel("whereQueryItem", { type: Object, ...{ required: true } });
|
|
11
|
+
const items = computed(() => {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
id: "query-fields",
|
|
15
|
+
label: "\u67E5\u8BE2\u5B57\u6BB5",
|
|
16
|
+
items: props.options.map((option) => ({
|
|
17
|
+
label: option.label,
|
|
18
|
+
value: option.field,
|
|
19
|
+
onSelect: () => {
|
|
20
|
+
modelValue.value = option.field;
|
|
21
|
+
nextTick(() => {
|
|
22
|
+
props.focus?.();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}))
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
});
|
|
29
|
+
const modelValue = computed({
|
|
30
|
+
get() {
|
|
31
|
+
return whereQueryItem.value.field;
|
|
32
|
+
},
|
|
33
|
+
set(newField) {
|
|
34
|
+
const newFieldOption = props.options.find((opt) => opt.field === newField);
|
|
35
|
+
if (!newFieldOption || !newFieldOption.type) {
|
|
36
|
+
console.error("Cannot find field option for field:", newField);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
whereQueryItem.value = {
|
|
40
|
+
field: newField,
|
|
41
|
+
opr: useTableOpr().getDefaultOprByType(newFieldOption.type),
|
|
42
|
+
value: null
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const currentLabel = computed(() => {
|
|
47
|
+
const option = props.options.find((opt) => opt.field === modelValue.value);
|
|
48
|
+
return option?.label || "";
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<ButtonDropdown
|
|
54
|
+
v-model="modelValue"
|
|
55
|
+
:groups="items"
|
|
56
|
+
>
|
|
57
|
+
<UButton
|
|
58
|
+
:size="'sm'"
|
|
59
|
+
:color="'neutral'"
|
|
60
|
+
:variant="'outline'"
|
|
61
|
+
:label="currentLabel"
|
|
62
|
+
:disabled="disabled"
|
|
63
|
+
/>
|
|
64
|
+
</ButtonDropdown>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WhereQueryItem, WhereQueryOption } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
options: WhereQueryOption<T>[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
focus?: () => void;
|
|
7
|
+
} & {
|
|
8
|
+
whereQueryItem: WhereQueryItem<T>;
|
|
9
|
+
}) & {
|
|
10
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<T>) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: (event: "update:whereQueryItem", value: WhereQueryItem<T>) => void;
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WhereQueryItem, WhereQueryOption } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
options: WhereQueryOption<T>[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
focus?: () => void;
|
|
7
|
+
} & {
|
|
8
|
+
whereQueryItem: WhereQueryItem<T>;
|
|
9
|
+
}) & {
|
|
10
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<T>) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: (event: "update:whereQueryItem", value: WhereQueryItem<T>) => void;
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, nextTick } from "vue";
|
|
3
|
+
import { useTableOpr } from "#v/composables/table/useTableOpr";
|
|
4
|
+
import ButtonDropdown from "#v/components/button/Dropdown.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
options: { type: Array, required: true },
|
|
7
|
+
disabled: { type: Boolean, required: false },
|
|
8
|
+
focus: { type: Function, required: false }
|
|
9
|
+
});
|
|
10
|
+
const whereQueryItem = defineModel("whereQueryItem", { type: Object, ...{ required: true } });
|
|
11
|
+
const option = computed(
|
|
12
|
+
() => props.options.find((opt) => opt.field === whereQueryItem.value.field)
|
|
13
|
+
);
|
|
14
|
+
const items = computed(() => {
|
|
15
|
+
if (!option.value || !option.value.type) {
|
|
16
|
+
console.error("Cannot find field option or missing type for field:", whereQueryItem.value.field);
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
id: "operators",
|
|
22
|
+
label: "\u64CD\u4F5C\u7B26",
|
|
23
|
+
items: useTableOpr().getOprNameOptionsByType(option.value.type).map((option2) => ({
|
|
24
|
+
label: option2.label,
|
|
25
|
+
value: option2.value,
|
|
26
|
+
onSelect: () => {
|
|
27
|
+
modelValue.value = option2.value;
|
|
28
|
+
nextTick(() => {
|
|
29
|
+
props.focus?.();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}))
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
});
|
|
36
|
+
const modelValue = computed({
|
|
37
|
+
get() {
|
|
38
|
+
return whereQueryItem.value.opr;
|
|
39
|
+
},
|
|
40
|
+
set(newOpr) {
|
|
41
|
+
whereQueryItem.value = {
|
|
42
|
+
...whereQueryItem.value,
|
|
43
|
+
opr: newOpr,
|
|
44
|
+
value: null
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const currentLabel = computed(() => {
|
|
49
|
+
if (!option.value?.type) return "";
|
|
50
|
+
return useTableOpr().getOprNameByTypeAndOpr(option.value.type, modelValue.value);
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<!-- NOTE: 自己实现DropdownMenu, 原生DropdownMenu的Focus有问题,会让查询字段打开的Popover关闭 -->
|
|
56
|
+
<ButtonDropdown
|
|
57
|
+
v-model="modelValue"
|
|
58
|
+
:groups="items"
|
|
59
|
+
>
|
|
60
|
+
<UButton
|
|
61
|
+
:size="'sm'"
|
|
62
|
+
:color="'neutral'"
|
|
63
|
+
:variant="'outline'"
|
|
64
|
+
:label="currentLabel"
|
|
65
|
+
:disabled="disabled"
|
|
66
|
+
/>
|
|
67
|
+
</ButtonDropdown>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WhereQueryItem, WhereQueryOption } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
options: WhereQueryOption<T>[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
focus?: () => void;
|
|
7
|
+
} & {
|
|
8
|
+
whereQueryItem: WhereQueryItem<T>;
|
|
9
|
+
}) & {
|
|
10
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<T>) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: (event: "update:whereQueryItem", value: WhereQueryItem<T>) => void;
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WhereQueryOption, WhereQueryItem } from '#v/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: WhereQueryOption<any>[];
|
|
4
|
+
fetching?: boolean;
|
|
5
|
+
triggerFetching?: () => Promise<void>;
|
|
6
|
+
onRemove: (field: string) => void;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
'whereQueryItem': WhereQueryItem<any>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
13
|
+
focus: () => void | undefined;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:whereQueryItem": (value: WhereQueryItem<any>) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<any>) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, watch, useTemplateRef } from "vue";
|
|
3
|
+
import TableQueryWhereSimpleItemColumnPicker from "#v/components/table/query/where/simple/item/ColumnPicker.vue";
|
|
4
|
+
import TableQueryWhereSimpleItemOprPicker from "#v/components/table/query/where/simple/item/OprPicker.vue";
|
|
5
|
+
import TableQueryWhereSimpleItemOpr from "#v/components/table/query/where/simple/item/opr/index.vue";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
options: { type: Array, required: true },
|
|
8
|
+
fetching: { type: Boolean, required: false },
|
|
9
|
+
triggerFetching: { type: Function, required: false },
|
|
10
|
+
onRemove: { type: Function, required: true }
|
|
11
|
+
});
|
|
12
|
+
const whereQueryItem = defineModel("whereQueryItem", { type: Object, ...{ required: true } });
|
|
13
|
+
const option = computed(() => props.options.find((option2) => option2.field === whereQueryItem.value.field));
|
|
14
|
+
watch(
|
|
15
|
+
() => whereQueryItem.value.custom,
|
|
16
|
+
() => {
|
|
17
|
+
whereQueryItem.value = { ...whereQueryItem.value, custom: option.value?.custom };
|
|
18
|
+
},
|
|
19
|
+
{ immediate: true }
|
|
20
|
+
);
|
|
21
|
+
const oprRef = useTemplateRef("opr");
|
|
22
|
+
defineExpose({
|
|
23
|
+
focus: () => oprRef.value?.focus()
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<UFieldGroup size="sm">
|
|
29
|
+
<TableQueryWhereSimpleItemColumnPicker
|
|
30
|
+
v-model:where-query-item="whereQueryItem"
|
|
31
|
+
:options="options"
|
|
32
|
+
:fetching="fetching"
|
|
33
|
+
:focus="() => oprRef?.focus()"
|
|
34
|
+
/>
|
|
35
|
+
<TableQueryWhereSimpleItemOprPicker
|
|
36
|
+
v-model:where-query-item="whereQueryItem"
|
|
37
|
+
:options="options"
|
|
38
|
+
:fetching="fetching"
|
|
39
|
+
:focus="() => oprRef?.focus()"
|
|
40
|
+
:disabled="option?.disableOprSelector"
|
|
41
|
+
/>
|
|
42
|
+
<TableQueryWhereSimpleItemOpr
|
|
43
|
+
ref="opr"
|
|
44
|
+
v-model:where-query-item="whereQueryItem"
|
|
45
|
+
:options="options"
|
|
46
|
+
:fetching="fetching"
|
|
47
|
+
:trigger-fetching="triggerFetching"
|
|
48
|
+
/>
|
|
49
|
+
<UButton
|
|
50
|
+
color="neutral"
|
|
51
|
+
variant="outline"
|
|
52
|
+
icon="i-lucide-x"
|
|
53
|
+
@click="onRemove(whereQueryItem.field)"
|
|
54
|
+
/>
|
|
55
|
+
</UFieldGroup>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WhereQueryOption, WhereQueryItem } from '#v/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: WhereQueryOption<any>[];
|
|
4
|
+
fetching?: boolean;
|
|
5
|
+
triggerFetching?: () => Promise<void>;
|
|
6
|
+
onRemove: (field: string) => void;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
'whereQueryItem': WhereQueryItem<any>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
13
|
+
focus: () => void | undefined;
|
|
14
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:whereQueryItem": (value: WhereQueryItem<any>) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<any>) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { VFormFieldAsyncSelectProps, WhereQueryItem } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
triggerFetching?: () => Promise<void>;
|
|
7
|
+
} & VFormFieldAsyncSelectProps<T> & {
|
|
8
|
+
whereQueryItem: WhereQueryItem<T>;
|
|
9
|
+
}) & {
|
|
10
|
+
"onUpdate:whereQueryItem"?: ((value: WhereQueryItem<T>) => any) | undefined;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
15
|
+
focus: () => void;
|
|
16
|
+
}>) => void;
|
|
17
|
+
attrs: any;
|
|
18
|
+
slots: {};
|
|
19
|
+
emit: (event: "update:whereQueryItem", value: WhereQueryItem<T>) => void;
|
|
20
|
+
}>) => import("vue").VNode & {
|
|
21
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
26
|
+
[K in keyof T]: T[K];
|
|
27
|
+
} : {
|
|
28
|
+
[K in keyof T as K]: T[K];
|
|
29
|
+
}) & {};
|