简体   繁体   English

以HTML呈现的Vue语法

[英]Vue syntax rendered in HTML

I'm getting acquainted with Vue.js and reading and trying out someone else's code in order to understand what is going on. 我已经熟悉Vue.js,并阅读并尝试了其他人的代码以了解发生了什么。

While rendering HTML, i get Vue conditionals rendered on the page, like this 在渲染HTML时,我在页面上渲染了Vue条件,就像这样 页面截图

The HTML looks like this %div.validation-error v-if="errors.has('start')" %p.error Bitte wählen Sie aus, ab wann Sie Ihren Austauschschüler aufnehmen wollen. HTML看起来像这样%div.validation-error v-if="errors.has('start')" %p.error Bitte wählen Sie aus, ab wann Sie Ihren Austauschschüler aufnehmen wollen.

What can be the reason for that? 可能是什么原因呢? I have vee-validate added as script in the layout. 我在布局中添加了vee-validate作为脚本。

You are using HAML but are setting attributes values in a non-supported way. 您正在使用HAML,但是以不受支持的方式设置属性值。

See http://haml.info/docs/yardoc/file.REFERENCE.html#attributes for a reference: 有关参考,请参见http://haml.info/docs/yardoc/file.REFERENCE.html#attributes

For example: 例如:

 %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"} 

is compiled to: 编译为:

 <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'></html> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM