diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 1f553e96..8b6f6f75 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.25.8](https://github.com/fast-crud/fast-crud/compare/v1.25.7...v1.25.8) (2025-04-10) + +### Bug Fixes + +* 修复commonOptions无法覆盖某些参数的bug ([f2ecc03](https://github.com/fast-crud/fast-crud/commit/f2ecc034bf5b38d668ee8366c903a824af34302c)) +* fs-editor-code 支持配置schema校验 ([7d342cb](https://github.com/fast-crud/fast-crud/commit/7d342cbe8ebbaebb6ff5b3b80ce977d87aaa9ba5)) + +### Performance Improvements + +* 添加代码编辑器示例 ([7217460](https://github.com/fast-crud/fast-crud/commit/72174604735b90fc57e0fb1ce40cc380b6c0c351)) + ## [1.25.7](https://github.com/fast-crud/fast-crud/compare/v1.25.6...v1.25.7) (2025-03-30) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 3e4c5b29..72d0b67c 100644 --- a/packages/ui/certd-client/package.json +++ b/packages/ui/certd-client/package.json @@ -1,6 +1,6 @@ { "name": "@fast-crud/fs-admin-antdv4", - "version": "1.25.7", + "version": "1.25.8", "private": true, "scripts": { "dev": "vite", @@ -27,10 +27,10 @@ "@aws-sdk/client-s3": "^3.535.0", "@aws-sdk/s3-request-presigner": "^3.535.0", "@ctrl/tinycolor": "^4.1.0", - "@fast-crud/fast-crud": "^1.25.7", - "@fast-crud/fast-extends": "^1.25.7", - "@fast-crud/ui-antdv4": "^1.25.7", - "@fast-crud/ui-interface": "^1.25.7", + "@fast-crud/fast-crud": "^1.25.8", + "@fast-crud/fast-extends": "^1.25.8", + "@fast-crud/ui-antdv4": "^1.25.8", + "@fast-crud/ui-interface": "^1.25.8", "@iconify/tailwind": "^1.2.0", "@iconify/vue": "^4.1.1", "@manypkg/get-packages": "^2.2.2", @@ -138,7 +138,6 @@ "vite": "^5.1.6", "vite-plugin-compression": "^0.5.1", "vite-plugin-html": "^3.2.2", - "vite-plugin-monaco-editor-esm": "^2.0.2", "vite-plugin-theme": "^0.8.6", "vite-plugin-windicss": "^1.9.3", "vue-eslint-parser": "^9.4.2", diff --git a/packages/ui/certd-client/src/plugin/antdv-async/index.ts b/packages/ui/certd-client/src/plugin/antdv-async/index.ts index 002da699..53a3d85e 100644 --- a/packages/ui/certd-client/src/plugin/antdv-async/index.ts +++ b/packages/ui/certd-client/src/plugin/antdv-async/index.ts @@ -1,18 +1,30 @@ import { defineAsyncComponent } from "vue"; import Input from "ant-design-vue/es/input/Input"; import Button from "ant-design-vue/es/button/button"; - +import Divider from "ant-design-vue/es/divider"; +import Badge from "ant-design-vue/es/badge"; +import Empty from "ant-design-vue/es/empty"; +import Avatar from "ant-design-vue/es/avatar"; +import Steps from "ant-design-vue/es/steps"; +import Select from "ant-design-vue/es/select"; +import PageHeader from "ant-design-vue/es/page-header"; +import Card from "ant-design-vue/es/card"; export default { install(app: any) { - app.component("AInput", Input); - app.component("AButton", Button); + app.use(Input); + app.use(Button); + app.use(Divider); + app.use(Badge); + app.use(Empty); + app.use(Avatar); + app.use(PageHeader); + app.use(Steps); + app.use(Select); + app.use(Card); + app.component( - "AInputPassword", - defineAsyncComponent(() => import("ant-design-vue/es/input/Password")) - ); - app.component( - "AButtonGroup", - defineAsyncComponent(() => import("ant-design-vue/es/button/button-group")) + "AAutoComplete", + defineAsyncComponent(() => import("ant-design-vue/es/auto-complete/index")) ); app.component( "ARadio", @@ -38,6 +50,11 @@ export default { "AFormItem", defineAsyncComponent(() => import("ant-design-vue/es/form/FormItem")) ); + app.component( + "AFormItemRest", + defineAsyncComponent(() => import("ant-design-vue/es/form/FormItemContext")) + ); + app.component( "ATabs", defineAsyncComponent(() => import("ant-design-vue/es/tabs/src/Tabs")) @@ -55,10 +72,6 @@ export default { "AInputNumber", defineAsyncComponent(() => import("ant-design-vue/es/input-number/index")) ); - app.component( - "ASelect", - defineAsyncComponent(() => import("ant-design-vue/es/select/index")) - ); app.component( "ADrawer", defineAsyncComponent(() => import("ant-design-vue/es/drawer/index")) @@ -98,10 +111,7 @@ export default { "AInputAutoComplete", defineAsyncComponent(() => import("ant-design-vue/es/auto-complete/index")) ); - app.component( - "ACard", - defineAsyncComponent(() => import("ant-design-vue/es/card/index")) - ); + app.component( "ACascader", defineAsyncComponent(() => import("ant-design-vue/es/cascader/index")) @@ -151,8 +161,8 @@ export default { defineAsyncComponent(() => import("ant-design-vue/es/tree-select")) ); app.component( - "AToar", - defineAsyncComponent(() => import("ant-design-vue/es/tree-select")) + "ATour", + defineAsyncComponent(() => import("ant-design-vue/es/tour")) ); app.component( @@ -167,5 +177,49 @@ export default { "AMenuItem", defineAsyncComponent(() => import("ant-design-vue/es/menu/src/MenuItem")) ); + + app.component( + "AProgress", + defineAsyncComponent(() => import("ant-design-vue/es/progress")) + ); + app.component( + "ATimelineItem", + defineAsyncComponent(() => import("ant-design-vue/es/timeline/TimelineItem")) + ); + app.component( + "ATimeline", + defineAsyncComponent(() => import("ant-design-vue/es/timeline/Timeline")) + ); + app.component( + "APageHeader", + defineAsyncComponent(() => import("ant-design-vue/es/page-header/index")) + ); + app.component( + "APopover", + defineAsyncComponent(() => import("ant-design-vue/es/popover")) + ); + app.component( + "APopconfirm", + defineAsyncComponent(() => import("ant-design-vue/es/popconfirm")) + ); + app.component( + "ACollapse", + defineAsyncComponent(() => import("ant-design-vue/es/collapse")) + ); + app.component( + "ADescriptions", + defineAsyncComponent(() => import("ant-design-vue/es/descriptions")) + ); + app.component( + "ADescriptionsItem", + defineAsyncComponent(async () => { + const m = await import("ant-design-vue/es/descriptions/"); + return m.DescriptionsItem; + }) + ); + app.component( + "AResult", + defineAsyncComponent(() => import("ant-design-vue/es/result")) + ); } }; diff --git a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx index 405a2818..dc68af23 100644 --- a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx +++ b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx @@ -338,6 +338,7 @@ function install(app: any, options: any = {}) { toolbarConfig: {} } }); + app.use(FsExtendsJson); app.use(FsExtendsTime); app.use(FsExtendsCopyable); diff --git a/packages/ui/certd-client/src/plugin/index.ts b/packages/ui/certd-client/src/plugin/index.ts index 243c5683..22edab0f 100644 --- a/packages/ui/certd-client/src/plugin/index.ts +++ b/packages/ui/certd-client/src/plugin/index.ts @@ -2,9 +2,11 @@ import "./iconify"; import "./iconfont"; import FastCrud from "./fast-crud"; import permission from "./permission"; +import { setupMonaco } from "./monaco"; function install(app: any, options: any = {}) { app.use(FastCrud, options); app.use(permission); + setupMonaco(); } export default { diff --git a/packages/ui/certd-client/src/plugin/monaco/index.ts b/packages/ui/certd-client/src/plugin/monaco/index.ts new file mode 100644 index 00000000..937a26dc --- /dev/null +++ b/packages/ui/certd-client/src/plugin/monaco/index.ts @@ -0,0 +1,5 @@ +import { initWorkers } from "@fast-crud/fast-extends/src/editor/components/fs-editor-code/worker"; + +export function setupMonaco() { + initWorkers(); +} diff --git a/packages/ui/certd-client/src/router/guard.ts b/packages/ui/certd-client/src/router/guard.ts index 4220c921..335d0964 100644 --- a/packages/ui/certd-client/src/router/guard.ts +++ b/packages/ui/certd-client/src/router/guard.ts @@ -43,6 +43,10 @@ export function setupCommonGuard(router: Router) { */ function setupAccessGuard(router: Router) { router.beforeEach(async (to, from) => { + if (to.matched && to.matched.length > 2) { + to.matched.splice(1, to.matched.length - 2); + } + // 基本路由,这些路由不需要进入权限拦截 const needAuth = to.matched.some((r) => { return r.meta?.auth || r.meta?.permission;