Skip to content

v-slot and v-if #11574

@bowencool

Description

@bowencool

Version

2.6.11

Reproduction link

https://codesandbox.io/s/cool-tharp-i0rvt?file=/src/App.vue:138-178

Steps to reproduce

 <template #default="{dataModel}" v-if="dataModel">{{dataModel.msg}}</template>
[Vue warn]: Property or method "dataModel" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

What is expected?

v-if should identify variables correctly when v-slot exist

What is actually happening?

it didn't

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