From 108a627296749b6a38ee38e21cfedb5dcc67bab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E7=A7=98=E4=BA=BA?= <3311118881@qq.com> Date: Fri, 18 Apr 2025 20:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8package.json=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0highlight.js=E5=92=8Ckatex=E4=BE=9D=E8=B5=96=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E6=9B=B4=E6=96=B0pnpm-lock.yaml=E4=BB=A5=E5=8F=8D?= =?UTF-8?q?=E6=98=A0=E5=85=B6=E7=89=88=E6=9C=AC=E5=8F=98=E5=8C=96=EF=BC=9B?= =?UTF-8?q?=E7=A7=BB=E9=99=A4Swiper=E7=BB=84=E4=BB=B6=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81API=E8=B0=83=E7=94=A8=E4=BB=A5?= =?UTF-8?q?=E7=AE=80=E5=8C=96=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 1 + package.json | 2 ++ pnpm-lock.yaml | 16 +++++++++++----- src/components/Swiper/index.tsx | 7 ------- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..7cb61a2 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +public-hoist-pattern[]=*@heroui/* \ No newline at end of file diff --git a/package.json b/package.json index 3b86ce9..fc215e4 100755 --- a/package.json +++ b/package.json @@ -21,6 +21,8 @@ "feed": "^4.2.2", "framer-motion": "^12.7.4", "github-markdown-css": "^5.6.1", + "highlight.js": "^11.11.1", + "katex": "^0.16.22", "mdast-util-gfm-autolink-literal": "^2.0.0", "next": "15.1.7", "next-nprogress-bar": "^2.3.13", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a05e092..560565f 100755 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,12 @@ importers: github-markdown-css: specifier: ^5.6.1 version: 5.8.1 + highlight.js: + specifier: ^11.11.1 + version: 11.11.1 + katex: + specifier: ^0.16.22 + version: 0.16.22 mdast-util-gfm-autolink-literal: specifier: ^2.0.0 version: 2.0.1 @@ -2119,8 +2125,8 @@ packages: resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} hasBin: true - katex@0.16.18: - resolution: {integrity: sha512-LRuk0rPdXrecAFwQucYjMiIs0JFefk6N1q/04mlw14aVIVgxq1FO0MA9RiIIGVaKOB5GIP5GH4aBBNraZERmaQ==} + katex@0.16.22: + resolution: {integrity: sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==} hasBin: true lilconfig@3.1.3: @@ -5603,7 +5609,7 @@ snapshots: jiti@1.21.7: {} - katex@0.16.18: + katex@0.16.22: dependencies: commander: 8.3.0 @@ -5875,7 +5881,7 @@ snapshots: dependencies: '@types/katex': 0.16.7 devlop: 1.1.0 - katex: 0.16.18 + katex: 0.16.22 micromark-factory-space: 2.0.1 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 @@ -6249,7 +6255,7 @@ snapshots: '@types/katex': 0.16.7 hast-util-from-html-isomorphic: 2.0.0 hast-util-to-text: 4.0.2 - katex: 0.16.18 + katex: 0.16.22 unist-util-visit-parents: 6.0.1 vfile: 6.0.3 diff --git a/src/components/Swiper/index.tsx b/src/components/Swiper/index.tsx index 2742375..b1ae1e9 100755 --- a/src/components/Swiper/index.tsx +++ b/src/components/Swiper/index.tsx @@ -5,19 +5,12 @@ import { useState, useEffect, useRef } from "react"; import { BiChevronRight } from "react-icons/bi"; import { BiChevronLeft } from "react-icons/bi"; import { Swiper as SwiperType } from "@/types/app/swiper"; -import { getSwiperListAPI } from "@/api/swiper"; export default ({ data, className }: { data: SwiperType[], className?: string }) => { const [current, setCurrent] = useState(0); const [isHovered, setIsHovered] = useState(false); const intervalRef = useRef(null); - useEffect(() => { - getSwiperListAPI().then((res) => { - console.log(res, 444) - }) - }, []) - const handlePrev = () => { setCurrent((current) => { if (current === 0) {