会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
逍遥妹纸
博客园
首页
新随笔
联系
管理
订阅
2025年10月27日
ios 刘海屏 底部fixed定位 输入框键盘弹起之后底部有空余未正常恢复,最外层fixed,底部按钮也是fixed
摘要: import { useEffect } from 'react' /** * 修复 iOS 键盘收起后页面不恢复的问题 * * 问题:iOS Safari 在键盘收起后,visualViewport.pageTop 不会自动归零, * 导致页面视觉上仍然被推上去 * * 解决方案: * 1. 监听
阅读全文
posted @ 2025-10-27 16:14 红苹果学园
阅读(4)
评论(0)
推荐(0)
2024年12月31日
shadcn 表格有间距,然后给某一行加边框显示不出来,用div覆盖
摘要: 方案一:此方法ios上有局限性,可能会包裹整个Table 而不是当前的TableRow`pointer-events-none` 到边框 `div` 上,以确保它不会干扰用户与表格的交互。 {isToday && ( <div className="absolute inset-0 border-2
阅读全文
posted @ 2024-12-31 10:41 红苹果学园
阅读(63)
评论(0)
推荐(0)
2024年12月26日
Next image 响应式图片,减少流量 Next14版本存在,15版本已移除
摘要: <Image src='/image.jpg' alt='图片描述' layout='responsive' quality={100} width={500} height={500} />
阅读全文
posted @ 2024-12-26 15:52 红苹果学园
阅读(17)
评论(0)
推荐(0)
2024年11月22日
swiper最外层设置了 overflow hidden ,但是子元素有动画或者弹窗需要超出,
摘要: swiper 外层 .swiper-container、swiper-wrapper、swiper-slide 都存在 position:relative 样式, 直接 子元素absolute 无效 干脆去掉 overflow:hidden,但这样 swiper 其他本该隐藏切换显示的 swiper
阅读全文
posted @ 2024-11-22 17:34 红苹果学园
阅读(289)
评论(0)
推荐(0)
2024年11月11日
Next 服务端请求不经常更新的数据默认强缓存,想更新就修改请求头中版本信息即可。
摘要:
阅读全文
posted @ 2024-11-11 14:48 红苹果学园
阅读(9)
评论(0)
推荐(0)
2024年11月8日
localeStorage 当前标签页变化监听不到,只能监听不同标签页变化,自己写方法监听
摘要: 1.在utils中新建一个文件watchLocalStorage.ts export default function dispatchEventStroage() { const signSetItem = localStorage.setItem localStorage.setItem = f
阅读全文
posted @ 2024-11-08 10:38 红苹果学园
阅读(35)
评论(0)
推荐(0)
2024年11月6日
intl 多语言国际化,自动补全locale createNavigation ,createLocalizedPathnamesNavigation(已弃用)
摘要: 注意:app router 的多语言 next.config.js 中配置i18n不起作用 import { createNavigation } from 'next-intl/navigation' export const { Link, redirect, usePathname, useR
阅读全文
posted @ 2024-11-06 19:05 红苹果学园
阅读(60)
评论(0)
推荐(0)
Next 设置字体文件cdn 或者本地
摘要: @font-face { font-family: 'font-ali-bold'; src: url('https://cdnurl/Alibaba-PuHuiTi-Bold.woff2') format('woff2'); font-weight: normal; font-style: nor
阅读全文
posted @ 2024-11-06 18:35 红苹果学园
阅读(96)
评论(0)
推荐(0)
2024年11月4日
Next next-intl 动态渲染报错??
摘要: Error: Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap
阅读全文
posted @ 2024-11-04 21:07 红苹果学园
阅读(71)
评论(0)
推荐(0)
2024年10月30日
ios input 键盘收起页面底部有间隙没有自动还原
摘要: 1.ios input 键盘收起页面底部有间隙没有自动还原解决办法: 最外层元素增加fixed 布局即可2. ios input输入 页面会放大,收起时页面不自动还原解决办法 input 字体设置最小为16px即可3.网页标签切换获取切换状态 document.addEventListener("v
阅读全文
posted @ 2024-10-30 21:00 红苹果学园
阅读(37)
评论(0)
推荐(0)
下一页
公告