uni-ui icon indicating copy to clipboard operation
uni-ui copied to clipboard

【bug】uni-transition 与其同层 dom 节点存在 v-if 变动时,translate 会在弹出状态下初始化

Open ZTStory opened this issue 3 years ago • 1 comments

最小复现代码片段

<template>
    <view>
        <button hover-class="button-hover" @click="show = true">点我弹框</button>
        <view v-show="temp">11111</view>

        <uni-transition :mode-class="['slide-bottom']" :show="show">
            <view>我是弹框内容</view>
            <button @click="temp = !temp">操作dom</button>
            <button @click="show = false">点我关闭</button></uni-transition
        >
    </view>
</template>

<script setup lang="ts">
import { ref } from "vue";

const show = ref(false);
const temp = ref(false);
</script>

<style scoped lang="scss"></style>

在弹出状态下操作 dom 时,translateY 会从 0 变为 100%

步骤点我弹框 -> 操作dom 会出现弹框内容回到底部

uni-ui: 1.4.22 vue: 3.2.33 vite: 2.9.5

ZTStory avatar Oct 18 '22 07:10 ZTStory

已复现该问题,确认bug,感谢反馈

18148764734 avatar Mar 01 '24 12:03 18148764734