From 20a2443d5f618294a380c0cd26c747b10525e2f3 Mon Sep 17 00:00:00 2001 From: jialin Date: Mon, 22 Jul 2024 10:26:31 +0800 Subject: [PATCH] fix: model list delete action update --- src/components/highlight-code/style.less | 17 +++++++++++++++++ src/hooks/use-update-chunk-list.ts | 6 +----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/highlight-code/style.less b/src/components/highlight-code/style.less index 698687b5..ec6a223a 100644 --- a/src/components/highlight-code/style.less +++ b/src/components/highlight-code/style.less @@ -5,6 +5,23 @@ font-weight: var(--font-weight-normal); padding-inline: 0; padding-block: 1.2em; + + &::-webkit-scrollbar { + height: 8px; + } + + &::-webkit-scrollbar-thumb { + background-color: rgba(211, 211, 220, 100%); + border-radius: 6px; + + &:hover { + background-color: rgba(190, 190, 190, 100%); + } + } + + &::-webkit-scrollbar-track { + background-color: transparent; + } } .code-pre { diff --git a/src/hooks/use-update-chunk-list.ts b/src/hooks/use-update-chunk-list.ts index 5d36dce2..1827cf4d 100644 --- a/src/hooks/use-update-chunk-list.ts +++ b/src/hooks/use-update-chunk-list.ts @@ -75,14 +75,10 @@ export function useUpdateChunkedList(options: { return !_.includes(ids, item.id); } ); - // console.log('updateChunkedList=====delete', updatedList); - // return updatedList; - - // options.setDataList?.([...cacheDataListRef.current]); + options.setDataList?.([...cacheDataListRef.current]); } // UPDATE if (data?.type === WatchEventType.UPDATE) { - // const updatedDataList = _.cloneDeep(dataList); _.each(collections, (item: any) => { const updateIndex = _.findIndex( cacheDataListRef.current,