Skip to content

Commit

Permalink
Merge pull request TencentBlueKing#1070 from lannoy0523/issue_1066
Browse files Browse the repository at this point in the history
bug:仓库树展示错误(仓库搜索tooltip修正,流水线仓二级以下仓带displayName属性展示修正) TencentBlueKing#1066
  • Loading branch information
owenlxu committed Aug 18, 2023
2 parents 8c538df + f12030e commit e0809f8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Icon class="mr5" size="14" :name="openList.includes(item.roadMap) ? 'folder-open' : 'folder'" />
</slot>
<slot name="text" :item="item">
<div class="mr10 node-text" v-html="importantTransform(item.displayName)" v-bk-tooltips="{ content: item.name, placements: ['top'], disabled: item.name.toString().length < 19 || openType !== '' }"></div>
<div class="mr10 node-text" v-html="importantTransform(item.displayName)" :title="item.displayName.toString().length > 19 && openType === '' ? item.displayName : ''"></div>
</slot>
<div class="mr10 node-operation flex-align-center">
<slot name="operation" :item="item"></slot>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
request = Vue.prototype.$ajax.post(
`${prefix}/node/search`,
{
select: ['name', 'fullPath'],
select: ['name', 'fullPath', 'metadata'],
page: {
pageNumber: 1,
pageSize: 10000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
:tree="genericTree"
:important-search="importantSearch"
:open-list="genericTreeData.openList"
:selected-node="genericTreeData.selectedNode"
:open-type="genericTreeData.type"
:selected-node="genericTreeData.selectedNode"
@icon-click="iconClickHandler"
@item-click="itemClickHandler">
</repo-tree>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@
created () {
this.getRepoListAll({ projectId: this.projectId })
this.initTree()
if (this.repoName === 'pipeline') {
this.$nextTick(() => {
this.$refs.repoTree.openType = this.repoName
})
}
this.pathChange()
window.repositoryVue.$on('upload-refresh', debounce((path) => {
if (path.replace(/\/[^/]+$/, '').includes(this.selectedTreeNode.fullPath)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<template #icon><span></span></template>
<template #text="{ item: { name } }">
<div class="flex-1 flex-between-center">
<span class="text-overflow">{{ name }}</span>
<span class="text-overflow" :title="name.length > 19 ? name : ''">{{ name }}</span>
</div>
</template>
</repo-tree>
Expand Down

0 comments on commit e0809f8

Please sign in to comment.