开发中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.
Posted 火腿肠烧烤大赛冠军
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了开发中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.相关的知识,希望对你有一定的参考价值。
method没加s加上就好了
<body>
<div id="app">
<button @click="sub">-</button>
<span>code</span>
<button @click="add">+</button>
</div>
<script>
var app = new Vue(
el: "#app",
data:
code: 0
,
methods:
add: function ()
if (this.code < 10)
this.code++;
else
alert('到头啦!不要再加啦');
,
sub: function ()
if (this.code > 0)
this.code--;
else
alert('到头啦!不要再减啦');
)
</script>
</body>
以上是关于开发中遇到的bug-Property or method “xxxx“ is not defined on the instance but referenced during render.的主要内容,如果未能解决你的问题,请参考以下文章
开发中遇到的问题——java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant(代码
SignTool Error: No certificates were found that met all the given criteria