微信小程序
shift
# Command.shift(): Command
支持端:小程序 , 云函数 , Web
数组更新操作符,对一个值为数组的字段,将数组头部元素删除。
# 返回值
# Command
# 示例代码
const _ = db.command
db.collection('todos').doc('doc-id').update({
data: {
tags: _.shift()
}
})
支持端:小程序 , 云函数 , Web
数组更新操作符,对一个值为数组的字段,将数组头部元素删除。
const _ = db.command
db.collection('todos').doc('doc-id').update({
data: {
tags: _.shift()
}
})