10000 New Feature: `unwrapTemplate` · Issue #802 · vue-macros/vue-macros · GitHub
[go: up one dir, main page]

Skip to content
New Feature: unwrapTemplate #802
Open
@sxzz

Description

@sxzz

Clear and concise description of the problem

Prevent auto-unwrap refs in <template>

https://vuejs.org/guide/essentials/reactivity-fundamentals.html#caveat-when-unwrapping-in-templates

Suggested solution

  • In development mode, inline template is disabled. Simply replace $setup with _ctx._.setupState.__v_raw.

  • In production mode, there's no $setup. The Vue compiler attaches unref() or .value directly. I'm unsure about this situation unless we analyze all variables in <script setup> like the Vue compiler d 525D oes.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0