@sy-common/organize-select-help 1.0.0-beta.21 → 1.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.vue +75 -3
package/package.json
CHANGED
package/src/index.vue
CHANGED
|
@@ -62,8 +62,16 @@
|
|
|
62
62
|
</TabPane>
|
|
63
63
|
<TabPane label="岗位选择" name="post" v-if="name.includes('post')">
|
|
64
64
|
<div class="tab post">
|
|
65
|
-
<div class="left">
|
|
66
|
-
<div
|
|
65
|
+
<div class="left" style="height: 450px; overflow: hidden; position: relative; z-index: 1;">
|
|
66
|
+
<div class="scroll-container">
|
|
67
|
+
<div class="position-item"
|
|
68
|
+
v-for="item in positiontList"
|
|
69
|
+
:class="[selectedPositionId === item.positionId ? 'active' : '']"
|
|
70
|
+
:key="item.positionId"
|
|
71
|
+
@click="getPosionId(item)">
|
|
72
|
+
{{ item.positionName }} <!-- 无需修改模板,仅通过样式实现自动换行 -->
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
67
75
|
</div>
|
|
68
76
|
<div class="right">
|
|
69
77
|
<span>组织搜索:</span>
|
|
@@ -242,7 +250,6 @@ export default {
|
|
|
242
250
|
includeLevelPost:[],
|
|
243
251
|
positiontList:[],
|
|
244
252
|
postTree:[],
|
|
245
|
-
defaultOrgUnitId:'',//人员选择默认组织编码
|
|
246
253
|
//直接人员
|
|
247
254
|
staffSearch:'',
|
|
248
255
|
staffAllList:[],
|
|
@@ -1294,6 +1301,71 @@ export default {
|
|
|
1294
1301
|
}
|
|
1295
1302
|
</script>
|
|
1296
1303
|
<style lang="less" scoped>
|
|
1304
|
+
.tab.post .left {
|
|
1305
|
+
width: 200px;
|
|
1306
|
+
height: 450px !important;
|
|
1307
|
+
overflow: hidden !important;
|
|
1308
|
+
padding-right: 10px;
|
|
1309
|
+
box-sizing: border-box;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
.scroll-container {
|
|
1313
|
+
height: 100% !important; /* 完全填充父容器高度 */
|
|
1314
|
+
overflow-y: auto !important; /* 内容超出时显示滚动条,不足时隐藏(也可设为scroll强制显示) */
|
|
1315
|
+
overflow-x: hidden !important;
|
|
1316
|
+
padding: 8px 0;
|
|
1317
|
+
/* 消除可能的内边距/外边距影响 */
|
|
1318
|
+
margin: 0;
|
|
1319
|
+
box-sizing: border-box;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/* 3. 强化滚动条样式,确保可见性(兼容webkit浏览器) */
|
|
1323
|
+
.scroll-container::-webkit-scrollbar {
|
|
1324
|
+
width: 8px !important; /* 滚动条宽度,确保肉眼可见 */
|
|
1325
|
+
height: 8px;
|
|
1326
|
+
display: block !important; /* 强制显示滚动条容器,避免被隐藏 */
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
.scroll-container::-webkit-scrollbar-thumb {
|
|
1330
|
+
background-color: #ccc !important; /* 滑块颜色,与背景区分明显 */
|
|
1331
|
+
border-radius: 4px !important;
|
|
1332
|
+
transition: background-color 0.2s;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
.scroll-container::-webkit-scrollbar-thumb:hover {
|
|
1336
|
+
background-color: #999 !important; /* hover时加深,增强交互感 */
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
.scroll-container::-webkit-scrollbar-track {
|
|
1340
|
+
background-color: #f9f9f9 !important; /* 轨道颜色,与容器背景区分 */
|
|
1341
|
+
border-radius: 4px !important;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/* 4. 保持position-item原有样式,确保布局正常 */
|
|
1345
|
+
.position-item {
|
|
1346
|
+
border: 1px solid #ddd;
|
|
1347
|
+
margin: 5px 0;
|
|
1348
|
+
padding: 8px 10px;
|
|
1349
|
+
border-radius: 2px;
|
|
1350
|
+
cursor: pointer;
|
|
1351
|
+
transition: background-color 0.2s;
|
|
1352
|
+
/* 取消文字截断,允许自动换行 */
|
|
1353
|
+
white-space: normal !important; /* 关键:取消强制不换行,恢复默认自动换行 */
|
|
1354
|
+
overflow: visible !important; /* 关键:取消内容隐藏,展示全部文字 */
|
|
1355
|
+
text-overflow: clip !important; /* 取消省略号,显示完整文字 */
|
|
1356
|
+
line-height: 1.4; /* 优化行高,换行后文字更易读 */
|
|
1357
|
+
min-height: 40px; /* 给个最小高度,避免内容过少时容器过扁 */
|
|
1358
|
+
word-wrap: break-word; /* 兼容长英文/数字,强制换行(防止横向溢出) */
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
.position-item.active {
|
|
1362
|
+
border-color: #1890ff;
|
|
1363
|
+
background-color: #e6f7ff;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.position-item:hover:not(.active) {
|
|
1367
|
+
background-color: #f5f5f5;
|
|
1368
|
+
}
|
|
1297
1369
|
.custom-select-wrapper {
|
|
1298
1370
|
position: relative;
|
|
1299
1371
|
|