v-bind错误:v-bind'是未声明的前缀 [英] v-bind error:v-bind' is an undeclared prefix
本文介绍了v-bind错误:v-bind'是未声明的前缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Orckestra CMS(在Composite之前)和Razor模板在asp.net中工作,并尝试使用Vue框架.
I'm working in asp.net with Orckestra CMS (before Composite) and Razor Templates and trying to use Vue framework.
使用{{option.text}}
All is fine when using {{option.text}}
<select class="form-control" id="myExample1">
<option v-for="option in options">{{option.text}}</option>
</select>
但是当我插入v-bind属性时,页面坏了:
But when I insert v-bind attribute, the page is broken:
<select class="form-control" id="myExample1">
<option v-for="option in options" v-bind:value="option.value">{{option.text}}</option>
</select>
渲染页面失败并显示错误:"v-bind"是未声明的前缀."
推荐答案
已解决:问题是XHTML验证,对标签,属性等非常严格.
SOLVED: The problem is the XHTML validation, is very strict with tags, attributes, etc.
排序此验证的方法是在< ![CDATA[ "blablabla" ]]>
The way to sort this validation is inset the code between < ![CDATA[ "blablabla" ]]>
<select class="form-control" id="myExample1">
<![CDATA[
<option v-for="option in options" v-bind:value="option.value">{{option.text}}</option>
]]>
</select>
这篇关于v-bind错误:v-bind'是未声明的前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文