vue.js - "Mustache" syntax alternative for Vue template when using Pug language
问题描述
"Mustache"
syntax allows defining data like this:
<template>
<Window>
<template v-slot:title >
{{title}}
</template>
</Window>
</template>
but compilation with lang='pug'
fails:
<template lang='pug'>
<Window>
<template v-slot:title >
{{title}}
</template>
</Window>
</template>
With this error:
Module build fails: unexpected text "{{" ...
Other templates without mustache
syntax usage build fine with lang='pug'
. What's the Pug's alternative to mustache
syntax?
解决方案
推荐阅读
- python-3.x - 将 python 2 代码修改为 python 3 时遇到问题
- javascript - 有时不执行ajax函数的成功部分
- java - Spring Data Jpa 不会自动获取 Next Id (PK),它总是从 1 开始
- python - 有人可以帮助修复康威的生命游戏吗
- java - 如何知道从动态添加的视图中单击了哪些切换按钮?
- excel - vb.net 调用 Excel WorksheetFunction 导致莫名其妙的错误“WorksheetFunction 类的 Max 方法失败”
- javascript - Sidenav 触发器在 Safari/iOS PWA 上不起作用
- python-3.x - pstats print_stats() 抛出错误 TypeError:描述符“write”需要一个“_io.StringIO”对象但收到一个“str”
- r - 如何编写函数来更改字符串并进行算术运算
- javascript - 如何在 react-native 中使用 ImageBackground 播放 gif?