Skip to content

Commit

Permalink
Merge pull request #607 from veops/dev_ui_240828
Browse files Browse the repository at this point in the history
fix(ui): ci choice attr error
  • Loading branch information
LHRUN authored Aug 28, 2024
2 parents f3e8757 + 00c7a64 commit 02235d8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cmdb-ui/src/modules/cmdb/components/ciTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
:type="choice[1].icon.name"
/>
</template>
<a-tooltip placement="topLeft" :title="choice[1].label || choice[0]">
<span>{{ choice[1].label || choice[0] }}</span>
<a-tooltip placement="topLeft" :title="choice[1] ? choice[1].label || choice[0] : choice[0]">
<span>{{ choice[1] ? choice[1].label || choice[0] : choice[0] }}</span>
</a-tooltip>
</span>
</a-select-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
v-if="choice[1] && choice[1].icon && choice[1].icon.name"
:type="choice[1].icon.name"
/>
<a-tooltip placement="topLeft" :title="choice[1].label || choice[0]" >
{{ choice[1].label || choice[0] }}
<a-tooltip placement="topLeft" :title="choice[1] ? choice[1].label || choice[0] : choice[0]" >
{{ choice[1] ? choice[1].label || choice[0] : choice[0] }}
</a-tooltip>
</span>
</a-select-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
:type="choice[1].icon.name"
/>
</template>
{{ choice[1].label || choice[0] }}
{{ choice[1] ? choice[1].label || choice[0] : choice[0] }}
</span>
</a-select-option>
</a-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
:type="choice[1].icon.name"
/>
</template>
<a-tooltip placement="topLeft" :title="choice[1].label || choice[0]">
{{ choice[1].label || choice[0] }}
<a-tooltip placement="topLeft" :title="choice[1] ? choice[1].label || choice[0] : choice[0]">
{{ choice[1] ? choice[1].label || choice[0] : choice[0] }}
</a-tooltip>
</span>
</a-select-option>
Expand Down
5 changes: 3 additions & 2 deletions cmdb-ui/src/modules/cmdb/views/ci_types/preValueArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,9 @@ export default {
return [
item[0],
{
...item[1],
label: item?.[1]?.['label'] || item[0]
icon: item?.[1]?.['icon'] || {},
style: item?.[1]?.['style'] || {},
label: item?.[1]?.['label'] || item?.[0] || ''
}
]
})
Expand Down

0 comments on commit 02235d8

Please sign in to comment.