当前位置:网站首页>01_ Template syntax
01_ Template syntax
2022-07-19 01:36:00 【ID does not exist.】
Template syntax
Vue Template syntax has 2 Categories: :
Interpolation Syntax :
function : Used to parse the contents of the tag body
How to write it :{ {xxx}},xxx yes js expression , And can directly read data All properties in
Instruction syntax :
function : Used to parse tags ( Include : Tag attributes 、 Label body properties 、 The binding event .......)
give an example :v-bind:href="xxx" Or abbreviated as :href="xxx",xxx Also write js expression , And can directly read data All properties in
<body>
<div id="root">
<h1> Interpolation Syntax </h1>
<h3> Hello ,{
{name}}</h3>
<hr />
<h1> Instruction syntax </h1>
<a v-bind:href="school.url.toUpperCase()" x="hello"> Let me go {
{school.name}} Study 1</a>
<a :href="school.url" x="hello"> Let me go {
{school.name}} Study 2</a>
</div>
</body>
<script type="text/javascript">
Vue.config.productionTip = false // prevent vue Generate production prompts at startup .
new Vue({
el: '#root',
data: {
name: 'jack',
school: {
name: ' Silicon Valley ',
url: 'http://www.atguigu.com',
}
}
})
</script>边栏推荐
- The applet is embedded in the web page, jumps to the applet and transmits parameters. The wechat applet realizes the authorization of official account to obtain openid
- uniapp中text-indent不起作用,uniapp首行缩进不管用如何解决?
- Summary of Applied Cryptography
- (6) Test command
- 当 std::bind 遇上 this
- XXX packages are looking for funding run `npm fund` for details解决方法
- Assemblage stylisé de cartes de commutation auto - encapsulées
- Nodejs cross domain CORS
- Replace special characters in URL (%e2%80%8b)
- [elementui El date picker date selector, the end time must not be earlier than the start time, and only the date of the specified number of days from the start time can be selected]
猜你喜欢
随机推荐
Initial flask
二分法查找
JSX compilation
How to modify the color of a line of text in the elemtnui table (elemtnui table modifies the color of a line of text)
红日靶场2
JS get the suffix format of a file name
07_事件的基本使用
Champ de tir rouge 3
E-commerce background management login
object-fit:cover;在小程序中不起作用,小程序图片变形了如何处理
分布式之数据库和缓存双写一致性方案解析(转载)
Replace special characters in URL (%e2%80%8b)
Summary of Applied Cryptography
uniapp中text-indent不起作用,uniapp首行缩进不管用如何解决?
Assemblage stylisé de cartes de commutation auto - encapsulées
The applet is embedded in the web page, jumps to the applet and transmits parameters. The wechat applet realizes the authorization of official account to obtain openid
uni-app微信小程序——商城(3)——商城主页
uni canvas截取图片
解决小程序自定义底部菜单切换闪动
[GFCTF 2021]Baby_ Cve-2021-41773 on the web









