mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Swipe): should resize after props.width/height changed (#11747)
* fix(Swipe): props changed but component didn't * fix(Swipe): target watch windowWidth * Update packages/vant/src/swipe/Swipe.tsx --------- Co-authored-by: neverland <jait.chen@foxmail.com>
This commit is contained in:
parent
8bc9b262f2
commit
17055a94c7
@ -457,7 +457,10 @@ export default defineComponent({
|
||||
|
||||
watch(count, () => initialize(state.active));
|
||||
watch(() => props.autoplay, autoplay);
|
||||
watch([windowWidth, windowHeight], resize);
|
||||
watch(
|
||||
[windowWidth, windowHeight, () => props.width, () => props.height],
|
||||
resize
|
||||
);
|
||||
watch(usePageVisibility(), (visible) => {
|
||||
if (visible === 'visible') {
|
||||
autoplay();
|
||||
|
Loading…
x
Reference in New Issue
Block a user