提交 e0f20352 编写于 作者: fxy060608's avatar fxy060608

fix: pageScrollTo behaves incorrectly when duration = 0 (question/139432)

上级 5179ec15
......@@ -5,11 +5,9 @@ export const PageScrollToProtocol: ApiProtocol<API_TYPE_PAGE_SCROLL_TO> = {
selector: String,
duration: Number,
}
const DEFAULT_DURATION = 300
export const PageScrollToOptions: ApiOptions<API_TYPE_PAGE_SCROLL_TO> = {
formatArgs: {
duration(value, params) {
params.duration = Math.max(0, parseInt(value + '') || DEFAULT_DURATION)
},
duration: 300,
},
}
......@@ -12750,12 +12750,9 @@ var serviceContext = (function (vue) {
selector: String,
duration: Number,
};
const DEFAULT_DURATION = 300;
const PageScrollToOptions = {
formatArgs: {
duration(value, params) {
params.duration = Math.max(0, parseInt(value + '') || DEFAULT_DURATION);
},
duration: 300,
},
};
......
......@@ -5236,12 +5236,9 @@ const PageScrollToProtocol = {
selector: String,
duration: Number
};
const DEFAULT_DURATION = 300;
const PageScrollToOptions = {
formatArgs: {
duration(value, params) {
params.duration = Math.max(0, parseInt(value + "") || DEFAULT_DURATION);
}
duration: 300
}
};
const API_SHOW_ACTION_SHEET = "showActionSheet";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册