vue2-client 1.22.2 → 1.22.4

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.
Files changed (101) hide show
  1. package/.claude/settings.local.json +30 -30
  2. package/.eslintrc.js +74 -74
  3. package/.idea/.name +1 -0
  4. package/.idea/MarsCodeWorkspaceAppSettings.xml +2 -1
  5. package/.idea/af-vue2-client.iml +9 -0
  6. package/.idea/deployment.xml +14 -0
  7. package/.idea/gradle.xml +7 -0
  8. package/.idea/inspectionProfiles/Project_Default.xml +0 -18
  9. package/.idea/libraries/contour_plot.xml +9 -0
  10. package/.idea/material_theme_project_new.xml +18 -0
  11. package/.idea/misc.xml +88 -0
  12. package/.idea/modules.xml +1 -1
  13. package/Components.md +60 -60
  14. package/index.js +31 -31
  15. package/jest-transform-stub.js +8 -8
  16. package/jest.setup.js +7 -7
  17. package/package.json +1 -1
  18. package/src/assets/img/querySlotDemo.svg +15 -15
  19. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  20. package/src/base-client/components/common/CitySelect/index.js +3 -3
  21. package/src/base-client/components/common/CitySelect/index.md +109 -109
  22. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  23. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  24. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +55 -1
  25. package/src/base-client/components/common/HIS/HTab/HTab.vue +88 -1
  26. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  27. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  28. package/src/base-client/components/common/Tree/index.js +2 -2
  29. package/src/base-client/components/common/Upload/index.js +3 -3
  30. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  31. package/src/base-client/components/common/XAddReport/XAddReport.vue +16 -1
  32. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  33. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  34. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  35. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  36. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  37. package/src/base-client/components/common/XDescriptions/index.md +382 -382
  38. package/src/base-client/components/common/XForm/index.md +178 -178
  39. package/src/base-client/components/common/XInput/XInput.vue +32 -1
  40. package/src/base-client/components/common/XInspectionDetailDrawer/index.vue +1 -1
  41. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  42. package/src/base-client/components/common/XStepView/index.js +3 -3
  43. package/src/base-client/components/common/XStepView/index.md +31 -31
  44. package/src/base-client/components/common/XTable/index.md +255 -255
  45. package/src/base-client/components/his/HAi/HAi.vue +800 -59
  46. package/src/base-client/components/his/XList/XList.vue +337 -58
  47. package/src/base-client/components/his/XSidebar/XSidebar.vue +36 -12
  48. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  49. package/src/base-client/plugins/Config.js +19 -19
  50. package/src/base-client/plugins/GetLoginInfoService.js +4 -4
  51. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  52. package/src/components/Charts/Bar.vue +62 -62
  53. package/src/components/Charts/ChartCard.vue +134 -134
  54. package/src/components/Charts/Liquid.vue +67 -67
  55. package/src/components/Charts/MiniArea.vue +39 -39
  56. package/src/components/Charts/MiniBar.vue +39 -39
  57. package/src/components/Charts/MiniProgress.vue +75 -75
  58. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  59. package/src/components/Charts/Radar.vue +68 -68
  60. package/src/components/Charts/RankList.vue +77 -77
  61. package/src/components/Charts/TagCloud.vue +113 -113
  62. package/src/components/Charts/TransferBar.vue +64 -64
  63. package/src/components/Charts/Trend.vue +82 -82
  64. package/src/components/Charts/chart.less +12 -12
  65. package/src/components/Charts/smooth.area.less +13 -13
  66. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  67. package/src/components/NumberInfo/index.js +3 -3
  68. package/src/components/NumberInfo/index.less +54 -54
  69. package/src/components/NumberInfo/index.md +43 -43
  70. package/src/components/STable/index.js +953 -953
  71. package/src/components/card/ChartCard.vue +79 -79
  72. package/src/components/chart/Bar.vue +60 -60
  73. package/src/components/chart/MiniArea.vue +67 -67
  74. package/src/components/chart/MiniBar.vue +59 -59
  75. package/src/components/chart/MiniProgress.vue +57 -57
  76. package/src/components/chart/Radar.vue +80 -80
  77. package/src/components/chart/RankingList.vue +60 -60
  78. package/src/components/chart/Trend.vue +79 -79
  79. package/src/components/chart/index.less +9 -9
  80. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  81. package/src/components/input/IInput.vue +66 -66
  82. package/src/components/menu/SideMenu.vue +75 -75
  83. package/src/components/menu/menu.js +273 -273
  84. package/src/components/tool/AStepItem.vue +60 -60
  85. package/src/layouts/CommonLayout.vue +56 -56
  86. package/src/lib.js +1 -1
  87. package/src/mock/extend/index.js +84 -84
  88. package/src/mock/goods/index.js +108 -108
  89. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  90. package/src/pages/system/dictionary/index.vue +44 -44
  91. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  92. package/src/pages/system/monitor/operLog/index.vue +37 -37
  93. package/src/services/api/cas.js +79 -79
  94. package/src/store/modules/setting.js +119 -119
  95. package/src/utils/errorCode.js +6 -6
  96. package/src/utils/login.js +11 -11
  97. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
  98. package/.idea/google-java-format.xml +0 -6
  99. package/.idea/jsLinters/eslint.xml +0 -6
  100. package/.idea/vue2-client.iml +0 -12
  101. package/.vscode/settings.json +0 -28
