mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 优化 labels 宽度
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div ref="drawer" :class="{show: show}" class="drawer">
|
||||
<div v-if="modal" :style="{'background-color': modal ? 'rgba(0, 0, 0, .3)' : 'transparent'}" class="modal" />
|
||||
<div ref="panel" :style="{width: width, height: height }" class="drawer-panel">
|
||||
<div ref="dragBox" class="handle-button">
|
||||
<div v-show="!show" ref="dragBox" class="handle-button">
|
||||
<i v-if="icon.startsWith('fa') || icon.startsWith('el')" :class="show ? 'el-icon-close': icon" />
|
||||
<img v-else :src="icon" alt="">
|
||||
</div>
|
||||
|
||||
@@ -112,8 +112,9 @@ export default {
|
||||
prop: 'actions',
|
||||
label: i18n.t('Actions'),
|
||||
align: 'center',
|
||||
width: '150px',
|
||||
width: '100px',
|
||||
formatter: ActionsFormatter,
|
||||
fixed: 'right',
|
||||
formatterArgs: {}
|
||||
}
|
||||
break
|
||||
@@ -144,6 +145,7 @@ export default {
|
||||
break
|
||||
case 'labels':
|
||||
col.formatter = LabelsFormatter
|
||||
col.width = '200px'
|
||||
break
|
||||
case 'comment':
|
||||
col.showOverflowTooltip = true
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
@click="showSearchSelect"
|
||||
>
|
||||
<svg-icon icon-class="tag" />
|
||||
<span style="padding-left: 2px">{{ $t('Label') }}</span>
|
||||
</el-button>
|
||||
<el-cascader
|
||||
v-else
|
||||
|
||||
@@ -137,7 +137,6 @@ export default {
|
||||
this.searchTable({ labels: val })
|
||||
},
|
||||
handleLabelSearchShowChange(val) {
|
||||
console.log('handleLabelSearchShowChange', val)
|
||||
this.foldSearch = val
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
:key="label"
|
||||
>
|
||||
<el-tag
|
||||
:title="getKey(label) + getValue(label)"
|
||||
:type="getLabelType(label)"
|
||||
class="tag-formatter"
|
||||
disable-transitions
|
||||
@@ -255,6 +256,10 @@ export default {
|
||||
|
||||
.tag-formatter {
|
||||
margin: 2px 0;
|
||||
max-width: 180px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
//display: table;
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,9 @@ export default {
|
||||
.collapsed {
|
||||
text-align: left;
|
||||
.nav-title {
|
||||
&:hover {
|
||||
background-color: var(--menu-hover);
|
||||
}
|
||||
.switch-view .icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
&.has-logo {
|
||||
.el-scrollbar {
|
||||
height: calc(100% - #{$headerHeight} - 38px - 52px); // header-height, view-header, footer-height
|
||||
height: calc(100% - #{$headerHeight} - 40px - 52px); // header-height, view-header, footer-height
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user