提交 ad04afa5 编写于 作者: X xzs02

fix: 修复view组件不能使用hidden属性控制显示状态的问题

上级 d524ea79
<template> <template>
<uni-view <uni-view
v-if="hoverClass && hoverClass !== 'none'" v-if="hoverClass && hoverClass !== 'none'"
:class="[hovering?hoverClass:'']" :class="[hovering?hoverClass:'']"
@touchstart="_hoverTouchStart" @touchstart="_hoverTouchStart"
@touchend="_hoverTouchEnd" @touchend="_hoverTouchEnd"
@touchcancel="_hoverTouchCancel" @touchcancel="_hoverTouchCancel"
v-on="$listeners"> v-on="$listeners"
<slot /> >
<slot/>
</uni-view> </uni-view>
<uni-view <uni-view
v-else v-else
v-on="$listeners"> v-on="$listeners">
<slot /> <slot/>
</uni-view> </uni-view>
</template> </template>
<style> <style>
uni-view { uni-view {
display: block; display: block;
} }
uni-view[hidden] {
display: none;
}
</style> </style>
<script> <script>
...@@ -30,4 +34,4 @@ export default { ...@@ -30,4 +34,4 @@ export default {
'label-click': 'clickHandler' 'label-click': 'clickHandler'
} }
} }
</script> </script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册