refactor(member page): extract global config getter method
extract repeated diyData.global access into a dedicated globalCfg computed property, simplify button visibility check logic
This commit is contained in:
@@ -96,11 +96,14 @@ export default {
|
||||
minHeight: this.openBottomNav ? 'calc(100vh - 55px)' : ''
|
||||
};
|
||||
},
|
||||
globalCfg() {
|
||||
return this.diyData?.global;
|
||||
},
|
||||
isShowCancelButton() {
|
||||
return this.diyData?.global?.isShowCancelButton?.[`${this.getAppType()}`] === 1
|
||||
return this.globalCfg?.isShowCancelButton?.[`${this.getAppType()}`] === 1
|
||||
},
|
||||
isShowLogoutButton() {
|
||||
return this.diyData?.global?.isShowLogoutButton?.[`${this.getAppType()}`] === 1
|
||||
return this.globalCfg?.isShowLogoutButton?.[`${this.getAppType()}`] === 1
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
Reference in New Issue
Block a user