dcloudio / uni-ui

基于uni-app的、全端兼容的、高性能UI框架
https://uniapp.dcloud.io/component/uniui/uni-ui.html
Apache License 2.0
1.85k stars 665 forks source link

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

Open ZTStory opened 1 year ago

ZTStory commented 1 year ago

最小复现代码片段

<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

18148764734 commented 5 months ago

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