From 0a359eb287f28bd47d765474f7bf4c5c62fd8b31 Mon Sep 17 00:00:00 2001 From: lxy Date: Tue, 23 Sep 2025 18:13:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E9=93=BE=E6=8E=A5=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/components/article/list/index.d.ts | 3 +-- es/components/article/list/index.js | 2 +- es/components/articleMenu/container/index.d.ts | 5 ++--- es/components/articleMenu/list/index.d.ts | 5 ++--- es/components/articleMenu/list/index.js | 2 +- es/types/Article.d.ts | 2 +- lib/types/Article.d.ts | 2 +- src/components/article/list/index.ts | 4 ++-- src/components/articleMenu/list/index.ts | 2 +- src/types/Article.ts | 2 +- 10 files changed, 13 insertions(+), 16 deletions(-) diff --git a/es/components/article/list/index.d.ts b/es/components/article/list/index.d.ts index 8550d91d3..c63d888b1 100644 --- a/es/components/article/list/index.d.ts +++ b/es/components/article/list/index.d.ts @@ -1,10 +1,9 @@ -/// import { GenerateUrlFn } from "../../../types/Article"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; }>) => React.ReactElement; export default _default; diff --git a/es/components/article/list/index.js b/es/components/article/list/index.js index 3a4adeb4b..a31e947a6 100644 --- a/es/components/article/list/index.js +++ b/es/components/article/list/index.js @@ -92,7 +92,7 @@ export default OakComponent({ }, onCopy(articleId) { const { generateUrl } = this.props; - const url = generateUrl ? generateUrl('article', 'detail', articleId) : ''; + const url = generateUrl ? generateUrl('article', 'copy', articleId) : ''; copy(url); this.setMessage({ type: 'success', diff --git a/es/components/articleMenu/container/index.d.ts b/es/components/articleMenu/container/index.d.ts index c84d52042..dec902a78 100644 --- a/es/components/articleMenu/container/index.d.ts +++ b/es/components/articleMenu/container/index.d.ts @@ -1,4 +1,3 @@ -/// import { EntityDict } from "../../../oak-app-domain"; import { GenerateUrlFn } from "../../../types/Article"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/articleMenu/list/index.d.ts b/es/components/articleMenu/list/index.d.ts index cbe48873f..6ee318932 100644 --- a/es/components/articleMenu/list/index.d.ts +++ b/es/components/articleMenu/list/index.d.ts @@ -1,4 +1,3 @@ -/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; onArticleClick: (atricleId: string) => void; - empty: import("react").ReactNode; + empty: React.ReactNode | undefined; changeAddArticle: (show: boolean) => void; - generateUrl: (mode: 'article' | 'menu', type: 'detail' | 'editor' | 'preview' | 'create', id: string) => string; + generateUrl: (mode: "article" | "menu", type: "detail" | "editor" | "preview" | "create", id: string) => string; }>) => React.ReactElement; export default _default; diff --git a/es/components/articleMenu/list/index.js b/es/components/articleMenu/list/index.js index 94bce1f6d..f69f5e194 100644 --- a/es/components/articleMenu/list/index.js +++ b/es/components/articleMenu/list/index.js @@ -115,7 +115,7 @@ export default OakComponent({ }, onCopy(menuId) { const { generateUrl } = this.props; - const url = generateUrl ? generateUrl('menu', 'detail', menuId) : ''; + const url = generateUrl ? generateUrl('menu', 'copy', menuId) : ''; copy(url); this.setMessage({ type: 'success', diff --git a/es/types/Article.d.ts b/es/types/Article.d.ts index e39fb3a25..1d4bd6f63 100644 --- a/es/types/Article.d.ts +++ b/es/types/Article.d.ts @@ -1,3 +1,3 @@ export type Mode = 'article' | 'menu'; -export type Action = 'detail' | 'editor' | 'preview' | 'create'; +export type Action = 'detail' | 'editor' | 'preview' | 'create' | 'copy'; export type GenerateUrlFn = (mode: Mode, type: Action, id: string) => string; diff --git a/lib/types/Article.d.ts b/lib/types/Article.d.ts index e39fb3a25..1d4bd6f63 100644 --- a/lib/types/Article.d.ts +++ b/lib/types/Article.d.ts @@ -1,3 +1,3 @@ export type Mode = 'article' | 'menu'; -export type Action = 'detail' | 'editor' | 'preview' | 'create'; +export type Action = 'detail' | 'editor' | 'preview' | 'create' | 'copy'; export type GenerateUrlFn = (mode: Mode, type: Action, id: string) => string; diff --git a/src/components/article/list/index.ts b/src/components/article/list/index.ts index 2f5475e40..71981f7b5 100644 --- a/src/components/article/list/index.ts +++ b/src/components/article/list/index.ts @@ -47,7 +47,7 @@ export default OakComponent({ properties: { entityId: '', articleMenuId: '' as string | undefined, - generateUrl: ((mode: Mode, type: Action, id: string) => {}) as GenerateUrlFn, + generateUrl: ((mode: Mode, type: Action, id: string) => { }) as GenerateUrlFn, empty: undefined as React.ReactNode | undefined, menuCheck: (isArticle: boolean) => undefined as void, }, @@ -97,7 +97,7 @@ export default OakComponent({ }, onCopy(articleId: string) { const { generateUrl } = this.props; - const url = generateUrl ? generateUrl('article', 'detail', articleId) : ''; + const url = generateUrl ? generateUrl('article', 'copy', articleId) : ''; copy(url); this.setMessage({ type: 'success', diff --git a/src/components/articleMenu/list/index.ts b/src/components/articleMenu/list/index.ts index 367df68bd..eedebad65 100644 --- a/src/components/articleMenu/list/index.ts +++ b/src/components/articleMenu/list/index.ts @@ -118,7 +118,7 @@ export default OakComponent({ }, onCopy(menuId: string) { const { generateUrl } = this.props; - const url = generateUrl ? generateUrl('menu', 'detail', menuId) : ''; + const url = generateUrl ? generateUrl('menu', 'copy', menuId) : ''; copy(url); this.setMessage({ type: 'success', diff --git a/src/types/Article.ts b/src/types/Article.ts index d95e32b0c..303c4260c 100644 --- a/src/types/Article.ts +++ b/src/types/Article.ts @@ -1,4 +1,4 @@ export type Mode = 'article' | 'menu'; -export type Action = 'detail' | 'editor' | 'preview' | 'create'; +export type Action = 'detail' | 'editor' | 'preview' | 'create' | 'copy'; export type GenerateUrlFn = (mode: Mode, type: Action, id: string) => string;