File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,17 @@ export default new Vuex.Store({
1414 ...instanceStates ,
1515 ...userStates ,
1616 visibleDialogName : '' , // 全局显示的 dialog name
17+ hasNewFeatures : false // 是否提示用户有新的特性
1718 } ,
1819 mutations : {
1920 ...instanceMutations ,
2021 ...userMutations ,
2122 setVisibleDialogName ( state , newName ) {
2223 state . visibleDialogName = newName
2324 } ,
25+ setHasNewFeatures ( state , has ) {
26+ state . hasNewFeatures = has
27+ }
2428 } ,
2529 actions : {
2630 } ,
@@ -36,8 +40,12 @@ export default new Vuex.Store({
3640 } ,
3741 isSelfProfile ( state ) {
3842 // 判断当前访问的是否为自己的主页
39- const { loginState, loginInfo, curUserDetail } = state
40- return loginState && loginInfo . username === curUserDetail . username
43+ const { loginState, loginInfo : { username } , curUserDetail : { username : curUsername } } = state
44+ return loginState && username === curUsername
45+ } ,
46+ isSelfInstance ( state ) {
47+ const { loginState, loginInfo : { username } , curInstanceDetail : { username : curUsername } } = state
48+ return loginState && username === curUsername
4149 }
4250 }
4351} )
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ const user = {
2020 detail [ key ] = ''
2121 }
2222 state . curUserDetail = Object . assign ( { } , detail )
23+ } ,
24+ setFollowState : ( state , isFollow ) => {
25+ state . curUserDetail . isMyFollow = isFollow
2326 }
2427}
2528
You can’t perform that action at this time.
0 commit comments