Vue 2.x All In One
Vue 2.x All In One
https://vuejs.org/v2/guide/syntax.html
https://cn.vuejs.org/v2/guide/syntax.html
http://www.runoob.com/vue2/vue-tutorial.html
vue 2.x demos
demos
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vue 2.x Demo</title>
</head>
<body>
<section>
<div id="vue_det">
<h1>site : {{site}}</h1>
<h1>url : {{url}}</h1>
<h1>{{details()}}</h1>
</div>
</section>
<!-- libs -->
<script src="https://unpkg.com/vue@2.5.16/dist/vue.js"></script>
<!-- <script src="https://unpkg.com/vue@2.5.16/dist/vue.min.js"></script> -->
<!-- js -->
<script type="text/javascript">
var vm = new Vue({
el: '#vue_det',
// vm === data
data: {
site: "Vue 2.x 教程",
url: "vue.xgqfrms.xyz",
alexa: "100",
},
methods: {
// arrow function bug
// details: () => {
// let site = this.site;
// return `${site} 学的不仅是技术,更是梦想!`;
// },
details: function() {
let site = this.site;
return `${site} 学的不仅是技术,更是梦想!`;
}
}
});
vm.site = "https://vue.xgqfrms.xyz";
</script>
</body>
</html>
devtools & browser-sync
https://github.com/xgqfrms-GitHub/browser-sync
demos
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/9061432.html
未经授权禁止转载,违者必究!