@@ -120,60 +120,133 @@
120
120
 
121
121
  <!-- 默认标签模式 -->
122
122
  <div class="list-wrapper x-list-wrapper" :class="wrapperClassObject" v-else>
123
- <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
124
- <a-list-item
125
- slot="renderItem"
126
- slot-scope="item, index"
127
- class="list-item"
128
- @click="handleClick(index)"
129
- @mouseenter="effectiveEnableHoverOptions && handleMouseEnter(index)"
130
- @mouseleave="handleMouseLeave"
131
- :class="{
132
- 'hover-active': effectiveEnableHoverOptions && hoveredIndex === index,
133
- 'selected-active': enableSelectRow && currentSelectedIndex === index
134
- }"
135
- >
136
- <i v-if="icon" class="icon-menu" :style="getIconStyle(item)"></i>
137
- <span
138
- class="item-text"
139
- :class="{ 'text-truncated': effectiveEnableHoverOptions && hoveredIndex === index }"
140
- :style="getTextStyle(index)"
141
- >
142
- {{ getListItemNumber(item, index) }} {{ getListItemName(item) }}
143
- </span>
144
-
145
- <div v-if="button" class="button-group">
146
- <a-button
147
- v-for="(name, idx) in buttonNames"
148
- :key="idx"
149
- type="link"
150
- :class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
151
- @click.stop="click(index, idx)"
152
- >
153
- <span :class="{ 'hover-active': effectiveEnableHoverOptions && hoveredIndex === index }">{{ name }}</span>
154
- </a-button>
123
+ <template v-if="groupField && groupedListData.length">
124
+ <div v-for="(group, gIdx) in groupedListData" :key="group.title" class="x-list-group">
125
+ <div class="x-list-group-header">
126
+ <span class="x-list-group-title">{{ group.title }} ({{ group.group.length }})</span>
155
127
  </div>
128
+ <a-list size="large" :data-source="group.group" itemLayout="horizontal" class="list-container">
129
+ <a-list-item
130
+ slot="renderItem"
131
+ slot-scope="item, index"
132
+ class="list-item"
133
+ @click="handleGroupItemClick(gIdx, index, item)"
134
+ @mouseenter="handleGroupMouseEnter(getGroupItemIndex(gIdx, index))"
135
+ @mouseleave="handleMouseLeave"
136
+ :class="{
137
+ 'hover-active': hoveredIndex === getGroupItemIndex(gIdx, index),
138
+ 'selected-active': enableSelectRow && currentSelectedIndex === getGroupItemIndex(gIdx, index)
139
+ }"
140
+ >
141
+ <span
142
+ class="item-text"
143
+ :class="{ 'text-truncated': hoveredIndex === getGroupItemIndex(gIdx, index) }"
144
+ :style="getTextStyle(getGroupItemIndex(gIdx, index))"
145
+ >
146
+ <template v-if="showNumber">{{ getGroupItemIndex(gIdx, index) + 1 }}. </template>{{ item.label }}
147
+ </span>
156
148
 
