提交Github临时代码

new_branch1
roger 2 years ago
parent ddcafab605
commit 2a7fbb0be1
  1. 6800
      20_脚手架/vue_code/public/css/bootstrap.css
  2. 1
      20_脚手架/vue_code/public/index.html
  3. 60
      20_脚手架/vue_code/src/App.vue
  4. 63
      20_脚手架/vue_code/src/components/List.vue
  5. 26
      20_脚手架/vue_code/src/components/Search.vue

File diff suppressed because it is too large Load Diff

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" href="<%= BASE_URL %>css/bootstrap.css">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>

@ -1,56 +1,20 @@
<template> <template>
<div id="app"> <div class="container">
<div> <Search/>
<section> <List/>
<h3>Search Github Users</h3>
<div>
<input type="text" placeholder="enter the name you search">&nbsp;<button>Search</button>
</div>
</section>
</div>
<div class="row">
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import Search from "@/components/Search.vue";
import List from "@/components/List.vue"
export default { export default {
name: "App" name: "App",
components: {Search, List}
} }
</script> </script>
<style>
</style>

@ -1,5 +1,42 @@
<template> <template>
<div class="row">
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
<div class="card">
<a href="https://github.com/xxxxxx" target="_blank">
<img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/>
</a>
<p class="card-text">xxxxx</p>
</div>
</div>
</template> </template>
<script> <script>
@ -9,5 +46,29 @@ export default {
</script> </script>
<style scoped> <style scoped>
.album {
min-height: 50rem; /* Can be removed; just added for demo purposes */
padding-top: 3rem;
padding-bottom: 3rem;
background-color: #f7f7f7;
}
.card {
float: left;
width: 33.333%;
padding: .75rem;
margin-bottom: 2rem;
border: 1px solid #efefef;
text-align: center;
border-radius: 10px;
}
.card > img {
margin-bottom: .75rem;
border-radius: 100px;
}
.card-text {
font-size: 85%;
}
</style> </style>

@ -1,10 +1,32 @@
<template> <template>
<div>
<section class="jumbotron">
<h3 class="jumbotron-heading">Search Github Users</h3>
<div>
<input type="text" placeholder="enter the name you search" v-model="input">&nbsp;<button @click="getUser()">Search</button>
</div>
</section>
</div>
</template> </template>
<script> <script>
import axios from "axios";
export default { export default {
name: "Search" name: "Search",
data() {
return {
input: ""
}
},
methods: {
getUser(e) {
axios.get('https://api.github.com/search/users?', {params: {"q": this.input}}).then(
response => {
console.log(response.data)},
)
}
}
} }
</script> </script>

Loading…
Cancel
Save