javascript - 无法读取未定义的 Vue Firebase 的属性“推送”
问题描述
您好,当我推送表单时遇到问题,我在 Firebase 上检查我看到数据已推送但数据为空。
我将 firebase 配置文件导入到我的 ProfileInfo.vue 文件中。
import { db } from '../../config/db';
这是我使用的方法。
AddProfile() {
this.$firebaseRefs.Profile.push({
firstName: this.profileData.firstName,
lastName: this.profileData.lastName,
phoneNumber: this.profileData.phoneNumber,
adress: this.profileData.adress,
gender: this.profileData.gender,
personalEmail: this.profileData.personalEmail,
companyName: this.profileData.companyName,
chamberOfCommerceNumber: this.profileData.chamberOfCommerceNumber,
street: this.profileData.street,
houseNumber: this.profileData.houseNumber,
zipCode: this.profileData.zipCode,
location: this.profileData.location,
companyEmail: this.profileData.companyEmail
})
this.profileData.firstName = '';
this.profileData.lastName = '';
this.profileData.phoneNumber = '';
this.profileData.adress = '';
this.profileData.gender = '';
this.profileData.personalEmail = '';
this.profileData.companyName = '';
this.profileData.chamberOfCommerceNumber = '';
this.profileData.street = '';
this.profileData.houseNumber = '';
this.profileData.zipCode = '';
this.profileData.location = '';
this.profileData.companyEmail = '';
// this.$router.push('/internship')
console.log('Added to database');
}
现在我的 Firebare 中的数据是空的:
解决方案
推荐阅读
- php - 类别表单构建器模块 PrestaShop 的问题
- android - 什么更有效:RxTextView.textChanges 或 doOnTextChanged?
- design-patterns - 命令模式是命令的单个实例
- r - RStudio Connect:无法在 R 版本 4.0.0 中部署
- awk - bash中两个连续行的值
- google-cloud-platform - 在重新启动计算引擎时,IP 地址仍然是静态的,尽管它应该是动态分配的
- python - 无法从 oracle pandas datafrime 写入镶木地板
- python - 如何在 Django 中大规模管理视图、URL 和模型?
- algorithm - 什么是更好的递归或迭代星形模式?
- visual-studio - Nuget 还原 - 无法解析远程名称