157
- <!-- 悬浮选项框 -->
158
- <div
159
- v-show="effectiveEnableHoverOptions && hoveredIndex === index"
160
- class="hover-options"
161
- @mouseenter="handleOptionsEnter"
162
- @mouseleave="handleOptionsLeave"
149
+ <div v-if="button" class="button-group">
150
+ <a-button
151
+ v-for="(name, idx) in buttonNames"
152
+ :key="idx"
153
+ type="link"
154
+ :class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
155
+ @click.stop="clickGroupItem(gIdx, index, idx, item)"
156
+ >
157
+ <span :class="{ 'hover-active': hoveredIndex === getGroupItemIndex(gIdx, index) }">{{ name }}</span>
158
+ </a-button>
159
+ </div>
160
+
161
+ <!-- 分组模式:图标下拉(悬浮时显示,有选项时才渲染下拉) -->
162
+ <template v-if="effectiveIcon">
163
+ <div v-if="effectiveIconSelect && effectiveIconSelect.length" class="group-icon-wrapper" v-show="hoveredIndex === getGroupItemIndex(gIdx, index)">
164
+ <a-dropdown
165
+ :trigger="['click']"
166
+ :get-popup-container="trigger => trigger.parentNode"
167
+ >
168
+ <a-icon
169
+ :type="effectiveIcon"
170
+ class="group-more-icon"
171
+ @click.stop="handleGroupIconClick(getGroupItemIndex(gIdx, index), $event)"
172
+ />
173
+ <a-menu slot="overlay" @click="({ key }) => handleGroupIconSelect(getGroupItemIndex(gIdx, index), key)">
174
+ <a-menu-item v-for="opt in effectiveIconSelect" :key="opt.value">
175
+ {{ opt.label }}
176
+ </a-menu-item>
177
+ </a-menu>
178
+ </a-dropdown>
179
+ </div>
180
+ <a-icon
181
+ v-else
182
+ :type="effectiveIcon"
183
+ class="group-more-icon"
184
+ v-show="hoveredIndex === getGroupItemIndex(gIdx, index)"
185
+ @click.stop="handleGroupIconClick(getGroupItemIndex(gIdx, index), $event)"
186
+ />
187
+ </template>
188
+
189
+
190
+ </a-list-item>
191
+ </a-list>
192
+ </div>
193
+ </template>
194
+ <template v-else>
195
+ <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
196
+ <a-list-item
197
+ slot="renderItem"
198
+ slot-scope="item, index"
199
+ class="list-item"
200
+ @click="handleClick(index)"
201
+ @mouseenter="effectiveEnableHoverOptions && handleMouseEnter(index)"
202
+ @mouseleave="handleMouseLeave"
203
+ :class="{
204
+ 'hover-active': effectiveEnableHoverOptions && hoveredIndex === index,
205
+ 'selected-active': enableSelectRow && currentSelectedIndex === index
206
+ }"
163
207
  >
164
- <div class="hover-options-content">
165
- <div
166
- v-for="(Item, idx) in select_options"
208
+ <i v-if="icon" class="icon-menu" :style="getIconStyle(item)"></i>
209
+ <span
210
+ class="item-text"
211
+ :class="{ 'text-truncated': effectiveEnableHoverOptions && hoveredIndex === index }"
212
+ :style="getTextStyle(index)"
213
+ >
214
+ <template v-if="showNumber">{{ getListItemNumber(item, index) }} </template>{{ getListItemName(item) }}
215
+ </span>
216
+
217
+ <div v-if="button" class="button-group">
218
+ <a-button
219
+ v-for="(name, idx) in buttonNames"
167
220
  :key="idx"
168
- class="option-item"
169
- @click="handleOptionClick(index, Item)"
221
+ type="link"
222
+ :class="['confirm-btn', buttonMode ? 'hover-btn' : '']"
223
+ @click.stop="click(index, idx)"
170
224
  >
171
- {{ Item }}
225
+ <span :class="{ 'hover-active': effectiveEnableHoverOptions && hoveredIndex === index }">{{ name }}</span>
226
+ </a-button>
227
+ </div>
228
+
229
+ <!-- 悬浮选项框 -->
230
+ <div
231
+ v-show="effectiveEnableHoverOptions && hoveredIndex === index"
232
+ class="hover-options"
233
+ @mouseenter="handleOptionsEnter"
234
+ @mouseleave="handleOptionsLeave"
235
+ >
236
+ <div class="hover-options-content">
237
+ <div
238
+ v-for="(Item, idx) in select_options"
239
+ :key="idx"
240
+ class="option-item"
241
+ @click="handleOptionClick(index, Item)"
242
+ >
243
+ {{ Item }}
244
+ </div>
172
245
  </div>
