头像上传功能、性别选择

This commit is contained in:
橙子
2022-10-13 23:55:21 +08:00
parent 3555b08fe8
commit 8456320884
119 changed files with 51 additions and 31 deletions

View File

@@ -0,0 +1,36 @@
const state = {
basePath: "",
extendPath:""
}
const mutations = { //变化//载荷
SetExtendPath(state, extendPath) {
state.extendPath = extendPath
},
SetBasePath(state, basePath) {
state.basePath = basePath
}
}
//在action中可以配合axios进行权限判断
const actions = { //动作
Set_ExtendPath(context,extendPath) {
context.commit('SetExtendPath',extendPath)
},
Set_BasePath(context,basePath) {
context.commit('SetBasePath',basePath)
},
Add_ExtendPath(context,extendPath) {
context.commit('SetExtendPath',context.state.extendPath+"/"+extendPath)
},
}
const getters = {
path: state => {
return state.basePath+state.extendPath;
}
}
export default { state, mutations, actions, getters }