我似乎找不到这个问题的任何解决方案。我只是不知道怎么了。
我已经在群聚中尝试过此Mongo减法,但没有希望。该帖子也无法进一步解释。
这是我的代码:
var aggregateOptions;
aggregateOptions = [{
$match: {
}
},{
$group: {
_id: "$customerID",
totalAmount: { $sum: "$amount" },
totalpaidAmount: { $sum: "$paidAmount" },
totalAmountDue: { $subtract: ["$totalAmount", "totalpaidAmount"] }
}
}];
Sale.sales.get(Sale.Schema, aggregateOptions, (err, saleRecord) => {
if (err) throw err;
console.log(saleRecord);
res.json({
pageTitle: "Customer List",
currentUser: req.user,
saleRecord: saleRecord,
});
});
Run Code Online (Sandbox Code Playgroud)
提示MongoError:每次我查询$ subtract累加器都是一元运算符。
我试图在动态生成的子标题 v-list-tile Vuetify https://vuetifyjs.com/en/components/subheaders上绑定单击事件,但每次单击该选项时都会出现错误。
vue.js:634 [Vue warn]: Error in v-on handler: "TypeError: handler.apply is not a function"
found in
---> <VListTile>
<VList>
<VCard>
<VApp>
<Root>
Run Code Online (Sandbox Code Playgroud)
我尝试过强制添加方法(不传递对象)并且它有效。它仅在传递给对象并动态渲染时触发。
这是我遇到的错误的Codepen 。
我期望的是触发被调用的方法而不触发错误