Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
ee69cecf
authored
Jan 27, 2026
by
Archer
Committed by
GitHub
Jan 27, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: date picker (#6325)
parent
1788b800
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
15 deletions
+44
-15
document/content/docs/upgrading/4-14/4146.mdx
+1
-0
document/data/doc-last-modified.json
+1
-1
packages/web/components/common/DateTimePicker/index.tsx
+42
-14
No files found.
document/content/docs/upgrading/4-14/4146.mdx
View file @
ee69cecf
...
@@ -40,5 +40,6 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4146' \
...
@@ -40,5 +40,6 @@ curl --location --request POST 'https://{{host}}/api/admin/initv4146' \
## 🐛 修复
## 🐛 修复
1. 系统工具工具集设置系统密钥后,子工具无法读取到设置的系统密钥
1. 系统工具工具集设置系统密钥后,子工具无法读取到设置的系统密钥
2. 日期选择器溢出问题,增加了动态位置适配。
## 插件
## 插件
document/data/doc-last-modified.json
View file @
ee69cecf
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
"document/content/docs/upgrading/4-14/4143.mdx"
:
"2025-11-26T20:52:05+08:00"
,
"document/content/docs/upgrading/4-14/4143.mdx"
:
"2025-11-26T20:52:05+08:00"
,
"document/content/docs/upgrading/4-14/4144.mdx"
:
"2025-12-16T14:56:04+08:00"
,
"document/content/docs/upgrading/4-14/4144.mdx"
:
"2025-12-16T14:56:04+08:00"
,
"document/content/docs/upgrading/4-14/4145.mdx"
:
"2026-01-18T23:59:15+08:00"
,
"document/content/docs/upgrading/4-14/4145.mdx"
:
"2026-01-18T23:59:15+08:00"
,
"document/content/docs/upgrading/4-14/41451.mdx"
:
"2026-01-
19T19:10:54
+08:00"
,
"document/content/docs/upgrading/4-14/41451.mdx"
:
"2026-01-
20T11:53:27
+08:00"
,
"document/content/docs/upgrading/4-14/4146.mdx"
:
"2026-01-19T19:10:54+08:00"
,
"document/content/docs/upgrading/4-14/4146.mdx"
:
"2026-01-19T19:10:54+08:00"
,
"document/content/docs/upgrading/4-8/40.mdx"
:
"2025-08-02T19:38:37+08:00"
,
"document/content/docs/upgrading/4-8/40.mdx"
:
"2025-08-02T19:38:37+08:00"
,
"document/content/docs/upgrading/4-8/41.mdx"
:
"2025-08-02T19:38:37+08:00"
,
"document/content/docs/upgrading/4-8/41.mdx"
:
"2025-08-02T19:38:37+08:00"
,
...
...
packages/web/components/common/DateTimePicker/index.tsx
View file @
ee69cecf
...
@@ -35,20 +35,49 @@ const DateTimePicker = ({
...
@@ -35,20 +35,49 @@ const DateTimePicker = ({
},
[
selectedDateTime
]);
},
[
selectedDateTime
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
showSelected
&&
containerRef
.
current
)
{
if
(
!
showSelected
)
return
;
const
rect
=
containerRef
.
current
.
getBoundingClientRect
();
const
updatePosition
=
()
=>
{
if
(
popPosition
===
'top'
)
{
const
rect
=
containerRef
.
current
?.
getBoundingClientRect
();
setPosition
({
const
popoverRect
=
popoverRef
.
current
?.
getBoundingClientRect
();
top
:
rect
.
top
-
4
,
if
(
!
rect
||
!
popoverRect
)
return
;
left
:
rect
.
left
});
const
padding
=
8
;
}
else
{
const
topBottom
=
rect
.
bottom
+
4
;
setPosition
({
const
topTop
=
rect
.
top
-
4
-
popoverRect
.
height
;
top
:
rect
.
bottom
+
4
,
const
maxTop
=
window
.
innerHeight
-
popoverRect
.
height
-
padding
;
left
:
rect
.
left
const
maxLeft
=
window
.
innerWidth
-
popoverRect
.
width
-
padding
;
});
let
top
=
popPosition
===
'top'
?
topTop
:
topBottom
;
if
(
popPosition
===
'bottom'
&&
topBottom
+
popoverRect
.
height
>
window
.
innerHeight
-
padding
&&
topTop
>=
padding
)
{
top
=
topTop
;
}
}
if
(
popPosition
===
'top'
&&
topTop
<
padding
&&
topBottom
+
popoverRect
.
height
<=
window
.
innerHeight
-
padding
)
{
top
=
topBottom
;
}
}
top
=
Math
.
min
(
Math
.
max
(
top
,
padding
),
Math
.
max
(
padding
,
maxTop
));
let
left
=
rect
.
left
;
left
=
Math
.
min
(
Math
.
max
(
left
,
padding
),
Math
.
max
(
padding
,
maxLeft
));
setPosition
({
top
,
left
});
};
const
raf
=
requestAnimationFrame
(
updatePosition
);
window
.
addEventListener
(
'resize'
,
updatePosition
);
window
.
addEventListener
(
'scroll'
,
updatePosition
,
true
);
return
()
=>
{
cancelAnimationFrame
(
raf
);
window
.
removeEventListener
(
'resize'
,
updatePosition
);
window
.
removeEventListener
(
'scroll'
,
updatePosition
,
true
);
};
},
[
showSelected
,
popPosition
]);
},
[
showSelected
,
popPosition
]);
// 点击外部关闭
// 点击外部关闭
...
@@ -99,8 +128,7 @@ const DateTimePicker = ({
...
@@ -99,8 +128,7 @@ const DateTimePicker = ({
<
Card
<
Card
ref=
{
popoverRef
}
ref=
{
popoverRef
}
position=
{
'fixed'
}
position=
{
'fixed'
}
top=
{
popPosition
===
'top'
?
'auto'
:
`${position.top}px`
}
top=
{
`${position.top}px`
}
bottom=
{
popPosition
===
'top'
?
`${window.innerHeight - position.top}px`
:
'auto'
}
left=
{
`${position.left}px`
}
left=
{
`${position.left}px`
}
zIndex=
{
1500
}
zIndex=
{
1500
}
css=
{
{
css=
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment