时间戳变量存储在 firestore 中,提取后它的格式为秒和纳秒,如何将时间戳转换为 2018-09-19T00:00:00 等格式
let Ref=firebase.firestore().collection("Recruiter").doc(u.uid).collection("Jobs")
Ref.orderBy("timestamp", "desc").onSnapshot(function(snapshot){
$.each(snapshot.docChanges(), function(){
var change= this
if(change.type==="added"){
var ab= new Date(change.doc.data().timestamp)
console.log(ab)
thisIns.RecruiterChart.chartOptions.xaxis.categories.push(
ab
)
console.log( thisIns.RecruiterChart.chartOptions.xaxis.categories)
}
})
})
Run Code Online (Sandbox Code Playgroud)
变量 ab 在控制台上显示“无效日期”
javascript firebase google-cloud-platform google-cloud-firestore
我正在尝试在 firebase 托管上部署我的项目。每当我使用firebase init它时,它都会在终端中显示错误,因为“firebaserc 已经有一个默认项目”,并且它会因该错误而退出
我再次尝试了 firebase 注销和 firebase 登录。并使用“firebase use”命令也更改了项目,但它仍在默认项目上执行 firebase init 操作
我想删除该默认项目
当我使用存储数据时
<vs-textarea v-model="textarea" label=" Description " rows="5" />
Run Code Online (Sandbox Code Playgroud)
例如
abc
def
geh
Run Code Online (Sandbox Code Playgroud)
数据以字符串的格式存储在firestore中
abc def geh
使用检索时会显示相同的内容
<vs-collapse>
<vs-collapse-item>
<div slot="header">Read More</div>
{{ jobDetails.description }}
</vs-collapse-item>
</vs-collapse>
Run Code Online (Sandbox Code Playgroud)
如何在 firestore 中存储多行文本?