npm run lint,显示错误点:
30:9 error Getting a value from the `props` in root scope of `setup()` will cause the value to lose reactivity vue/no-setup-props-destructure
查看第30行代码:
setup ( props ) => { .... let total = props.total .... }
原因是变更名“total”与“ props.total”同名了,npm run serve编译通过,但运行npm run lint或npm run build,会报错。
另外,在return { total },也会报错,所以在返回值中不能重复输出total。
标签:npm,Vue3,run,Setup,props,报错,Props,total,setup From: https://www.cnblogs.com/nbwsj/p/16909566.html