一下报了四个错误:
Property or method "myprice" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
Invalid handler for event "click": got undefined
Error in nextTick: "TypeError: Cannot read properties of undefined (reading '_withTask')"
Cannot read properties of undefined (reading '_withTask')
如图:
结果:是因为methods拼写错误。
查错过程:
1、引起错误的几种原因
(1)函数没有写到methods中去
(2)调用的函数没有定义
(3)调用的函数名写错了
2、排查
发现methods拼写错误。