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,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<style>
.red{
color: red;
}
</style>
</head>
<body>
<div class="app">
<div v-html="html"></div>
<a :href="href">{{baidu}}</a>
<ul>
<li v-for="b,index in Newlist"
@click="changgeRed(index)"
:class="index == indexx ? 'red' : '' ">
{{b.title}}:{{index+1}}
</li>
<h2 v-for='b,index in Newlist'>
<div v-if="index == indexx">
{{b.content}}
</div>
</h2>
</ul>
<input v-model="cd" type="text" placeholder="请输入">
{{ cd }}
</div>
</body>
<script>
var app = new Vue({
el: '.app',
data: {
baidu:'百度',
href: 'wwww.baidu.com',
html: '<h2>这是h2</h2>',
indexx: 0,
Newlist:[
{title: 'tabs1',content: '1'},
{title: 'tabs2',content: '2'},
{title: 'tabs3',content: '3'},
{title: 'tabs4',content: '4'}
],
cd: ''
},
methods:{
changgeRed(index){
this.indexx =index
console.log(index);
}
}
})
</script>
</html>

View File

@@ -0,0 +1,32 @@
class Utils {
getHello() {
console.log("测试");
}
}
function GetName() {
console.log("侧按时");
}
module.exports = new Utils()
// module.exports = new Utils();
exports.name = "zhangsan";
// module.exports = function() {
// // ...
// }

View File

@@ -0,0 +1,104 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<style>
.red {
color: red;
}
</style>
</head>
<body>
<div class="app">
<h2>{{tips}}</h2>
<a :href="href">百度</a>
<!-- <a v-bind:href="href">百度</a> -->
<div v-html="html"> </div>
<div class="red" v-show="isShow">你好</div>
<h2 v-if="showH2 == 1">1</h2>
<h2 v-else-if="showH2 == 2">2</h2>
<h2 v-else-if="showH2 == 3">3</h2>
<h2 v-else>4</h2>
<ul>
<li v-for="j,index in NewList"
@click="changeRed(index)"
:class="index == currentIndex ? 'red' : '' " >
{{ index+1 }} : {{ j.title }}
</li>
<h2 v-for="j,index in NewList">
<div v-if="index == currentIndex">
{{ j.content }}
</div>
</h2>
</ul>
<input v-model="UserName" type="text" placeholder="输入用户名">
{{ UserName }}
<span v-pre>{{ this will not be compiled }}</span>
</div>
</body>
<script>
// jq 对原生js的封装
// vue m(model) v(view) vm
// 双向数据绑定
// 指令
// v-bind 将data变量绑定到 标签属性上 简写 " : "
// v-html 将HTML字符串渲染到网页上
// v-show 将元素显示或者隐藏display none 实现
// v-if 将元素显示或者隐藏条件为false的时候会将dom节点删除
// v-for
// v-on: 绑定点击事件 简写 @
// v-model 数据双向绑定
var app = new Vue({
el: '.app',
data: { // 放数据的地方
tips: "这是vue学习",
href: 'http://www.baidu.com',
html: '<h2>我是H2</h2>',
isShow: false,
showH2: 3,
currentIndex: 0,
UserName: '',
NewList: [
{ title: '你好1', content: '1' },
{ title: '你好2', content: '2' },
{ title: '你好3', content: '3' }
]
},
// 放vue的所有方法
methods: {
changeRed(index) {
this.currentIndex = index
console.log(index);
}
}
})
</script>
</html>

View File

@@ -0,0 +1,8 @@
const { GetName } = {
GetName: function () {
}
};
GetName()

View File

@@ -0,0 +1,12 @@
{
"name": "2020-04-20",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}