Browse Source

fix: 树样式优化

temp
xuziqiang 4 months ago
parent
commit
2a6de583e1
  1. 5
      hx-ai-intelligent/src/App.vue
  2. 11
      hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
  3. 8
      lib/component/tree/tree-api.vue

5
hx-ai-intelligent/src/App.vue

@ -48,6 +48,11 @@
height: 100%;
}
}
:deep(.ant-tree-node-content-wrapper) {
overflow: hidden;
text-overflow: ellipsis;
text-wrap: nowrap;
}
// :deep(.ant-menu-item),
// :deep(.ant-menu-submenu-title) {
// &:not(.ant-menu-item-selected) {

11
hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

@ -17,7 +17,7 @@
@select="SelectApartmentTree">
<template #title="data">
<div style="display: flex; justify-content: space-between; align-items: center">
<span>{{ data.deptInfo?.deptName }}</span>
<span class="treeContent">{{ data.deptInfo?.deptName }}</span>
<a-dropdown>
<ns-icon name="actionMore" size="14" class="actionMore" />
<template #overlay>
@ -96,7 +96,7 @@
@select="SelectUserTree">
<template #title="data">
<div style="display: flex; justify-content: space-between; align-items: center">
<span> {{ data.zhName }}</span>
<span class="treeContent"> {{ data.zhName }}</span>
<a-dropdown>
<ns-icon name="actionMore" size="14" class="actionMore" />
<template #overlay>
@ -819,6 +819,7 @@
border-radius: @ns-border-radius;
border: 1px solid #ebeef5;
padding: 16px;
min-width: 100px;
}
.list {
padding-left: @ns-gap;
@ -863,4 +864,10 @@
.form {
margin: 20px;
}
.treeContent {
overflow: hidden;
text-overflow: ellipsis;
text-wrap: nowrap;
}
</style>

8
lib/component/tree/tree-api.vue

@ -10,7 +10,7 @@
</div>
</div>
<div style="min-height: 300px; overflow-y: scroll">
<div style="min-height: 150px; overflow-y: scroll">
<ns-tree v-if="treeData?.length" v-bind="getBindValue" v-model:selectedKeys="selectedKeys">
<template #[item]="data" v-for="(item, index) in Object.keys($slots)" :key="index">
<slot :name="item" v-bind="{ ...data, formModel } || {}"></slot>
@ -138,9 +138,9 @@
font-weight: bold;
user-select: text;
padding: @gap;
margin-bottom: @gap;
padding-bottom: 10px;
border-bottom: 1px solid #e9e9e9;
// margin-bottom: @gap;
// padding-bottom: 10px;
// border-bottom: 1px solid #e9e9e9;
> span {
padding-left: 6px;

Loading…
Cancel
Save