computed:{ currentTimeA: function() { return Date.now(); } }
<div>{{currentTimeA()}}</div>
在运行的时候出现vue.js:634 [Vue warn]: Error in render: "TypeError: currentTimeA is not a function"
在查看网上的解决办法时了解到computed(计算属性)中的内容会被看作是一个属性,正确的书写方法为。
computed:{ currentTimeA: function() { return function (){Date.now();} } }
- quot TypeError computed function renderquot typeerror computed function compute_class_weight positional typeerror argument getusermedia typeerror navigator function computer function design basic searchlist typeerror function slice defineconfig typeerror function not javascript typeerror uncaught function typeerror function gitbook问题 typeerror function track vue3 typeerror classname function taro3