上一页 1 2 3 4 5 6 ··· 22 下一页
摘要: useEffect(() => { form.clearErrors() if (state && state.data) { router.push('/') } // 后台错误 if (state && state.errorMessage) { // showErrorToast(t(stat 阅读全文
posted @ 2024-09-02 20:33 红苹果学园 阅读(44) 评论(0) 推荐(0)
摘要: <Popover open={open} onOpenChange={setOpen}> <PopoverTrigger asChild> <Button role="combobox" aria-expanded={open} className="w-full justify-between h 阅读全文
posted @ 2024-09-02 20:30 红苹果学园 阅读(77) 评论(0) 推荐(0)
摘要: import { Swiper, SwiperSlide } from 'swiper/react' import { Autoplay, Pagination, Navigation } from 'swiper/modules' // Import Swiper styles import 's 阅读全文
posted @ 2024-08-29 22:04 红苹果学园 阅读(26) 评论(0) 推荐(0)
摘要: import { usePathname, useSearchParams } from 'next/navigation' import { PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, Paginat 阅读全文
posted @ 2024-08-29 22:03 红苹果学园 阅读(150) 评论(0) 推荐(0)
摘要: 获取屏幕视窗高度 100,直接使用 window.innerHeight,页面未加载完也可以,浏览器的属性 阅读全文
posted @ 2024-08-29 21:59 红苹果学园 阅读(60) 评论(0) 推荐(0)
摘要: //Npm npm install @react-oauth/google@latest //Yarn yarn add @react-oauth/google@latest在首页中引入 GoogleOAuthProvider,并写上google后台的clientId /*index.js*/ im 阅读全文
posted @ 2024-08-08 21:17 红苹果学园 阅读(55) 评论(0) 推荐(0)
摘要: SEO META in 1 CLICK 谷歌插件可以查看网站seo内容,包括title description等信息。下载地址:https://www.chajianxw.com/developer/14081.html 下载完解压之后打开谷歌扩展程序拖入即可。 使用方式:打开需要查看的网站对应页面 阅读全文
posted @ 2024-07-26 19:03 红苹果学园 阅读(30) 评论(0) 推荐(0)
摘要: let mainDom = document.getElementsByClassName('scroll-smooth')[0] mainDom.scrollTo({ top: mainDom.scrollHeight, // 页面底部位置 behavior: 'smooth' // 平滑滚动 } 阅读全文
posted @ 2024-07-12 14:02 红苹果学园 阅读(23) 评论(0) 推荐(0)
摘要: 最简单的方式是检查响应的 Content-Type 头部,看它是否指定了 JSON 类型。大多数服务器会在返回 JSON 数据时设置正确的 Content-Type 头部为 application/json。 const contentType = response.headers.get('con 阅读全文
posted @ 2024-07-11 15:25 红苹果学园 阅读(31) 评论(0) 推荐(0)
摘要: import useSWR from 'swr' function Profile() { const { data, error, isLoading } = useSWR('/api/user', fetcher) if (error) return <div>failed to load</d 阅读全文
posted @ 2024-07-11 09:28 红苹果学园 阅读(18) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 22 下一页