Why the object in data returned by method in vue is this {_ _ ob__: Observer}

the code is as follows

<template>
    <div id="data">
        <input type="text" v-model="obj.name" placeholder="">
        <button @click="commit"></button>
        <span id="show-name">{{obj.name}}</span>
    </div>
</template>
<script>
    export default {
        data(){
            return{                
                obj:{
                    name:""
                }
            }
        },
        methods:{
            commit(){
                console.log(this.obj, this.obj.name)
            }
        }
    }
</script>

the final result returned is

what should I do if the result is {name: "sdf"}?

Jul.09,2021

console.log (JSON.stringify (this.obj), this.obj.name)

< hr >

add

clipboard.png

Menu