[英]How to fix this “” ESLing error?
This piece of code: 这段代码:
<template v-if="isTag(field, '')">
{{ getItemValue(item, field)
? getItemValue(item, field)
: '–'; }}
</template>
Is producing this error: 正在产生此错误:
invalid expression: missing ) after argument list in
无效的表达式:在参数列表后缺少)
"\\n "+_s(getItemValue(item, field) ? getItemValue(item, field) : '–';)+"\\n "
“ \\ n” + _s(getItemValue(item,field)?getItemValue(item,field):'–';)+“ \\ n”
Raw expression: {{ getItemValue(item, field) ?
原始表达式:{{getItemValue(item,field)? getItemValue(item, field) : '–';
getItemValue(item,field):'–'; }}
}}
I've stared at that code for ours but I still can't understand what's wrong. 我一直在盯着我们的代码,但是我仍然不明白哪里出了问题。
There's a semi-colon appearing before a closing brace ;)
. 在右括号前面有一个分号
;)
。 Making the assumption that this is a Vue template, semi-colons do not belong within Vue's template syntax. 假设这是Vue模板,则分号不属于Vue的模板语法。
_s(getItemValue(item, field) ? getItemValue(item, field) : '–';)
^^ Here
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.