antd-mini
Advanced tools
Comparing version 2.29.1 to 2.29.2
@@ -25,2 +25,3 @@ var __assign = (this && this.__assign) || function () { | ||
import { useComponentEvent } from '../_util/hooks/useComponentEvent'; | ||
import { triggerRefEvent } from '../_util/hooks/useReportRef'; | ||
import { hasValue, useMergedState } from '../_util/hooks/useMergedState'; | ||
@@ -59,2 +60,14 @@ import { defaultLocaleText, } from './props'; | ||
var _d = useState(''), scrollIntoViewId = _d[0], setScrollIntoViewId = _d[1]; | ||
useEvent('scrollIntoView', function (value) { | ||
updateScrollIntoViewId(getScrollIntoViewId(value)); | ||
}); | ||
triggerRefEvent(); | ||
// scroll 触发滚动之后需要重置 scrollIntoViewId | ||
function updateScrollIntoViewId(id) { | ||
setScrollIntoViewId(id); | ||
var timer = setTimeout(function () { | ||
setScrollIntoViewId(''); | ||
clearTimeout(timer); | ||
}); | ||
} | ||
var selectionModeFromValue = getSelectionModeFromValue(value); | ||
@@ -163,3 +176,3 @@ var selectionMode = (_b = (_a = props.selectionMode) !== null && _a !== void 0 ? _a : selectionModeFromValue) !== null && _b !== void 0 ? _b : 'range'; | ||
props.changedScrollIntoView && | ||
setScrollIntoViewId(getScrollIntoViewId(value)); | ||
updateScrollIntoViewId(getScrollIntoViewId(value)); | ||
}, [value]); | ||
@@ -171,7 +184,7 @@ useReady(function () { | ||
if (isControl) { | ||
setScrollIntoViewId(getScrollIntoViewId(props.value)); | ||
updateScrollIntoViewId(getScrollIntoViewId(props.value)); | ||
} | ||
else { | ||
props.defaultValue && | ||
setScrollIntoViewId(getScrollIntoViewId(props.defaultValue)); | ||
updateScrollIntoViewId(getScrollIntoViewId(props.defaultValue)); | ||
} | ||
@@ -202,2 +215,3 @@ }, []); | ||
onFormatter: null, | ||
changedScrollIntoView: null, | ||
}); |
@@ -8,3 +8,3 @@ import { Component, triggerEventOnly } from '../_util/simply'; | ||
onMaskClose: function () { | ||
if (this.props.maskClosable) { | ||
if (this.properties.maskClosable) { | ||
triggerEventOnly(this, 'close'); | ||
@@ -11,0 +11,0 @@ } |
@@ -6,2 +6,3 @@ import { __assign, __spreadArray } from "tslib"; | ||
import { useComponentEvent } from '../_util/hooks/useComponentEvent'; | ||
import { triggerRefEvent } from '../_util/hooks/useReportRef'; | ||
import { hasValue, useMergedState } from '../_util/hooks/useMergedState'; | ||
@@ -40,2 +41,14 @@ import { defaultLocaleText, } from './props'; | ||
var _d = useState(''), scrollIntoViewId = _d[0], setScrollIntoViewId = _d[1]; | ||
useEvent('scrollIntoView', function (value) { | ||
updateScrollIntoViewId(getScrollIntoViewId(value)); | ||
}); | ||
triggerRefEvent(); | ||
// scroll 触发滚动之后需要重置 scrollIntoViewId | ||
function updateScrollIntoViewId(id) { | ||
setScrollIntoViewId(id); | ||
var timer = setTimeout(function () { | ||
setScrollIntoViewId(''); | ||
clearTimeout(timer); | ||
}); | ||
} | ||
var selectionModeFromValue = getSelectionModeFromValue(value); | ||
@@ -144,3 +157,3 @@ var selectionMode = (_b = (_a = props.selectionMode) !== null && _a !== void 0 ? _a : selectionModeFromValue) !== null && _b !== void 0 ? _b : 'range'; | ||
props.changedScrollIntoView && | ||
setScrollIntoViewId(getScrollIntoViewId(value)); | ||
updateScrollIntoViewId(getScrollIntoViewId(value)); | ||
}, [value]); | ||
@@ -152,7 +165,7 @@ useReady(function () { | ||
if (isControl) { | ||
setScrollIntoViewId(getScrollIntoViewId(props.value)); | ||
updateScrollIntoViewId(getScrollIntoViewId(props.value)); | ||
} | ||
else { | ||
props.defaultValue && | ||
setScrollIntoViewId(getScrollIntoViewId(props.defaultValue)); | ||
updateScrollIntoViewId(getScrollIntoViewId(props.defaultValue)); | ||
} | ||
@@ -183,2 +196,3 @@ }, []); | ||
onFormatter: null, | ||
changedScrollIntoView: null, | ||
}); |
@@ -6,2 +6,3 @@ import { __assign, __spreadArray } from "tslib"; | ||
import { useComponentEvent } from '../_util/hooks/useComponentEvent'; | ||
import { triggerRefEvent } from '../_util/hooks/useReportRef'; | ||
import { hasValue, useMergedState } from '../_util/hooks/useMergedState'; | ||
@@ -40,2 +41,14 @@ import { defaultLocaleText, } from './props'; | ||
var _d = useState(''), scrollIntoViewId = _d[0], setScrollIntoViewId = _d[1]; | ||
useEvent('scrollIntoView', function (value) { | ||
updateScrollIntoViewId(getScrollIntoViewId(value)); | ||
}); | ||
triggerRefEvent(); | ||
// scroll 触发滚动之后需要重置 scrollIntoViewId | ||
function updateScrollIntoViewId(id) { | ||
setScrollIntoViewId(id); | ||
var timer = setTimeout(function () { | ||
setScrollIntoViewId(''); | ||
clearTimeout(timer); | ||
}); | ||
} | ||
var selectionModeFromValue = getSelectionModeFromValue(value); | ||
@@ -144,3 +157,3 @@ var selectionMode = (_b = (_a = props.selectionMode) !== null && _a !== void 0 ? _a : selectionModeFromValue) !== null && _b !== void 0 ? _b : 'range'; | ||
props.changedScrollIntoView && | ||
setScrollIntoViewId(getScrollIntoViewId(value)); | ||
updateScrollIntoViewId(getScrollIntoViewId(value)); | ||
}, [value]); | ||
@@ -152,7 +165,7 @@ useReady(function () { | ||
if (isControl) { | ||
setScrollIntoViewId(getScrollIntoViewId(props.value)); | ||
updateScrollIntoViewId(getScrollIntoViewId(props.value)); | ||
} | ||
else { | ||
props.defaultValue && | ||
setScrollIntoViewId(getScrollIntoViewId(props.defaultValue)); | ||
updateScrollIntoViewId(getScrollIntoViewId(props.defaultValue)); | ||
} | ||
@@ -183,2 +196,3 @@ }, []); | ||
onFormatter: null, | ||
changedScrollIntoView: null, | ||
}); |
{ | ||
"name": "antd-mini", | ||
"version": "2.29.1", | ||
"version": "2.29.2", | ||
"description": "antd-mini 是支付宝小程序 UI 组件库,遵循 Ant Design 规范。", | ||
@@ -5,0 +5,0 @@ "miniprogram": "compiled/wechat/src", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3745529
39602