10 |
├── static
├── .gitkeep
└── img
│ └── user.png
├── src
├── store
│ ├── actions.js
│ ├── getters.js
│ ├── modules
│ │ ├── load.js
│ │ ├── user.js
│ │ ├── comment.js
│ │ └── article.js
│ ├── mutation-types.js
│ └── index.js
├── assets
│ └── logo.png
├── config.js
├── api
│ ├── resources.js
│ └── index.js
├── components
│ ├── Loading.vue
│ ├── FooterBar.vue
│ ├── ArticleList.vue
│ ├── Pagination.vue
│ ├── Signin.vue
│ ├── HeaderBar.vue
│ ├── Signup.vue
│ ├── ArticleEdit.vue
│ └── ArticleDetail.vue
├── App.vue
├── main.js
├── router.js
└── filters
│ └── index.js
├── .eslintignore
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── .babelrc
├── index.html
├── .eslintrc.js
├── README.md
└── package.json
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/store/actions.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/store/getters.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | config/*.js
3 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drafish/vue-blog/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/static/img/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drafish/vue-blog/HEAD/static/img/user.png
--------------------------------------------------------------------------------
/src/config.js:
--------------------------------------------------------------------------------
1 | export const API_ROOT = (process.env.NODE_ENV === 'production')
2 | ? 'https://vue.paidepaiper.top/'
3 | : 'http://localhost:9001/'
4 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | *.suo
11 | *.ntvs*
12 | *.njsproj
13 | *.sln
14 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserslist" field in package.json
6 | "autoprefixer": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/api/resources.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export const ArticleResource = axios.create({baseURL: 'home/article'})
4 | export const UserResource = axios.create({baseURL: 'home/user'})
5 | export const CommentResource = axios.create({baseURL: 'home/comment'})
6 |
--------------------------------------------------------------------------------
/src/store/modules/load.js:
--------------------------------------------------------------------------------
1 | import {SET_ISFETCH} from '../mutation-types'
2 |
3 | const state = {
4 | isFetch: 0
5 | }
6 |
7 | const mutations = {
8 | [SET_ISFETCH] (state, isFetch) {
9 | state.isFetch = isFetch
10 | }
11 | }
12 |
13 | export default {
14 | state,
15 | mutations
16 | }
17 |
--------------------------------------------------------------------------------
/src/components/Loading.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
(作者)
46 |{{comment.createTime|smartDate}}
47 |还没有人评论...
56 | 57 |