Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复DatePicker组件onVisibleChange事件参数未适配微信的问题 #1150

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions compiled/alipay/src/DatePicker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../_util/assert-component2';
import { mountComponent } from '../_util/component';
import { useComponentEvent } from '../_util/hooks/useComponentEvent';
import { useMixState } from '../_util/hooks/useMixState';
import { resolveEventValues } from '../_util/platform';
import { resolveEventValues, resolveEventValue } from '../_util/platform';
import { DatePickerFunctionalProps, IDatePickerProps } from './props';
import {
getDateByValue,
Expand Down Expand Up @@ -119,7 +119,8 @@ const DatePicker = (props: IDatePickerProps) => {
}
}

useEvent('onVisibleChange', (visible) => {
useEvent('onVisibleChange', (event) => {
const visible = resolveEventValue(event)
if (visible) {
const currentValue = getCurrentValueWithCValue(props);
const newColumns = generateData(currentValue, props);
Expand Down
5 changes: 3 additions & 2 deletions compiled/wechat/src/DatePicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../_util/assert-component2';
import { mountComponent } from '../_util/component';
import { useComponentEvent } from '../_util/hooks/useComponentEvent';
import { useMixState } from '../_util/hooks/useMixState';
import { resolveEventValues } from '../_util/platform';
import { resolveEventValues, resolveEventValue } from '../_util/platform';
import { DatePickerFunctionalProps } from './props';
import { getDateByValue, getRangeData, getValidValue, getValueByDate, } from './util';
function getMin(min) {
Expand Down Expand Up @@ -95,7 +95,8 @@ var DatePicker = function (props) {
}
}
}
useEvent('onVisibleChange', function (visible) {
useEvent('onVisibleChange', function (event) {
var visible = resolveEventValue(event);
if (visible) {
var currentValue = getCurrentValueWithCValue(props);
var newColumns = generateData(currentValue, props);
Expand Down
5 changes: 3 additions & 2 deletions src/DatePicker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../_util/assert-component2';
import { mountComponent } from '../_util/component';
import { useComponentEvent } from '../_util/hooks/useComponentEvent';
import { useMixState } from '../_util/hooks/useMixState';
import { resolveEventValues } from '../_util/platform';
import { resolveEventValues, resolveEventValue } from '../_util/platform';
import { DatePickerFunctionalProps, IDatePickerProps } from './props';
import {
getDateByValue,
Expand Down Expand Up @@ -119,7 +119,8 @@ const DatePicker = (props: IDatePickerProps) => {
}
}

useEvent('onVisibleChange', (visible) => {
useEvent('onVisibleChange', (event) => {
const visible = resolveEventValue(event)
if (visible) {
const currentValue = getCurrentValueWithCValue(props);
const newColumns = generateData(currentValue, props);
Expand Down
Loading