diff --git a/src/app.config.ts b/src/app.config.ts index 09a4ec6..52281f8 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -16,6 +16,7 @@ export default defineAppConfig({ root: 'publish_pages', pages: [ "publishBall/index", + "footballRules/index" ], }, { diff --git a/src/components/CommonPopup/index.module.scss b/src/components/CommonPopup/index.module.scss index d5e460e..8e4ce9f 100644 --- a/src/components/CommonPopup/index.module.scss +++ b/src/components/CommonPopup/index.module.scss @@ -2,7 +2,7 @@ .common-popup { position: fixed; - z-index: 99999!important; + z-index: 9999!important; .common-popup__drag-handle-container { position: position; } diff --git a/src/components/FilterPopup/index.tsx b/src/components/FilterPopup/index.tsx index 2124c70..c795caf 100644 --- a/src/components/FilterPopup/index.tsx +++ b/src/components/FilterPopup/index.tsx @@ -39,10 +39,21 @@ const FilterPopup = (props: FilterPopupProps) => { // const [selectedDates, setSelectedDates] = useState([]) const handleDateChange = (dates: Date[]) => { - const dateArray = dates.map(date => dayjs(date).format('YYYY-MM-DD')) + console.log(dates,'datesdatesdatesdatesdates'); + let times: String[] = []; + if (Array.isArray(dates)) { + const currentDay = dayjs(dates[0]).format('YYYY-MM-DD'); + if (filterOptions.dateRange.length === 0 || filterOptions.dateRange.length === 2) { + times.push(currentDay); + } else { + times = [...filterOptions.dateRange, currentDay].sort( + (a, b) => new Date(a).getTime() - new Date(b).getTime() + ) + } + } onChange({ - 'dateRange': dateArray, + 'dateRange': times, }) } @@ -113,8 +124,9 @@ const FilterPopup = (props: FilterPopupProps) => { {/* 日历 */} diff --git a/src/components/Picker/CalendarUI/CalendarUI.tsx b/src/components/Picker/CalendarUI/CalendarUI.tsx index f58f469..9cdcd69 100644 --- a/src/components/Picker/CalendarUI/CalendarUI.tsx +++ b/src/components/Picker/CalendarUI/CalendarUI.tsx @@ -18,6 +18,7 @@ interface NutUICalendarProps { isBorder?: boolean; showQuickActions?: boolean; onHeaderClick?: (date: Date) => void; + showRangeStart?: boolean; } export interface CalendarUIRef { @@ -32,6 +33,7 @@ const NutUICalendar = React.forwardRef( value, onChange, isBorder = false, + showRangeStart = true, showQuickActions = true, onHeaderClick, }, @@ -195,7 +197,7 @@ const NutUICalendar = React.forwardRef( isBorder ? styles["border"] : "" }`} > - {type === "range" && ( + {type === "range" && showRangeStart && ( { const handleAnyInputFocus = (item: FormFieldConfig, e: any) => { const { prop } = item - if (prop === 'title') { - return + if (prop === 'descriptionInfo') { + setShouldReactToKeyboard(true) } - setShouldReactToKeyboard(true) } - const handleAnyInputBlur = (item: FormFieldConfig, e: any) => { + const handleAnyInputBlur = () => { setShouldReactToKeyboard(false) } return ( @@ -680,7 +679,7 @@ useEffect(() => { activityType === 'individual' && ( 点击确定发布约球,即表示已经同意条款 - Taro.navigateTo({url: '/publish_pages/publishBall/footballRules/index'})}>《约球规则》 + Taro.navigateTo({url: '/publish_pages/footballRules/index'})}>《约球规则》 ) }