Vue之Mustache语法

摘要:
htmllang="en">metacharset="UTF-8">divid="app">{{message}}<{{message}};也可以写简单的表达式--&gt,{{firstName+lastName}}<{{firstName+''+lastName}}<{{firstName}}{{lastName}}<{{counter*2}}<

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <h2>{{message}}</h2>
    <h2>{{message}},兮动人</h2>
<!--mustache语法中,不仅仅可以直接写变量,也可以写简单的表达式    -->
    <h2>{{firstName + lastName}}</h2>
    <h2>{{firstName + ' ' +lastName}}</h2>
    <h2>{{firstName}} {{lastName}}</h2>
    <h2>{{counter * 2}}</h2>
</div>

<script src="../js/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            message: '你好啊',
            firstName: 'xi',
            lastName: 'dongren',
            counter: 100
        }
    })
</script>
</body>
</html>

在这里插入图片描述

免责声明:文章转载自《Vue之Mustache语法》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Git 快速入门Ubuntu CEPH快速安装下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

四、Haproxy的4层及7层IP透传

IP透传是web服务器中需要记录客户端的真实IP地址,用于做访问统计、安全防护、行为分析、区域排行等场景。 四层IP透传配置   haproxy 配置: listen web_prot bind 192.168.32.204:80 mode tcp balance roundrobin server web1 10.0.0.201 send-proxy...

集合工具类CollectionUtils、ListUtils、SetUtils、MapUtils的使用

要使用这个工具类,我们要在maven工程当中加入相应的依赖: <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>...

Python——常用模块

模块,就是一堆实现了某个功能的代码的集合。 一、time & datetime time.time() 返回当前时间的时间戳,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量。 1473344512.2949986 time.sleep(秒数) 使用该方法可以让程序休眠n秒,n可以是小数。 time.clock() 计算CPU...

Solr 入门实战(2)--SolrCloud 简介及安装

SolrCloud 是 Solr 的集群版,用于在多个服务器之间分发索引内容和查询请求。本文主要介绍 SolrCloud 的基本概念及安装,文中使用到的软件版本:Solr 8.9.0、jdk1.8.0_181。 1、SolrCloud 简介  SolrCloud 是 Solr 提供的分布式搜索方案,具有容错性和高可用性。SolrCloud 使用 ZooKe...

python接口自动化测试二十:函数写接口测试

python接口自动化测试二十:函数写接口测试  # coding:utf-8import requestsimport refrom bs4 import BeautifulSoup# s = requests.session() # 全局的sdef get_token(s): ''' fuction: 获取token args:...

(转载)HTTP状态码

转载请见https://blog.csdn.net/Lkeven/article/details/52775296 HTTP Status Code 常见的状态码: HTTP: Status 200 – 服务器成功返回网页 HTTP: Status 404 – 请求的网页不存在 HTTP: Status 503 – 服务不可用 详解 说明: HTTP:...