Skip to content

vue3-slot结合v-if判断不生效 #4486

@chenchenpp

Description

@chenchenpp

问题描述
定义了一个组件,设置了右插槽,通过v-if判断使用右slot,正常理解此判断应该能够控制插槽显示隐藏:

<Amount>
  <template #right v-if="couponitem.voucherType == '5'">
    <text ></text>
  </template>
</Amount>

预期结果
希望能够能够正常判断隐藏显示

实际结果
image
当voucherType不是5的情况下,还是正常显示出来了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions