Skip to content

Commit

Permalink
fix-color-input-ini
Browse files Browse the repository at this point in the history
修复调色盘初始值,读取现有卡片颜色
  • Loading branch information
ioahc committed Nov 14, 2024
1 parent 3b1a53d commit 967fd7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ColorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const ColorCard: React.FC<ColorCardProps> = ({
const handleClick = () => {
const rect = cardRef.current?.getBoundingClientRect();
if (rect && colorInputRef.current) {
// 读取颜色值
colorInputRef.current.value = color;
const scrollX = window.scrollX;
const scrollY = window.scrollY;

Expand Down

0 comments on commit 967fd7d

Please sign in to comment.