Merge pull request #2202 from jumpserver/revert-2199-pr@v3@feat_org_select_width

Revert "feat: 切换组织选择器宽度自适应"
This commit is contained in:
Chenyang Shen 2022-11-25 16:42:11 +08:00 committed by GitHub
commit a8a1c99312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
<template>
<el-select
:value="currentOrgId"
class="org-select organization autoWidth-select"
class="org-select organization"
filterable
:placeholder="$tc('common.Select')"
@change="changeOrg"
@ -9,9 +9,6 @@
<template slot="prefix">
<svg-icon icon-class="organization" />
<span class="line" />
<span class="placeholder">
{{ (orgGroups.map(i => (i.options.find(item => item.id === currentOrg.id) || {}).name)).filter(Boolean) }}
</span>
</template>
<el-option-group
@ -151,7 +148,7 @@ export default {
.line {
width: 1px;
margin-left: 6px;
margin-left: 8px;
border: .5px solid #FFF;
}
@ -186,26 +183,4 @@ export default {
font-size: 12px;
line-height: 30px;
}
.autoWidth-select {
min-width: 140px;
&>>> input{
position: absolute;
}
&>>> .el-input__inner{
margin-left: 6px;
}
&>>> .el-input__prefix{
position: relative;
left: 0px;
box-sizing: border-box;
border: 1px solid #ffffff00;
padding: 0 30px 0 0;
height: 30px;
line-height: 30px;
.placeholder {
visibility: hidden;
}
}
}
</style>