This commit is contained in:
zyjnicemoe 2021-01-03 20:02:14 +08:00
parent ed5401b64b
commit 20a227ca85
7 changed files with 13775 additions and 13 deletions

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Title</title>
</head>
<body>
<div id="app">{{username.toUpperCase()}} <br /></div>
</body>
<script src="./js/vue.js"></script>
<script>
const app = new Vue({
//element 用来给Vue实例定义一个作用范围
el: "#app",
data: {
username: "hello Vue",
},
});
</script>
</html>

View File

@ -1,10 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
<head>
<meta charset="UTF-8" />
<title>Title</title>
</head>
<body>
<div id="app">
{{ msg }} <br />{{username}} <br />
{{pwd}}
<span v-for="item in items"> {{item.msg}} </span>
<h3>{{url.url}}</h3>
<h3>{{items[0].msg}}</h3>
</div>
</body>
<script src="./js/vue.js"></script>
<script>
const app = new Vue({
//element 用来给Vue实例定义一个作用范围
el: "#app",
data: {
msg: "百知欢迎你,期待你的加入",
username: "hello Vue",
pwd: "12345",
url: { url: "https://zyjblogs.cn" },
items: [
{ msg: "13131", age: 23 },
{ msg: "14424", age: 23 },
{ msg: "nini", age: 23 },
],
},
});
</script>
</html>

View File

@ -24,7 +24,6 @@
</div>
</div>
</body>
<script>
var vue = new Vue({
// <!-- el , element缩写 ,挂载元素-->
@ -44,7 +43,7 @@
};
},
mounted() {
axios.get("data.json").then((response) => (this.info = response.data));
axios.get("data/data.json").then((response) => (this.info = response.data));
},
});
</script>

1736
base/js/axios.js Normal file

File diff suppressed because it is too large Load Diff

11965
base/js/vue.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
<meta charset="UTF-8">
<title>Title</title>
<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
$END$
<div id="app">
{{a}}{{b}}
</div>
</body>
<script>
var data = {a : 1,b : 2};
var vm = new Vue({
el : "#app",
data : data
});
data.a = "hi ..... new ....";
data.b = "test"
vm.$data.b = "test1"
vm.$watch('a',function (newVal,oldVal){
console.log(newVal,oldVal);
})
vm.$data.a = "test1"
</script>
</html>

0
vue.md Normal file
View File