3
私は、このメソッドを持っている子コンポーネントを持っている:Vue.jsアクセス親コンポーネント
getSubscriptions() {
MessageService.subscriptions()
this.$parent.loading = true;
.then((data) => {
if (data.data.subscriptions == null) {
this.noSubscriptions = true;
} else {
this.subscriptions = data.data.subscriptions;
}
this.$parent.loading = false;
}).bind(this);
}
だから私は、私はこのようにアクセス私の親コンポーネントの負荷円を表示したい:
this.$parent.loading
(私の親コンポーネントはloading
と呼ばれるデータの属性を持っている)しかし、私は^グッとそれをコンパイルしようとすると、私が受け取る:
[14:52:56] Starting 'browserify'...
46 | }
47 |
> 48 | t this.$parent.loading = false;
| ^
49 | }).bind(this);
50 | },
51 |
{ SyntaxError: unknown: Unexpected token (48:28)
46 | }
47 |
> 48 | t this.$parent.loading = false;
| ^
49 | }).bind(this);
50 | },
ここで何が間違っていますか?
あなたは約束のセットアップの途中で新しいステートメントを入れている