first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div class="app">
<ul>
<li v-for="(v,i) in newsList"
>{{i}} :{{v.title}}</li>
</ul>
<div class="show"v-show="isShow">展示show</div>
<div v-if=" vipLevel==1">VIP1</div><!--如果VIP等级为1显示这个div否则显示下面的div(可以继续判断)-->
<div v-else>VIP2</div>
<input type="text" placeholder="请输入用户名"v-model="username">
{{username}}
<button @click="hello(123456)">点击</button>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
new Vue({
el:".app",
data:{
test: '这是vue',
url:'https://www.baidu.com/',
newsList: [
{ title: '新闻1',id:1},
{ title: '新闻2',id:2},
{ title: '新闻3',id:3},
{ title: '新闻4',id:4},
{ title: '新闻5',id:5},
],
isShow:true,
vipLevel:1,
username:''
},
methods:{
hello(a){
console.log(a)
console.log(this.username)
}
}
})
</script>
</html>