Skip to content
代码片段 群组 项目
提交 b91130fd 编辑于 作者: Jack Chapman's avatar Jack Chapman
浏览文件

Allow router navigation for children

If the child item link is displayed in the drawer
use Vue Router to navigate to it
上级 6f41b9d8
No related branches found
No related tags found
无相关合并请求
......@@ -864,6 +864,7 @@ export default {
:can-update-children="canUpdateChildren"
:confidential="workItem.confidential"
:allowed-child-types="allowedChildTypes"
:is-drawer="isDrawer"
@show-modal="openInModal"
@addChild="$emit('addChild')"
@childrenLoaded="hasChildren = $event"
......
......@@ -49,8 +49,10 @@ export default {
WorkItemRolledUpData,
},
inject: ['hasSubepicsFeature'],
provide: {
[INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION]: true,
provide() {
return {
[INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION]: !this.isDrawer,
};
},
props: {
fullPath: {
......@@ -100,6 +102,11 @@ export default {
required: false,
default: () => [],
},
isDrawer: {
type: Boolean,
required: false,
default: false,
},
},
data() {
return {
......
......@@ -373,4 +373,6 @@ export const WORKITEM_LINKS_SHOWLABELS_LOCALSTORAGEKEY = 'workItemLinks.showLabe
export const WORKITEM_TREE_SHOWLABELS_LOCALSTORAGEKEY = 'workItemTree.showLabels';
export const WORKITEM_RELATIONSHIPS_SHOWLABELS_LOCALSTORAGEKEY = 'workItemRelationships.showLabels';
export const INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION = 'injection:prevent-router-navigation';
export const INJECTION_LINK_CHILD_PREVENT_ROUTER_NAVIGATION = Symbol(
'injection:prevent-router-navigation',
);
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册