Open chenchenpp opened 1 year ago
问题描述 定义了一个组件,设置了右插槽,通过v-if判断使用右slot,正常理解此判断应该能够控制插槽显示隐藏:
<Amount> <template #right v-if="couponitem.voucherType == '5'"> <text >折</text> </template> </Amount>
预期结果 希望能够能够正常判断隐藏显示
实际结果 当voucherType不是5的情况下,还是正常显示出来了
我也遇到了这个问题,在Vue里,这种方法明显是支持的,但在uniapp不行。
令人感到疑惑的是,在uniapp插槽中触发多根节点包裹时却生效了
感谢反馈,只有具名插槽内容为单根节点时,template 的 v-if 才会有问题,后续会修复。
问题描述 定义了一个组件,设置了右插槽,通过v-if判断使用右slot,正常理解此判断应该能够控制插槽显示隐藏:
预期结果 希望能够能够正常判断隐藏显示
实际结果 当voucherType不是5的情况下,还是正常显示出来了