diff --git a/client/src/component/ImageItem.vue b/client/src/component/ImageItem.vue index a68e483..85b96af 100644 --- a/client/src/component/ImageItem.vue +++ b/client/src/component/ImageItem.vue @@ -8,7 +8,6 @@ class="fa fa-upload" v-if="!uploading && !uploaded" @click="onUploadButtonClick" - :flag="flag" > +
+
+ + + {{ tipsContent }} +
+
+ + + + + diff --git a/client/src/store/index.js b/client/src/store/index.js index 6e01d9e..43f889c 100644 --- a/client/src/store/index.js +++ b/client/src/store/index.js @@ -3,13 +3,15 @@ import Vuex from 'vuex'; import img from './modules/img.js'; import user from './modules/user.js'; +import tip from './modules/tip.js'; Vue.use(Vuex); const store = new Vuex.Store({ modules: { img, - user + user, + tip } }); diff --git a/client/src/store/modules/tip.js b/client/src/store/modules/tip.js new file mode 100644 index 0000000..9073f78 --- /dev/null +++ b/client/src/store/modules/tip.js @@ -0,0 +1,36 @@ +import axios from 'axios'; + +import * as api from '../../api.js'; +import * as types from '../types.js'; + +const store = { + + state: { + content: '', + show: false, + type: 0 + }, + getters: { + + }, + mutations: { + + [types.MUTATION_TIP_SHOWTIPS](state, payload){ + state.content = payload.content; + state.type = payload.type; + state.show = true; + setTimeout(() => { + state.show = false; + }, 2000); + }, + + }, + actions: { + + + } + + +} + +export default store; \ No newline at end of file diff --git a/client/src/store/types.js b/client/src/store/types.js index 0f7afc3..07161b8 100644 --- a/client/src/store/types.js +++ b/client/src/store/types.js @@ -19,4 +19,6 @@ export const MUTATION_IMG_REMOVEOWNIMG = 'MUTATION_IMG_REMOVEOWNIMG'; export const ACTION_IMG_TOUPLOADIMG = 'ACTION_IMG_TOUPLOADIMG'; export const ACTION_IMG_TOUPLOADALLIMG = 'ACTION_IMG_TOUPLOADALLIMG'; export const ACTION_IMG_GETLIST = 'ACTION_IMG_GETLIST'; -export const ACTION_IMG_REMOVEOWN = 'ACTION_IMG_REMOVEOWN'; \ No newline at end of file +export const ACTION_IMG_REMOVEOWN = 'ACTION_IMG_REMOVEOWN'; + +export const MUTATION_TIP_SHOWTIPS = 'MUTATION_TIP_SHOWTIPS'; \ No newline at end of file diff --git a/client/src/view/App.vue b/client/src/view/App.vue index f0b15c0..a358763 100644 --- a/client/src/view/App.vue +++ b/client/src/view/App.vue @@ -21,6 +21,10 @@ v-if="loginOrRegisterBoxActive" /> +