Javascript 用户配置文件无法显示且无法更新:Firebase和VueJS

Javascript 用户配置文件无法显示且无法更新:Firebase和VueJS,javascript,firebase,vue.js,vuejs2,google-cloud-firestore,Javascript,Firebase,Vue.js,Vuejs2,Google Cloud Firestore,我正在构建一个应用程序,在这个应用程序中我有一个个人资料页面。在这个配置文件页面中,我想显示有关当前用户的信息,例如名称、用户名等。。。我创建了一个firestore()函数,该函数通过用户uid获取用户集合(因为我的用户集合与用户uid同名)。当我启动我的应用程序时,没有显示任何内容,当我想通过在输入中输入一些文本来更新名称或用户名时,我有一个错误。这个错误告诉我: [Vue warn]: Error in v-on handler: "TypeError: Cannot read prope

我正在构建一个应用程序,在这个应用程序中我有一个个人资料页面。在这个配置文件页面中,我想显示有关当前用户的信息,例如名称、用户名等。。。我创建了一个
firestore()
函数,该函数通过用户uid获取用户集合(因为我的用户集合与用户uid同名)。当我启动我的应用程序时,没有显示任何内容,当我想通过在输入中输入一些文本来更新名称或用户名时,我有一个错误。这个错误告诉我:

[Vue warn]: Error in v-on handler: "TypeError: Cannot read property 'profile' of undefined"

found in

---> <Profile> at popup/components/profile/extension_userAccount.vue
       <ExtensionMainComponent> at popup/components/extension_mainComponent.vue
         <App> at popup/App.vue
           <Root>

TypeError: Cannot read property 'profile' of undefined
    at VueComponent.updateProfile (extension_userAccount.vue?../node_modules/babel-loader/lib!../node_modules/vue-loader/lib??vue-loader-options:258)
    at invokeWithErrorHandling (vue.runtime.esm.js:1853)
    at HTMLButtonElement.invoker (vue.runtime.esm.js:2178)
    at HTMLButtonElement.original._wrapper (vue.runtime.esm.js:6901)
还有我的
firebaseInit.js


import * as firebase from "firebase/app";
import "firebase/firebase-auth";
import "firebase/firebase-firestore";

var firebaseConfig = {
    apiKey: "",
    authDomain: "",
    databaseURL: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: "",
    measurementId: ""
};


const fb = firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();

export {fb,db}

如果有人能帮我;)


import * as firebase from "firebase/app";
import "firebase/firebase-auth";
import "firebase/firebase-firestore";

var firebaseConfig = {
    apiKey: "",
    authDomain: "",
    databaseURL: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: "",
    measurementId: ""
};


const fb = firebase.initializeApp(firebaseConfig);
const db = firebase.firestore();

export {fb,db}