From 7c00e03a5b1a0c57a2054d238836676b02edc5be Mon Sep 17 00:00:00 2001
From: cKey <35512826+colinin@users.noreply.github.com>
Date: Fri, 19 Aug 2022 18:30:49 +0800
Subject: [PATCH] upgrade: upgrade vben to 2.8.0
---
apps/vue/.eslintignore | 2 +-
apps/vue/.eslintrc.js | 14 +-
.../.github/workflows/issue-close-require.yml | 17 +
apps/vue/.github/workflows/issue-labeled.yml | 29 +
apps/vue/.github/workflows/release.yml | 24 +
apps/vue/.gitignore | 2 +
apps/vue/.gitpod.yml | 4 +-
apps/vue/.husky/pre-commit | 8 +-
apps/vue/README.md | 109 ++-
apps/vue/README.zh-CN.md | 175 +++++
apps/vue/build/generate/icon/index.ts | 4 +-
apps/vue/build/script/buildConf.ts | 11 +-
apps/vue/build/script/postBuild.ts | 6 +-
apps/vue/build/vite/plugin/compress.ts | 6 +-
apps/vue/build/vite/plugin/html.ts | 6 +-
apps/vue/build/vite/plugin/index.ts | 16 +-
apps/vue/build/vite/plugin/styleImport.ts | 15 +-
apps/vue/build/vite/plugin/svgSprite.ts | 4 +-
apps/vue/build/vite/plugin/theme.ts | 6 +-
apps/vue/commitlint.config.js | 74 ++
apps/vue/index.html | 21 +-
apps/vue/mock/demo/api-cascader.ts | 325 ++++++++
apps/vue/mock/demo/select-demo.ts | 28 +
apps/vue/mock/demo/system.ts | 202 +++++
apps/vue/mock/demo/table-demo.ts | 52 ++
apps/vue/mock/demo/tree-demo.ts | 38 +
apps/vue/mock/sys/user.ts | 8 +
apps/vue/package.json | 197 +++--
apps/vue/src/App.vue | 1 +
apps/vue/src/api/account/accounts.ts | 19 +
.../src/api/account/model/profilesModel.ts | 7 +
apps/vue/src/api/account/profiles.ts | 11 +-
apps/vue/src/api/api-gateway/aggregate.ts | 89 ---
apps/vue/src/api/api-gateway/basic.ts | 26 -
apps/vue/src/api/api-gateway/global.ts | 66 --
apps/vue/src/api/api-gateway/group.ts | 73 --
.../api/api-gateway/model/aggregateModel.ts | 46 --
.../src/api/api-gateway/model/basicModel.ts | 80 --
.../src/api/api-gateway/model/globalModel.ts | 39 -
.../src/api/api-gateway/model/groupModel.ts | 38 -
.../src/api/api-gateway/model/routeModel.ts | 70 --
apps/vue/src/api/api-gateway/route.ts | 70 --
.../src/api/caching-management/cache/index.ts | 56 ++
.../caching-management/cache/model/index.ts | 23 +
apps/vue/src/api/demo/error.ts | 12 -
apps/vue/src/api/identity/model/claimModel.ts | 16 +
apps/vue/src/api/identity/model/roleModel.ts | 19 +-
apps/vue/src/api/identity/model/userModel.ts | 18 +-
.../src/api/identity/organization-units.ts | 10 +-
apps/vue/src/api/identity/role.ts | 13 +-
apps/vue/src/api/identity/user.ts | 11 +-
apps/vue/src/api/localization/languages.ts | 52 +-
.../api/localization/model/resourcesModel.ts | 5 +-
.../src/api/localization/model/textsModel.ts | 17 +-
apps/vue/src/api/localization/resources.ts | 52 +-
apps/vue/src/api/localization/texts.ts | 43 +-
apps/vue/src/api/messages/notifications.ts | 21 +
.../api/multi-tenancy/models/tenantModel.ts | 1 +
.../src/api/openiddict/applications/index.ts | 71 ++
.../openiddict/applications/model/index.ts | 47 ++
.../api/openiddict/authorizations/index.ts | 51 ++
.../openiddict/authorizations/model/index.ts | 21 +
apps/vue/src/api/openiddict/scopes/index.ts | 61 ++
.../src/api/openiddict/scopes/model/index.ts | 29 +
apps/vue/src/api/openiddict/tokens/index.ts | 68 ++
.../src/api/openiddict/tokens/model/index.ts | 29 +
apps/vue/src/api/sys/model/menuModel.ts | 3 +-
apps/vue/src/api/sys/model/userModel.ts | 2 +
apps/vue/src/api/sys/user.ts | 2 +
.../task-management/backgroundJobAction.ts | 51 ++
.../api/task-management/backgroundJobInfo.ts | 10 +-
.../model/backgroundJobActionModel.ts | 43 +
.../model/backgroundJobInfoModel.ts | 14 +
.../api/text-templating/templates/index.ts | 64 ++
.../text-templating/templates/model/index.ts | 36 +
.../Application/src/AppLocalePicker.vue | 4 +-
.../Application/src/search/AppSearchModal.vue | 5 +-
.../src/components/CardList/src/CardList.vue | 166 ++--
apps/vue/src/components/CardList/src/data.ts | 2 +-
apps/vue/src/components/CodeEditor/index.ts | 2 +
.../CodeEditor/src/codemirror/codemirror.css | 10 +-
.../src/codemirrorX/CodeMirrorX.vue | 137 ++++
.../src/json-preview/JsonPreview.vue | 1 -
.../src/collapse/CollapseContainer.vue | 11 +-
.../ContextMenu/src/ContextMenu.vue | 22 +-
.../src/components/ContextMenu/src/typing.ts | 1 +
.../CountDown/src/CountdownInput.vue | 7 +-
.../components/Cropper/src/CropperAvatar.vue | 2 +-
.../Description/src/Description.vue | 5 +-
.../src/components/Drawer/src/BasicDrawer.vue | 2 +-
.../Drawer/src/components/DrawerFooter.vue | 2 +-
apps/vue/src/components/Drawer/src/typing.ts | 3 +-
.../src/components/Excel/src/Export2Excel.ts | 2 +-
.../components/Excel/src/ExportExcelModal.vue | 3 +
.../src/components/Excel/src/ImportExcel.vue | 2 +-
apps/vue/src/components/Form/index.ts | 1 +
.../vue/src/components/Form/src/BasicForm.vue | 18 +-
apps/vue/src/components/Form/src/TabForm.vue | 43 +-
.../src/components/Form/src/componentMap.ts | 4 +
.../Form/src/components/ApiCascader.vue | 5 +-
.../Form/src/components/ApiSelect.vue | 17 +-
.../Form/src/components/ApiTransfer.vue | 129 +++
.../Form/src/components/ApiTree.vue | 90 +++
.../Form/src/components/FormItem.vue | 33 +-
apps/vue/src/components/Form/src/helper.ts | 6 +-
.../Form/src/hooks/useFormEvents.ts | 131 ++--
.../Form/src/hooks/useFormValues.ts | 55 +-
.../Form/src/hooks/useLabelWidth.ts | 9 +-
apps/vue/src/components/Form/src/props.ts | 3 +-
.../vue/src/components/Form/src/types/form.ts | 14 +-
.../src/components/Form/src/types/index.ts | 4 +-
.../src/components/Icon/src/IconPicker.vue | 13 +-
.../src/components/Markdown/src/Markdown.vue | 17 +-
.../Markdown/src/MarkdownViewer.vue | 58 +-
.../src/components/Markdown/src/getTheme.ts | 19 +
.../vue/src/components/Menu/src/BasicMenu.vue | 2 +-
.../components/Modal/src/components/Modal.tsx | 8 +-
apps/vue/src/components/Modal/src/index.less | 1 -
.../MultiTenancyBox/src/MultiTenancyBox.vue | 85 +-
.../MultiTenancyBox/src/MultiTenancyModal.vue | 97 +++
.../src/components/Page/src/PageWrapper.vue | 7 +-
.../Permission/src/PermissionModal.vue | 13 +-
.../SettingManagement/src/SettingForm.vue | 219 +++---
.../SimpleMenu/src/SimpleSubMenu.vue | 5 +-
.../SimpleMenu/src/components/SubMenuItem.vue | 2 +-
.../SimpleMenu/src/components/menu.less | 12 +-
.../StrengthMeter/src/StrengthMeter.vue | 1 -
.../src/components/Table/src/BasicTable.vue | 47 +-
.../src/components/Table/src/componentMap.ts | 14 +-
.../Table/src/components/HeaderCell.vue | 2 +-
.../Table/src/components/TableAction.vue | 29 +-
.../src/components/editable/EditableCell.vue | 159 ++--
.../Table/src/components/editable/helper.ts | 2 +-
.../src/components/settings/ColumnSetting.vue | 89 ++-
.../src/components/settings/SizeSetting.vue | 2 +-
.../src/components/settings/TableExport.vue | 80 ++
.../Table/src/components/settings/index.vue | 4 +
.../components/Table/src/hooks/useColumns.ts | 36 +-
.../Table/src/hooks/useDataSource.ts | 32 +-
.../Table/src/hooks/useRowSelection.ts | 3 -
.../components/Table/src/hooks/useScrollTo.ts | 55 ++
.../components/Table/src/hooks/useTable.ts | 6 +
.../Table/src/hooks/useTableExpand.ts | 9 +-
.../Table/src/hooks/useTableFooter.ts | 7 +-
.../Table/src/hooks/useTableScroll.ts | 59 +-
apps/vue/src/components/Table/src/props.ts | 27 +-
.../Table/src/types/componentType.ts | 1 +
.../components/Table/src/types/pagination.ts | 18 +-
.../src/components/Table/src/types/table.ts | 33 +-
.../components/Table/src/types/tableAction.ts | 13 +
apps/vue/src/components/Tree/index.ts | 3 +-
apps/vue/src/components/Tree/src/Tree.vue | 232 ++----
.../src/components/Tree/src/TreeHeader.vue | 253 +++---
apps/vue/src/components/Tree/src/TreeIcon.ts | 8 +-
apps/vue/src/components/Tree/src/tree.ts | 194 +++++
apps/vue/src/components/Tree/src/useTree.ts | 52 +-
apps/vue/src/components/Tree/style/index.less | 52 ++
apps/vue/src/components/Tree/style/index.ts | 1 +
.../src/components/Upload/src/BasicUpload.vue | 23 +-
.../src/components/Upload/src/UploadModal.vue | 18 +-
.../Upload/src/UploadPreviewModal.vue | 2 +-
apps/vue/src/components/registerGlobComp.ts | 3 +-
apps/vue/src/design/ant/btn.less | 32 -
apps/vue/src/design/ant/index.less | 6 -
apps/vue/src/design/ant/input.less | 16 +
apps/vue/src/design/color.less | 4 +
apps/vue/src/design/index.less | 5 +-
apps/vue/src/design/public.less | 2 +-
apps/vue/src/design/transition/fade.less | 30 +-
apps/vue/src/design/transition/fade.wxss | 65 ++
apps/vue/src/design/transition/scale.less | 4 +-
apps/vue/src/design/transition/scroll.less | 8 +-
apps/vue/src/design/transition/slide.less | 8 +-
apps/vue/src/design/transition/zoom.less | 6 +-
apps/vue/src/design/transition/zoom.wxss | 21 +
apps/vue/src/directives/loading.ts | 4 +-
apps/vue/src/enums/httpEnum.ts | 2 +-
apps/vue/src/hooks/abp/typing.ts | 17 +-
apps/vue/src/hooks/abp/useLocalization.ts | 22 +-
apps/vue/src/hooks/abp/useValidation.ts | 99 +--
apps/vue/src/hooks/component/useFormItem.ts | 5 +-
apps/vue/src/hooks/component/useStyles.ts | 55 ++
apps/vue/src/hooks/core/useContext.ts | 1 -
apps/vue/src/hooks/event/useWindowSizeFn.ts | 3 +-
.../hooks/security/usePasswordValidator.ts | 55 ++
apps/vue/src/hooks/setting/useMenuSetting.ts | 10 +-
apps/vue/src/hooks/web/useECharts.ts | 8 +-
apps/vue/src/hooks/web/usePage.ts | 19 +-
apps/vue/src/hooks/web/useTabs.ts | 2 +-
.../vue/src/layouts/default/feature/index.vue | 4 +-
.../default/header/components/Breadcrumb.vue | 4 +-
.../header/components/lock/LockModal.vue | 3 +
.../components/notify/useNotifications.ts | 4 +-
.../components/user-dropdown/DropMenuItem.vue | 1 +
.../header/components/user-dropdown/index.vue | 20 +-
apps/vue/src/layouts/default/header/index.vue | 2 +-
.../layouts/default/setting/SettingDrawer.tsx | 2 +-
.../setting/components/SettingFooter.vue | 14 +-
.../src/layouts/default/sider/MixSider.vue | 2 +-
.../layouts/default/sider/useLayoutSider.ts | 15 +-
.../default/tabs/components/TabContent.vue | 8 +-
apps/vue/src/layouts/default/tabs/index.less | 68 +-
apps/vue/src/layouts/default/tabs/index.vue | 4 +-
.../layouts/default/tabs/useMultipleTabs.ts | 4 +-
apps/vue/src/layouts/page/index.vue | 4 +-
apps/vue/src/locales/lang/en.ts | 5 +-
apps/vue/src/locales/lang/en/common.ts | 2 +
apps/vue/src/locales/lang/en/component.ts | 4 +-
apps/vue/src/locales/lang/en/routes/demo.ts | 3 +
apps/vue/src/locales/lang/en/sys.ts | 3 +-
.../lang/zh-CN/antdLocale/DatePicker.ts | 19 +
apps/vue/src/locales/lang/zh-CN/common.ts | 2 +
apps/vue/src/locales/lang/zh-CN/component.ts | 4 +-
.../vue/src/locales/lang/zh-CN/routes/demo.ts | 3 +
apps/vue/src/locales/lang/zh-CN/sys.ts | 1 +
apps/vue/src/locales/lang/zh_CN.ts | 3 -
apps/vue/src/locales/useLocale.ts | 14 +-
apps/vue/src/main.ts | 12 +-
apps/vue/src/router/index.ts | 4 +-
apps/vue/src/router/routes/modules/about.ts | 4 +-
apps/vue/src/router/types.ts | 2 +
apps/vue/src/settings/projectSetting.ts | 4 +-
apps/vue/src/store/modules/permission.ts | 2 +-
apps/vue/src/store/modules/user.ts | 12 +-
apps/vue/src/utils/bem.ts | 52 ++
apps/vue/src/utils/cache/memory.ts | 7 +-
apps/vue/src/utils/cache/persistent.ts | 2 -
apps/vue/src/utils/cache/storageCache.ts | 15 +-
apps/vue/src/utils/cookie.ts | 17 -
apps/vue/src/utils/dateUtil.ts | 17 +-
.../utils/factory/createAsyncComponent.tsx | 2 +-
apps/vue/src/utils/file/base64Conver.ts | 2 +-
apps/vue/src/utils/helper/treeHelper.ts | 17 +-
apps/vue/src/utils/helper/tsxHelper.tsx | 2 +-
apps/vue/src/utils/http/abp/abp.ts | 60 +-
apps/vue/src/utils/http/axios/Axios.ts | 14 +-
apps/vue/src/utils/http/axios/axiosRetry.ts | 28 +
.../src/utils/http/axios/axiosTransform.ts | 2 +-
apps/vue/src/utils/http/axios/checkStatus.ts | 22 +-
apps/vue/src/utils/http/axios/helper.ts | 3 +-
apps/vue/src/utils/http/axios/index.ts | 41 +-
apps/vue/src/utils/index.ts | 1 +
apps/vue/src/utils/is.ts | 36 +-
apps/vue/src/utils/lib/echarts.ts | 2 +
apps/vue/src/utils/props.ts | 185 +++++
apps/vue/src/utils/strings.ts | 20 +-
apps/vue/src/utils/types.ts | 42 +
apps/vue/src/views/account/center/Cloud.vue | 2 +-
.../vue/src/views/account/center/FileList.vue | 86 +-
apps/vue/src/views/account/center/Setting.vue | 2 +-
.../src/views/account/center/ShareList.vue | 39 +-
apps/vue/src/views/account/center/index.vue | 17 +-
.../src/views/account/setting/AccountBind.vue | 12 +-
.../src/views/account/setting/BaseSetting.vue | 45 +-
.../src/views/account/setting/MsgNotify.vue | 83 +-
.../views/account/setting/SecureSetting.vue | 188 +----
.../account/setting/SettingFormModal.vue | 227 ++++++
apps/vue/src/views/account/setting/index.vue | 23 +-
.../src/views/account/setting/useProfile.ts | 66 +-
.../components/AggregateRouteConfigModal.vue | 150 ----
.../components/AggregateRouteTable.vue | 174 -----
.../aggregate/components/ModalData.ts | 174 -----
.../aggregate/components/TableData.ts | 91 ---
.../src/views/api-gateway/aggregate/index.vue | 16 -
.../global/components/GlobalModal.vue | 276 -------
.../global/components/GlobalTable.vue | 122 ---
.../global/components/TableData.ts | 50 --
.../global/hooks/useGlobalModal.ts | 148 ----
.../src/views/api-gateway/global/index.vue | 16 -
.../group/components/GroupModal.vue | 47 --
.../group/components/GroupTable.vue | 136 ----
.../api-gateway/group/components/ModalData.ts | 71 --
.../api-gateway/group/components/TableData.ts | 52 --
.../vue/src/views/api-gateway/group/index.vue | 16 -
.../api-gateway/route/components/ModalData.ts | 33 -
.../route/components/RouteModal.vue | 393 ----------
.../route/components/RouteTable.vue | 141 ----
.../api-gateway/route/components/TableData.ts | 72 --
.../api-gateway/route/hooks/useRouteModal.ts | 279 -------
.../vue/src/views/api-gateway/route/index.vue | 16 -
.../auditing/components/AuditLogModal.vue | 5 +-
.../auditing/components/AuditLogTable.vue | 57 +-
.../views/auditing/components/ModalData.ts | 6 +-
.../views/auditing/components/TableData.ts | 5 +-
.../cache/components/CacheModal.vue | 43 +
.../cache/components/CacheTable.vue | 110 +++
.../cache/datas/ModalData.ts | 78 ++
.../cache/datas/TableData.ts | 18 +
.../views/caching-management/cache/index.vue | 13 +
.../analysis/components/GrowCard.vue | 7 +-
.../analysis/components/SiteAnalysis.vue | 2 +-
.../analysis/components/VisitAnalysis.vue | 25 +-
.../analysis/components/VisitAnalysisBar.vue | 19 +-
.../analysis/components/VisitRadar.vue | 20 +-
.../workbench/components/ProjectCard.vue | 24 +-
.../workbench/components/QuickNav.vue | 14 +-
.../workbench/components/SaleRadar.vue | 18 +-
.../vue/src/views/feature/hooks/useFeature.ts | 5 +-
.../src/views/feature/src/FeatureModal.vue | 4 +-
.../components/ApiResourceSecret.vue | 27 +-
.../components/ApiResourceTable.vue | 51 +-
.../api-resources/datas/TableData.ts | 2 -
.../api-scopes/components/ApiScopeTable.vue | 63 +-
.../api-scopes/datas/TableData.ts | 4 -
.../clients/components/ClientModal.vue | 10 +-
.../clients/components/ClientTable.vue | 71 +-
.../clients/components/DynamicForm.vue | 25 +-
.../clients/components/Resources.vue | 21 +-
.../clients/datas/TableData.ts | 3 +-
.../identity-server/clients/hooks/useModal.ts | 1 +
.../identity-server/components/Properties.vue | 29 +-
.../identity-server/components/UserClaim.vue | 20 +-
.../components/IdentityResourceTable.vue | 65 +-
.../identity-resources/datas/TableData.ts | 12 +-
.../persisted-grants/components/ModalData.ts | 7 +-
.../components/PersistedGrantTable.vue | 41 +-
.../claim-types/components/ClaimTable.vue | 69 +-
.../identity/claim-types/datas/TableData.ts | 15 +-
.../claim-types/hooks/useClaimTable.ts | 1 -
.../identity/components/ClaimEditModal.vue | 108 +++
.../views/identity/components/ClaimModal.vue | 161 ++++
.../views/identity/components/MenuModal.vue | 17 +-
.../components/MemberTable.vue | 28 +-
.../components/OrganizationUnitModal.vue | 81 ++
.../components/OrganizationUnitTree.vue | 36 +-
.../components/RoleTable.vue | 28 +-
.../hooks/useMemberTable.ts | 1 -
.../organization-units/hooks/useOuTree.ts | 101 ++-
.../organization-units/hooks/useRoleTable.ts | 1 -
.../identity/role/components/ClaimModal.vue | 38 +-
.../identity/role/components/RoleTable.vue | 111 ++-
.../views/identity/role/datas/TableData.ts | 8 +-
.../src/views/identity/role/hooks/useClaim.ts | 1 -
.../views/identity/role/hooks/useRoleTable.ts | 1 -
.../components/SecurityLogTable.vue | 30 +-
.../security-logs/components/TableData.ts | 52 +-
.../identity/user/components/ClaimModal.vue | 89 ---
.../user/components/PasswordModal.vue | 36 +-
.../identity/user/components/UserModal.vue | 6 +-
.../identity/user/components/UserTable.vue | 176 +++--
.../views/identity/user/datas/TableData.ts | 21 +-
.../src/views/identity/user/hooks/useClaim.ts | 149 ----
.../views/identity/user/hooks/usePassword.ts | 32 +-
.../views/identity/user/hooks/useUserTable.ts | 1 -
.../languages/components/LanguageModal.vue | 95 ---
.../languages/components/LanguageTable.vue | 113 +--
.../languages/components/ModalData.ts | 2 +-
.../languages/components/TableData.ts | 38 +-
.../resources/components/ModalData.ts | 2 +-
.../resources/components/ResourceModal.vue | 95 ---
.../resources/components/ResourceTable.vue | 115 +--
.../resources/components/TableData.ts | 31 +-
.../texts/components/ModalData.ts | 9 +-
.../texts/components/TableData.ts | 26 +-
.../texts/components/TextModal.vue | 70 +-
.../texts/components/TextTable.vue | 90 +--
.../components/NotificationTable.vue | 242 ++++++
.../messages/notifications/datas/ModalData.ts | 32 +
.../messages/notifications/datas/TableData.ts | 54 ++
.../views/messages/notifications/index.vue | 13 +
.../components/ApplicationModal.vue | 29 +
.../components/ApplicationTable.vue | 89 +++
.../applications/datas}/ModalData.ts | 4 +-
.../applications/datas/TableData.ts | 40 +
.../views/openiddict/applications/index.vue | 13 +
.../components/AuthorizationModal.vue | 44 ++
.../components/AuthorizationTable.vue | 89 +++
.../authorizations/datas/ModalData.ts | 155 ++++
.../authorizations/datas/TableData.ts | 52 ++
.../views/openiddict/authorizations/index.vue | 13 +
.../components/Properties/PropertyModal.vue | 0
.../components/Properties/Proterties.vue | 0
.../openiddict/components/Properties/index.ts | 0
.../scopes/components/ScopeModal.vue | 0
.../scopes/components/ScopeTable.vue | 0
.../vue/src/views/openiddict/scopes/index.vue | 13 +
.../tokens/components/TokenModal.vue | 44 ++
.../tokens/components/TokenTable.vue | 89 +++
.../openiddict/tokens/datas/ModalData.ts | 178 +++++
.../openiddict/tokens/datas/TableData.ts | 83 ++
.../vue/src/views/openiddict/tokens/index.vue | 13 +
.../containers/components/ContainerTable.vue | 31 +-
.../containers/components/ModalData.ts | 2 +-
.../objects/components/FileList.vue | 218 ++++++
.../objects/components/FolderTree.vue | 154 ++++
.../objects/components/OssFolderModal.vue | 2 +-
.../objects/components/OssManagePage.vue | 91 +++
.../objects/components/OssPreviewModal.vue | 6 +-
.../objects/components/OssTable.vue | 283 -------
.../objects/components/OssUploadModal.vue | 75 +-
.../oss-management/objects/datas/ModalData.ts | 2 +-
.../oss-management/objects/datas/TableData.ts | 3 -
.../oss-management/objects/datas/typing.ts | 7 +
.../objects/hooks/useObjects.ts | 95 ---
.../views/oss-management/objects/index.vue | 6 +-
.../dataDic/components/DataItemModal.vue | 115 ++-
.../dataDic/components/DataItemTable.vue | 146 ++--
.../platform/dataDic/components/DataModal.vue | 87 ++-
.../platform/dataDic/components/DataTree.vue | 84 +-
.../platform/dataDic/components/ModalData.ts | 33 +-
.../platform/dataDic/components/TableData.ts | 1 -
.../layout/components/LayoutTable.vue | 41 +-
.../platform/menu/components/MenuDrawer.vue | 8 +-
.../platform/menu/components/MenuTable.vue | 41 +-
.../platform/menu/hooks/useMenuFormContext.ts | 56 +-
.../saas/editions/components/EditionModal.vue | 15 +-
.../saas/editions/components/EditionTable.vue | 55 +-
.../components/TenantConnectionModal.vue | 27 +-
.../saas/tenant/components/TenantModal.vue | 5 +-
.../saas/tenant/components/TenantTable.vue | 79 +-
.../src/views/saas/tenant/datas/ModalData.ts | 18 +-
.../src/views/saas/tenant/datas/TableData.ts | 7 +
.../views/saas/tenant/hooks/useTenantTable.ts | 1 -
apps/vue/src/views/sys/error-log/index.vue | 25 +-
apps/vue/src/views/sys/lock/LockPage.vue | 18 +-
apps/vue/src/views/sys/lock/useNow.ts | 9 +-
.../sys/logging/components/LoggingModal.vue | 9 +-
.../sys/logging/components/LoggingTable.vue | 35 +-
.../src/views/sys/logging/datas/ModalData.ts | 14 +-
.../src/views/sys/logging/datas/TableData.ts | 37 +-
.../views/sys/login/ForgetPasswordForm.vue | 22 +-
apps/vue/src/views/sys/login/Login.vue | 38 +-
apps/vue/src/views/sys/login/LoginForm.vue | 41 +-
.../src/views/sys/login/LoginFormTitle.vue | 1 +
apps/vue/src/views/sys/login/MobileForm.vue | 23 +-
.../views/sys/login/MobileRegisterForm.vue | 22 +-
apps/vue/src/views/sys/login/RegisterForm.vue | 9 +-
.../vue/src/views/sys/login/TwoFactorCode.vue | 86 ++
.../src/views/sys/login/TwoFactorModal.vue | 50 ++
.../src/views/sys/login/TwoFactorSwitch.vue | 159 ++++
apps/vue/src/views/sys/login/useLogin.ts | 80 +-
.../components/BackgroundJobInfoDetail.vue | 23 +-
.../components/BackgroundJobInfoModal.vue | 362 ---------
.../background-jobs/components/JobAction.vue | 225 ++++++
.../background-jobs/components/JobModal.vue | 320 ++++++++
.../components/JobParamter.vue | 203 +++++
...ackgroundJobInfoTable.vue => JobTable.vue} | 153 ++--
.../background-jobs/datas/ModalData.ts | 2 +-
.../background-jobs/datas/TableData.ts | 12 -
.../task-management/background-jobs/index.vue | 7 +-
.../TemplateContentCultureModal.vue | 184 +++++
.../components/TemplateContentModal.vue | 133 ++++
.../templates/components/TemplateTable.vue | 71 ++
.../templates/datas/ModalData.ts | 32 +
.../templates/datas/TableData.ts | 49 ++
.../views/text-templating/templates/index.vue | 13 +
.../components/SendAttemptModal.vue | 88 ++-
.../components/SendAttemptTable.vue | 77 +-
.../webhooks/send-attempts/datas/ModalData.ts | 2 +-
.../webhooks/send-attempts/datas/TableData.ts | 5 +-
.../components/SubscriptionModal.vue | 68 +-
.../components/SubscriptionTable.vue | 59 +-
.../webhooks/subscriptions/datas/ModalData.ts | 2 +-
.../webhooks/subscriptions/datas/TableData.ts | 13 +-
apps/vue/stylelint.config.js | 14 +-
apps/vue/tests/server/README.md | 4 +-
apps/vue/tests/server/package.json | 14 +-
apps/vue/tests/server/yarn.lock | 739 ++++++------------
apps/vue/tsconfig.json | 5 +-
apps/vue/types/axios.d.ts | 8 +
apps/vue/types/config.d.ts | 1 +
apps/vue/types/global.d.ts | 2 +
apps/vue/types/module.d.ts | 6 -
apps/vue/vite.config.ts | 33 +-
apps/vue/windi.config.ts | 6 +-
465 files changed, 11753 insertions(+), 8662 deletions(-)
create mode 100644 apps/vue/.github/workflows/issue-close-require.yml
create mode 100644 apps/vue/.github/workflows/issue-labeled.yml
create mode 100644 apps/vue/.github/workflows/release.yml
create mode 100644 apps/vue/README.zh-CN.md
create mode 100644 apps/vue/mock/demo/api-cascader.ts
create mode 100644 apps/vue/mock/demo/select-demo.ts
create mode 100644 apps/vue/mock/demo/system.ts
create mode 100644 apps/vue/mock/demo/table-demo.ts
create mode 100644 apps/vue/mock/demo/tree-demo.ts
delete mode 100644 apps/vue/src/api/api-gateway/aggregate.ts
delete mode 100644 apps/vue/src/api/api-gateway/basic.ts
delete mode 100644 apps/vue/src/api/api-gateway/global.ts
delete mode 100644 apps/vue/src/api/api-gateway/group.ts
delete mode 100644 apps/vue/src/api/api-gateway/model/aggregateModel.ts
delete mode 100644 apps/vue/src/api/api-gateway/model/basicModel.ts
delete mode 100644 apps/vue/src/api/api-gateway/model/globalModel.ts
delete mode 100644 apps/vue/src/api/api-gateway/model/groupModel.ts
delete mode 100644 apps/vue/src/api/api-gateway/model/routeModel.ts
delete mode 100644 apps/vue/src/api/api-gateway/route.ts
create mode 100644 apps/vue/src/api/caching-management/cache/index.ts
create mode 100644 apps/vue/src/api/caching-management/cache/model/index.ts
delete mode 100644 apps/vue/src/api/demo/error.ts
create mode 100644 apps/vue/src/api/openiddict/applications/index.ts
create mode 100644 apps/vue/src/api/openiddict/applications/model/index.ts
create mode 100644 apps/vue/src/api/openiddict/authorizations/index.ts
create mode 100644 apps/vue/src/api/openiddict/authorizations/model/index.ts
create mode 100644 apps/vue/src/api/openiddict/scopes/index.ts
create mode 100644 apps/vue/src/api/openiddict/scopes/model/index.ts
create mode 100644 apps/vue/src/api/openiddict/tokens/index.ts
create mode 100644 apps/vue/src/api/openiddict/tokens/model/index.ts
create mode 100644 apps/vue/src/api/task-management/backgroundJobAction.ts
create mode 100644 apps/vue/src/api/task-management/model/backgroundJobActionModel.ts
create mode 100644 apps/vue/src/api/text-templating/templates/index.ts
create mode 100644 apps/vue/src/api/text-templating/templates/model/index.ts
create mode 100644 apps/vue/src/components/CodeEditor/src/codemirrorX/CodeMirrorX.vue
create mode 100644 apps/vue/src/components/Form/src/components/ApiTransfer.vue
create mode 100644 apps/vue/src/components/Form/src/components/ApiTree.vue
create mode 100644 apps/vue/src/components/Markdown/src/getTheme.ts
create mode 100644 apps/vue/src/components/MultiTenancyBox/src/MultiTenancyModal.vue
create mode 100644 apps/vue/src/components/Table/src/components/settings/TableExport.vue
create mode 100644 apps/vue/src/components/Table/src/hooks/useScrollTo.ts
create mode 100644 apps/vue/src/components/Tree/src/tree.ts
create mode 100644 apps/vue/src/components/Tree/style/index.less
create mode 100644 apps/vue/src/components/Tree/style/index.ts
create mode 100644 apps/vue/src/design/transition/fade.wxss
create mode 100644 apps/vue/src/design/transition/zoom.wxss
create mode 100644 apps/vue/src/hooks/component/useStyles.ts
create mode 100644 apps/vue/src/hooks/security/usePasswordValidator.ts
create mode 100644 apps/vue/src/locales/lang/zh-CN/antdLocale/DatePicker.ts
create mode 100644 apps/vue/src/utils/bem.ts
delete mode 100644 apps/vue/src/utils/cookie.ts
create mode 100644 apps/vue/src/utils/http/axios/axiosRetry.ts
create mode 100644 apps/vue/src/utils/props.ts
create mode 100644 apps/vue/src/utils/types.ts
create mode 100644 apps/vue/src/views/account/setting/SettingFormModal.vue
delete mode 100644 apps/vue/src/views/api-gateway/aggregate/components/AggregateRouteConfigModal.vue
delete mode 100644 apps/vue/src/views/api-gateway/aggregate/components/AggregateRouteTable.vue
delete mode 100644 apps/vue/src/views/api-gateway/aggregate/components/ModalData.ts
delete mode 100644 apps/vue/src/views/api-gateway/aggregate/components/TableData.ts
delete mode 100644 apps/vue/src/views/api-gateway/aggregate/index.vue
delete mode 100644 apps/vue/src/views/api-gateway/global/components/GlobalModal.vue
delete mode 100644 apps/vue/src/views/api-gateway/global/components/GlobalTable.vue
delete mode 100644 apps/vue/src/views/api-gateway/global/components/TableData.ts
delete mode 100644 apps/vue/src/views/api-gateway/global/hooks/useGlobalModal.ts
delete mode 100644 apps/vue/src/views/api-gateway/global/index.vue
delete mode 100644 apps/vue/src/views/api-gateway/group/components/GroupModal.vue
delete mode 100644 apps/vue/src/views/api-gateway/group/components/GroupTable.vue
delete mode 100644 apps/vue/src/views/api-gateway/group/components/ModalData.ts
delete mode 100644 apps/vue/src/views/api-gateway/group/components/TableData.ts
delete mode 100644 apps/vue/src/views/api-gateway/group/index.vue
delete mode 100644 apps/vue/src/views/api-gateway/route/components/ModalData.ts
delete mode 100644 apps/vue/src/views/api-gateway/route/components/RouteModal.vue
delete mode 100644 apps/vue/src/views/api-gateway/route/components/RouteTable.vue
delete mode 100644 apps/vue/src/views/api-gateway/route/components/TableData.ts
delete mode 100644 apps/vue/src/views/api-gateway/route/hooks/useRouteModal.ts
delete mode 100644 apps/vue/src/views/api-gateway/route/index.vue
create mode 100644 apps/vue/src/views/caching-management/cache/components/CacheModal.vue
create mode 100644 apps/vue/src/views/caching-management/cache/components/CacheTable.vue
create mode 100644 apps/vue/src/views/caching-management/cache/datas/ModalData.ts
create mode 100644 apps/vue/src/views/caching-management/cache/datas/TableData.ts
create mode 100644 apps/vue/src/views/caching-management/cache/index.vue
create mode 100644 apps/vue/src/views/identity/components/ClaimEditModal.vue
create mode 100644 apps/vue/src/views/identity/components/ClaimModal.vue
create mode 100644 apps/vue/src/views/identity/organization-units/components/OrganizationUnitModal.vue
delete mode 100644 apps/vue/src/views/identity/user/components/ClaimModal.vue
delete mode 100644 apps/vue/src/views/identity/user/hooks/useClaim.ts
delete mode 100644 apps/vue/src/views/localization/languages/components/LanguageModal.vue
delete mode 100644 apps/vue/src/views/localization/resources/components/ResourceModal.vue
create mode 100644 apps/vue/src/views/messages/notifications/components/NotificationTable.vue
create mode 100644 apps/vue/src/views/messages/notifications/datas/ModalData.ts
create mode 100644 apps/vue/src/views/messages/notifications/datas/TableData.ts
create mode 100644 apps/vue/src/views/messages/notifications/index.vue
create mode 100644 apps/vue/src/views/openiddict/applications/components/ApplicationModal.vue
create mode 100644 apps/vue/src/views/openiddict/applications/components/ApplicationTable.vue
rename apps/vue/src/views/{api-gateway/global/components => openiddict/applications/datas}/ModalData.ts (73%)
create mode 100644 apps/vue/src/views/openiddict/applications/datas/TableData.ts
create mode 100644 apps/vue/src/views/openiddict/applications/index.vue
create mode 100644 apps/vue/src/views/openiddict/authorizations/components/AuthorizationModal.vue
create mode 100644 apps/vue/src/views/openiddict/authorizations/components/AuthorizationTable.vue
create mode 100644 apps/vue/src/views/openiddict/authorizations/datas/ModalData.ts
create mode 100644 apps/vue/src/views/openiddict/authorizations/datas/TableData.ts
create mode 100644 apps/vue/src/views/openiddict/authorizations/index.vue
create mode 100644 apps/vue/src/views/openiddict/components/Properties/PropertyModal.vue
create mode 100644 apps/vue/src/views/openiddict/components/Properties/Proterties.vue
create mode 100644 apps/vue/src/views/openiddict/components/Properties/index.ts
create mode 100644 apps/vue/src/views/openiddict/scopes/components/ScopeModal.vue
create mode 100644 apps/vue/src/views/openiddict/scopes/components/ScopeTable.vue
create mode 100644 apps/vue/src/views/openiddict/scopes/index.vue
create mode 100644 apps/vue/src/views/openiddict/tokens/components/TokenModal.vue
create mode 100644 apps/vue/src/views/openiddict/tokens/components/TokenTable.vue
create mode 100644 apps/vue/src/views/openiddict/tokens/datas/ModalData.ts
create mode 100644 apps/vue/src/views/openiddict/tokens/datas/TableData.ts
create mode 100644 apps/vue/src/views/openiddict/tokens/index.vue
create mode 100644 apps/vue/src/views/oss-management/objects/components/FileList.vue
create mode 100644 apps/vue/src/views/oss-management/objects/components/FolderTree.vue
create mode 100644 apps/vue/src/views/oss-management/objects/components/OssManagePage.vue
delete mode 100644 apps/vue/src/views/oss-management/objects/components/OssTable.vue
create mode 100644 apps/vue/src/views/oss-management/objects/datas/typing.ts
delete mode 100644 apps/vue/src/views/oss-management/objects/hooks/useObjects.ts
create mode 100644 apps/vue/src/views/sys/login/TwoFactorCode.vue
create mode 100644 apps/vue/src/views/sys/login/TwoFactorModal.vue
create mode 100644 apps/vue/src/views/sys/login/TwoFactorSwitch.vue
delete mode 100644 apps/vue/src/views/task-management/background-jobs/components/BackgroundJobInfoModal.vue
create mode 100644 apps/vue/src/views/task-management/background-jobs/components/JobAction.vue
create mode 100644 apps/vue/src/views/task-management/background-jobs/components/JobModal.vue
create mode 100644 apps/vue/src/views/task-management/background-jobs/components/JobParamter.vue
rename apps/vue/src/views/task-management/background-jobs/components/{BackgroundJobInfoTable.vue => JobTable.vue} (53%)
create mode 100644 apps/vue/src/views/text-templating/templates/components/TemplateContentCultureModal.vue
create mode 100644 apps/vue/src/views/text-templating/templates/components/TemplateContentModal.vue
create mode 100644 apps/vue/src/views/text-templating/templates/components/TemplateTable.vue
create mode 100644 apps/vue/src/views/text-templating/templates/datas/ModalData.ts
create mode 100644 apps/vue/src/views/text-templating/templates/datas/TableData.ts
create mode 100644 apps/vue/src/views/text-templating/templates/index.vue
diff --git a/apps/vue/.eslintignore b/apps/vue/.eslintignore
index 5aaaddd86..afa978eed 100644
--- a/apps/vue/.eslintignore
+++ b/apps/vue/.eslintignore
@@ -13,4 +13,4 @@ dist
.local
/bin
Dockerfile
-src/
\ No newline at end of file
+src/
diff --git a/apps/vue/.eslintrc.js b/apps/vue/.eslintrc.js
index 7d181e4ff..9aa3e10ce 100644
--- a/apps/vue/.eslintrc.js
+++ b/apps/vue/.eslintrc.js
@@ -1,6 +1,4 @@
-// @ts-check
-const { defineConfig } = require('eslint-define-config');
-module.exports = defineConfig({
+module.exports = {
root: true,
env: {
browser: true,
@@ -20,9 +18,7 @@ module.exports = defineConfig({
extends: [
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
- 'prettier',
'plugin:prettier/recommended',
- 'plugin:jest/recommended',
],
rules: {
'vue/script-setup-uses-vars': 'error',
@@ -55,8 +51,6 @@ module.exports = defineConfig({
'space-before-function-paren': 'off',
'vue/attributes-order': 'off',
- 'vue/v-on-event-hyphenation': 'off',
- 'vue/multi-word-component-names': 'off',
'vue/one-component-per-file': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/max-attributes-per-line': 'off',
@@ -64,8 +58,7 @@ module.exports = defineConfig({
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
'vue/require-default-prop': 'off',
- 'jest/no-commented-out-tests': 'warn',
- 'function-url-quotes': 'off',
+ 'vue/require-explicit-emits': 'off',
'vue/html-self-closing': [
'error',
{
@@ -78,5 +71,6 @@ module.exports = defineConfig({
math: 'always',
},
],
+ 'vue/multi-word-component-names': 'off',
},
-});
+};
diff --git a/apps/vue/.github/workflows/issue-close-require.yml b/apps/vue/.github/workflows/issue-close-require.yml
new file mode 100644
index 000000000..a5fb0a400
--- /dev/null
+++ b/apps/vue/.github/workflows/issue-close-require.yml
@@ -0,0 +1,17 @@
+name: Issue Close Require
+
+on:
+ schedule:
+ - cron: '0 0 * * *'
+
+jobs:
+ close-issues:
+ runs-on: ubuntu-latest
+ steps:
+ - name: need reproduction
+ uses: actions-cool/issues-helper@v2.1.1
+ with:
+ actions: 'close-issues'
+ token: ${{ secrets.OPER_TOKEN }}
+ labels: 'need reproduction'
+ inactive-day: 3
diff --git a/apps/vue/.github/workflows/issue-labeled.yml b/apps/vue/.github/workflows/issue-labeled.yml
new file mode 100644
index 000000000..43a7a624a
--- /dev/null
+++ b/apps/vue/.github/workflows/issue-labeled.yml
@@ -0,0 +1,29 @@
+name: Issue Labeled
+
+on:
+ issues:
+ types: [labeled]
+
+jobs:
+ reply-labeled:
+ runs-on: ubuntu-latest
+ steps:
+ - name: remove pending
+ if: github.event.label.name == 'enhancement' || github.event.label.name == 'bug'
+ uses: actions-cool/issues-helper@v2.1.1
+ with:
+ actions: 'remove-labels'
+ token: ${{ secrets.OPER_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ labels: 'bug: pending triage'
+
+ - name: need reproduction
+ if: github.event.label.name == 'need reproduction'
+ uses: actions-cool/issues-helper@v2.1.1
+ with:
+ actions: 'create-comment, remove-labels'
+ token: ${{ secrets.OPER_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ body: |
+ Hello @${{ github.event.issue.user.login }}. Please provide the complete reproduction steps and code. Issues labeled by `need reproduction` will be closed if no activities in 3 days.
+ labels: 'bug: pending triage'
diff --git a/apps/vue/.github/workflows/release.yml b/apps/vue/.github/workflows/release.yml
new file mode 100644
index 000000000..74ab4a3d1
--- /dev/null
+++ b/apps/vue/.github/workflows/release.yml
@@ -0,0 +1,24 @@
+name: Create Release
+
+on:
+ push:
+ tags:
+ - v*
+
+jobs:
+ build:
+ name: Create Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@master
+
+ - name: Create Release for Tag
+ id: release_tag
+ uses: yyx990803/release-tag@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.OPER_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ body: |
+ Please refer to [CHANGELOG.md](https://github.com/anncwb/vue-vben-admin/blob/main/CHANGELOG.md) for details.
diff --git a/apps/vue/.gitignore b/apps/vue/.gitignore
index d25887c6f..003b54a7d 100644
--- a/apps/vue/.gitignore
+++ b/apps/vue/.gitignore
@@ -4,6 +4,7 @@ dist
.npmrc
.cache
yarn.lock
+pnpm-lock.yaml
tests/server/static
tests/server/static/upload
@@ -28,3 +29,4 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
+/package-lock.json
diff --git a/apps/vue/.gitpod.yml b/apps/vue/.gitpod.yml
index 219189500..866381fcc 100644
--- a/apps/vue/.gitpod.yml
+++ b/apps/vue/.gitpod.yml
@@ -2,5 +2,5 @@ ports:
- port: 3344
onOpen: open-preview
tasks:
- - init: yarn
- command: yarn dev
+ - init: pnpm install
+ command: pnpm run dev
diff --git a/apps/vue/.husky/pre-commit b/apps/vue/.husky/pre-commit
index 35f92427c..eec6cb6ec 100644
--- a/apps/vue/.husky/pre-commit
+++ b/apps/vue/.husky/pre-commit
@@ -1,8 +1,8 @@
#!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-. "$(dirname "$0")/common.sh"
+#. "$(dirname "$0")/_/husky.sh"
+#. "$(dirname "$0")/common.sh"
-[ -n "$CI" ] && exit 0
+#[ -n "$CI" ] && exit 0
# Format and submit code according to lintstagedrc.js configuration
-npm run lint:lint-staged
+# npm run lint:lint-staged
diff --git a/apps/vue/README.md b/apps/vue/README.md
index cea9083e2..c3d3d57fc 100644
--- a/apps/vue/README.md
+++ b/apps/vue/README.md
@@ -79,104 +79,99 @@ git clone https://github.com/anncwb/vue-vben-admin.git
```bash
cd vue-vben-admin
-yarn install
+pnpm install
```
-- 运行
+- run
```bash
-yarn serve
+pnpm serve
```
-- 打包
+- build
```bash
-yarn build
+pnpm build
```
-## 更新日志
+## Change Log
[CHANGELOG](./CHANGELOG.zh_CN.md)
-## 项目地址
+## Project
-- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - 完整版
-- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - 简化版
+- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - full version
+- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - Simplified version
-## 如何贡献
+## How to contribute
-非常欢迎你的加入 或者提交一个 Pull Request。
+You are very welcome to join Or submit a Pull Request。
**Pull Request:**
-1. Fork 代码!
-2. 创建自己的分支: `git checkout -b feat/xxxx`
-3. 提交你的修改: `git commit -am 'feat(function): add xxxxx'`
-4. 推送您的分支: `git push origin feat/xxxx`
-5. 提交`pull request`
+1. Fork code!
+2. Create your own branch: `git checkout -b feat/xxxx`
+3. Submit your changes: `git commit -am 'feat(function): add xxxxx'`
+4. Push your branch: `git push origin feat/xxxx`
+5. submit`pull request`
-## Git 贡献提交规范
+## Git Contribution submission specification
-- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
+- reference [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) specification ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
- - `feat` 增加新功能
- - `fix` 修复问题/BUG
- - `style` 代码风格相关无影响运行结果的
- - `perf` 优化/性能提升
- - `refactor` 重构
- - `revert` 撤销修改
- - `test` 测试相关
- - `docs` 文档/注释
- - `chore` 依赖更新/脚手架配置修改等
- - `workflow` 工作流改进
- - `ci` 持续集成
- - `types` 类型定义文件更改
- - `wip` 开发中
+ - `feat` Add new features
+ - `fix` Fix the problem/BUG
+ - `style` The code style is related and does not affect the running result
+ - `perf` Optimization/performance improvement
+ - `refactor` Refactor
+ - `revert` Undo edit
+ - `test` Test related
+ - `docs` Documentation/notes
+ - `chore` Dependency update/scaffolding configuration modification etc.
+ - `workflow` Workflow improvements
+ - `ci` Continuous integration
+ - `types` Type definition file changes
+ - `wip` In development
-## 浏览器支持
+## Related warehouse
-本地开发推荐使用`Chrome 80+` 浏览器
+If these plugins are helpful to you, you can give a star support
-支持现代浏览器, 不支持 IE
+- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - Used for local and development environment data mock
+- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - Used for html template conversion and compression
+- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - Used for component library style introduction on demand
+- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - Used for online switching of theme colors and other color-related configurations
+- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - Used to pack compressed image resources
+- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - Used to pack input .gz|.brotil files
+- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - Used to quickly generate svg sprite
-| [
](http://godban.github.io/browsers-support-badges/)IE | [
](http://godban.github.io/browsers-support-badges/)Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
-| :-: | :-: | :-: | :-: | :-: |
-| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
-
-## 相关仓库
-
-如果这些插件对你有帮助,可以给一个 star 支持下
+## Browser support
-- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - 用于本地及开发环境数据 mock
-- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩
-- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - 用于组件库样式按需引入
-- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - 用于在线切换主题色等颜色相关配置
-- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - 用于打包压缩图片资源
-- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件
-- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图
+The `Chrome 80+` browser is recommended for local development
-## 后台整合示例
+Support modern browsers, not IE
-- [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台
+| [
](http://godban.github.io/browsers-support-badges/)IE | [
](http://godban.github.io/browsers-support-badges/)Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
+| :-: | :-: | :-: | :-: | :-: |
+| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
-## 维护者
+## Maintainer
[@Vben](https://github.com/anncwb)
-## 捐赠
+## Donate
-如果你觉得这个项目对你有帮助,你可以帮作者买一杯咖啡表示支持!
+If you think this project is helpful to you, you can help the author buy a cup of coffee to show your support!

Paypal Me
-## 交流
-
-`Vue-vben-Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。
+## Discord
-- QQ 群 `569291866`
+- [github discussions](https://github.com/anncwb/vue-vben-admin/discussions)
+- [Discord](https://discord.gg/8GuAdwDhj6)
## License
diff --git a/apps/vue/README.zh-CN.md b/apps/vue/README.zh-CN.md
new file mode 100644
index 000000000..408af3cc8
--- /dev/null
+++ b/apps/vue/README.zh-CN.md
@@ -0,0 +1,175 @@
+
+
+[](LICENSE)
+
+
Vue vben admin
+
+
+**中文** | [English](./README.md)
+
+## 简介
+
+Vue Vben Admin 是一个免费开源的中后台模版。使用了最新的`vue3`,`vite2`,`TypeScript`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
+
+## 特性
+
+- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发
+- **TypeScript**: 应用程序级 JavaScript 的语言
+- **主题**:可配置的主题
+- **国际化**:内置完善的国际化方案
+- **Mock 数据** 内置 Mock 数据方案
+- **权限** 内置完善的动态路由权限生成方案
+- **组件** 二次封装了多个常用的组件
+
+## 预览
+
+- [vue-vben-admin](https://vvbin.cn/next/) - 完整版中文站点
+- [vue-vben-admin-gh-pages](https://anncwb.github.io/vue-vben-admin/) - 完整版 github 站点
+- [vben-admin-thin-next](https://vvbin.cn/thin/next/) - 简化版中文站点
+- [vben-admin-thin-gh-pages](https://anncwb.github.io/vben-admin-thin-next/) - 简化版 github 站点
+
+测试账号: vben/123456
+
+
+
+
+
+
+
+### 使用 Gitpod
+
+在 Gitpod(适用于 GitHub 的免费在线开发环境)中打开项目,并立即开始编码.
+
+[](https://gitpod.io/#https://github.com/anncwb/vue-vben-admin)
+
+## 文档
+
+[文档地址](https://vvbin.cn/doc-next/)
+
+## 准备
+
+- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
+- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
+- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
+- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
+- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
+- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
+- [Ant-Design-Vue](https://2x.antdv.com/docs/vue/introduce-cn/) - ui 基本使用
+- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
+
+## 安装使用
+
+- 获取项目代码
+
+```bash
+git clone https://github.com/anncwb/vue-vben-admin.git
+```
+
+- 安装依赖
+
+```bash
+cd vue-vben-admin
+
+pnpm install
+
+```
+
+- 运行
+
+```bash
+pnpm serve
+```
+
+- 打包
+
+```bash
+pnpm build
+```
+
+## 更新日志
+
+[CHANGELOG](./CHANGELOG.zh_CN.md)
+
+## 项目地址
+
+- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) - 完整版
+- [vue-vben-admin-thin-next](https://github.com/anncwb/vben-admin-thin-next) - 简化版
+
+## 如何贡献
+
+非常欢迎你的加入 或者提交一个 Pull Request。
+
+**Pull Request:**
+
+1. Fork 代码!
+2. 创建自己的分支: `git checkout -b feat/xxxx`
+3. 提交你的修改: `git commit -am 'feat(function): add xxxxx'`
+4. 推送您的分支: `git push origin feat/xxxx`
+5. 提交`pull request`
+
+## Git 贡献提交规范
+
+- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
+
+ - `feat` 增加新功能
+ - `fix` 修复问题/BUG
+ - `style` 代码风格相关无影响运行结果的
+ - `perf` 优化/性能提升
+ - `refactor` 重构
+ - `revert` 撤销修改
+ - `test` 测试相关
+ - `docs` 文档/注释
+ - `chore` 依赖更新/脚手架配置修改等
+ - `workflow` 工作流改进
+ - `ci` 持续集成
+ - `types` 类型定义文件更改
+ - `wip` 开发中
+
+## 浏览器支持
+
+本地开发推荐使用`Chrome 80+` 浏览器
+
+支持现代浏览器, 不支持 IE
+
+| [
](http://godban.github.io/browsers-support-badges/)IE | [
](http://godban.github.io/browsers-support-badges/)Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
+| :-: | :-: | :-: | :-: | :-: |
+| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
+
+## 相关仓库
+
+如果这些插件对你有帮助,可以给一个 star 支持下
+
+- [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - 用于本地及开发环境数据 mock
+- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩
+- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - 用于组件库样式按需引入
+- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - 用于在线切换主题色等颜色相关配置
+- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - 用于打包压缩图片资源
+- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件
+- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图
+
+## 后台整合示例
+
+- [lamp-cloud](https://github.com/zuihou/lamp-cloud) - 基于 SpringCloud Alibaba 的微服务中后台快速开发平台
+- [matecloud](https://github.com/matevip/matecloud) - MateCloud 微服务脚手架,基于 Spring Cloud 2020.0.3、SpringBoot 2.5.3 的全开源平台
+
+## 维护者
+
+[@Vben](https://github.com/anncwb)
+
+## 捐赠
+
+如果你觉得这个项目对你有帮助,你可以帮作者买一杯咖啡表示支持!
+
+
+
+Paypal Me
+
+## 交流
+
+`Vue-vben-Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。
+
+- QQ 群 `569291866`
+
+## License
+
+[MIT © Vben-2020](./LICENSE)
diff --git a/apps/vue/build/generate/icon/index.ts b/apps/vue/build/generate/icon/index.ts
index c78cb09f2..b01fec4cb 100644
--- a/apps/vue/build/generate/icon/index.ts
+++ b/apps/vue/build/generate/icon/index.ts
@@ -1,7 +1,7 @@
import path from 'path';
import fs from 'fs-extra';
import inquirer from 'inquirer';
-import chalk from 'chalk';
+import colors from 'picocolors';
import pkg from '../../../package.json';
async function generateIcon() {
@@ -64,7 +64,7 @@ async function generateIcon() {
}
fs.emptyDir(path.join(process.cwd(), 'node_modules/.vite'));
console.log(
- `✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`,
+ `✨ ${colors.cyan(`[${pkg.name}]`)}` + ' - Icon generated successfully:' + `[${prefixSet}]`,
);
});
}
diff --git a/apps/vue/build/script/buildConf.ts b/apps/vue/build/script/buildConf.ts
index 342c15411..c35977497 100644
--- a/apps/vue/build/script/buildConf.ts
+++ b/apps/vue/build/script/buildConf.ts
@@ -3,7 +3,7 @@
*/
import { GLOB_CONFIG_FILE_NAME, OUTPUT_DIR } from '../constant';
import fs, { writeFileSync } from 'fs-extra';
-import chalk from 'chalk';
+import colors from 'picocolors';
import { getEnvConfig, getRootPath } from '../utils';
import { getConfigFileName } from '../getConfigFileName';
@@ -21,7 +21,8 @@ function createConfig(params: CreateConfigParams) {
try {
const windowConf = `window.${configName}`;
// Ensure that the variable will not be modified
- const configStr = `${windowConf}=${JSON.stringify(config)};
+ let configStr = `${windowConf}=${JSON.stringify(config)};`;
+ configStr += `
Object.freeze(${windowConf});
Object.defineProperty(window, "${configName}", {
configurable: false,
@@ -31,10 +32,10 @@ function createConfig(params: CreateConfigParams) {
fs.mkdirp(getRootPath(OUTPUT_DIR));
writeFileSync(getRootPath(`${OUTPUT_DIR}/${configFileName}`), configStr);
- console.log(chalk.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
- console.log(chalk.gray(OUTPUT_DIR + '/' + chalk.green(configFileName)) + '\n');
+ console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
+ console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n');
} catch (error) {
- console.log(chalk.red('configuration file configuration file failed to package:\n' + error));
+ console.log(colors.red('configuration file configuration file failed to package:\n' + error));
}
}
diff --git a/apps/vue/build/script/postBuild.ts b/apps/vue/build/script/postBuild.ts
index e1554bff7..42635d88b 100644
--- a/apps/vue/build/script/postBuild.ts
+++ b/apps/vue/build/script/postBuild.ts
@@ -1,7 +1,7 @@
// #!/usr/bin/env node
import { runBuildConfig } from './buildConf';
-import chalk from 'chalk';
+import colors from 'picocolors';
import pkg from '../../package.json';
@@ -14,9 +14,9 @@ export const runBuild = async () => {
runBuildConfig();
}
- console.log(`✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - build successfully!');
+ console.log(`✨ ${colors.cyan(`[${pkg.name}]`)}` + ' - build successfully!');
} catch (error) {
- console.log(chalk.red('vite build error:\n' + error));
+ console.log(colors.red('vite build error:\n' + error));
process.exit(1);
}
};
diff --git a/apps/vue/build/vite/plugin/compress.ts b/apps/vue/build/vite/plugin/compress.ts
index 3ad32be12..ff4f6311d 100644
--- a/apps/vue/build/vite/plugin/compress.ts
+++ b/apps/vue/build/vite/plugin/compress.ts
@@ -2,16 +2,16 @@
* Used to package and output gzip. Note that this does not work properly in Vite, the specific reason is still being investigated
* https://github.com/anncwb/vite-plugin-compression
*/
-import type { Plugin } from 'vite';
+import type { PluginOption } from 'vite';
import compressPlugin from 'vite-plugin-compression';
export function configCompressPlugin(
compress: 'gzip' | 'brotli' | 'none',
deleteOriginFile = false,
-): Plugin | Plugin[] {
+): PluginOption | PluginOption[] {
const compressList = compress.split(',');
- const plugins: Plugin[] = [];
+ const plugins: PluginOption[] = [];
if (compressList.includes('gzip')) {
plugins.push(
diff --git a/apps/vue/build/vite/plugin/html.ts b/apps/vue/build/vite/plugin/html.ts
index 848190bd8..6af034ac4 100644
--- a/apps/vue/build/vite/plugin/html.ts
+++ b/apps/vue/build/vite/plugin/html.ts
@@ -2,8 +2,8 @@
* Plugin to minimize and use ejs template syntax in index.html.
* https://github.com/anncwb/vite-plugin-html
*/
-import type { Plugin } from 'vite';
-import html from 'vite-plugin-html';
+import type { PluginOption } from 'vite';
+import { createHtmlPlugin } from 'vite-plugin-html';
import pkg from '../../../package.json';
import { GLOB_CONFIG_FILE_NAME } from '../../constant';
@@ -16,7 +16,7 @@ export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
return `${path || '/'}${GLOB_CONFIG_FILE_NAME}?v=${pkg.version}-${new Date().getTime()}`;
};
- const htmlPlugin: Plugin[] = html({
+ const htmlPlugin: PluginOption[] = createHtmlPlugin({
minify: isBuild,
inject: {
// Inject data into ejs template
diff --git a/apps/vue/build/vite/plugin/index.ts b/apps/vue/build/vite/plugin/index.ts
index 9c0924a0d..0efe660db 100644
--- a/apps/vue/build/vite/plugin/index.ts
+++ b/apps/vue/build/vite/plugin/index.ts
@@ -1,9 +1,10 @@
-import type { Plugin } from 'vite';
+import { PluginOption } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import legacy from '@vitejs/plugin-legacy';
import purgeIcons from 'vite-plugin-purge-icons';
import windiCSS from 'vite-plugin-windicss';
+import VitePluginCertificate from 'vite-plugin-mkcert';
import vueSetupExtend from 'vite-plugin-vue-setup-extend';
import { configHtmlPlugin } from './html';
import { configPwaConfig } from './pwa';
@@ -14,7 +15,6 @@ import { configVisualizerConfig } from './visualizer';
import { configThemePlugin } from './theme';
import { configImageminPlugin } from './imagemin';
import { configSvgIconsPlugin } from './svgSprite';
-import { configHmrPlugin } from './hmr';
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
const {
@@ -25,21 +25,21 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE,
} = viteEnv;
- const vitePlugins: (Plugin | Plugin[])[] = [
+ const vitePlugins: (PluginOption | PluginOption[])[] = [
// have to
vue(),
// have to
vueJsx(),
// support name
vueSetupExtend(),
+ VitePluginCertificate({
+ source: 'coding',
+ }),
];
// vite-plugin-windicss
vitePlugins.push(windiCSS());
- // TODO
- !isBuild && vitePlugins.push(configHmrPlugin());
-
// @vitejs/plugin-legacy
VITE_LEGACY && isBuild && vitePlugins.push(legacy());
@@ -61,12 +61,12 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
// rollup-plugin-visualizer
vitePlugins.push(configVisualizerConfig());
- //vite-plugin-theme
+ // vite-plugin-theme
vitePlugins.push(configThemePlugin(isBuild));
// The following plugins only work in the production environment
if (isBuild) {
- //vite-plugin-imagemin
+ // vite-plugin-imagemin
VITE_USE_IMAGEMIN && vitePlugins.push(configImageminPlugin());
// rollup-plugin-gzip
diff --git a/apps/vue/build/vite/plugin/styleImport.ts b/apps/vue/build/vite/plugin/styleImport.ts
index 111a3faaf..32b8f823a 100644
--- a/apps/vue/build/vite/plugin/styleImport.ts
+++ b/apps/vue/build/vite/plugin/styleImport.ts
@@ -2,13 +2,13 @@
* Introduces component library styles on demand.
* https://github.com/anncwb/vite-plugin-style-import
*/
-import styleImport from 'vite-plugin-style-import';
+import { createStyleImportPlugin } from 'vite-plugin-style-import';
-export function configStyleImportPlugin(isBuild: boolean) {
- if (!isBuild) {
- return [];
- }
- const styleImportPlugin = styleImport({
+export function configStyleImportPlugin(_isBuild: boolean) {
+ // if (!isBuild) {
+ // return [];
+ // }
+ const styleImportPlugin = createStyleImportPlugin({
libs: [
{
libraryName: 'ant-design-vue',
@@ -19,6 +19,7 @@ export function configStyleImportPlugin(isBuild: boolean) {
'anchor-link',
'sub-menu',
'menu-item',
+ 'menu-divider',
'menu-item-group',
'breadcrumb-item',
'breadcrumb-separator',
@@ -63,6 +64,8 @@ export function configStyleImportPlugin(isBuild: boolean) {
'layout-footer': 'layout',
'layout-header': 'layout',
'month-picker': 'date-picker',
+ 'range-picker': 'date-picker',
+ 'image-preview-group': 'image',
};
return ignoreList.includes(name)
diff --git a/apps/vue/build/vite/plugin/svgSprite.ts b/apps/vue/build/vite/plugin/svgSprite.ts
index 3817acbfc..61f637f4e 100644
--- a/apps/vue/build/vite/plugin/svgSprite.ts
+++ b/apps/vue/build/vite/plugin/svgSprite.ts
@@ -3,11 +3,11 @@
* https://github.com/anncwb/vite-plugin-svg-icons
*/
-import SvgIconsPlugin from 'vite-plugin-svg-icons';
+import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import path from 'path';
export function configSvgIconsPlugin(isBuild: boolean) {
- const svgIconsPlugin = SvgIconsPlugin({
+ const svgIconsPlugin = createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')],
svgoOptions: isBuild,
// default
diff --git a/apps/vue/build/vite/plugin/theme.ts b/apps/vue/build/vite/plugin/theme.ts
index c54f1a834..118983f77 100644
--- a/apps/vue/build/vite/plugin/theme.ts
+++ b/apps/vue/build/vite/plugin/theme.ts
@@ -2,7 +2,7 @@
* Vite plugin for website theme color switching
* https://github.com/anncwb/vite-plugin-theme
*/
-import type { Plugin } from 'vite';
+import type { PluginOption } from 'vite';
import path from 'path';
import {
viteThemePlugin,
@@ -14,7 +14,7 @@ import {
import { getThemeColors, generateColors } from '../../config/themeConfig';
import { generateModifyVars } from '../../generate/generateModifyVars';
-export function configThemePlugin(isBuild: boolean): Plugin[] {
+export function configThemePlugin(isBuild: boolean): PluginOption[] {
const colors = generateColors({
mixDarken,
mixLighten,
@@ -85,5 +85,5 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
}),
];
- return plugin as unknown as Plugin[];
+ return plugin as unknown as PluginOption[];
}
diff --git a/apps/vue/commitlint.config.js b/apps/vue/commitlint.config.js
index 54598876e..151ead3cf 100644
--- a/apps/vue/commitlint.config.js
+++ b/apps/vue/commitlint.config.js
@@ -1,3 +1,23 @@
+const fs = require('fs');
+const path = require('path');
+const { execSync } = require('child_process');
+
+const scopes = fs
+ .readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
+ .filter((dirent) => dirent.isDirectory())
+ .map((dirent) => dirent.name.replace(/s$/, ''));
+
+// precomputed scope
+const scopeComplete = execSync('git status --porcelain || true')
+ .toString()
+ .trim()
+ .split('\n')
+ .find((r) => ~r.indexOf('M src'))
+ ?.replace(/(\/)/g, '%%')
+ ?.match(/src%%((\w|-)*)/)?.[1]
+ ?.replace(/s$/, '');
+
+/** @type {import('cz-git').UserConfig} */
module.exports = {
ignores: [(commit) => commit.includes('init')],
extends: ['@commitlint/config-conventional'],
@@ -30,4 +50,58 @@ module.exports = {
],
],
},
+ prompt: {
+ /** @use `yarn commit :f` */
+ alias: {
+ f: 'docs: fix typos',
+ r: 'docs: update README',
+ s: 'style: update code format',
+ b: 'build: bump dependencies',
+ c: 'chore: update config',
+ },
+ customScopesAlign: !scopeComplete ? 'top' : 'bottom',
+ defaultScope: scopeComplete,
+ scopes: [...scopes, 'mock'],
+ allowEmptyIssuePrefixs: false,
+ allowCustomIssuePrefixs: false,
+
+ // English
+ typesAppend: [
+ { value: 'wip', name: 'wip: work in process' },
+ { value: 'workflow', name: 'workflow: workflow improvements' },
+ { value: 'types', name: 'types: type definition file changes' },
+ ],
+
+ // 中英文对照版
+ // messages: {
+ // type: '选择你要提交的类型 :',
+ // scope: '选择一个提交范围 (可选):',
+ // customScope: '请输入自定义的提交范围 :',
+ // subject: '填写简短精炼的变更描述 :\n',
+ // body: '填写更加详细的变更描述 (可选)。使用 "|" 换行 :\n',
+ // breaking: '列举非兼容性重大的变更 (可选)。使用 "|" 换行 :\n',
+ // footerPrefixsSelect: '选择关联issue前缀 (可选):',
+ // customFooterPrefixs: '输入自定义issue前缀 :',
+ // footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
+ // confirmCommit: '是否提交或修改commit ?',
+ // },
+ // types: [
+ // { value: 'feat', name: 'feat: 新增功能' },
+ // { value: 'fix', name: 'fix: 修复缺陷' },
+ // { value: 'docs', name: 'docs: 文档变更' },
+ // { value: 'style', name: 'style: 代码格式' },
+ // { value: 'refactor', name: 'refactor: 代码重构' },
+ // { value: 'perf', name: 'perf: 性能优化' },
+ // { value: 'test', name: 'test: 添加疏漏测试或已有测试改动' },
+ // { value: 'build', name: 'build: 构建流程、外部依赖变更 (如升级 npm 包、修改打包配置等)' },
+ // { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
+ // { value: 'revert', name: 'revert: 回滚 commit' },
+ // { value: 'chore', name: 'chore: 对构建过程或辅助工具和库的更改 (不影响源文件、测试用例)' },
+ // { value: 'wip', name: 'wip: 正在开发中' },
+ // { value: 'workflow', name: 'workflow: 工作流程改进' },
+ // { value: 'types', name: 'types: 类型定义文件修改' },
+ // ],
+ // emptyScopesAlias: 'empty: 不填写',
+ // customScopesAlias: 'custom: 自定义',
+ },
};
diff --git a/apps/vue/index.html b/apps/vue/index.html
index 5b99faf67..f615e97cc 100644
--- a/apps/vue/index.html
+++ b/apps/vue/index.html
@@ -8,7 +8,6 @@
name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
-
<%= title %>
@@ -30,7 +29,7 @@
}
html[data-theme='dark'] .app-loading .app-loading-title {
- color: rgba(255, 255, 255, 0.85);
+ color: rgb(255 255 255 / 85%);
}
.app-loading {
@@ -48,7 +47,6 @@
top: 50%;
left: 50%;
display: flex;
- -webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
justify-content: center;
align-items: center;
@@ -66,7 +64,7 @@
display: flex;
margin-top: 30px;
font-size: 30px;
- color: rgba(0, 0, 0, 0.85);
+ color: rgb(0 0 0 / 85%);
justify-content: center;
align-items: center;
}
@@ -97,7 +95,7 @@
height: 20px;
background-color: #0065cc;
border-radius: 100%;
- opacity: 0.3;
+ opacity: 30%;
transform: scale(0.75);
animation: antSpinMove 1s infinite linear alternate;
transform-origin: 50% 50%;
@@ -111,43 +109,38 @@
.dot i:nth-child(2) {
top: 0;
right: 0;
- -webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.dot i:nth-child(3) {
right: 0;
bottom: 0;
- -webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.dot i:nth-child(4) {
bottom: 0;
left: 0;
- -webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
@keyframes antRotate {
to {
- -webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
- @-webkit-keyframes antRotate {
+ @keyframes antRotate {
to {
- -webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
- opacity: 1;
+ opacity: 100%;
}
}
- @-webkit-keyframes antSpinMove {
+ @keyframes antSpinMove {
to {
- opacity: 1;
+ opacity: 100%;
}
}
diff --git a/apps/vue/mock/demo/api-cascader.ts b/apps/vue/mock/demo/api-cascader.ts
new file mode 100644
index 000000000..6334ef5b1
--- /dev/null
+++ b/apps/vue/mock/demo/api-cascader.ts
@@ -0,0 +1,325 @@
+import { MockMethod } from 'vite-plugin-mock';
+import { resultSuccess } from '../_util';
+
+const areaList: any[] = [
+ {
+ id: '530825900854620160',
+ code: '430000',
+ parentCode: '100000',
+ levelType: 1,
+ name: '湖南省',
+ province: '湖南省',
+ city: null,
+ district: null,
+ town: null,
+ village: null,
+ parentPath: '430000',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 16:33:42',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530825900883980288',
+ code: '430100',
+ parentCode: '430000',
+ levelType: 2,
+ name: '长沙市',
+ province: '湖南省',
+ city: '长沙市',
+ district: null,
+ town: null,
+ village: null,
+ parentPath: '430000,430100',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 16:33:42',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530825900951089152',
+ code: '430102',
+ parentCode: '430100',
+ levelType: 3,
+ name: '芙蓉区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '芙蓉区',
+ town: null,
+ village: null,
+ parentPath: '430000,430100,430102',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 16:33:42',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530825901014003712',
+ code: '430104',
+ parentCode: '430100',
+ levelType: 3,
+ name: '岳麓区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '岳麓区',
+ town: null,
+ village: null,
+ parentPath: '430000,430100,430104',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 16:33:42',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530825900988837888',
+ code: '430103',
+ parentCode: '430100',
+ levelType: 3,
+ name: '天心区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: null,
+ village: null,
+ parentPath: '430000,430100,430103',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 16:33:42',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530826672489115648',
+ code: '430103002',
+ parentCode: '430103',
+ levelType: 4,
+ name: '坡子街街道',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: null,
+ parentPath: '430000,430100,430103,430103002',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-12-14 15:26:43',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241171607552',
+ code: '430103002001',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '八角亭社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '八角亭社区',
+ parentPath: '430000,430100,430103,430103002,430103002001',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2021-01-20 14:07:23',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241200967680',
+ code: '430103002002',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '西牌楼社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '西牌楼社区',
+ parentPath: '430000,430100,430103,430103002,430103002002',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241230327808',
+ code: '430103002003',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '太平街社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '太平街社区',
+ parentPath: '430000,430100,430103,430103002,430103002003',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241259687936',
+ code: '430103002005',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '坡子街社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '坡子街社区',
+ parentPath: '430000,430100,430103,430103002,430103002005',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241284853760',
+ code: '430103002006',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '青山祠社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '青山祠社区',
+ parentPath: '430000,430100,430103,430103002,430103002006',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241310019584',
+ code: '430103002007',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '沙河社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '沙河社区',
+ parentPath: '430000,430100,430103,430103002,430103002007',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241381322752',
+ code: '430103002008',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '碧湘社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '碧湘社区',
+ parentPath: '430000,430100,430103,430103002,430103002008',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241410682880',
+ code: '430103002009',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '创远社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '创远社区',
+ parentPath: '430000,430100,430103,430103002,430103002009',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241431654400',
+ code: '430103002010',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '楚湘社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '楚湘社区',
+ parentPath: '430000,430100,430103,430103002,430103002010',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241465208832',
+ code: '430103002011',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '西湖社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '西湖社区',
+ parentPath: '430000,430100,430103,430103002,430103002011',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241502957568',
+ code: '430103002012',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '登仁桥社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '登仁桥社区',
+ parentPath: '430000,430100,430103,430103002,430103002012',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+ {
+ id: '530840241553289216',
+ code: '430103002013',
+ parentCode: '430103002',
+ levelType: 5,
+ name: '文庙坪社区',
+ province: '湖南省',
+ city: '长沙市',
+ district: '天心区',
+ town: '坡子街街道',
+ village: '文庙坪社区',
+ parentPath: '430000,430100,430103,430103002,430103002013',
+ createTime: '2020-11-30 15:47:31',
+ updateTime: '2020-11-30 17:30:41',
+ customized: false,
+ usable: true,
+ },
+];
+export default [
+ {
+ url: '/basic-api/cascader/getAreaRecord',
+ timeout: 1000,
+ method: 'post',
+ response: ({ body }) => {
+ const { parentCode } = body || {};
+ if (!parentCode) {
+ return resultSuccess(areaList.filter((it) => it.code === '430000'));
+ }
+ return resultSuccess(areaList.filter((it) => it.parentCode === parentCode));
+ },
+ },
+] as MockMethod[];
diff --git a/apps/vue/mock/demo/select-demo.ts b/apps/vue/mock/demo/select-demo.ts
new file mode 100644
index 000000000..631c6bb05
--- /dev/null
+++ b/apps/vue/mock/demo/select-demo.ts
@@ -0,0 +1,28 @@
+import { MockMethod } from 'vite-plugin-mock';
+import { resultSuccess } from '../_util';
+
+const demoList = (keyword, count = 20) => {
+ const result = {
+ list: [] as any[],
+ };
+ for (let index = 0; index < count; index++) {
+ result.list.push({
+ name: `${keyword ?? ''}选项${index}`,
+ id: `${index}`,
+ });
+ }
+ return result;
+};
+
+export default [
+ {
+ url: '/basic-api/select/getDemoOptions',
+ timeout: 1000,
+ method: 'get',
+ response: ({ query }) => {
+ const { keyword, count } = query;
+ console.log(keyword);
+ return resultSuccess(demoList(keyword, count));
+ },
+ },
+] as MockMethod[];
diff --git a/apps/vue/mock/demo/system.ts b/apps/vue/mock/demo/system.ts
new file mode 100644
index 000000000..c41772736
--- /dev/null
+++ b/apps/vue/mock/demo/system.ts
@@ -0,0 +1,202 @@
+import { MockMethod } from 'vite-plugin-mock';
+import { resultError, resultPageSuccess, resultSuccess } from '../_util';
+
+const accountList = (() => {
+ const result: any[] = [];
+ for (let index = 0; index < 20; index++) {
+ result.push({
+ id: `${index}`,
+ account: '@first',
+ email: '@email',
+ nickname: '@cname()',
+ role: '@first',
+ createTime: '@datetime',
+ remark: '@cword(10,20)',
+ 'status|1': ['0', '1'],
+ });
+ }
+ return result;
+})();
+
+const roleList = (() => {
+ const result: any[] = [];
+ for (let index = 0; index < 4; index++) {
+ result.push({
+ id: index + 1,
+ orderNo: `${index + 1}`,
+ roleName: ['超级管理员', '管理员', '文章管理员', '普通用户'][index],
+ roleValue: '@first',
+ createTime: '@datetime',
+ remark: '@cword(10,20)',
+ menu: [['0', '1', '2'], ['0', '1'], ['0', '2'], ['2']][index],
+ 'status|1': ['0', '1'],
+ });
+ }
+ return result;
+})();
+
+const deptList = (() => {
+ const result: any[] = [];
+ for (let index = 0; index < 3; index++) {
+ result.push({
+ id: `${index}`,
+ deptName: ['华东分部', '华南分部', '西北分部'][index],
+ orderNo: index + 1,
+ createTime: '@datetime',
+ remark: '@cword(10,20)',
+ 'status|1': ['0', '0', '1'],
+ children: (() => {
+ const children: any[] = [];
+ for (let j = 0; j < 4; j++) {
+ children.push({
+ id: `${index}-${j}`,
+ deptName: ['研发部', '市场部', '商务部', '财务部'][j],
+ orderNo: j + 1,
+ createTime: '@datetime',
+ remark: '@cword(10,20)',
+ 'status|1': ['0', '1'],
+ parentDept: `${index}`,
+ children: undefined,
+ });
+ }
+ return children;
+ })(),
+ });
+ }
+ return result;
+})();
+
+const menuList = (() => {
+ const result: any[] = [];
+ for (let index = 0; index < 3; index++) {
+ result.push({
+ id: `${index}`,
+ icon: ['ion:layers-outline', 'ion:git-compare-outline', 'ion:tv-outline'][index],
+ component: 'LAYOUT',
+ type: '0',
+ menuName: ['Dashboard', '权限管理', '功能'][index],
+ permission: '',
+ orderNo: index + 1,
+ createTime: '@datetime',
+ 'status|1': ['0', '0', '1'],
+ children: (() => {
+ const children: any[] = [];
+ for (let j = 0; j < 4; j++) {
+ children.push({
+ id: `${index}-${j}`,
+ type: '1',
+ menuName: ['菜单1', '菜单2', '菜单3', '菜单4'][j],
+ icon: 'ion:document',
+ permission: ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index],
+ component: [
+ '/dashboard/welcome/index',
+ '/dashboard/analysis/index',
+ '/dashboard/workbench/index',
+ '/dashboard/test/index',
+ ][j],
+ orderNo: j + 1,
+ createTime: '@datetime',
+ 'status|1': ['0', '1'],
+ parentMenu: `${index}`,
+ children: (() => {
+ const children: any[] = [];
+ for (let k = 0; k < 4; k++) {
+ children.push({
+ id: `${index}-${j}-${k}`,
+ type: '2',
+ menuName: '按钮' + (j + 1) + '-' + (k + 1),
+ icon: '',
+ permission:
+ ['menu1:view', 'menu2:add', 'menu3:update', 'menu4:del'][index] +
+ ':btn' +
+ (k + 1),
+ component: [
+ '/dashboard/welcome/index',
+ '/dashboard/analysis/index',
+ '/dashboard/workbench/index',
+ '/dashboard/test/index',
+ ][j],
+ orderNo: j + 1,
+ createTime: '@datetime',
+ 'status|1': ['0', '1'],
+ parentMenu: `${index}-${j}`,
+ children: undefined,
+ });
+ }
+ return children;
+ })(),
+ });
+ }
+ return children;
+ })(),
+ });
+ }
+ return result;
+})();
+
+export default [
+ {
+ url: '/basic-api/system/getAccountList',
+ timeout: 100,
+ method: 'get',
+ response: ({ query }) => {
+ const { page = 1, pageSize = 20 } = query;
+ return resultPageSuccess(page, pageSize, accountList);
+ },
+ },
+ {
+ url: '/basic-api/system/getRoleListByPage',
+ timeout: 100,
+ method: 'get',
+ response: ({ query }) => {
+ const { page = 1, pageSize = 20 } = query;
+ return resultPageSuccess(page, pageSize, roleList);
+ },
+ },
+ {
+ url: '/basic-api/system/setRoleStatus',
+ timeout: 500,
+ method: 'post',
+ response: ({ query }) => {
+ const { id, status } = query;
+ return resultSuccess({ id, status });
+ },
+ },
+ {
+ url: '/basic-api/system/getAllRoleList',
+ timeout: 100,
+ method: 'get',
+ response: () => {
+ return resultSuccess(roleList);
+ },
+ },
+ {
+ url: '/basic-api/system/getDeptList',
+ timeout: 100,
+ method: 'get',
+ response: () => {
+ return resultSuccess(deptList);
+ },
+ },
+ {
+ url: '/basic-api/system/getMenuList',
+ timeout: 100,
+ method: 'get',
+ response: () => {
+ return resultSuccess(menuList);
+ },
+ },
+ {
+ url: '/basic-api/system/accountExist',
+ timeout: 500,
+ method: 'post',
+ response: ({ body }) => {
+ const { account } = body || {};
+ if (account && account.indexOf('admin') !== -1) {
+ return resultError('该字段不能包含admin');
+ } else {
+ return resultSuccess(`${account} can use`);
+ }
+ },
+ },
+] as MockMethod[];
diff --git a/apps/vue/mock/demo/table-demo.ts b/apps/vue/mock/demo/table-demo.ts
new file mode 100644
index 000000000..f3a0f16fd
--- /dev/null
+++ b/apps/vue/mock/demo/table-demo.ts
@@ -0,0 +1,52 @@
+import { MockMethod } from 'vite-plugin-mock';
+import { Random } from 'mockjs';
+import { resultPageSuccess } from '../_util';
+
+function getRandomPics(count = 10): string[] {
+ const arr: string[] = [];
+ for (let i = 0; i < count; i++) {
+ arr.push(Random.image('800x600', Random.color(), Random.color(), Random.title()));
+ }
+ return arr;
+}
+
+const demoList = (() => {
+ const result: any[] = [];
+ for (let index = 0; index < 200; index++) {
+ result.push({
+ id: `${index}`,
+ beginTime: '@datetime',
+ endTime: '@datetime',
+ address: '@city()',
+ name: '@cname()',
+ name1: '@cname()',
+ name2: '@cname()',
+ name3: '@cname()',
+ name4: '@cname()',
+ name5: '@cname()',
+ name6: '@cname()',
+ name7: '@cname()',
+ name8: '@cname()',
+ avatar: Random.image('400x400', Random.color(), Random.color(), Random.first()),
+ imgArr: getRandomPics(Math.ceil(Math.random() * 3) + 1),
+ imgs: getRandomPics(Math.ceil(Math.random() * 3) + 1),
+ date: `@date('yyyy-MM-dd')`,
+ time: `@time('HH:mm')`,
+ 'no|100000-10000000': 100000,
+ 'status|1': ['normal', 'enable', 'disable'],
+ });
+ }
+ return result;
+})();
+
+export default [
+ {
+ url: '/basic-api/table/getDemoList',
+ timeout: 100,
+ method: 'get',
+ response: ({ query }) => {
+ const { page = 1, pageSize = 20 } = query;
+ return resultPageSuccess(page, pageSize, demoList);
+ },
+ },
+] as MockMethod[];
diff --git a/apps/vue/mock/demo/tree-demo.ts b/apps/vue/mock/demo/tree-demo.ts
new file mode 100644
index 000000000..6fdcb8591
--- /dev/null
+++ b/apps/vue/mock/demo/tree-demo.ts
@@ -0,0 +1,38 @@
+import { MockMethod } from 'vite-plugin-mock';
+import { resultSuccess } from '../_util';
+
+const demoTreeList = (keyword) => {
+ const result = {
+ list: [] as Recordable[],
+ };
+ for (let index = 0; index < 5; index++) {
+ const children: Recordable[] = [];
+ for (let j = 0; j < 3; j++) {
+ children.push({
+ title: `${keyword ?? ''}选项${index}-${j}`,
+ value: `${index}-${j}`,
+ key: `${index}-${j}`,
+ });
+ }
+ result.list.push({
+ title: `${keyword ?? ''}选项${index}`,
+ value: `${index}`,
+ key: `${index}`,
+ children,
+ });
+ }
+ return result;
+};
+
+export default [
+ {
+ url: '/basic-api/tree/getDemoOptions',
+ timeout: 1000,
+ method: 'get',
+ response: ({ query }) => {
+ const { keyword } = query;
+ console.log(keyword);
+ return resultSuccess(demoTreeList(keyword));
+ },
+ },
+] as MockMethod[];
diff --git a/apps/vue/mock/sys/user.ts b/apps/vue/mock/sys/user.ts
index 8b8989fa4..5b569d4d9 100644
--- a/apps/vue/mock/sys/user.ts
+++ b/apps/vue/mock/sys/user.ts
@@ -111,4 +111,12 @@ export default [
return resultSuccess(undefined, { message: 'Token has been destroyed' });
},
},
+ {
+ url: '/basic-api/testRetry',
+ statusCode: 405,
+ method: 'get',
+ response: () => {
+ return resultError('Error!');
+ },
+ },
] as MockMethod[];
diff --git a/apps/vue/package.json b/apps/vue/package.json
index 07f614248..fc116b104 100644
--- a/apps/vue/package.json
+++ b/apps/vue/package.json
@@ -7,12 +7,13 @@
"url": "https://github.com/anncwb"
},
"scripts": {
- "bootstrap": "yarn install",
+ "commit": "czg",
+ "bootstrap": "pnpm install",
"serve": "npm run dev",
"dev": "vite",
"build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
"build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts",
- "build:no-cache": "yarn clean:cache && npm run build",
+ "build:no-cache": "pnpm clean:cache && npm run build",
"report": "cross-env REPORT=true npm run build",
"type:check": "vue-tsc --noEmit --skipLibCheck",
"preview": "npm run build && vite preview",
@@ -23,124 +24,133 @@
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
- "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
+ "lint:lint-staged": "lint-staged",
"test:unit": "jest",
- "test:unit-coverage": "jest --coverage",
"test:gzip": "npx http-server dist --cors --gzip -c-1",
"test:br": "npx http-server dist --cors --brotli -c-1",
- "reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
+ "reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
"prepare": "husky install",
"gen:icon": "esno ./build/generate/icon/index.ts"
},
"dependencies": {
"@ant-design/colors": "^6.0.0",
- "@ant-design/icons-vue": "^6.0.1",
- "@iconify/iconify": "^2.0.4",
+ "@ant-design/icons-vue": "^6.1.0",
+ "@iconify/iconify": "^2.2.1",
+ "@logicflow/core": "^1.1.13",
+ "@logicflow/extension": "^1.1.13",
"@microsoft/signalr": "^6.0.0",
- "@vueuse/core": "^6.7.4",
- "@vueuse/shared": "^6.7.4",
- "@zxcvbn-ts/core": "^1.0.0-beta.0",
- "ant-design-vue": "2.2.8",
- "axios": "^0.24.0",
- "codemirror": "^5.62.2",
+ "@vue/runtime-core": "^3.2.33",
+ "@vue/shared": "^3.2.33",
+ "@vueuse/core": "^8.3.0",
+ "@vueuse/shared": "^8.3.0",
+ "@zxcvbn-ts/core": "^2.0.1",
+ "ant-design-vue": "^3.2.0",
+ "axios": "^0.26.1",
+ "codemirror": "^5.65.3",
"cropperjs": "^1.5.12",
"crypto-js": "^4.1.1",
- "echarts": "^5.2.2",
+ "cz-git": "^1.3.9",
+ "czg": "^1.3.9",
+ "dayjs": "^1.11.1",
+ "echarts": "^5.3.2",
+ "intro.js": "^5.1.0",
"lodash-es": "^4.17.21",
"mockjs": "^1.1.0",
- "moment": "^2.29.1",
"nprogress": "^0.2.0",
"oidc-client": "^1.11.5",
"path-to-regexp": "^6.2.0",
- "pinia": "2.0.0",
- "qrcode": "^1.4.4",
- "qs": "^6.10.1",
+ "pinia": "2.0.12",
+ "print-js": "^1.6.0",
+ "qrcode": "^1.5.0",
+ "qs": "^6.10.3",
"resize-observer-polyfill": "^1.5.1",
+ "showdown": "^2.1.0",
"simple-uploader.js": "^0.5.6",
- "sortablejs": "^1.14.0",
- "vue": "^3.2.21",
+ "sortablejs": "^1.15.0",
+ "tinymce": "^5.10.3",
+ "vditor": "^3.8.13",
+ "vue": "^3.2.33",
+ "vue-cookies": "^1.8.1",
"vue-i18n": "^9.1.9",
- "vue-json-pretty": "^1.8.1",
- "vue-router": "^4.0.12",
+ "vue-json-pretty": "^2.0.6",
+ "vue-router": "^4.0.14",
"vue-types": "^4.1.1",
- "xlsx": "^0.17.3"
+ "xlsx": "^0.18.5"
},
"devDependencies": {
- "@commitlint/cli": "^14.1.0",
- "@commitlint/config-conventional": "^14.1.0",
- "@iconify/json": "^1.1.422",
- "@purge-icons/generated": "^0.7.0",
+ "@commitlint/cli": "^16.2.3",
+ "@commitlint/config-conventional": "^16.2.1",
+ "@iconify/json": "^2.1.30",
+ "@purge-icons/generated": "^0.8.1",
"@types/codemirror": "^5.60.5",
- "@types/crypto-js": "^4.0.2",
+ "@types/crypto-js": "^4.1.1",
"@types/fs-extra": "^9.0.13",
- "@types/inquirer": "^8.1.3",
+ "@types/inquirer": "^8.2.1",
"@types/intro.js": "^3.0.2",
- "@types/jest": "^27.0.2",
- "@types/lodash-es": "^4.17.5",
- "@types/mockjs": "^1.0.4",
- "@types/node": "^16.11.6",
+ "@types/lodash-es": "^4.17.6",
+ "@types/mockjs": "^1.0.6",
+ "@types/node": "^17.0.25",
"@types/nprogress": "^0.2.0",
- "@types/qrcode": "^1.4.1",
+ "@types/qrcode": "^1.4.2",
"@types/qs": "^6.9.7",
"@types/showdown": "^1.9.4",
"@types/sortablejs": "^1.10.7",
- "@typescript-eslint/eslint-plugin": "^5.3.0",
- "@typescript-eslint/parser": "^5.3.0",
- "@vitejs/plugin-legacy": "^1.6.2",
- "@vitejs/plugin-vue": "^1.9.4",
- "@vitejs/plugin-vue-jsx": "^1.2.0",
- "@vue/compiler-sfc": "3.2.21",
- "@vue/test-utils": "^2.0.0-rc.16",
- "autoprefixer": "^10.4.0",
+ "@typescript-eslint/eslint-plugin": "^5.20.0",
+ "@typescript-eslint/parser": "^5.20.0",
+ "@vitejs/plugin-legacy": "^1.8.1",
+ "@vitejs/plugin-vue": "^2.3.1",
+ "@vitejs/plugin-vue-jsx": "^1.3.10",
+ "@vue/compiler-sfc": "^3.2.33",
+ "@vue/test-utils": "^2.0.0-rc.21",
+ "autoprefixer": "^10.4.4",
"commitizen": "^4.2.4",
- "conventional-changelog-cli": "^2.1.1",
+ "conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3",
- "dotenv": "^10.0.0",
- "eslint": "^8.1.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-define-config": "^1.1.2",
- "eslint-plugin-jest": "^25.2.2",
+ "dotenv": "^16.0.0",
+ "eslint": "^8.13.0",
+ "eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
- "eslint-plugin-vue": "^8.0.3",
- "esno": "^0.10.1",
- "fs-extra": "^10.0.0",
+ "eslint-plugin-vue": "^8.6.0",
+ "esno": "^0.14.1",
+ "fs-extra": "^10.1.0",
"husky": "^7.0.4",
- "inquirer": "^8.2.0",
- "jest": "^27.3.1",
+ "inquirer": "^8.2.2",
"less": "^4.1.2",
- "lint-staged": "11.2.6",
+ "lint-staged": "12.3.7",
"npm-run-all": "^4.1.5",
- "postcss": "^8.3.11",
- "postcss-html": "^1.2.0",
- "postcss-less": "^5.0.0",
- "prettier": "^2.4.1",
+ "picocolors": "^1.0.0",
+ "postcss": "^8.4.12",
+ "postcss-html": "^1.4.1",
+ "postcss-less": "^6.0.0",
+ "prettier": "^2.6.2",
"rimraf": "^3.0.2",
- "rollup-plugin-visualizer": "^5.5.2",
- "stylelint": "^14.0.1",
- "stylelint-config-html": "^1.0.0",
+ "rollup": "^2.70.2",
+ "rollup-plugin-visualizer": "^5.6.0",
+ "stylelint": "^14.7.1",
"stylelint-config-prettier": "^9.0.3",
- "stylelint-config-standard": "^23.0.0",
+ "stylelint-config-recommended": "^7.0.0",
+ "stylelint-config-recommended-vue": "^1.4.0",
+ "stylelint-config-standard": "^25.0.0",
"stylelint-order": "^5.0.0",
- "ts-jest": "^27.0.7",
- "ts-node": "^10.4.0",
- "typescript": "^4.4.4",
- "vite": "^2.6.13",
- "vite-plugin-compression": "^0.3.5",
- "vite-plugin-html": "^2.1.1",
- "vite-plugin-imagemin": "^0.4.6",
+ "ts-node": "^10.7.0",
+ "typescript": "^4.6.3",
+ "vite": "^2.9.5",
+ "vite-plugin-compression": "^0.5.1",
+ "vite-plugin-html": "^3.2.0",
+ "vite-plugin-imagemin": "^0.6.1",
+ "vite-plugin-mkcert": "^1.6.0",
"vite-plugin-mock": "^2.9.6",
- "vite-plugin-purge-icons": "^0.7.0",
- "vite-plugin-pwa": "^0.11.3",
- "vite-plugin-style-import": "^1.3.0",
- "vite-plugin-svg-icons": "^1.0.5",
- "vite-plugin-theme": "^0.8.1",
- "vite-plugin-vue-setup-extend": "^0.1.0",
- "vite-plugin-windicss": "^1.4.12",
- "vue-eslint-parser": "^8.0.1",
- "vue-tsc": "^0.28.10"
+ "vite-plugin-purge-icons": "^0.8.1",
+ "vite-plugin-pwa": "^0.11.13",
+ "vite-plugin-style-import": "^2.0.0",
+ "vite-plugin-svg-icons": "^2.0.1",
+ "vite-plugin-theme": "^0.8.6",
+ "vite-plugin-vue-setup-extend": "^0.4.0",
+ "vite-plugin-windicss": "^1.8.4",
+ "vue-eslint-parser": "^8.3.0",
+ "vue-tsc": "^0.33.9"
},
"resolutions": {
- "//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
"bin-wrapper": "npm:bin-wrapper-china",
"rollup": "^2.56.3",
"gifsicle": "5.2.0"
@@ -156,5 +166,34 @@
"homepage": "https://github.com/anncwb/vue-vben-admin",
"engines": {
"node": "^12 || >=14"
+ },
+ "lint-staged": {
+ "*.{js,jsx,ts,tsx}": [
+ "eslint --fix",
+ "prettier --write"
+ ],
+ "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
+ "prettier --write--parser json"
+ ],
+ "package.json": [
+ "prettier --write"
+ ],
+ "*.vue": [
+ "eslint --fix",
+ "prettier --write",
+ "stylelint --fix"
+ ],
+ "*.{scss,less,styl,html}": [
+ "stylelint --fix",
+ "prettier --write"
+ ],
+ "*.md": [
+ "prettier --write"
+ ]
+ },
+ "config": {
+ "commitizen": {
+ "path": "node_modules/cz-git"
+ }
}
}
diff --git a/apps/vue/src/App.vue b/apps/vue/src/App.vue
index f8df489e3..f4fab182c 100644
--- a/apps/vue/src/App.vue
+++ b/apps/vue/src/App.vue
@@ -12,6 +12,7 @@
import { useTitle } from '/@/hooks/web/useTitle';
import { useLocale } from '/@/locales/useLocale';
+ import 'dayjs/locale/zh-cn';
// support Multi-language
const { getAntdLocale } = useLocale();
diff --git a/apps/vue/src/api/account/accounts.ts b/apps/vue/src/api/account/accounts.ts
index cbfc7cde6..eed2096fe 100644
--- a/apps/vue/src/api/account/accounts.ts
+++ b/apps/vue/src/api/account/accounts.ts
@@ -1,14 +1,18 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { Register, PhoneRegister, PhoneResetPassword } from './model/accountsModel';
import { User } from '/@/api/identity/model/userModel';
+import { ListResultDto } from '../model/baseModel';
+import { format } from '/@/utils/strings';
enum Api {
Register = '/api/account/register',
RegisterByPhone = '/api/account/phone/register',
ResetPassword = '/api/account/phone/reset-password',
+ SendEmailSignCode = '/api/account/email/send-signin-code',
SendPhoneSignCode = '/api/account/phone/send-signin-code',
SendPhoneRegisterCode = '/api/account/phone/send-register-code',
SendPhoneResetPasswordCode = '/api/account/phone/send-password-reset-code',
+ GetTwoFactorProviders = '/api/account/two-factor-providers?userId={userId}',
}
export const register = (input: Register) => {
@@ -41,6 +45,15 @@ export const sendPhoneSignCode = (phoneNumber: string) => {
});
};
+export const sendEmailSignCode = (emailAddress: string) => {
+ return defAbpHttp.post({
+ url: Api.SendEmailSignCode,
+ data: {
+ emailAddress: emailAddress,
+ },
+ });
+};
+
export const sendPhoneRegisterCode = (phoneNumber: string) => {
return defAbpHttp.post({
url: Api.SendPhoneRegisterCode,
@@ -58,3 +71,9 @@ export const sendPhoneResetPasswordCode = (phoneNumber: string) => {
},
});
};
+
+export const getTwoFactorProviders = (userId: string) => {
+ return defAbpHttp.get>>({
+ url: format(Api.GetTwoFactorProviders, { userId: userId }),
+ });
+}
diff --git a/apps/vue/src/api/account/model/profilesModel.ts b/apps/vue/src/api/account/model/profilesModel.ts
index b29236c2e..6f3f8b912 100644
--- a/apps/vue/src/api/account/model/profilesModel.ts
+++ b/apps/vue/src/api/account/model/profilesModel.ts
@@ -28,3 +28,10 @@ export interface ChangePhoneNumber {
export interface TwoFactorEnabled {
enabled: boolean;
}
+
+export interface SendEmailConfirmCode {
+ email: string;
+ appName: string;
+ returnUrl?: string;
+ returnUrlHash?: string;
+}
diff --git a/apps/vue/src/api/account/profiles.ts b/apps/vue/src/api/account/profiles.ts
index e33976f03..e73d1ecbe 100644
--- a/apps/vue/src/api/account/profiles.ts
+++ b/apps/vue/src/api/account/profiles.ts
@@ -5,6 +5,7 @@ import {
ChangePassword,
ChangePhoneNumber,
TwoFactorEnabled,
+ SendEmailConfirmCode,
} from './model/profilesModel';
enum Api {
@@ -15,6 +16,7 @@ enum Api {
ChangePhoneNumber = '/api/account/my-profile/change-phone-number',
GetTwoFactorEnabled = '/api/account/my-profile/two-factor',
ChangeTwoFactorEnabled = '/api/account/my-profile/change-two-factor',
+ SendEmailConfirmLink = '/api/account/my-profile/send-email-confirm-link',
}
export const get = () => {
@@ -37,8 +39,15 @@ export const changePassword = (input: ChangePassword) => {
});
};
+export const sendEmailConfirmLink = (input: SendEmailConfirmCode) => {
+ return defAbpHttp.post({
+ url: Api.SendEmailConfirmLink,
+ data: input,
+ });
+};
+
export const sendChangePhoneNumberCode = (phoneNumber: string) => {
- return defAbpHttp.put({
+ return defAbpHttp.post({
url: Api.SendChangePhoneNumberCode,
data: {
newPhoneNumber: phoneNumber,
diff --git a/apps/vue/src/api/api-gateway/aggregate.ts b/apps/vue/src/api/api-gateway/aggregate.ts
deleted file mode 100644
index d112d1e77..000000000
--- a/apps/vue/src/api/api-gateway/aggregate.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { defAbpHttp } from '/@/utils/http/abp';
-import {
- AggregateRoute,
- CreateAggregateRoute,
- CreateAggregateRouteConfig,
- UpdateAggregateRoute,
- GetAggregateRoutePagedRequest,
- AggregateRoutePagedResult,
-} from './model/aggregateModel';
-import { format } from '/@/utils/strings';
-
-enum Api {
- RemoteService = 'ApiGateway',
- Controller = 'AggregateReRoute',
- GetById = '/api/ApiGateway/Aggregates/{routeId}',
- GetList = '/api/ApiGateway/Globals',
- GetActivedList = '/api/ApiGateway/RouteGroups/Actived',
-}
-
-export const create = (input: CreateAggregateRoute) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'CreateAsync',
- data: input,
- });
-};
-
-export const createConfig = (input: CreateAggregateRouteConfig) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'AddRouteConfigAsync',
- data: input,
- });
-};
-
-export const deleteById = (routeId: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'DeleteAsync',
- params: {
- input: {
- RouteId: routeId,
- },
- },
- });
-};
-
-export const deleteConfig = (routeId: string, routeKey: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'DeleteAsync',
- params: {
- input: {
- RouteId: routeId,
- ReRouteKey: routeKey,
- },
- },
- });
-};
-
-export const getById = (id: string) => {
- return defAbpHttp.get({
- url: format(Api.GetById, { routeId: id }),
- });
-};
-
-export const getList = (input: GetAggregateRoutePagedRequest) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'GetPagedListAsync',
- params: {
- input: input,
- },
- });
-};
-
-export const update = (input: UpdateAggregateRoute) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'UpdateAsync',
- data: input,
- });
-};
diff --git a/apps/vue/src/api/api-gateway/basic.ts b/apps/vue/src/api/api-gateway/basic.ts
deleted file mode 100644
index 7666b7aea..000000000
--- a/apps/vue/src/api/api-gateway/basic.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { defAbpHttp } from '/@/utils/http/abp';
-import { LoadBalancerDescriptor } from './model/basicModel';
-import { ListResultDto } from '../model/baseModel';
-
-enum Api {
- GetLoadBalancerProviders = '/api/ApiGateway/Basic/LoadBalancers',
- GetDefinedAggregatorProvicers = '/api/ApiGateway/Basic/Aggregators',
-}
-
-export const getLoadBalancerProviders = () => {
- return defAbpHttp.get>({
- url: Api.GetLoadBalancerProviders,
- });
-};
-
-export async function getDefinedAggregatorProviders() {
- const { items } = await defAbpHttp.get>({
- url: Api.GetDefinedAggregatorProvicers,
- });
- // 需要对返回格式转换以适配 ApiSelect组件
- return items.map((item) => {
- return {
- provider: item,
- };
- });
-}
diff --git a/apps/vue/src/api/api-gateway/global.ts b/apps/vue/src/api/api-gateway/global.ts
deleted file mode 100644
index bcc92bcc2..000000000
--- a/apps/vue/src/api/api-gateway/global.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { defAbpHttp } from '/@/utils/http/abp';
-import {
- GlobalConfiguration,
- CreateGlobalConfiguration,
- UpdateGlobalConfiguration,
- GetGlobalPagedRequest,
- GlobalConfigurationPagedResult,
-} from './model/globalModel';
-
-enum Api {
- RemoteService = 'ApiGateway',
- Controller = 'GlobalConfiguration',
- GetList = '/api/ApiGateway/Globals',
- GetActivedList = '/api/ApiGateway/RouteGroups/Actived',
-}
-
-export const create = (input: CreateGlobalConfiguration) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'CreateAsync',
- data: input,
- });
-};
-
-export const update = (input: UpdateGlobalConfiguration) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'UpdateAsync',
- data: input,
- });
-};
-
-export const getByAppId = (appId: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'GetAsync',
- params: {
- input: {
- appId: appId,
- },
- },
- });
-};
-
-export const getList = (input: GetGlobalPagedRequest) => {
- return defAbpHttp.get({
- url: Api.GetList,
- params: input,
- });
-};
-
-export const deleteByAppId = (appId: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'DeleteAsync',
- params: {
- input: {
- appId: appId,
- },
- },
- });
-};
diff --git a/apps/vue/src/api/api-gateway/group.ts b/apps/vue/src/api/api-gateway/group.ts
deleted file mode 100644
index 53f058619..000000000
--- a/apps/vue/src/api/api-gateway/group.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { defAbpHttp } from '/@/utils/http/abp';
-import {
- RouteGroup,
- CreateRouteGroup,
- UpdateRouteGroup,
- RouteGroupListResult,
- GetRouteGroupPagedRequest,
- RouteGroupPagedResult,
-} from './model/groupModel';
-
-enum Api {
- RemoteService = 'ApiGateway',
- Controller = 'RouteGroup',
- GetList = '/api/ApiGateway/RouteGroups',
- GetActivedList = '/api/ApiGateway/RouteGroups/Actived',
-}
-
-export const create = (input: CreateRouteGroup) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'CreateAsync',
- data: input,
- });
-};
-
-export const update = (input: UpdateRouteGroup) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'UpdateAsync',
- data: input,
- });
-};
-
-export const getByAppId = (appId: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'GetAsync',
- params: {
- input: {
- appId: appId,
- },
- },
- });
-};
-
-export const getActivedList = () => {
- return defAbpHttp.get({
- url: Api.GetList,
- });
-};
-
-export const getList = (input: GetRouteGroupPagedRequest) => {
- return defAbpHttp.get({
- url: Api.GetList,
- params: input,
- });
-};
-
-export const deleteByAppId = (appId: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'DeleteAsync',
- params: {
- input: {
- appId: appId,
- },
- },
- });
-};
diff --git a/apps/vue/src/api/api-gateway/model/aggregateModel.ts b/apps/vue/src/api/api-gateway/model/aggregateModel.ts
deleted file mode 100644
index e20df54ea..000000000
--- a/apps/vue/src/api/api-gateway/model/aggregateModel.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { PagedAndSortedResultRequestDto, PagedResultDto } from '../../model/baseModel';
-
-export class AggregateRouteConfig {
- reRouteKey = '';
- parameter = '';
- jsonPath = '';
-}
-
-export class CreateAggregateRouteConfig extends AggregateRouteConfig {
- routeId = '';
-}
-
-export class AggregateRouteBase {
- reRouteKeys: string[] = [];
- upstreamPathTemplate = '';
- upstreamHost = '';
- reRouteIsCaseSensitive = true;
- aggregator = '';
- priority?: number;
- upstreamHttpMethod: string[] = [];
-}
-
-export class AggregateRoute extends AggregateRouteBase {
- appId = '';
- name = '';
- reRouteId = '';
- concurrencyStamp = '';
- reRouteKeysConfig: AggregateRouteConfig[] = [];
-}
-
-export class CreateAggregateRoute extends AggregateRouteBase {
- appId = '';
- name = '';
-}
-
-export class UpdateAggregateRoute extends AggregateRouteBase {
- routeId = '';
- concurrencyStamp = '';
-}
-
-export class GetAggregateRoutePagedRequest extends PagedAndSortedResultRequestDto {
- appId = '';
- filter = '';
-}
-
-export class AggregateRoutePagedResult extends PagedResultDto {}
diff --git a/apps/vue/src/api/api-gateway/model/basicModel.ts b/apps/vue/src/api/api-gateway/model/basicModel.ts
deleted file mode 100644
index ec7bc33ba..000000000
--- a/apps/vue/src/api/api-gateway/model/basicModel.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-export class ServiceDiscoveryProvider {
- host!: string;
- port?: number;
- type!: string;
- token?: string;
- configurationKey?: string;
- pollingInterval?: number;
- namespace?: string;
- scheme?: string;
-}
-
-export class RateLimitOptions {
- clientIdHeader?: string;
- httpStatusCode?: number;
- quotaExceededMessage?: string;
- rateLimitCounterPrefix?: string;
- disableRateLimitHeaders!: boolean;
-}
-
-export class RateLimitRuleOptions {
- clientWhitelist?: string[] = [];
- enableRateLimiting!: boolean;
- period?: string;
- periodTimespan?: boolean;
- limit?: number;
-}
-
-export class QoSOptions {
- timeoutValue?: number = 10000;
- durationOfBreak?: number = 60000;
- exceptionsAllowedBeforeBreaking?: number = 50;
-}
-
-export class LoadBalancerOptions {
- type?: string = '';
- key?: string = '';
- expiry?: number = 0;
-}
-
-export class HostAndPort {
- host = '';
- port?: number = 80;
-}
-
-export class HttpHandlerOptions {
- useProxy = false;
- useTracing = false;
- allowAutoRedirect = false;
- useCookieContainer = false;
- maxConnectionsPerServer?: number = 0;
-}
-
-export class FileCacheOptions {
- ttlSeconds?: number = 0;
- region?: string = '';
-}
-
-export class AuthenticationOptions {
- authenticationProviderKey?: string = '';
- allowedScopes?: string[] = [];
-}
-
-export class SecurityOptions {
- ipAllowedList?: string[] = [];
- ipBlockedList?: string[] = [];
-}
-
-export class LoadBalancerDescriptor {
- type!: string;
- displayName!: string;
-}
-
-export const HttpMethods: { [key: string]: string } = {
- ['GET']: 'blue',
- ['POST']: 'green',
- ['PUT']: 'orange',
- ['DELETE']: 'red',
- ['OPTIONS']: 'cyan',
- ['PATCH']: 'pink',
-};
diff --git a/apps/vue/src/api/api-gateway/model/globalModel.ts b/apps/vue/src/api/api-gateway/model/globalModel.ts
deleted file mode 100644
index b28305d8e..000000000
--- a/apps/vue/src/api/api-gateway/model/globalModel.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { PagedAndSortedResultRequestDto, PagedResultDto } from '../../model/baseModel';
-import {
- HttpHandlerOptions,
- LoadBalancerOptions,
- QoSOptions,
- RateLimitOptions,
- ServiceDiscoveryProvider,
-} from './basicModel';
-
-export class GlobalConfigurationBase {
- baseUrl = '';
- requestIdKey?: string = '';
- downstreamScheme?: string = '';
- downstreamHttpVersion?: string = '';
- qoSOptions!: QoSOptions;
- rateLimitOptions!: RateLimitOptions;
- httpHandlerOptions!: HttpHandlerOptions;
- loadBalancerOptions!: LoadBalancerOptions;
- serviceDiscoveryProvider!: ServiceDiscoveryProvider;
-}
-
-export class GlobalConfiguration extends GlobalConfigurationBase {
- appId!: string;
- itemId!: string;
-}
-
-export class CreateGlobalConfiguration extends GlobalConfigurationBase {
- appId = '';
-}
-
-export class UpdateGlobalConfiguration extends GlobalConfigurationBase {
- itemId!: string;
-}
-
-export class GetGlobalPagedRequest extends PagedAndSortedResultRequestDto {
- filter = '';
-}
-
-export class GlobalConfigurationPagedResult extends PagedResultDto {}
diff --git a/apps/vue/src/api/api-gateway/model/groupModel.ts b/apps/vue/src/api/api-gateway/model/groupModel.ts
deleted file mode 100644
index a4ea71765..000000000
--- a/apps/vue/src/api/api-gateway/model/groupModel.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import {
- FullAuditedEntityDto,
- ListResultDto,
- PagedAndSortedResultRequestDto,
- PagedResultDto,
-} from '../../model/baseModel';
-
-export class RouteGroup extends FullAuditedEntityDto {
- id!: string;
- name!: string;
- appId!: string;
- appName!: string;
- appIpAddress?: string;
- description?: string;
- isActive!: boolean;
-}
-
-export class CreateOrUpdateRouteGroup {
- name = '';
- appId = '';
- appName = '';
- isActive = true;
- appIpAddress?: string = '';
- description?: string = '';
-}
-
-export class CreateRouteGroup extends CreateOrUpdateRouteGroup {}
-
-export class UpdateRouteGroup extends CreateOrUpdateRouteGroup {}
-
-export class GetRouteGroupPagedRequest extends PagedAndSortedResultRequestDto {
- filter = '';
- sorting = 'AppId';
-}
-
-export class RouteGroupPagedResult extends PagedResultDto {}
-
-export class RouteGroupListResult extends ListResultDto {}
diff --git a/apps/vue/src/api/api-gateway/model/routeModel.ts b/apps/vue/src/api/api-gateway/model/routeModel.ts
deleted file mode 100644
index 908f47791..000000000
--- a/apps/vue/src/api/api-gateway/model/routeModel.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { PagedAndSortedResultRequestDto, PagedResultDto } from '../../model/baseModel';
-import {
- AuthenticationOptions,
- FileCacheOptions,
- HostAndPort,
- HttpHandlerOptions,
- LoadBalancerOptions,
- QoSOptions,
- RateLimitRuleOptions,
- SecurityOptions,
-} from './basicModel';
-
-export class RouteBase {
- reRouteName = ''; // TODO: 需要修改名称
- downstreamPathTemplate = '';
- changeDownstreamPathTemplate?: { [key: string]: string };
- upstreamPathTemplate = '';
- upstreamHttpMethod!: string[];
- addHeadersToRequest?: { [key: string]: string };
- upstreamHeaderTransform?: { [key: string]: string };
- downstreamHeaderTransform?: { [key: string]: string };
- addClaimsToRequest?: { [key: string]: string };
- routeClaimsRequirement?: { [key: string]: string };
- addQueriesToRequest?: { [key: string]: string };
- requestIdKey? = '';
- reRouteIsCaseSensitive? = true;
- serviceName? = '';
- serviceNamespace? = '';
- downstreamScheme? = 'HTTP';
- downstreamHostAndPorts!: HostAndPort[];
- upstreamHost = '';
- key? = '';
- delegatingHandlers?: string[];
- priority? = 0;
- timeout? = 30000;
- dangerousAcceptAnyServerCertificateValidator?: boolean = true;
- downstreamHttpVersion? = '';
- downstreamHttpMethod? = '';
- securityOptions?: SecurityOptions;
- qoSOptions?: QoSOptions;
- rateLimitOptions?: RateLimitRuleOptions;
- loadBalancerOptions?: LoadBalancerOptions;
- fileCacheOptions?: FileCacheOptions;
- authenticationOptions?: AuthenticationOptions;
- httpHandlerOptions?: HttpHandlerOptions;
-}
-
-export class Route extends RouteBase {
- id!: number;
- appId!: string;
- reRouteId!: string;
- concurrencyStamp!: string;
-}
-
-export class CreateRoute extends RouteBase {
- appId = '';
-}
-
-export class UpdateRoute extends RouteBase {
- reRouteId = '';
- concurrencyStamp!: string;
-}
-
-export class GetRoutePagedRequest extends PagedAndSortedResultRequestDto {
- appId!: string;
- filter = '';
- sorting = 'ReRouteName';
-}
-
-export class RoutePagedResult extends PagedResultDto {}
diff --git a/apps/vue/src/api/api-gateway/route.ts b/apps/vue/src/api/api-gateway/route.ts
deleted file mode 100644
index 104438945..000000000
--- a/apps/vue/src/api/api-gateway/route.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { defAbpHttp } from '/@/utils/http/abp';
-import {
- Route,
- CreateRoute,
- UpdateRoute,
- GetRoutePagedRequest,
- RoutePagedResult,
-} from './model/routeModel';
-
-enum Api {
- RemoteService = 'ApiGateway',
- Controller = 'ReRoute',
- GetList = '/api/ApiGateway/Globals',
- GetActivedList = '/api/ApiGateway/RouteGroups/Actived',
-}
-
-export const create = (input: CreateRoute) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'CreateAsync',
- data: input,
- });
-};
-
-export const deleteById = (id: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'DeleteAsync',
- params: {
- input: {
- RouteId: id,
- },
- },
- });
-};
-
-export const getById = (id: string) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'GetAsync',
- params: {
- input: {
- RouteId: id,
- },
- },
- });
-};
-
-export const getList = (input: GetRoutePagedRequest) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'GetListAsync',
- params: {
- input: input,
- },
- });
-};
-
-export const update = (input: UpdateRoute) => {
- return defAbpHttp.request({
- service: Api.RemoteService,
- controller: Api.Controller,
- action: 'UpdateAsync',
- data: input,
- });
-};
diff --git a/apps/vue/src/api/caching-management/cache/index.ts b/apps/vue/src/api/caching-management/cache/index.ts
new file mode 100644
index 000000000..fcfaa16c3
--- /dev/null
+++ b/apps/vue/src/api/caching-management/cache/index.ts
@@ -0,0 +1,56 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import {
+ CacheKeys,
+ CacheValue,
+ CacheRefreshRequest,
+ GetCacheKeysRequest,
+} from './model';
+
+const remoteServiceName = 'CachingManagement';
+const controllerName = 'Cache';
+
+export const getKeys = (input: GetCacheKeysRequest) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetKeysAsync',
+ params: {
+ input: input,
+ },
+ });
+};
+
+export const getValue = (key: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetValueAsync',
+ params: {
+ input: {
+ key: key,
+ }
+ },
+ });
+};
+
+export const refresh = (input: CacheRefreshRequest) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'RefreshAsync',
+ data: input,
+ });
+};
+
+export const remove = (key: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'RemoveAsync',
+ params: {
+ input: {
+ key: key,
+ }
+ },
+ });
+};
diff --git a/apps/vue/src/api/caching-management/cache/model/index.ts b/apps/vue/src/api/caching-management/cache/model/index.ts
new file mode 100644
index 000000000..423851bf8
--- /dev/null
+++ b/apps/vue/src/api/caching-management/cache/model/index.ts
@@ -0,0 +1,23 @@
+export interface CacheKeys {
+ nextMarker: string;
+ keys: string[],
+}
+
+export interface CacheValue {
+ type: string;
+ size: number;
+ expiration?: Date;
+ values: {[key:string]: any};
+}
+
+export interface CacheRefreshRequest {
+ key: string;
+ absoluteExpiration?: Date;
+ slidingExpiration?: Date;
+}
+
+export interface GetCacheKeysRequest {
+ prefix?: string;
+ marker?: string;
+ filter?: string;
+}
diff --git a/apps/vue/src/api/demo/error.ts b/apps/vue/src/api/demo/error.ts
deleted file mode 100644
index 3ce607217..000000000
--- a/apps/vue/src/api/demo/error.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { defHttp } from '/@/utils/http/axios';
-
-enum Api {
- // The address does not exist
- Error = '/error',
-}
-
-/**
- * @description: Trigger ajax error
- */
-
-export const fireErrorApi = () => defHttp.get({ url: Api.Error });
diff --git a/apps/vue/src/api/identity/model/claimModel.ts b/apps/vue/src/api/identity/model/claimModel.ts
index 8675f4df2..ee5988598 100644
--- a/apps/vue/src/api/identity/model/claimModel.ts
+++ b/apps/vue/src/api/identity/model/claimModel.ts
@@ -45,3 +45,19 @@ export class GetIdentityClaimTypePagedRequest extends PagedAndSortedResultReques
export class IdentityClaimTypeListResult extends ListResultDto {}
export class IdentityClaimTypePagedResult extends PagedResultDto {}
+
+export class IdentityClaim {
+ claimType = '';
+ claimValue = '';
+}
+
+export class DeleteIdentityClaim {
+ claimType = '';
+ claimValue = '';
+}
+
+export class CreateIdentityClaim extends IdentityClaim {}
+
+export class UpdateIdentityClaim extends IdentityClaim {
+ newClaimValue!: string;
+}
diff --git a/apps/vue/src/api/identity/model/roleModel.ts b/apps/vue/src/api/identity/model/roleModel.ts
index b6feca7a8..cc00a93e5 100644
--- a/apps/vue/src/api/identity/model/roleModel.ts
+++ b/apps/vue/src/api/identity/model/roleModel.ts
@@ -3,6 +3,7 @@ import {
PagedAndSortedResultRequestDto,
PagedResultDto,
} from '../../model/baseModel';
+import { IdentityClaim } from './claimModel';
export class RoleBase {
name!: string;
@@ -38,23 +39,7 @@ export class ChangeRoleOrganizationUnitDto {
organizationUnitIds: string[] = [];
}
-export class RoleClaimBase {
- claimType = '';
- claimValue = '';
-}
-
-export class DeleteRoleClaim {
- claimType = '';
- claimValue = '';
-}
-
-export class CreateRoleClaim extends RoleClaimBase {}
-
-export class UpdateRoleClaim extends RoleClaimBase {
- newClaimValue!: string;
-}
-
-export class RoleClaim extends RoleClaimBase {
+export class RoleClaim extends IdentityClaim {
id!: string;
}
diff --git a/apps/vue/src/api/identity/model/userModel.ts b/apps/vue/src/api/identity/model/userModel.ts
index 6db28b79e..eee5c67fd 100644
--- a/apps/vue/src/api/identity/model/userModel.ts
+++ b/apps/vue/src/api/identity/model/userModel.ts
@@ -5,6 +5,7 @@ import {
PagedAndSortedResultRequestDto,
PagedResultDto,
} from '../../model/baseModel';
+import { IdentityClaim } from './claimModel';
/** 用户对象接口 */
export interface IUser {
@@ -29,6 +30,10 @@ export interface ChangePassword {
newPassword: string;
}
+export interface SetPassword {
+ password: string;
+}
+
/** 用户对象 */
export class User extends FullAuditedEntityDto implements IUser {
/** 用户名 */
@@ -96,18 +101,7 @@ export class GetUserPagedRequest extends PagedAndSortedResultRequestDto {
export class UserPagedResult extends PagedResultDto {}
-export class UserClaimBase {
- claimType = '';
- claimValue = '';
-}
-
-export class CreateUserClaim extends UserClaimBase {}
-
-export class UpdateUserClaim extends UserClaimBase {
- newClaimValue!: string;
-}
-
-export class UserClaim extends UserClaimBase {
+export class UserClaim extends IdentityClaim {
id!: string;
}
diff --git a/apps/vue/src/api/identity/organization-units.ts b/apps/vue/src/api/identity/organization-units.ts
index a1ff35631..1630ced15 100644
--- a/apps/vue/src/api/identity/organization-units.ts
+++ b/apps/vue/src/api/identity/organization-units.ts
@@ -15,8 +15,8 @@ enum Api {
Create = '/api/identity/organization-units',
Delete = '/api/identity/organization-units/{id}',
Update = '/api/identity/organization-units/{id}',
- GetById = '/api/identity/organization-units/{id}',
- GetList = '/api/identity/organization-units',
+ GetById = '/api/identity/organization-units/{id}',
+ GetList = '/api/identity/organization-units',
GetAllList = '/api/identity/organization-units/all',
GetUnaddedMemberList = '/api/identity/organization-units/{id}/unadded-users',
GetMemberList = '/api/identity/organization-units/{id}/users',
@@ -47,6 +47,12 @@ export const deleteById = (id: string) => {
});
};
+export const get = (id: string) => {
+ return defAbpHttp.get({
+ url: format(Api.GetById, { id: id }),
+ });
+}
+
export const getList = (input: GetOrganizationUnitPagedRequest) => {
return defAbpHttp.get({
url: Api.GetList,
diff --git a/apps/vue/src/api/identity/role.ts b/apps/vue/src/api/identity/role.ts
index ca19a2bbc..fc352e0af 100644
--- a/apps/vue/src/api/identity/role.ts
+++ b/apps/vue/src/api/identity/role.ts
@@ -6,21 +6,20 @@ import {
RolePagedResult,
UpdateRole,
CreateRole,
- CreateRoleClaim,
RoleClaimListResult,
- UpdateRoleClaim,
RoleClaim,
} from './model/roleModel';
import { format } from '/@/utils/strings';
+import { CreateIdentityClaim, UpdateIdentityClaim } from './model/claimModel';
enum Api {
RemoteService = 'AbpIdentity',
Controller = 'IdentityRole',
Create = '/api/identity/roles',
CreateClaim = '/api/identity/roles/{id}/claims',
- DeleteClaim = '',
+ DeleteClaim = '/api/identity/roles/{id}/claims',
Update = '/api/identity/roles/{id}',
- UpdateClaim = '',
+ UpdateClaim = '/api/identity/roles/{id}/claims',
GetById = '/api/identity/roles/{id}',
GetAllList = '/api/identity/roles/all',
GetClaimList = '/api/identity/roles/{id}/claims',
@@ -36,7 +35,7 @@ export const create = (input: CreateRole) => {
});
};
-export const createClaim = (id: string, input: CreateRoleClaim) => {
+export const createClaim = (id: string, input: CreateIdentityClaim) => {
return defAbpHttp.post({
url: format(Api.CreateClaim, { id: id }),
data: input,
@@ -50,9 +49,9 @@ export const update = (id: string, input: UpdateRole) => {
});
};
-export const updateClaim = (id: string, input: UpdateRoleClaim) => {
+export const updateClaim = (id: string, input: UpdateIdentityClaim) => {
return defAbpHttp.put({
- url: format(Api.CreateClaim, { id: id }),
+ url: format(Api.UpdateClaim, { id: id }),
data: input,
});
};
diff --git a/apps/vue/src/api/identity/user.ts b/apps/vue/src/api/identity/user.ts
index 8ea73dc2d..c7362826d 100644
--- a/apps/vue/src/api/identity/user.ts
+++ b/apps/vue/src/api/identity/user.ts
@@ -3,16 +3,15 @@ import {
User,
UserClaimListResult,
CreateUser,
- CreateUserClaim,
- ChangePassword,
+ SetPassword,
UpdateUser,
GetUserPagedRequest,
UserPagedResult,
- UpdateUserClaim,
UserClaim,
} from './model/userModel';
import { RoleListResult } from './model/roleModel';
import { format } from '/@/utils/strings';
+import { CreateIdentityClaim, UpdateIdentityClaim } from './model/claimModel';
enum Api {
Create = '/api/identity/users',
@@ -40,14 +39,14 @@ export const create = (input: CreateUser) => {
});
};
-export const createClaim = (id: string, input: CreateUserClaim) => {
+export const createClaim = (id: string, input: CreateIdentityClaim) => {
return defAbpHttp.post({
url: format(Api.CreateClaim, { id: id }),
data: input,
});
};
-export const changePassword = (id: string, input: ChangePassword) => {
+export const changePassword = (id: string, input: SetPassword) => {
return defAbpHttp.put({
url: Api.ChangePassword,
data: input,
@@ -116,7 +115,7 @@ export const update = (id: string, input: UpdateUser) => {
});
};
-export const updateClaim = (id: string, input: UpdateUserClaim) => {
+export const updateClaim = (id: string, input: UpdateIdentityClaim) => {
return defAbpHttp.put({
url: format(Api.CreateClaim, { id: id }),
data: input,
diff --git a/apps/vue/src/api/localization/languages.ts b/apps/vue/src/api/localization/languages.ts
index afc1a9c77..ee2971966 100644
--- a/apps/vue/src/api/localization/languages.ts
+++ b/apps/vue/src/api/localization/languages.ts
@@ -1,56 +1,12 @@
import { defAbpHttp } from '/@/utils/http/abp';
-import {
- Language,
- LanguageCreateOrUpdate,
- GetLanguagePagedRequest,
- LanguageListResult,
- LanguagePagedResult,
-} from './model/languagesModel';
-import { format } from '/@/utils/strings';
+import { LanguageListResult } from './model/languagesModel';
enum Api {
- Create = '/api/localization/languages',
- DeleteById = '/api/localization/languages/{id}',
- GetById = '/api/localization/languages/{id}',
- GetList = '/api/localization/languages',
- GetAllList = '/api/localization/languages/all',
+ GetList = '/api/abp/localization/languages',
}
-export const get = (id: string) => {
- return defAbpHttp.get({
- url: format(Api.GetById, { id: id }),
- });
-};
-
-export const create = (input: LanguageCreateOrUpdate) => {
- return defAbpHttp.post({
- url: Api.Create,
- data: input,
- });
-};
-
-export const deleteById = (id: string) => {
- return defAbpHttp.delete({
- url: format(Api.GetById, { id: id }),
- });
-};
-
-export const update = (id: string, input: LanguageCreateOrUpdate) => {
- return defAbpHttp.put({
- url: format(Api.GetById, { id: id }),
- data: input,
- });
-};
-
-export const getList = (input: GetLanguagePagedRequest) => {
- return defAbpHttp.get({
- url: Api.GetList,
- params: input,
- });
-};
-
-export const getAll = () => {
+export const getList = () => {
return defAbpHttp.get({
- url: Api.GetAllList,
+ url: Api.GetList,
});
};
diff --git a/apps/vue/src/api/localization/model/resourcesModel.ts b/apps/vue/src/api/localization/model/resourcesModel.ts
index 6b2bb3e14..b5549032e 100644
--- a/apps/vue/src/api/localization/model/resourcesModel.ts
+++ b/apps/vue/src/api/localization/model/resourcesModel.ts
@@ -1,13 +1,10 @@
import {
- AuditedEntityDto,
ListResultDto,
PagedAndSortedResultRequestDto,
PagedResultDto,
} from '/@/api/model/baseModel';
-export interface Resource extends AuditedEntityDto {
- id: string;
- enable: boolean;
+export interface Resource {
name: string;
displayName: string;
description: string;
diff --git a/apps/vue/src/api/localization/model/textsModel.ts b/apps/vue/src/api/localization/model/textsModel.ts
index e4121c488..1452057e6 100644
--- a/apps/vue/src/api/localization/model/textsModel.ts
+++ b/apps/vue/src/api/localization/model/textsModel.ts
@@ -1,7 +1,6 @@
-import { PagedAndSortedResultRequestDto, PagedResultDto } from '/@/api/model/baseModel';
+import { ListResultDto } from '/@/api/model/baseModel';
export interface Text {
- id?: number;
key: boolean;
value: string;
cultureName: string;
@@ -9,7 +8,6 @@ export interface Text {
}
export interface TextDifference {
- id: number;
key: boolean;
value: string;
cultureName: string;
@@ -18,19 +16,14 @@ export interface TextDifference {
targetValue: string;
}
-export interface TextCreateOrUpdate {
- value: string;
-}
-
-export interface TextCreate extends TextCreateOrUpdate {
+export interface SetTextInput {
key: boolean;
+ value: string;
cultureName: string;
resourceName: string;
}
-export type TextUpdate = TextCreateOrUpdate;
-
-export class TextPagedResult extends PagedResultDto {}
+export class TextListResult extends ListResultDto {}
export interface GetTextByKey {
key: boolean;
@@ -38,7 +31,7 @@ export interface GetTextByKey {
resourceName: string;
}
-export class GetTextPagedRequest extends PagedAndSortedResultRequestDto {
+export class GetTextRequest {
filter = '';
cultureName = '';
targetCultureName = '';
diff --git a/apps/vue/src/api/localization/resources.ts b/apps/vue/src/api/localization/resources.ts
index 4f8e98a68..7c9b7db56 100644
--- a/apps/vue/src/api/localization/resources.ts
+++ b/apps/vue/src/api/localization/resources.ts
@@ -1,56 +1,12 @@
import { defAbpHttp } from '/@/utils/http/abp';
-import {
- Resource,
- ResourceCreateOrUpdate,
- GetResourcePagedRequest,
- ResourceListResult,
- ResourcePagedResult,
-} from './model/resourcesModel';
-import { format } from '/@/utils/strings';
+import { ResourceListResult } from './model/resourcesModel';
enum Api {
- Create = '/api/localization/resources',
- DeleteById = '/api/localization/resources/{id}',
- GetById = '/api/localization/resources/{id}',
- GetList = '/api/localization/resources',
- GetAllList = '/api/localization/resources/all',
+ GetList = '/api/abp/localization/resources',
}
-export const get = (id: string) => {
- return defAbpHttp.get({
- url: format(Api.GetById, { id: id }),
- });
-};
-
-export const create = (input: ResourceCreateOrUpdate) => {
- return defAbpHttp.post({
- url: Api.Create,
- data: input,
- });
-};
-
-export const deleteById = (id: string) => {
- return defAbpHttp.delete({
- url: format(Api.GetById, { id: id }),
- });
-};
-
-export const update = (id: string, input: ResourceCreateOrUpdate) => {
- return defAbpHttp.put({
- url: format(Api.GetById, { id: id }),
- data: input,
- });
-};
-
-export const getList = (input: GetResourcePagedRequest) => {
- return defAbpHttp.get({
- url: Api.GetList,
- params: input,
- });
-};
-
-export const getAll = () => {
+export const getList = () => {
return defAbpHttp.get({
- url: Api.GetAllList,
+ url: Api.GetList,
});
};
diff --git a/apps/vue/src/api/localization/texts.ts b/apps/vue/src/api/localization/texts.ts
index 310d00ea3..487b5db6c 100644
--- a/apps/vue/src/api/localization/texts.ts
+++ b/apps/vue/src/api/localization/texts.ts
@@ -1,28 +1,18 @@
import { defAbpHttp } from '/@/utils/http/abp';
import {
Text,
- TextCreate,
- TextUpdate,
+ SetTextInput,
GetTextByKey,
- GetTextPagedRequest,
- TextPagedResult,
+ GetTextRequest,
+ TextListResult,
} from './model/textsModel';
-import { format } from '/@/utils/strings';
enum Api {
- Create = '/api/localization/texts',
- DeleteById = '/api/localization/texts/{id}',
- GetById = '/api/localization/texts/{id}',
- GetList = '/api/localization/texts',
- GetByCulture = '/api/localization/texts/by-culture-key',
+ SetText = '/api/localization/texts',
+ GetList = '/api/abp/localization/texts',
+ GetByCulture = '/api/abp/localization/texts/by-culture-key',
}
-export const get = (id: number) => {
- return defAbpHttp.get({
- url: format(Api.GetById, { id: id }),
- });
-};
-
export const getByCulture = (input: GetTextByKey) => {
return defAbpHttp.get({
url: Api.GetByCulture,
@@ -30,28 +20,15 @@ export const getByCulture = (input: GetTextByKey) => {
});
};
-export const create = (input: TextCreate) => {
- return defAbpHttp.post({
- url: Api.Create,
- data: input,
- });
-};
-
-export const deleteById = (id: string) => {
- return defAbpHttp.delete({
- url: format(Api.GetById, { id: id }),
- });
-};
-
-export const update = (id: number, input: TextUpdate) => {
+export const setText = (input: SetTextInput) => {
return defAbpHttp.put({
- url: format(Api.GetById, { id: id }),
+ url: Api.SetText,
data: input,
});
};
-export const getList = (input: GetTextPagedRequest) => {
- return defAbpHttp.get({
+export const getList = (input: GetTextRequest) => {
+ return defAbpHttp.get({
url: Api.GetList,
params: input,
});
diff --git a/apps/vue/src/api/messages/notifications.ts b/apps/vue/src/api/messages/notifications.ts
index 80f0d035d..6bab1c12f 100644
--- a/apps/vue/src/api/messages/notifications.ts
+++ b/apps/vue/src/api/messages/notifications.ts
@@ -3,13 +3,34 @@ import {
GetNotificationPagedRequest,
NotificationPagedResult,
NotificationGroupListResult,
+ NotificationReadState,
} from './model/notificationsModel';
+import { format } from '/@/utils/strings';
enum Api {
+ GetById = '/api/my-notifilers/{id}',
GetList = '/api/my-notifilers',
GetAssignableNotifiers = '/api/my-notifilers/assignables',
+ Read = '/api/my-notifilers/{id}/read',
+ MarkReadState = '/api/my-notifilers/mark-read-state',
}
+export const markReadState = (ids: string[], state: NotificationReadState = NotificationReadState.Read) => {
+ return defHttp.put({
+ url: Api.MarkReadState,
+ data: {
+ idList: ids,
+ state: state,
+ },
+ });
+};
+
+export const deleteById = (id: string) => {
+ return defHttp.delete({
+ url: format(Api.GetById, { id: id }),
+ });
+};
+
export const getList = (input: GetNotificationPagedRequest) => {
return defHttp.get({
url: Api.GetList,
diff --git a/apps/vue/src/api/multi-tenancy/models/tenantModel.ts b/apps/vue/src/api/multi-tenancy/models/tenantModel.ts
index 7145179c6..2db8da259 100644
--- a/apps/vue/src/api/multi-tenancy/models/tenantModel.ts
+++ b/apps/vue/src/api/multi-tenancy/models/tenantModel.ts
@@ -40,4 +40,5 @@ export class FindTenantResult {
name = '';
tenantId = '';
success = '';
+ isActive = false;
}
diff --git a/apps/vue/src/api/openiddict/applications/index.ts b/apps/vue/src/api/openiddict/applications/index.ts
new file mode 100644
index 000000000..fc3804c00
--- /dev/null
+++ b/apps/vue/src/api/openiddict/applications/index.ts
@@ -0,0 +1,71 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import {
+ OpenIddictApplicationDto,
+ OpenIddictApplicationCreateDto,
+ OpenIddictApplicationUpdateDto,
+ OpenIddictApplicationGetListInput,
+} from './model';
+import { PagedResultDto } from '../../model/baseModel';
+
+const remoteServiceName = 'AbpOpenIddict';
+const controllerName = 'OpenIddictApplication';
+
+export const getById = (id: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetAsync',
+ params: {
+ id: id,
+ },
+ });
+};
+
+export const getList = (input: OpenIddictApplicationGetListInput) => {
+ return defAbpHttp.get>({
+ url: '/api/openiddict/applications',
+ params: input,
+ }, {
+ withToken: false
+ });
+};
+
+// export const getList = (input: OpenIddictApplicationGetListInput) => {
+// return defAbpHttp.pagedRequest({
+// service: remoteServiceName,
+// controller: controllerName,
+// action: 'GetListAsync',
+// params: {
+// input: input,
+// },
+// });
+// };
+
+export const deleteById = (id: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'DeleteAsync',
+ params: {
+ id: id,
+ },
+ });
+};
+
+export const create = (input: OpenIddictApplicationCreateDto) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'CreateAsync',
+ data: input,
+ });
+};
+
+export const update = (input: OpenIddictApplicationUpdateDto) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'UpdateAsync',
+ data: input,
+ });
+};
diff --git a/apps/vue/src/api/openiddict/applications/model/index.ts b/apps/vue/src/api/openiddict/applications/model/index.ts
new file mode 100644
index 000000000..9a1734089
--- /dev/null
+++ b/apps/vue/src/api/openiddict/applications/model/index.ts
@@ -0,0 +1,47 @@
+import { ExtensibleObject, ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel';
+
+export interface OpenIddictApplicationDto extends ExtensibleAuditedEntity {
+ clientId: string;
+ clientSecret?: string;
+ consentType?: string;
+ displayName?: string;
+ displayNames?: {[key: string]: string};
+ endpoints?: string[];
+ grantTypes?: string[];
+ responseTypes?: string[];
+ scopes?: string[];
+ postLogoutRedirectUris?: string[];
+ properties?: {[key: string]: string};
+ redirectUris?: string[];
+ requirements?: string[];
+ type?: string;
+ clientUri?: string;
+ logoUri?: string;
+}
+
+export interface OpenIddictApplicationGetListInput extends PagedAndSortedResultRequestDto {
+ filter?: string;
+}
+
+interface OpenIddictApplicationCreateOrUpdateDto extends ExtensibleObject {
+ clientId: string;
+ clientSecret?: string;
+ consentType?: string;
+ displayName?: string;
+ displayNames?: {[key: string]: string};
+ endpoints?: string[];
+ grantTypes?: string[];
+ responseTypes?: string[];
+ scopes?: string[];
+ postLogoutRedirectUris?: string[];
+ properties?: {[key: string]: string};
+ redirectUris?: string[];
+ requirements?: string[];
+ type?: string;
+ clientUri?: string;
+ logoUri?: string;
+}
+
+export type OpenIddictApplicationCreateDto = OpenIddictApplicationCreateOrUpdateDto;
+
+export type OpenIddictApplicationUpdateDto = OpenIddictApplicationCreateOrUpdateDto;
diff --git a/apps/vue/src/api/openiddict/authorizations/index.ts b/apps/vue/src/api/openiddict/authorizations/index.ts
new file mode 100644
index 000000000..5560f078e
--- /dev/null
+++ b/apps/vue/src/api/openiddict/authorizations/index.ts
@@ -0,0 +1,51 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import {
+ OpenIddictAuthorizationDto,
+ OpenIddictAuthorizationGetListInput,
+} from './model';
+import { PagedResultDto } from '../../model/baseModel';
+
+const remoteServiceName = 'AbpOpenIddict';
+const controllerName = 'OpenIddictAuthorization';
+
+export const getById = (id: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetAsync',
+ params: {
+ id: id,
+ },
+ });
+};
+
+// export const getList = (input: OpenIddictAuthorizationGetListInput) => {
+// return defAbpHttp.pagedRequest({
+// service: remoteServiceName,
+// controller: controllerName,
+// action: 'GetListAsync',
+// params: {
+// input: input,
+// },
+// });
+// };
+
+export const getList = (input: OpenIddictAuthorizationGetListInput) => {
+ return defAbpHttp.get>({
+ url: '/api/openiddict/authorizations',
+ params: input,
+ }, {
+ withToken: false
+ });
+};
+
+export const deleteById = (id: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'DeleteAsync',
+ params: {
+ id: id,
+ },
+ });
+};
diff --git a/apps/vue/src/api/openiddict/authorizations/model/index.ts b/apps/vue/src/api/openiddict/authorizations/model/index.ts
new file mode 100644
index 000000000..41a62d119
--- /dev/null
+++ b/apps/vue/src/api/openiddict/authorizations/model/index.ts
@@ -0,0 +1,21 @@
+import { ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel';
+
+export interface OpenIddictAuthorizationDto extends ExtensibleAuditedEntity {
+ applicationId?: string;
+ creationDate?: Date;
+ properties?: {[key: string]: string};
+ scopes?: string[];
+ type?: string;
+ status?: string;
+ subject?: string;
+}
+
+export interface OpenIddictAuthorizationGetListInput extends PagedAndSortedResultRequestDto {
+ filter?: string;
+ subject?: string;
+ clientId?: string;
+ status?: string;
+ type?: string;
+ beginCreationTime?: Date;
+ endCreationTime?: string;
+}
diff --git a/apps/vue/src/api/openiddict/scopes/index.ts b/apps/vue/src/api/openiddict/scopes/index.ts
new file mode 100644
index 000000000..2811f623a
--- /dev/null
+++ b/apps/vue/src/api/openiddict/scopes/index.ts
@@ -0,0 +1,61 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import {
+ OpenIddictScopeDto,
+ OpenIddictScopeCreateDto,
+ OpenIddictScopeUpdateDto,
+ OpenIddictScopeGetListInput,
+} from './model';
+
+const remoteServiceName = 'AbpOpenIddict';
+const controllerName = 'OpenIddictScope';
+
+export const getById = (id: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetAsync',
+ params: {
+ id: id,
+ },
+ });
+};
+
+export const getList = (input: OpenIddictScopeGetListInput) => {
+ return defAbpHttp.pagedRequest({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetListAsync',
+ params: {
+ input: input,
+ },
+ });
+};
+
+export const deleteById = (id: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'DeleteAsync',
+ params: {
+ id: id,
+ },
+ });
+};
+
+export const create = (input: OpenIddictScopeCreateDto) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'CreateAsync',
+ data: input,
+ });
+};
+
+export const update = (input: OpenIddictScopeUpdateDto) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'UpdateAsync',
+ data: input,
+ });
+};
diff --git a/apps/vue/src/api/openiddict/scopes/model/index.ts b/apps/vue/src/api/openiddict/scopes/model/index.ts
new file mode 100644
index 000000000..9b8de3ef7
--- /dev/null
+++ b/apps/vue/src/api/openiddict/scopes/model/index.ts
@@ -0,0 +1,29 @@
+import { ExtensibleObject, ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel';
+
+export interface OpenIddictScopeDto extends ExtensibleAuditedEntity {
+ name: string;
+ displayName?: string;
+ displayNames?: {[key: string]: string};
+ description?: string;
+ descriptions?: {[key: string]: string};
+ properties?: {[key: string]: string};
+ resources?: {[key: string]: string};
+}
+
+export interface OpenIddictScopeGetListInput extends PagedAndSortedResultRequestDto {
+ filter?: string;
+}
+
+interface OpenIddictScopeCreateOrUpdateDto extends ExtensibleObject {
+ name: string;
+ displayName?: string;
+ displayNames?: {[key: string]: string};
+ description?: string;
+ descriptions?: {[key: string]: string};
+ properties?: {[key: string]: string};
+ resources?: {[key: string]: string};
+}
+
+export type OpenIddictScopeCreateDto = OpenIddictScopeCreateOrUpdateDto;
+
+export type OpenIddictScopeUpdateDto = OpenIddictScopeCreateOrUpdateDto;
diff --git a/apps/vue/src/api/openiddict/tokens/index.ts b/apps/vue/src/api/openiddict/tokens/index.ts
new file mode 100644
index 000000000..d7f53cc44
--- /dev/null
+++ b/apps/vue/src/api/openiddict/tokens/index.ts
@@ -0,0 +1,68 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import {
+ OpenIddictTokenDto,
+ OpenIddictTokenGetListInput,
+} from './model';
+import { PagedResultDto } from '../../model/baseModel';
+
+const remoteServiceName = 'AbpOpenIddict';
+const controllerName = 'OpenIddictToken';
+
+// export const getById = (id: string) => {
+// return defAbpHttp.request({
+// service: remoteServiceName,
+// controller: controllerName,
+// action: 'GetAsync',
+// params: {
+// id: id,
+// },
+// });
+// };
+
+export const getById = (id: string) => {
+ return defAbpHttp.get({
+ url: `/api/openiddict/tokens/${id}`,
+ }, {
+ withToken: false
+ });
+};
+
+// export const getList = (input: OpenIddictTokenGetListInput) => {
+// return defAbpHttp.pagedRequest({
+// service: remoteServiceName,
+// controller: controllerName,
+// action: 'GetListAsync',
+// params: {
+// input: input,
+// },
+// });
+// };
+
+export const getList = (input: OpenIddictTokenGetListInput) => {
+ return defAbpHttp.get>({
+ url: '/api/openiddict/tokens',
+ params: input,
+ }, {
+ withToken: false
+ });
+};
+
+
+// export const deleteById = (id: string) => {
+// return defAbpHttp.request({
+// service: remoteServiceName,
+// controller: controllerName,
+// action: 'DeleteAsync',
+// params: {
+// id: id,
+// },
+// });
+// };
+
+export const deleteById = (id: string) => {
+ return defAbpHttp.delete({
+ url: `/api/openiddict/tokens/${id}`,
+ }, {
+ withToken: false
+ });
+};
diff --git a/apps/vue/src/api/openiddict/tokens/model/index.ts b/apps/vue/src/api/openiddict/tokens/model/index.ts
new file mode 100644
index 000000000..273740fac
--- /dev/null
+++ b/apps/vue/src/api/openiddict/tokens/model/index.ts
@@ -0,0 +1,29 @@
+import { ExtensibleAuditedEntity, PagedAndSortedResultRequestDto } from '../../../model/baseModel';
+
+export interface OpenIddictTokenDto extends ExtensibleAuditedEntity {
+ applicationId?: string;
+ authorizationId?: string;
+ creationDate?: Date;
+ expirationDate?: Date;
+ payload?: string;
+ properties?: string;
+ redemptionDate?: Date;
+ referenceId?: string;
+ type?: string;
+ status?: string;
+ subject?: string;
+}
+
+export interface OpenIddictTokenGetListInput extends PagedAndSortedResultRequestDto {
+ filter?: string;
+ clientId?: string;
+ authorizationId?: string;
+ subject?: string;
+ status?: string;
+ type?: string;
+ referenceId?: string;
+ beginCreationTime?: Date;
+ endCreationTime?: string;
+ beginExpirationDate?: Date;
+ endExpirationDate?: Date;
+}
diff --git a/apps/vue/src/api/sys/model/menuModel.ts b/apps/vue/src/api/sys/model/menuModel.ts
index 72ac1d796..a4bd4b621 100644
--- a/apps/vue/src/api/sys/model/menuModel.ts
+++ b/apps/vue/src/api/sys/model/menuModel.ts
@@ -1,8 +1,7 @@
-import type { RouteMeta } from '/@/router/types';
+import type { RouteMeta } from 'vue-router';
export interface RouteItem {
path: string;
component: any;
- components?: any;
meta: RouteMeta;
name?: string;
alias?: string | string[];
diff --git a/apps/vue/src/api/sys/model/userModel.ts b/apps/vue/src/api/sys/model/userModel.ts
index d4bb76900..ae40d20e8 100644
--- a/apps/vue/src/api/sys/model/userModel.ts
+++ b/apps/vue/src/api/sys/model/userModel.ts
@@ -4,6 +4,8 @@
export interface LoginParams {
username: string;
password: string;
+ twoFactorProvider?: string;
+ twoFactorCode?: string;
}
export interface LoginByPhoneParams {
diff --git a/apps/vue/src/api/sys/user.ts b/apps/vue/src/api/sys/user.ts
index 380d10994..7b4c4ae05 100644
--- a/apps/vue/src/api/sys/user.ts
+++ b/apps/vue/src/api/sys/user.ts
@@ -28,6 +28,8 @@ export function loginApi(params: LoginParams, mode: ErrorMessageMode = 'modal')
grant_type: 'password',
username: params.username,
password: params.password,
+ TwoFactorProvider: params.twoFactorProvider,
+ TwoFactorCode: params.twoFactorCode,
};
return defHttp.post(
{
diff --git a/apps/vue/src/api/task-management/backgroundJobAction.ts b/apps/vue/src/api/task-management/backgroundJobAction.ts
new file mode 100644
index 000000000..eee7dee6e
--- /dev/null
+++ b/apps/vue/src/api/task-management/backgroundJobAction.ts
@@ -0,0 +1,51 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import {
+ BackgroundJobAction,
+ BackgroundJobActionDefinition,
+ CreateBackgroundJobAction,
+ UpdateBackgroundJobAction,
+ BackgroundJobActionGetDefinitionsInput
+} from './model/backgroundJobActionModel';
+import { format } from '/@/utils/strings';
+import { ListResultDto } from '../model/baseModel';
+
+enum Api {
+ AddAction = '/api/task-management/background-jobs/actions/{jobId}',
+ UpdateAction = '/api/task-management/background-jobs/actions/{id}',
+ DeleteAction = '/api/task-management/background-jobs/actions/{id}',
+ GetActions = '/api/task-management/background-jobs/actions/{jobId}',
+ GetDefinitions = '/api/task-management/background-jobs/actions/definitions',
+}
+
+export const addAction = (jobId: string, input: CreateBackgroundJobAction) => {
+ return defAbpHttp.post({
+ url: format(Api.AddAction, { jobId: jobId }),
+ data: input,
+ });
+};
+
+export const updateAction = (id: string, input: UpdateBackgroundJobAction) => {
+ return defAbpHttp.put({
+ url: format(Api.UpdateAction, { id: id }),
+ data: input,
+ });
+};
+
+export const deleteAction = (id: string) => {
+ return defAbpHttp.delete({
+ url: format(Api.DeleteAction, { id: id }),
+ });
+};
+
+export const getActions = (jobId: string) => {
+ return defAbpHttp.get>({
+ url: format(Api.GetActions, { jobId: jobId }),
+ });
+};
+
+export const getDefinitions = (input: BackgroundJobActionGetDefinitionsInput) => {
+ return defAbpHttp.get>({
+ url: Api.GetDefinitions,
+ params: input,
+ });
+};
diff --git a/apps/vue/src/api/task-management/backgroundJobInfo.ts b/apps/vue/src/api/task-management/backgroundJobInfo.ts
index 3f0480c38..fbf58bd43 100644
--- a/apps/vue/src/api/task-management/backgroundJobInfo.ts
+++ b/apps/vue/src/api/task-management/backgroundJobInfo.ts
@@ -3,10 +3,11 @@ import {
BackgroundJobInfo,
BackgroundJobInfoCreate,
BackgroundJobInfoUpdate,
+ BackgroundJobDefinition,
BackgroundJobInfoGetListInput,
} from './model/backgroundJobInfoModel';
import { format } from '/@/utils/strings';
-import { PagedResultDto } from '../model/baseModel';
+import { ListResultDto, PagedResultDto } from '../model/baseModel';
enum Api {
GetById = '/api/task-management/background-jobs/{id}',
@@ -25,6 +26,7 @@ enum Api {
BulkStart = '/api/task-management/background-jobs/bulk-start',
BulkStop = '/api/task-management/background-jobs/bulk-stop',
BulkDelete = '/api/task-management/background-jobs/bulk-delete',
+ GetDefinitions = '/api/task-management/background-jobs/definitions',
}
export const getById = (id: string) => {
@@ -40,6 +42,12 @@ export const getList = (input: BackgroundJobInfoGetListInput) => {
});
};
+export const getDefinitions = () => {
+ return defAbpHttp.get>({
+ url: Api.GetDefinitions,
+ });
+};
+
export const create = (input: BackgroundJobInfoCreate) => {
return defAbpHttp.post({
url: Api.Create,
diff --git a/apps/vue/src/api/task-management/model/backgroundJobActionModel.ts b/apps/vue/src/api/task-management/model/backgroundJobActionModel.ts
new file mode 100644
index 000000000..1967b672b
--- /dev/null
+++ b/apps/vue/src/api/task-management/model/backgroundJobActionModel.ts
@@ -0,0 +1,43 @@
+export enum JobActionType {
+ Failed = -1,
+ Successed = 0,
+}
+
+export interface BackgroundJobAction {
+ id: string;
+ jobId: string;
+ name: string;
+ displayName?: string;
+ isEnabled: boolean;
+ paramters: ExtraPropertyDictionary;
+}
+
+export interface BackgroundJobActionParamter {
+ name: string;
+ required: boolean;
+ displayName: string;
+ description?: string;
+}
+
+export interface BackgroundJobActionDefinition {
+ name: string;
+ type: JobActionType;
+ displayName: string;
+ description?: string;
+ paramters: BackgroundJobActionParamter[];
+}
+
+export interface CreateBackgroundJobAction {
+ name: string;
+ isEnabled: boolean;
+ paramters: ExtraPropertyDictionary;
+}
+
+export interface UpdateBackgroundJobAction {
+ isEnabled: boolean;
+ paramters: ExtraPropertyDictionary;
+}
+
+export interface BackgroundJobActionGetDefinitionsInput {
+ type?: JobActionType;
+}
diff --git a/apps/vue/src/api/task-management/model/backgroundJobInfoModel.ts b/apps/vue/src/api/task-management/model/backgroundJobInfoModel.ts
index 8d219fa8b..3a167edd8 100644
--- a/apps/vue/src/api/task-management/model/backgroundJobInfoModel.ts
+++ b/apps/vue/src/api/task-management/model/backgroundJobInfoModel.ts
@@ -29,6 +29,20 @@ export enum JobPriority {
High = 25
}
+export interface BackgroundJobParamter {
+ name: string;
+ required: boolean;
+ DisplayName: string;
+ Description?: string;
+}
+
+export interface BackgroundJobDefinition {
+ name: string;
+ displayName: string;
+ description?: string;
+ paramters: BackgroundJobParamter[];
+}
+
export interface BackgroundJobInfo extends ExtensibleAuditedEntity, IHasConcurrencyStamp {
isEnabled: boolean;
name: string;
diff --git a/apps/vue/src/api/text-templating/templates/index.ts b/apps/vue/src/api/text-templating/templates/index.ts
new file mode 100644
index 000000000..89e5c5c0a
--- /dev/null
+++ b/apps/vue/src/api/text-templating/templates/index.ts
@@ -0,0 +1,64 @@
+import { defAbpHttp } from '/@/utils/http/abp';
+import { PagedResultDto } from '../../model/baseModel';
+import {
+ TextTemplateDefinition,
+ TextTemplateContent,
+ TextTemplateContentGetInput,
+ TextTemplateUpdateInput,
+ TextTemplateRestoreInput,
+ TextTemplateDefinitionGetListInput,
+} from './model';
+
+const remoteServiceName = 'AbpTextTemplating';
+const controllerName = 'TextTemplate';
+
+export const get = (name: string) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetAsync',
+ params: {
+ name: name,
+ },
+ });
+};
+
+export const getContent = (input: TextTemplateContentGetInput) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetContentAsync',
+ params: {
+ input: input,
+ },
+ });
+}
+
+export const getList = (input: TextTemplateDefinitionGetListInput) => {
+ return defAbpHttp.request>({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'GetListAsync',
+ params: {
+ input: input,
+ },
+ });
+};
+
+export const restoreToDefault = (input: TextTemplateRestoreInput) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'RestoreToDefaultAsync',
+ data: input,
+ });
+};
+
+export const update = (input: TextTemplateUpdateInput) => {
+ return defAbpHttp.request({
+ service: remoteServiceName,
+ controller: controllerName,
+ action: 'UpdateAsync',
+ data: input,
+ });
+};
diff --git a/apps/vue/src/api/text-templating/templates/model/index.ts b/apps/vue/src/api/text-templating/templates/model/index.ts
new file mode 100644
index 000000000..fa935f89f
--- /dev/null
+++ b/apps/vue/src/api/text-templating/templates/model/index.ts
@@ -0,0 +1,36 @@
+import { PagedAndSortedResultRequestDto } from "/@/api/model/baseModel";
+
+export interface TextTemplateDefinition {
+ name: string;
+ displayName: string;
+ defaultCultureName?: string;
+ isInlineLocalized: boolean;
+ isLayout: boolean;
+ layout?: string;
+}
+
+export interface TextTemplateContent {
+ name: string;
+ content?: string;
+ culture?: string;
+}
+
+export interface TextTemplateContentGetInput {
+ name: string;
+ culture?: string;
+}
+
+export interface TextTemplateRestoreInput {
+ name: string;
+ culture?: string;
+}
+
+export interface TextTemplateUpdateInput {
+ name: string;
+ culture?: string;
+ content: string;
+}
+
+export interface TextTemplateDefinitionGetListInput extends PagedAndSortedResultRequestDto {
+ filter?: string;
+}
diff --git a/apps/vue/src/components/Application/src/AppLocalePicker.vue b/apps/vue/src/components/Application/src/AppLocalePicker.vue
index 3d40a53b7..f71b81280 100644
--- a/apps/vue/src/components/Application/src/AppLocalePicker.vue
+++ b/apps/vue/src/components/Application/src/AppLocalePicker.vue
@@ -4,11 +4,11 @@
-->
diff --git a/apps/vue/src/components/Application/src/search/AppSearchModal.vue b/apps/vue/src/components/Application/src/search/AppSearchModal.vue
index 193b38e9c..76b788240 100644
--- a/apps/vue/src/components/Application/src/search/AppSearchModal.vue
+++ b/apps/vue/src/components/Application/src/search/AppSearchModal.vue
@@ -4,7 +4,7 @@
-
-
+
{{ t('common.cancelText') }}
@@ -62,7 +62,6 @@
import { SearchOutlined } from '@ant-design/icons-vue';
import AppSearchFooter from './AppSearchFooter.vue';
import Icon from '/@/components/Icon';
- import { Input } from '/@/components/Input';
// @ts-ignore
import vClickOutside from '/@/directives/clickOutside';
import { useDesign } from '/@/hooks/web/useDesign';
diff --git a/apps/vue/src/components/CardList/src/CardList.vue b/apps/vue/src/components/CardList/src/CardList.vue
index 0000cd4fd..d14f7c6fa 100644
--- a/apps/vue/src/components/CardList/src/CardList.vue
+++ b/apps/vue/src/components/CardList/src/CardList.vue
@@ -1,3 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+ 每行显示数量
+
+
+
+ 刷新
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.time }}
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- {{ sliderProp.width }}
-
-
-
-
-
-
- 每行显示数量
-
-
-
- 刷新
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.time }}
-
-
-
-
-
-
-
-
diff --git a/apps/vue/src/components/CardList/src/data.ts b/apps/vue/src/components/CardList/src/data.ts
index ac56cad91..b7c4be78c 100644
--- a/apps/vue/src/components/CardList/src/data.ts
+++ b/apps/vue/src/components/CardList/src/data.ts
@@ -1,5 +1,5 @@
import { ref } from 'vue';
-//每行个数
+// 每行个数
export const grid = ref(12);
// slider属性
export const useSlider = (min = 6, max = 12) => {
diff --git a/apps/vue/src/components/CodeEditor/index.ts b/apps/vue/src/components/CodeEditor/index.ts
index 872bfedf9..38f664f4e 100644
--- a/apps/vue/src/components/CodeEditor/index.ts
+++ b/apps/vue/src/components/CodeEditor/index.ts
@@ -1,8 +1,10 @@
import { withInstall } from '/@/utils';
import codeEditor from './src/CodeEditor.vue';
+import codeEditorX from './src/codemirrorX/CodeMirrorX.vue';
import jsonPreview from './src/json-preview/JsonPreview.vue';
export const CodeEditor = withInstall(codeEditor);
+export const CodeEditorX = withInstall(codeEditorX);
export const JsonPreview = withInstall(jsonPreview);
export * from './src/typing';
diff --git a/apps/vue/src/components/CodeEditor/src/codemirror/codemirror.css b/apps/vue/src/components/CodeEditor/src/codemirror/codemirror.css
index 8e9cbd864..cbcfa8764 100644
--- a/apps/vue/src/components/CodeEditor/src/codemirror/codemirror.css
+++ b/apps/vue/src/components/CodeEditor/src/codemirror/codemirror.css
@@ -39,7 +39,7 @@
.CodeMirror-gutters {
position: absolute;
top: 0;
- left: 0;
+ left: 5 !important;
z-index: 3;
min-height: 100%;
white-space: nowrap;
@@ -49,11 +49,11 @@
.CodeMirror-linenumber {
min-width: 20px;
- padding: 0 3px 0 5px;
+ padding: 1 8px 0 5px;
color: var(--comment);
- text-align: right;
+ text-align: left !important;
white-space: nowrap;
- opacity: 60%;
+ opacity: 0.6;
}
.CodeMirror-guttermarker {
@@ -90,7 +90,7 @@
display: inline-block;
font-size: 0.8em;
content: '>';
- opacity: 80%;
+ opacity: 0.8;
transform: rotate(90deg);
transition: transform 0.2s;
}
diff --git a/apps/vue/src/components/CodeEditor/src/codemirrorX/CodeMirrorX.vue b/apps/vue/src/components/CodeEditor/src/codemirrorX/CodeMirrorX.vue
new file mode 100644
index 000000000..52d543c35
--- /dev/null
+++ b/apps/vue/src/components/CodeEditor/src/codemirrorX/CodeMirrorX.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
diff --git a/apps/vue/src/components/CodeEditor/src/json-preview/JsonPreview.vue b/apps/vue/src/components/CodeEditor/src/json-preview/JsonPreview.vue
index 3e081bf50..75890c336 100644
--- a/apps/vue/src/components/CodeEditor/src/json-preview/JsonPreview.vue
+++ b/apps/vue/src/components/CodeEditor/src/json-preview/JsonPreview.vue
@@ -3,7 +3,6 @@
diff --git a/apps/vue/src/components/Tree/src/TreeHeader.vue b/apps/vue/src/components/Tree/src/TreeHeader.vue
index 57739d50e..d2124a9f0 100644
--- a/apps/vue/src/components/Tree/src/TreeHeader.vue
+++ b/apps/vue/src/components/Tree/src/TreeHeader.vue
@@ -1,12 +1,11 @@
-