似乎我可以同时使用这两个元素来隐藏元素的水平滚动条:
db.getCollection("repos").aggregate(
// Pipeline
[
// Stage 1
{
$group: {
_id: {
month: {
$month: {
$dateFromString: {
dateString: "$created_at"
}
}
},
day: {
$dayOfMonth: {
$dateFromString: {
dateString: "$created_at"
}
}
},
year: {
$year: {
$dateFromString: {
dateString: "$created_at"
}
}
}
},
languages: { $push: { item: "$language"} },
}
},
// Stage 2
{
$project: {
// specifications
date: {
$dateFromParts: {
'year' : '$_id.year', 'month' : '$_id.month', 'day': '$_id.day'
}
},
document: '$$ROOT'
}
},
// Stage 3
{
$sort: {
$sort: {date: -1}
}
},
]
);
哪种是隐藏水平滚动条的更好解决方案?