@sy-common/organize-select-help 1.0.0-beta.24 → 1.0.0-beta.26
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 +91 -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>
|
|
@@ -261,7 +269,7 @@ export default {
|
|
|
261
269
|
mounted() {
|
|
262
270
|
this.queryTagList()
|
|
263
271
|
this.queryPositionList()
|
|
264
|
-
this.loadMore()
|
|
272
|
+
// this.loadMore()
|
|
265
273
|
},
|
|
266
274
|
methods:{
|
|
267
275
|
handlePostTagSelect(quickPickKey) {
|
|
@@ -720,6 +728,21 @@ export default {
|
|
|
720
728
|
},
|
|
721
729
|
visibleChange(val){
|
|
722
730
|
this.$emit('input',val);
|
|
731
|
+
// val 为 true 时表示帮助框打开,此时发起请求
|
|
732
|
+
if (val) {
|
|
733
|
+
this.initStaffList() // 新增初始化方法,统一处理打开后的请求逻辑
|
|
734
|
+
} else {
|
|
735
|
+
// 可选:关闭帮助框时重置人员列表相关状态,避免下次打开残留旧数据
|
|
736
|
+
this.staffEnding = false;
|
|
737
|
+
this.offset = 0;
|
|
738
|
+
this.staffAllList = [];
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
initStaffList() {
|
|
742
|
+
this.staffEnding = false;
|
|
743
|
+
this.offset = 0;
|
|
744
|
+
this.staffAllList = [];
|
|
745
|
+
this.loadMore(); // 打开帮助框后,再发起第一次请求
|
|
723
746
|
},
|
|
724
747
|
// 处理Tab切换,同步更新tabName
|
|
725
748
|
handleTabChange(tabName) {
|
|
@@ -1293,6 +1316,71 @@ export default {
|
|
|
1293
1316
|
}
|
|
1294
1317
|
</script>
|
|
1295
1318
|
<style lang="less" scoped>
|
|
1319
|
+
.tab.post .left {
|
|
1320
|
+
width: 200px;
|
|
1321
|
+
height: 450px !important;
|
|
1322
|
+
overflow: hidden !important;
|
|
1323
|
+
padding-right: 10px;
|
|
1324
|
+
box-sizing: border-box;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.scroll-container {
|
|
1328
|
+
height: 100% !important; /* 完全填充父容器高度 */
|
|
1329
|
+
overflow-y: auto !important; /* 内容超出时显示滚动条,不足时隐藏(也可设为scroll强制显示) */
|
|
1330
|
+
overflow-x: hidden !important;
|
|
1331
|
+
padding: 8px 0;
|
|
1332
|
+
/* 消除可能的内边距/外边距影响 */
|
|
1333
|
+
margin: 0;
|
|
1334
|
+
box-sizing: border-box;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/* 3. 强化滚动条样式,确保可见性(兼容webkit浏览器) */
|
|
1338
|
+
.scroll-container::-webkit-scrollbar {
|
|
1339
|
+
width: 8px !important; /* 滚动条宽度,确保肉眼可见 */
|
|
1340
|
+
height: 8px;
|
|
1341
|
+
display: block !important; /* 强制显示滚动条容器,避免被隐藏 */
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
.scroll-container::-webkit-scrollbar-thumb {
|
|
1345
|
+
background-color: #ccc !important; /* 滑块颜色,与背景区分明显 */
|
|
1346
|
+
border-radius: 4px !important;
|
|
1347
|
+
transition: background-color 0.2s;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
.scroll-container::-webkit-scrollbar-thumb:hover {
|
|
1351
|
+
background-color: #999 !important; /* hover时加深,增强交互感 */
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
.scroll-container::-webkit-scrollbar-track {
|
|
1355
|
+
background-color: #f9f9f9 !important; /* 轨道颜色,与容器背景区分 */
|
|
1356
|
+
border-radius: 4px !important;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
/* 4. 保持position-item原有样式,确保布局正常 */
|
|
1360
|
+
.position-item {
|
|
1361
|
+
border: 1px solid #ddd;
|
|
1362
|
+
margin: 5px 0;
|
|
1363
|
+
padding: 8px 10px;
|
|
1364
|
+
border-radius: 2px;
|
|
1365
|
+
cursor: pointer;
|
|
1366
|
+
transition: background-color 0.2s;
|
|
1367
|
+
/* 取消文字截断,允许自动换行 */
|
|
1368
|
+
white-space: normal !important; /* 关键:取消强制不换行,恢复默认自动换行 */
|
|
1369
|
+
overflow: visible !important; /* 关键:取消内容隐藏,展示全部文字 */
|
|
1370
|
+
text-overflow: clip !important; /* 取消省略号,显示完整文字 */
|
|
1371
|
+
line-height: 1.4; /* 优化行高,换行后文字更易读 */
|
|
1372
|
+
min-height: 40px; /* 给个最小高度,避免内容过少时容器过扁 */
|
|
1373
|
+
word-wrap: break-word; /* 兼容长英文/数字,强制换行(防止横向溢出) */
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
.position-item.active {
|
|
1377
|
+
border-color: #1890ff;
|
|
1378
|
+
background-color: #e6f7ff;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
.position-item:hover:not(.active) {
|
|
1382
|
+
background-color: #f5f5f5;
|
|
1383
|
+
}
|
|
1296
1384
|
.custom-select-wrapper {
|
|
1297
1385
|
position: relative;
|
|
1298
1386
|
|