在class中添加 {’another‘:age>29} 后就報(bào)錯(cuò)了 這是為啥呀?
錯(cuò)誤提示:
Uncaught DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided ('[object Object]') contains HTML space characters, which are not valid in tokens.
源碼:
?<div?v-show="item.age?>?29"
??????????:class="['active','add','more',{'another':true}]"? ? <-就是這一行 去掉那個(gè)another就可以 但是加上就不行。。我迷了。。
??????????:style?=?'styleMsg'>
??????????{{item.name}}
????????</div>
2020-10-07
{'another':item.age>29}