From 47f02d7ec5dc4785a638ec10f093a950917cfe6f Mon Sep 17 00:00:00 2001 From: cjx <1870803323@qq.com> Date: Wed, 30 Oct 2024 17:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=BA=86=E6=A0=B7=E5=BC=8F,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BA=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/comment/list/styles.module.less | 1 + .../frontend/home/comment/list/web.pc.tsx | 2 +- src/pages/console/comment/list/web.pc.tsx | 7 +----- src/triggers/essay.ts | 24 +------------------ 4 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/components/frontend/home/comment/list/styles.module.less b/src/components/frontend/home/comment/list/styles.module.less index aaca9ce..dfb640f 100644 --- a/src/components/frontend/home/comment/list/styles.module.less +++ b/src/components/frontend/home/comment/list/styles.module.less @@ -1,5 +1,6 @@ .heading{ color:rgb(97, 218, 251); + text-indent: 2em; } .id { diff --git a/src/components/frontend/home/comment/list/web.pc.tsx b/src/components/frontend/home/comment/list/web.pc.tsx index a95e965..dcf7626 100644 --- a/src/components/frontend/home/comment/list/web.pc.tsx +++ b/src/components/frontend/home/comment/list/web.pc.tsx @@ -41,7 +41,7 @@ const List = ( return ( <> -

 评论区

+

评论区

{list && ( <> diff --git a/src/pages/console/comment/list/web.pc.tsx b/src/pages/console/comment/list/web.pc.tsx index 71d7c12..6907874 100644 --- a/src/pages/console/comment/list/web.pc.tsx +++ b/src/pages/console/comment/list/web.pc.tsx @@ -19,6 +19,7 @@ const List = ( ) => { const { list } = props.data; const { t } = props.methods; + const { removeItem, execute } = props.methods; const attrs = [ { @@ -72,10 +73,4 @@ const List = ( export default List; -function removeItem(id: any) { - throw new Error('Function not implemented.'); -} -function execute() { - throw new Error('Function not implemented.'); -} diff --git a/src/triggers/essay.ts b/src/triggers/essay.ts index 55d29c3..d1a3fb8 100644 --- a/src/triggers/essay.ts +++ b/src/triggers/essay.ts @@ -54,29 +54,7 @@ const triggers: Trigger[] = [ return 1; }, }, - //在删除之前先删除相关的comments - { - name: '删除之前删除相关的comments', - entity: 'essay', - action: 'remove', - when: "before", - fn: async ({ operation }, context, option) => { - const { filter } = operation; - const opRes = await context.operate( - 'comment', - { - action: 'remove', - id: await generateNewIdAsync(), - data: {}, - filter: { - essay: filter, - }, - }, - option - ); - return opRes.oper?.remove; - }, - } as RemoveTrigger, + ]; export default triggers;