Showing
9 changed files
with
100 additions
and
151 deletions
... | @@ -2196,6 +2196,37 @@ | ... | @@ -2196,6 +2196,37 @@ |
2196 | "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", | 2196 | "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", |
2197 | "dev": true | 2197 | "dev": true |
2198 | }, | 2198 | }, |
2199 | + "axios": { | ||
2200 | + "version": "0.19.2", | ||
2201 | + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", | ||
2202 | + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", | ||
2203 | + "requires": { | ||
2204 | + "follow-redirects": "1.5.10" | ||
2205 | + }, | ||
2206 | + "dependencies": { | ||
2207 | + "debug": { | ||
2208 | + "version": "3.1.0", | ||
2209 | + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", | ||
2210 | + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", | ||
2211 | + "requires": { | ||
2212 | + "ms": "2.0.0" | ||
2213 | + } | ||
2214 | + }, | ||
2215 | + "follow-redirects": { | ||
2216 | + "version": "1.5.10", | ||
2217 | + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", | ||
2218 | + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", | ||
2219 | + "requires": { | ||
2220 | + "debug": "=3.1.0" | ||
2221 | + } | ||
2222 | + }, | ||
2223 | + "ms": { | ||
2224 | + "version": "2.0.0", | ||
2225 | + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | ||
2226 | + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" | ||
2227 | + } | ||
2228 | + } | ||
2229 | + }, | ||
2199 | "babel-eslint": { | 2230 | "babel-eslint": { |
2200 | "version": "10.1.0", | 2231 | "version": "10.1.0", |
2201 | "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", | 2232 | "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", | ... | ... |
... | @@ -8,6 +8,7 @@ | ... | @@ -8,6 +8,7 @@ |
8 | "lint": "vue-cli-service lint" | 8 | "lint": "vue-cli-service lint" |
9 | }, | 9 | }, |
10 | "dependencies": { | 10 | "dependencies": { |
11 | + "axios": "^0.19.2", | ||
11 | "core-js": "^3.6.5", | 12 | "core-js": "^3.6.5", |
12 | "vue": "^2.6.11", | 13 | "vue": "^2.6.11", |
13 | "vue-router": "^3.2.0", | 14 | "vue-router": "^3.2.0", | ... | ... |
front-end/felol/public/lolinfologo.png
0 → 100644

60.5 KB
1 | -<template> </template> | 1 | +<template> |
2 | + <div> | ||
3 | + <home></home> | ||
4 | + </div> | ||
5 | +</template> | ||
2 | 6 | ||
3 | <script> | 7 | <script> |
4 | -export default {}; | 8 | +import home from './views/home'; |
9 | +export default { | ||
10 | + components: { | ||
11 | + home, | ||
12 | + }, | ||
13 | +}; | ||
5 | </script> | 14 | </script> |
6 | 15 | ||
7 | <style></style> | 16 | <style></style> | ... | ... |
front-end/felol/src/api/index.js
0 → 100644
1 | -<template> | ||
2 | - <div class="hello"> | ||
3 | - <h1>{{ msg }}</h1> | ||
4 | - <p> | ||
5 | - For a guide and recipes on how to configure / customize this project,<br /> | ||
6 | - check out the | ||
7 | - <a href="https://cli.vuejs.org" target="_blank" rel="noopener" | ||
8 | - >vue-cli documentation</a | ||
9 | - >. | ||
10 | - </p> | ||
11 | - <h3>Installed CLI Plugins</h3> | ||
12 | - <ul> | ||
13 | - <li> | ||
14 | - <a | ||
15 | - href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" | ||
16 | - target="_blank" | ||
17 | - rel="noopener" | ||
18 | - >babel</a | ||
19 | - > | ||
20 | - </li> | ||
21 | - <li> | ||
22 | - <a | ||
23 | - href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" | ||
24 | - target="_blank" | ||
25 | - rel="noopener" | ||
26 | - >router</a | ||
27 | - > | ||
28 | - </li> | ||
29 | - <li> | ||
30 | - <a | ||
31 | - href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" | ||
32 | - target="_blank" | ||
33 | - rel="noopener" | ||
34 | - >vuex</a | ||
35 | - > | ||
36 | - </li> | ||
37 | - <li> | ||
38 | - <a | ||
39 | - href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" | ||
40 | - target="_blank" | ||
41 | - rel="noopener" | ||
42 | - >eslint</a | ||
43 | - > | ||
44 | - </li> | ||
45 | - </ul> | ||
46 | - <h3>Essential Links</h3> | ||
47 | - <ul> | ||
48 | - <li> | ||
49 | - <a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a> | ||
50 | - </li> | ||
51 | - <li> | ||
52 | - <a href="https://forum.vuejs.org" target="_blank" rel="noopener" | ||
53 | - >Forum</a | ||
54 | - > | ||
55 | - </li> | ||
56 | - <li> | ||
57 | - <a href="https://chat.vuejs.org" target="_blank" rel="noopener" | ||
58 | - >Community Chat</a | ||
59 | - > | ||
60 | - </li> | ||
61 | - <li> | ||
62 | - <a href="https://twitter.com/vuejs" target="_blank" rel="noopener" | ||
63 | - >Twitter</a | ||
64 | - > | ||
65 | - </li> | ||
66 | - <li> | ||
67 | - <a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a> | ||
68 | - </li> | ||
69 | - </ul> | ||
70 | - <h3>Ecosystem</h3> | ||
71 | - <ul> | ||
72 | - <li> | ||
73 | - <a href="https://router.vuejs.org" target="_blank" rel="noopener" | ||
74 | - >vue-router</a | ||
75 | - > | ||
76 | - </li> | ||
77 | - <li> | ||
78 | - <a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a> | ||
79 | - </li> | ||
80 | - <li> | ||
81 | - <a | ||
82 | - href="https://github.com/vuejs/vue-devtools#vue-devtools" | ||
83 | - target="_blank" | ||
84 | - rel="noopener" | ||
85 | - >vue-devtools</a | ||
86 | - > | ||
87 | - </li> | ||
88 | - <li> | ||
89 | - <a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener" | ||
90 | - >vue-loader</a | ||
91 | - > | ||
92 | - </li> | ||
93 | - <li> | ||
94 | - <a | ||
95 | - href="https://github.com/vuejs/awesome-vue" | ||
96 | - target="_blank" | ||
97 | - rel="noopener" | ||
98 | - >awesome-vue</a | ||
99 | - > | ||
100 | - </li> | ||
101 | - </ul> | ||
102 | - </div> | ||
103 | -</template> | ||
104 | - | ||
105 | -<script> | ||
106 | -export default { | ||
107 | - name: "HelloWorld", | ||
108 | - props: { | ||
109 | - msg: String | ||
110 | - } | ||
111 | -}; | ||
112 | -</script> | ||
113 | - | ||
114 | -<!-- Add "scoped" attribute to limit CSS to this component only --> | ||
115 | -<style scoped> | ||
116 | -h3 { | ||
117 | - margin: 40px 0 0; | ||
118 | -} | ||
119 | -ul { | ||
120 | - list-style-type: none; | ||
121 | - padding: 0; | ||
122 | -} | ||
123 | -li { | ||
124 | - display: inline-block; | ||
125 | - margin: 0 10px; | ||
126 | -} | ||
127 | -a { | ||
128 | - color: #42b983; | ||
129 | -} | ||
130 | -</style> |
1 | -import Vue from "vue"; | 1 | +import Vue from 'vue'; |
2 | -import App from "./App.vue"; | 2 | +import App from './App.vue'; |
3 | -import router from "./router"; | 3 | +import router from './router'; |
4 | -import store from "./store"; | 4 | +import store from './store'; |
5 | 5 | ||
6 | Vue.config.productionTip = false; | 6 | Vue.config.productionTip = false; |
7 | 7 | ||
8 | new Vue({ | 8 | new Vue({ |
9 | - router, | 9 | + router, |
10 | - store, | 10 | + store, |
11 | - render: h => h(App) | 11 | + render: h => h(App), |
12 | -}).$mount("#app"); | 12 | +}).$mount('#app'); | ... | ... |
1 | import Vue from 'vue'; | 1 | import Vue from 'vue'; |
2 | import VueRouter from 'vue-router'; | 2 | import VueRouter from 'vue-router'; |
3 | -import Home from '../views/Home.vue'; | ||
4 | 3 | ||
5 | Vue.use(VueRouter); | 4 | Vue.use(VueRouter); |
6 | 5 | ||
... | @@ -8,16 +7,7 @@ const routes = [ | ... | @@ -8,16 +7,7 @@ const routes = [ |
8 | { | 7 | { |
9 | path: '/', | 8 | path: '/', |
10 | name: 'Home', | 9 | name: 'Home', |
11 | - component: Home, | 10 | + component: () => import('../views/home'), |
12 | - }, | ||
13 | - { | ||
14 | - path: '/about', | ||
15 | - name: 'About', | ||
16 | - // route level code-splitting | ||
17 | - // this generates a separate chunk (about.[hash].js) for this route | ||
18 | - // which is lazy-loaded when the route is visited. | ||
19 | - component: () => | ||
20 | - import(/* webpackChunkName: "about" */ '../views/About.vue'), | ||
21 | }, | 11 | }, |
22 | ]; | 12 | ]; |
23 | 13 | ... | ... |
front-end/felol/src/views/home.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="container"> | ||
3 | + <img src="../../public/lolinfologo.png" alt="logo" align="center" /> | ||
4 | + <form> | ||
5 | + <input | ||
6 | + type="text" | ||
7 | + v-model="search" | ||
8 | + placeholder="Search" | ||
9 | + autofocus | ||
10 | + align="center" | ||
11 | + /> | ||
12 | + <button v-show="search.length" @click="serachUser"> | ||
13 | + Search | ||
14 | + </button> | ||
15 | + </form> | ||
16 | + </div> | ||
17 | +</template> | ||
18 | + | ||
19 | +<script> | ||
20 | +import { searchU } from '../api/index'; | ||
21 | +export default { | ||
22 | + data() { | ||
23 | + return { | ||
24 | + search: '', | ||
25 | + }; | ||
26 | + }, | ||
27 | + methods: { | ||
28 | + async searchUser() { | ||
29 | + try { | ||
30 | + const userId = this.search; | ||
31 | + const response = await searchU(userId); | ||
32 | + console.log(response); | ||
33 | + } catch (error) { | ||
34 | + console.log('에러'); | ||
35 | + } | ||
36 | + }, | ||
37 | + }, | ||
38 | +}; | ||
39 | +</script> | ||
40 | + | ||
41 | +<style></style> |
-
Please register or login to post a comment