Skip to content

Commit 8dbaa98

Browse files
committed
first commit
0 parents  commit 8dbaa98

File tree

17 files changed

+11231
-0
lines changed

17 files changed

+11231
-0
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?

babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
}

package-lock.json

Lines changed: 10885 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "vuex-project",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build"
8+
},
9+
"dependencies": {
10+
"vue": "^2.5.17",
11+
"vue-router": "^3.0.1",
12+
"vuetify": "^1.3.0",
13+
"vuex": "^3.0.1"
14+
},
15+
"devDependencies": {
16+
"@vue/cli-plugin-babel": "^3.0.5",
17+
"@vue/cli-service": "^3.0.5",
18+
"stylus": "^0.54.5",
19+
"stylus-loader": "^3.0.1",
20+
"vue-cli-plugin-vuetify": "^0.4.4",
21+
"vue-template-compiler": "^2.5.17",
22+
"vuetify-loader": "^1.0.5"
23+
},
24+
"postcss": {
25+
"plugins": {
26+
"autoprefixer": {}
27+
}
28+
},
29+
"browserslist": [
30+
"> 1%",
31+
"last 2 versions",
32+
"not ie <= 8"
33+
]
34+
}

public/favicon.ico

1.12 KB
Binary file not shown.

public/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title>vuex-project</title>
9+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
10+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
11+
</head>
12+
<body>
13+
<noscript>
14+
<strong>We're sorry but vuex-project doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
15+
</noscript>
16+
<div id="app"></div>
17+
<!-- built files will be auto injected -->
18+
</body>
19+
</html>

src/App.vue

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<template>
2+
<v-app id="inspire">
3+
<v-navigation-drawer v-model="drawer" fixed app>
4+
<v-list dense>
5+
<v-list-tile router :to="{name: 'home'}" exact>
6+
<v-list-tile-action>
7+
<v-icon>home</v-icon>
8+
</v-list-tile-action>
9+
<v-list-tile-content>
10+
<v-list-tile-title>Home</v-list-tile-title>
11+
</v-list-tile-content>
12+
</v-list-tile>
13+
14+
<v-list-tile router :to="{name: 'users'}" exact>
15+
<v-list-tile-action>
16+
<v-icon>person</v-icon>
17+
</v-list-tile-action>
18+
<v-list-tile-content>
19+
<v-list-tile-title>Users</v-list-tile-title>
20+
</v-list-tile-content>
21+
</v-list-tile>
22+
</v-list>
23+
</v-navigation-drawer>
24+
25+
<v-toolbar color="indigo" dark fixed app>
26+
<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
27+
<v-toolbar-title>Application</v-toolbar-title>
28+
</v-toolbar>
29+
30+
<v-content>
31+
<router-view></router-view>
32+
</v-content>
33+
34+
<v-footer color="indigo" app>
35+
<span class="white--text">&copy; 2019 AGUMON</span>
36+
</v-footer>
37+
</v-app>
38+
</template>
39+
40+
<script>
41+
export default {
42+
data: () => ({
43+
drawer: null
44+
}),
45+
props: {
46+
source: String
47+
}
48+
};
49+
</script>

src/assets/logo.png

6.69 KB
Loading

src/assets/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/Users/AllUsers.vue

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<template>
2+
<div>
3+
<h1>회원 리스트</h1>
4+
<h3>총 {{ allUsersCount }}명</h3>
5+
<h3>서울 거주 회원 : {{ countOfSeoul }}명 ({{ percentOfSeoul }}%)</h3>
6+
<v-list two-line>
7+
<v-list-tile v-for="(user, index) in allUsers" :key="index" avatar>
8+
<v-list-tile-avatar color="grey lighten-3">
9+
<img :src="user.src" />
10+
</v-list-tile-avatar>
11+
12+
<v-list-tile-content>
13+
<v-list-tile-title v-html="user.name"></v-list-tile-title>
14+
<v-list-tile-sub-title>id:#{{ index }} / {{ user.address }} 거주</v-list-tile-sub-title>
15+
</v-list-tile-content>
16+
</v-list-tile>
17+
</v-list>
18+
</div>
19+
</template>
20+
21+
<script>
22+
import { EventBus } from "@/main.js";
23+
import { mapState, mapGetters } from "vuex";
24+
25+
export default {
26+
data() {
27+
return {
28+
}
29+
},
30+
computed: {
31+
...mapState(['allUsers']),
32+
...mapGetters(['allUsersCount', 'countOfSeoul', 'percentOfSeoul'])
33+
},
34+
mounted() {
35+
EventBus.$on("signUp", users => {
36+
this.$store.state.allUsers.push(users);
37+
});
38+
}
39+
};
40+
</script>

0 commit comments

Comments
 (0)