Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
4ccf5a04
提交
4ccf5a04
authored
9月 05, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
测试
上级
0974d351
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
27 行增加
和
0 行删除
+27
-0
index.vue
...y/sales_point_inspection/examine/inspectionTask/index.vue
+27
-0
没有找到文件。
src/views/mobile/pages/audit_activity/sales_point_inspection/examine/inspectionTask/index.vue
浏览文件 @
4ccf5a04
...
...
@@ -394,6 +394,32 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
})
showNotify
({
type
:
'success'
,
message
:
'大日期产品照片,删除成功'
})
}
// 检测是否为 iOS 设备
const
isIOS
=
/iPad|iPhone|iPod/
.
test
(
navigator
.
userAgent
)
&&
!
window
.
MSStream
;
if
(
isIOS
)
{
// 监听所有输入框的失焦事件(键盘收起时触发)
document
.
addEventListener
(
'blur'
,
(
e
)
=>
{
if
([
'INPUT'
,
'TEXTAREA'
].
includes
(
e
.
target
.
tagName
))
{
setTimeout
(()
=>
{
// 保存当前滚动位置(避免过度滚动)
const
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
;
// 先向下滚动1px,再滚回原位置,强制触发重排
window
.
scrollTo
(
0
,
scrollTop
+
1
);
window
.
scrollTo
(
0
,
scrollTop
);
},
100
);
// 延迟100ms,确保键盘完全收起
}
},
true
);
// 注意:需用捕获阶段(true)监听
}
window
.
addEventListener
(
'resize'
,
()
=>
{
const
isKeyboardOpen
=
window
.
innerHeight
<
window
.
screen
.
height
*
0.7
;
// 粗略判断键盘是否打开
const
fixedElements
=
document
.
querySelectorAll
(
'.fixed-element'
);
// 替换为你的固定元素类名
fixedElements
.
forEach
(
el
=>
{
el
.
style
.
bottom
=
isKeyboardOpen
?
'0'
:
'auto'
;
// 键盘打开时强制固定到底部
});
});
</
script
>
...
...
@@ -402,6 +428,7 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
.wrap
{
background-color
:
#f5f5f5
;
/* min-height: 100vh; */
min-height
:
100%
;
/* height: 3000px; */
font-size
:
16px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论