173
246
  </div>
174
- </div>
175
- </a-list-item>
176
- </a-list>
247
+ </a-list-item>
248
+ </a-list>
249
+ </template>
177
250
  </div>
178
251
  </template>
179
252
 
@@ -209,6 +282,11 @@ export default {
209
282
  type: Boolean,
210
283
  default: true
211
284
  },
285
+ // 分组模式:图标下拉是否启用悬浮显示
286
+ enableGroupHover: {
287
+ type: Boolean,
288
+ default: true
289
+ },
212
290
  serviceName: {
213
291
  type: String,
214
292
  default: 'af-his'
@@ -246,6 +324,16 @@ export default {
246
324
  initialData: {
247
325
  type: Array,
248
326
  default: null
327
+ },
328
+ // 分组配置:分组字段名(从配置中读取)
329
+ groupField: {
330
+ type: String,
331
+ default: null
332
+ },
333
+ // 分组配置:是否显示列表序号
334
+ showNumber: {
335
+ type: Boolean,
336
+ default: true
249
337
  }
250
338
  },
251
339
  data() {
@@ -290,6 +378,12 @@ export default {
290
378
  internalEnableHoverOptions: undefined,
291
379
  // 选择请求的轻量防抖
292
380
  selectDebounceTimer: null,
381
+ // 分组相关(已移除,由 props.groupField 提供)
382
+ groupedData: [],
383
+ // 分组模式图标下拉相关
384
+ groupIconDropdownVisible: false,
385
+ activeGroupIconIndex: -1,
386
+ iconSelect: [], // 图标下拉选项列表
293
387
  }
294
388
  },
295
389
  inject: ['getComponentByName'],
@@ -306,7 +400,7 @@ export default {
306
400
  const a = this.$attrs || {}
307
401
  const classes = {}
308
402
  // 多个布尔型样式开关(存在且为真则生效)
309
- const booleanStyleKeys = ['enableNewListStyle']
403
+ const booleanStyleKeys = ['enableNewListStyle', 'enableGroupStyle']
310
404
  booleanStyleKeys.forEach(key => {
311
405
  const val = a[key]
312
406
  const truthy = val === true || val === '' || val === 'true'
@@ -367,6 +461,30 @@ export default {
367
461
  cardModeWrapperStyle() {
368
462
  if (!this.listMode) return undefined
369
463
  return { '--x-list-card-height': this.listCardHeight }
464
+ },
465
+ // 分组数据:按 create_time 聚合,返回 [{ title, group: [{ label, value }] }]
466
+ // 数据格式:[{ create_time: '2026-06-11', titlelist: [{ label, value }] }]
467
+ groupedListData() {
468
+ if (!Array.isArray(this.localData) || this.localData.length === 0) {
469
+ return []
470
+ }
471
+ return this.localData
472
+ .filter(item => item && item[this.groupField] != null && Array.isArray(item.titlelist))
473
+ .map(item => ({
474
+ title: item[this.groupField], // 分组标题使用 groupField 字段值
475
+ group: item.titlelist // 列表项数组
476
+ }))
477
+ },
478
+ // 图标下拉选项:支持配置和 props 两种方式
479
+ effectiveIconSelect() {
480
+ if (Array.isArray(this.iconSelect) && this.iconSelect.length) return this.iconSelect
481
+ return []
482
+ },
483
+ // 是否显示图标:icon 显式设置或 iconSelect 有选项时都显示
484
+ effectiveIcon() {
485
+ if (this.icon !== false && this.icon !== undefined) return this.icon
486
+ if (this.effectiveIconSelect.length) return 'more'
487
+ return false
370
488
  }
371
489
  },
372
490
  methods: {
@@ -447,6 +565,10 @@ export default {
447
565
  that.buttonNames = (res.buttonNames) || [] // 按钮文本
448
566
  that.buttonMode = (res.buttonMode) || false // 按钮模式
449
567
  that.cardButtonsVisible = (res.cardButtonsVisible) || false // 卡片按钮
568
+ // 图标下拉选项
569
+ if (Array.isArray(res.iconSelect)) {
570
+ that.iconSelect = res.iconSelect
571
+ }
450
572
  const grid = res.grid
451
573
  if (grid && typeof grid === 'object') {
452
574
  that.listGrid = { gutter: 16, ...grid }
@@ -467,6 +589,9 @@ export default {
467
589
  if (enableHover) {
468
590
  this.select_options = res.select_options
469
591
  }
592
+ // 分组配置:从配置中读取
593
+ if (res.groupField) this.groupField = res.groupField
594
+ if (typeof res.showNumber === 'boolean') this.showNumber = res.showNumber
470
595
  if (that.initialData != null && Array.isArray(that.initialData)) {
471
596
  applyResult(that.initialData)
472
597
  that._emitConfigEnd()
@@ -660,6 +785,25 @@ export default {
660
785
  click(index, buttonIndex) {
661
786
  this.$emit('click', { data: this.data[index], name: this.buttonNames[buttonIndex] })
662
787
  },
788
+ getGroupItemIndex(groupIndex, innerIndex) {
789
+ let idx = 0
790
+ const groups = this.groupedListData
791
+ for (let i = 0; i < groups.length; i++) {
792
+ if (i === groupIndex) {
793
+ return idx + innerIndex
794
+ }
795
+ idx += groups[i].group.length
796
+ }
797
+ return -1
798
+ },
799
+ handleGroupItemClick(groupIndex, innerIndex, item) {
800
+ const globalIndex = this.getGroupItemIndex(groupIndex, innerIndex)
801
+ if (this.enableSelectRow && this.selectOnClick) this.setSelectedIndex(globalIndex)
802
+ this.$emit('listClick', item)
803
+ },
804
+ clickGroupItem(groupIndex, innerIndex, buttonIndex, item) {
805
+ this.$emit('click', { data: item, name: this.buttonNames[buttonIndex] })
806
+ },
663
807
  // 根据对象字段匹配选中(默认按 id 字段)
664
808
  setSelectedById(id, field = 'id') {
665
809
  const list = this.listMode ? this.localData : this.data
@@ -716,6 +860,12 @@ export default {
716
860
  this.hoveredIndex = index
717
861
  this.isOptionsHovered = true
718
862
  },
863
+ // 分组模式鼠标进入
864
+ handleGroupMouseEnter(index) {
865
+ this.clearAllTimers()
866
+ this.hoveredIndex = index
867
+ this.isOptionsHovered = true
868
+ },
719
869
  // 鼠标离开列表项
720
870
  handleMouseLeave() {
721
871
  this.clearAllTimers()
@@ -737,6 +887,17 @@ export default {
737
887
  this.hoveredIndex = -1
738
888
  }, 100)
739
889
  },
890
+ // 分组模式图标点击
891
+ handleGroupIconClick(index, event) {
892
+ this.activeGroupIconIndex = index
893
+ this.groupIconDropdownVisible = !this.groupIconDropdownVisible
894
+ },
895
+ // 分组模式图标下拉选择
896
+ handleGroupIconSelect(index, opt) {
897
+ this.groupIconDropdownVisible = false
898
+ this.activeGroupIconIndex = -1
899
+ this.$emit('groupIconSelect', { index, option: opt })
900
+ },
740
901
  // 清除所有定时器
741
902
  clearAllTimers() {
742
903
  if (this.hoverTimer) {
@@ -813,7 +974,6 @@ export default {
813
974
  display: inline-block;
814
975
  width: 20px;
815
976
  height: 20px;
816
- background-color: #ccc;
817
977
  margin-right: 8px;
818
978
  }
819
979
 
@@ -881,7 +1041,7 @@ export default {
881
1041
  }
882
1042
  .card-a-col.selected-active {
883
1043
  background-color: #0057fe !important;
884
- color: white;
1044
+ color: #ffffff;
885
1045
  border: none !important;
886
1046
  }
887
1047
  .card-a-col.selected-active .button-a-col,
@@ -1158,16 +1318,135 @@ export default {
1158
1318
  .list-item:hover .confirm-btn {
1159
1319
  opacity: 1;
1160
1320
  }
1161
- /* 选中状态字体颜色 - 使用白色,与全局样式保持一致 */
1162
- .list-item.selected-active {
1163
- color: white !important; /* 使用白色文本 */
1321
+ }
1322
+
1323
+ /* 分组模式样式(enableGroupStyle) */
1324
+ .x-list-enableGroupStyle {
1325
+ .x-list-group {
1326
+ margin-bottom: 12px;
1327
+ }
1328
+ .x-list-group-header {
1329
+ display: flex;
1330
+ align-items: center;
1331
+ justify-content: flex-start;
1332
+ gap: 8px;
1333
+ padding: 8px 12px;
1334
+ height: 16px;
1335
+ opacity: 1;
1336
+ font-family: Source Han Sans;
1337
+ font-size: 12px;
1338
+ font-weight: normal;
1339
+ line-height: normal;
1340
+ letter-spacing: 0em;
1341
+ color: #5D5C5C;
1342
+ background: #ffffff;
1343
+ border: none;
1344
+ border-radius: 0;
1345
+ }
1346
+ .x-list-group-title {
1347
+ font-weight: normal;
1348
+ color: #5D5C5C;
1164
1349
  }
1165
- .list-item.selected-active .item-text {
1166
- color: white !important; /* 确保文本使用白色 */
1350
+ .x-list-group .list-container {
1351
+ border: none;
1352
+ border-radius: 0;
1167
1353
  }
1168
- .list-item.selected-active .confirm-btn,
1169
- .list-item.selected-active .confirm-btn span {
1170
- color: #ffffff !important; /* 按钮使用白色 */
1354
+ .x-list-group .list-item {
1355
+ height: 32px;
1356
+ border-radius: 0;
1357
+ margin-bottom: 0;
1358
+ border: none;
1359
+ background: #ffffff;
1360
+ opacity: 1;
1361
+ font-family: Source Han Sans;
1362
+ font-size: 16px;
1363
+ font-weight: normal;
1364
+ line-height: 32px;
1365
+ letter-spacing: 0em;
1366
+ color: #313131;
1367
+ padding-left: 3px;
1368
+ margin-bottom: 0 !important;
1369
+ display: flex;
1370
+ align-items: center;
1371
+ width: 100%;
1372
+ box-sizing: border-box;
1373
+ position: relative;
1374
+ transition: background-color 0.3s ease;
1375
+ }
1376
+
1377
+ .x-list-group .list-item:last-child {
1378
+ border-radius: 0 !important;
1379
+ }
1380
+ .x-list-group .list-item {
1381
+ border-radius: 0 !important;
1382
+ transition: background-color 0.3s ease;
1383
+ }
1384
+ .x-list-group .list-item.hover-active,
1385
+ .x-list-group .list-item.selected-active {
1386
+ background-color: #0057fe !important;
1387
+ color: #ffffff !important;
1388
+ border-radius: 0px 6px 6px 0px !important;
1389
+ }
1390
+ .x-list-group .list-item.hover-active .item-text,
1391
+ .x-list-group .list-item.selected-active .item-text {
1392
+ color: #ffffff !important;
1393
+ }
1394
+ .x-list-group .list-item.hover-active .confirm-btn,
1395
+ .x-list-group .list-item.selected-active .confirm-btn,
1396
+ .x-list-group .list-item.hover-active .confirm-btn span,
1397
+ .x-list-group .list-item.selected-active .confirm-btn span {
1398
+ color: #ffffff !important;
1399
+ }
1400
+
1401
+ /* 分组模式图标下拉样式 */
1402
+ .group-icon-wrapper {
1403
+ position: relative;
1404
+ margin-left: auto;
1405
+ flex-shrink: 0;
1406
+ }
1407
+ .group-more-icon {
1408
+ font-size: 20px;
1409
+ width: 20px;
1410
+ height: 20px;
1411
+ opacity: 1;
1412
+ cursor: pointer;
1413
+ border-radius: 4px;
1414
+ transition: all 0.2s ease;
1415
+ line-height: 1;
1416
+ &:hover {
1417
+ color: #FFFFFF;
1418
+ }
1419
+ }
1420
+ .group-icon-dropdown {
1421
+ position: absolute;
1422
+ right: 0;
1423
+ top: 100%;
1424
+ min-width: 100px;
1425
+ background: #fff;
1426
+ border-radius: 4px;
1427
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
1428
+ z-index: 100;
1429
+ overflow: hidden;
1430
+ }
1431
+ .group-icon-dropdown-item {
1432
+ padding: 8px 12px;
1433
+ cursor: pointer;
1434
+ font-family: Source Han Sans;
1435
+ font-size: 16px;
1436
+ font-weight: normal;
1437
+ line-height: 37px;
1438
+ letter-spacing: 0em;
1439
+ font-variation-settings: "opsz" auto;
1440
+ font-feature-settings: "kern" on;
1441
+ color: #5D5C5C;
1442
+ &:hover {
1443
+ background: #f5f5f5;
1444
+ }
1445
+ }
1446
+
1447
+ /* 分组模式:悬浮时隐藏右边框圆角 */
1448
+ .x-list-group .list-item.hover-active {
1449
+ border-radius: 0px 6px 6px 0px !important;
1171
1450
  }
1172
1451
  }
1173
1452
  </style>
@@ -2,16 +2,16 @@
2
2
  <div
3
3
  ref="drawerRoot"
4
4
  class="drawer"
5
- :class="[{ 'drawer-collapsed': !isOpen }, wrapperClassObject()]"
5
+ :class="[{ 'drawer-collapsed': !isOpen, 'position-right': position === 'right' }, wrapperClassObject()]"
6
6
  :style="drawerStyle">
7
7
  <div
8
8
  v-show="!isFrameConfig || showToggleInFrame"
9
9
  class="drawer-toggle"
10
10
  :class="{ 'toggle-collapsed': !isOpen }"
11
- :style="toggleButtonStyle"
11
+ :style="[toggleButtonStyle, toggleButtonPositionStyle]"
12
12
  @click="toggleDrawer">
13
13
  <div class="arrow">
14
- {{ isOpen ? '›' : '‹' }}
14
+ {{ arrowChar }}
15
15
  </div>
16
16
  </div>
17
17
  <div class="drawer-content" v-show="isOpen" :style="contentStyle">
@@ -83,6 +83,12 @@ export default {
83
83
  type: Number,
84
84
  default: 26
85
85
  },
86
+ // 侧边栏位置: 'left' 左侧侧边栏,'right' 右侧侧边栏
87
+ position: {
88
+ type: String,
89
+ default: 'left',
90
+ validator: value => ['left', 'right'].includes(value)
91
+ },
86
92
  // 总宽度像素值(px模式使用)
87
93
  totalWidth: {
88
94
  type: Number,
@@ -163,6 +169,22 @@ export default {
163
169
  const rowH = this.rowHeight || this.maxRowHeight
164
170
  const top = rowH ? `${rowH / 2 - 24}px` : '50%'
165
171
  return { width, top }
172
+ },
173
+ // 根据侧边栏位置和展开状态返回箭头字符
174
+ arrowChar () {
175
+ if (this.position === 'right') {
176
+ // 右侧侧边栏:展开时箭头指向右(收回),折叠时箭头指向左(展开)
177
+ return this.isOpen ? '‹' : '›'
178
+ }
179
+ // 左侧侧边栏:展开时箭头指向左(收回),折叠时箭头指向右(展开)
180
+ return this.isOpen ? '›' : '‹'
181
+ },
182
+ // 切换按钮的定位样式
183
+ toggleButtonPositionStyle () {
184
+ if (this.position === 'right') {
185
+ return { right: 0 }
186
+ }
187
+ return { left: 0 }
166
188
  }
167
189
  },
168
190
  mounted () {
@@ -720,18 +742,13 @@ export default {
720
742
  align-items: center;
721
743
  justify-content: center;
722
744
  z-index: 1000;
723
- }
724
- /* 打开状态:箭头在抽屉内 */
725
- .drawer:not(.drawer-collapsed) .drawer-toggle {
726
- left: 0;
727
745
  border-radius: 0;
728
746
  box-shadow: none;
729
747
  }
730
- /* 关闭状态:箭头在抽屉内 */
731
- .drawer-collapsed .drawer-toggle {
732
- left: 0;
733
- border-radius: 0;
734
- box-shadow: none;
748
+ /* 右侧侧边栏:按钮在右侧 */
749
+ .position-right > .drawer-toggle {
750
+ left: auto;
751
+ right: 0;
735
752
  }
736
753
  .arrow {
737
754
  font-size: 20px;
@@ -743,4 +760,11 @@ export default {
743
760
  padding-right: 12px;
744
761
  margin-left: 26px;
745
762
  }
763
+ /* 右侧侧边栏的内容区域 */
764
+ .position-right > .drawer-content {
765
+ padding-right: 0px;
766
+ padding-left: 0px;
767
+ margin-left: 0;
768
+ margin-right: 0px;
769
+ }
746
770
  </style>