Browse Source

fix(roles): 修复默认显示不是我的角色的问题

因为后台返回的mine字段是字符串的 前端当数字进行处理了, 此版本进行了更正
develop
wally 4 years ago
parent
commit
b69f94fcc8
  1. 1
      CHANGELOG.md
  2. 2
      src/pages/project/project.vue

1
CHANGELOG.md

@ -53,6 +53,7 @@
### 🐛 Bug 修复 ### 🐛 Bug 修复
范围|描述|commitId 范围|描述|commitId
--|--|-- --|--|--
ID1000343 | 解决向下预加载查询参数时间没+1颗粒度;以及滚动加载颗粒度写死的问题 | 940603a, closes #ID1000343
plugin | 插件解析机制完善 | 0f5a27d plugin | 插件解析机制完善 | 0f5a27d
project title | 项目标题修改; 切换角色移除script | 5c20017 project title | 项目标题修改; 切换角色移除script | 5c20017
role | 切换角色的逻辑修正完善 | 4ae534f role | 切换角色的逻辑修正完善 | 4ae534f

2
src/pages/project/project.vue

@ -133,7 +133,7 @@ export default {
// //
setInitialRoleId(visibleList) { setInitialRoleId(visibleList) {
const index = visibleList.findIndex(item => item.mine); const index = visibleList.findIndex(item => item.mine === '1');
const currentRole = index > 0 ? visibleList[index] : visibleList[0]; const currentRole = index > 0 ? visibleList[index] : visibleList[0];
const currentRoleId = currentRole ? currentRole.id : ''; const currentRoleId = currentRole ? currentRole.id : '';
this.setRoleId(currentRoleId); this.setRoleId(currentRoleId);

Loading…
Cancel
Save