this.nameAJAX成功处理程序中存在范围问题。
该
this.name内部是不一样
this.name在你的Vue公司的组成部分。因此,不会在Vue组件中设置您的名字。
您可以使用箭头功能来解决此问题:
$.ajax({ url: 'http://elk.example.com:9200/users/user/' + this.id }).done(data => { this.name = data._source; // 'this' points to outside scope this.name.valueset = true; });


