当前位置:网站首页>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>边栏推荐
猜你喜欢

Uni app wechat official account (4) - address management page

Express项目创建以及其路由介绍

Uni app wechat official account (5) - add and modify addresses

Uni app wechat official account (1) - Web page authorization login

tp-watermark.js网页添加水印插件

uni-app微信公众号(1)——网页授权登录

Uni app wechat applet - Mall (4) - merchants

NodeJS 跨域 CORS

uni-app微信小程序——商城(4)——商家

使用bat自动执行cmd命令(多个命令或单个命令)
随机推荐
2022年暑假ACM热身练习1(总结)
(九)Shell 输入输出重定向
Registry hijacking triggers malicious programs
mmap的 Bus error问题及解决
服务器如何安装宝塔面板?(宝塔面板安装教程)
记一次用canvas做出腾讯云首页banner流光效果的经历
Colorful text advertising code, text advertising code beautification version, add text advertising tutorials to the website
promise
Initial flask
openGauss内核分析-统计信息与行数估计
C Programming Language(2nd Edition)--读书笔记--1.5.1
时间戳转化时间
缤纷彩色文字广告代码,文字广告代码美化版,给网站添加文字广告教程
分布式之数据库和缓存双写一致性方案解析(转载)
uniapp调用地图,进行位置查询,标记定位
量化行业知识汇总
How to modify the color of a line of text in the elemtnui table (elemtnui table modifies the color of a line of text)
JS高阶函数 filter/map/reduce
uni-app微信小程序——商城(4)——商家
uni-app微信小程序——商城(8)——订单详情