vuejs / composition-api

Composition API plugin for Vue 2
https://composition-api.vuejs.org/
MIT License
4.19k stars 343 forks source link

Variables created with ref in <templete>,do not automatically expand value #956

Closed Raoting1997 closed 2 years ago

Raoting1997 commented 2 years ago

Vue version is V2.6.14.

example code:

<template>
    <div id="app">
        {{ test }}
    </div>
</template>
import { ref } from '@vue/composition-api';

export default {
    name: 'App',
    setup() {
        const test = ref('test');
        return { test };
    }
};

The result of test on the page is { value: 'test'},not test.

computed too.

Please pay attention to this problem

CNMathon commented 2 years ago

I encountered, too.

CNMathon commented 2 years ago

@antfu Is there a schedule for repairs?

antfu commented 2 years ago

We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required