From de65dd3767b39ffe9b933de4b536e83ed931ae47 Mon Sep 17 00:00:00 2001 From: zhujiruo Date: Sun, 27 Apr 2025 17:28:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(calendar):=20=E4=BC=98=E5=8C=96=E9=95=BF?= =?UTF-8?q?=E8=B7=A8=E5=BA=A6=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E5=B9=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=BB=9A=E5=8A=A8=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 LongSpan 组件中添加 ScrollView 组件,实现滚动功能 - 调整长跨度选择界面布局,优化用户体验 - 修复了一些样式问题,包括月份选择按钮样式和弹窗样式 --- .../calendar/components/longSpan/index.tsx | 81 ++++++++++--------- packages/vantui/src/calendar/index.less | 7 ++ packages/vantui/src/calendar/index.tsx | 3 +- 3 files changed, 49 insertions(+), 42 deletions(-) diff --git a/packages/vantui/src/calendar/components/longSpan/index.tsx b/packages/vantui/src/calendar/components/longSpan/index.tsx index 6eee9276e..d6c75e137 100644 --- a/packages/vantui/src/calendar/components/longSpan/index.tsx +++ b/packages/vantui/src/calendar/components/longSpan/index.tsx @@ -1,5 +1,5 @@ import { useState, useEffect, useMemo } from 'react' -import { View } from '@tarojs/components' +import { ScrollView, View } from '@tarojs/components' import { Button } from '../../../button' type IProps = { @@ -70,45 +70,46 @@ export function LongSpan(props: IProps) { return ( 切换年月 - - 年份选择 - - {data.map((item, index) => ( - - ))} - - 月选择 - - {monthData.map((item) => ( - - ))} - + + 年份选择 + + {data.map((item, index) => ( + + ))} + + 月选择 + + {monthData.map((item) => ( + + ))} + +