vue2-client 1.18.21 → 1.18.22

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 (26) hide show
  1. package/package.json +112 -112
  2. package/src/assets/svg/female.svg +1 -1
  3. package/src/assets/svg/male.svg +1 -1
  4. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +491 -491
  5. package/src/base-client/components/common/HIS/HFormGroup/index.js +3 -3
  6. package/src/base-client/components/common/HIS/HTab/HTab.vue +443 -443
  7. package/src/base-client/components/common/XCollapse/XCollapse.vue +830 -830
  8. package/src/base-client/components/common/XTimeline/XTimeline.vue +477 -477
  9. package/src/base-client/components/his/XHisEditor/XHisEditor.vue +705 -705
  10. package/src/base-client/components/his/XList/XList.vue +938 -938
  11. package/src/base-client/components/his/XTimeSelect/XTimeSelect.vue +354 -354
  12. package/src/base-client/components/his/XTitle/XTitle.vue +314 -314
  13. package/src/base-client/components/his/XTreeRows/XTreeRows.vue +341 -341
  14. package/src/base-client/components/his/threeTestOrders/editor.vue +113 -113
  15. package/src/components/FileImageItem/FileItem.vue +320 -320
  16. package/src/components/FileImageItem/FileItemGroup.vue +297 -297
  17. package/src/pages/WorkflowDetail/WorkflowDetail.vue +404 -404
  18. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +1815 -1815
  19. package/src/pages/WorkflowDetail/WorkflowPageDetail/worklog.vue +98 -98
  20. package/src/pages/userInfoDetailManage/ApplyRecordQuery/index.vue +64 -64
  21. package/src/pages/userInfoDetailManage/ExceptionRecordQuery/index.vue +45 -45
  22. package/src/pages/userInfoDetailManage/SafeCheckPaperV3RecordQuery/index.vue +64 -64
  23. package/src/pages/userInfoDetailManage/TelephoneV3RecordQuery/index.vue +64 -64
  24. package/src/pages/userInfoDetailManage/userInfoDetailQueryTabs.vue +155 -155
  25. package/src-base-client/components/common/HIS/HForm/HForm.vue +347 -0
  26. package/src-base-client/components/common/XCollapse/XCollapse.vue +0 -0
@@ -1,443 +1,443 @@
1
- <script setup>
2
- import XTab from '@vue2-client/base-client/components/common/XTab/XTab.vue'
3
- import { ref, computed, useAttrs, useSlots, watch, onMounted } from 'vue'
4
- import { getConfigByName } from '@vue2-client/services/api/common'
5
-
6
- const props = defineProps({
7
- // 标签栏右侧附加区域的配置名(可选)。提供时将自动加载配置并渲染到 tabBar 右侧。
8
- tabBarExtraConfig: {
9
- type: String,
10
- default: undefined
11
- },
12
- // 控制标签间距,覆盖内部 XTab 的默认 10px;默认置 0 清除外边距
13
- tabBarGutter: {
14
- type: Number,
15
- default: 0
16
- }
17
- })
18
-
19
- // 兼容多种样式配置
20
- const attrs = useAttrs()
21
- const wrapperClassObject = computed(() => {
22
- const a = attrs
23
- const classes = {}
24
-
25
- // 通用布尔样式开关(以存在/空字符串/'true' 为真)
26
- const booleanStyleKeys = [
27
- 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8', 'out-tab'
28
- ]
29
- for (const key of booleanStyleKeys) {
30
- const val = a[key]
31
- const truthy = val === true || val === '' || val === 'true'
32
- if (truthy) classes[`h-tab-${key}`] = true
33
- }
34
- return classes
35
- })
36
-
37
- // 创建对XTab组件的引用
38
- const xTabRef = ref()
39
-
40
- // 获取插槽(避免模板中直接使用 $slots 触发类型检查错误)
41
- const slots = useSlots()
42
- const slotNames = computed(() => {
43
- try {
44
- return Object.keys(slots || {})
45
- } catch (e) {
46
- return []
47
- }
48
- })
49
-
50
- // 右侧附加区域的动态配置
51
- const extraConfig = ref(null)
52
- const extraItems = computed(() => {
53
- const cfg = extraConfig.value
54
- return cfg && cfg.value ? cfg.value : []
55
- })
56
-
57
- // 本地异步组件映射(未全局注册时生效)
58
- const localMap = {
59
- 'x-input': () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
60
- 'x-select': () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
61
- 'x-radio': () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
62
- 'x-buttons': () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
63
- 'h-buttons': () => import('@vue2-client/base-client/components/common/HIS/HButtons/HButtons.vue')
64
- }
65
-
66
- // 从 attrs 中读取 serverName 与 env(保持向后兼容)
67
- const serverName = computed(() => (attrs && attrs.serverName))
68
- const env = computed(() => (attrs && attrs.env) || 'prod')
69
-
70
- const loadExtraConfig = (configName) => {
71
- if (!configName) {
72
- extraConfig.value = null
73
- return
74
- }
75
- getConfigByName(configName, serverName.value, (res) => {
76
- extraConfig.value = res
77
- }, env.value === 'dev')
78
- }
79
-
80
- onMounted(() => loadExtraConfig(props.tabBarExtraConfig))
81
- watch(() => props.tabBarExtraConfig, loadExtraConfig)
82
-
83
- // 暴露方法给父组件使用
84
- defineExpose({
85
- // 为了兼容性,保留getXTabInstance方法
86
- getXTabInstance: () => xTabRef.value,
87
- })
88
- </script>
89
-
90
- <template>
91
- <div
92
- class="h-tab-wrapper"
93
- :class="[wrapperClassObject, extraItems.length > 1 ? 'h-tab-extra-wrapper-multiple' : '']">
94
- <x-tab
95
- ref="xTabRef"
96
- :tabBarGutter="props.tabBarGutter"
97
- v-bind="$attrs"
98
- v-on="$listeners"
99
- >
100
- <template v-if="extraItems.length" #tabBarExtraContent>
101
- <!-- 父级可接管渲染;未提供则按配置兜底渲染 -->
102
- <slot name="tabBarExtraContent" :config="extraConfig" :items="extraItems">
103
- <div class="h-tab-extra-wrapper">
104
- <component
105
- v-for="(item, idx) in extraItems"
106
- :is="localMap[item.slotType] || item.slotType"
107
- :key="idx"
108
- :ref="item.slotRef || `extra_${idx}`"
109
- :serviceName="item.serviceName || serverName"
110
- :serverName="item.serviceName || serverName"
111
- :queryParamsName="item.slotConfig"
112
- :env="env"
113
- v-on="$listeners"
114
- v-bind="item.attrs"
115
- />
116
- </div>
117
- </slot>
118
- </template>
119
- <template v-for="name in slotNames" #[name]="slotData">
120
- <slot :name="name" v-bind="slotData" />
121
- </template>
122
- </x-tab>
123
- </div>
124
- </template>
125
-
126
- <style scoped lang="less">
127
- .h-tab-wrapper {
128
- // 基础样式
129
- :deep(.ant-tabs-tab-next) {
130
- display: none;
131
- }
132
- :deep(.ant-tabs-nav-wrap) {
133
- margin-top: 18px !important;
134
- margin-bottom: 0 !important;
135
- }
136
- :deep(.ant-tabs-nav) {
137
- // 去除导航容器默认左右内边距,避免收缩时左侧多出一截
138
- .ant-tabs-nav-container,
139
- .ant-tabs-nav-scroll {
140
- margin: 0px;
141
- }
142
-
143
- // 移除左右切换箭头带来的占位
144
- .ant-tabs-tab-prev,
145
- .ant-tabs-tab-next {
146
- display: none !important;
147
- width: 0 !important;
148
- }
149
- .ant-tabs-tab-next-icon {
150
- display: none;
151
- }
152
- .ant-tabs-tab {
153
- background-color: transparent;
154
- border-radius: 6px 6px 0 0;
155
- color: #5D5C5C;
156
- font-weight: bold;
157
- width: 134px;
158
- font-size: 18px;
159
- line-height: 26px;
160
- font-family: "Source Han Sans";
161
- transition: all 0.3s;
162
- height: 32px;
163
- text-align: center;
164
- margin: 0 !important;
165
- padding: 0 !important;
166
- }
167
- .ant-tabs-tab-active {
168
- background-color: #0057FE;
169
- color: #ffffff;
170
- width: 134px;
171
- line-height: 26px;
172
- height: 32px;
173
- text-align: center;
174
- margin: 0 !important;
175
- padding: 0 !important;
176
- }
177
- }
178
-
179
- :deep(.ant-tabs-bar) {
180
- border-bottom: 2px solid #0057FE;
181
- margin: 0px 0px;
182
- width: 100%;
183
- height: 50px;
184
- }
185
-
186
- // 滚动状态下的容器左右内边距清零,避免左侧多出一截
187
- :deep(.ant-tabs-nav-container-scrolling) {
188
- padding-left: 0 !important;
189
- padding-right: 0 !important;
190
- }
191
-
192
- :deep(.ant-tabs-tab-arrow-show) {
193
- display: none;
194
- }
195
-
196
- :deep(.ant-tabs-ink-bar) {
197
- background-color: transparent;
198
- bottom: 0px;
199
- display: none;
200
- height: 0;
201
- }
202
-
203
- :deep(.ant-tabs-tab-prev-icon-target) {
204
- display: none;
205
- }
206
-
207
- // 带顶部边距的样式
208
- &.h-tab-hasTopMargin {
209
- :deep(.ant-tabs-nav) {
210
- margin-top: 6px;
211
- }
212
-
213
- :deep(.ant-tabs-bar) {
214
- margin: 0 6px;
215
- }
216
-
217
- :deep(.ant-card-body) {
218
- padding: 6px 0;
219
-
220
- .ant-card-body {
221
- padding: 6px;
222
- }
223
- }
224
- }
225
-
226
- // 通用样式7:细下划线、透明背景、可配置宽度
227
- &.h-tab-useStyle7 {
228
- :deep(.ant-tabs-tab-next),
229
- :deep(.ant-tabs-tab-prev-icon-target),
230
- :deep(.ant-tabs-tab-next-icon) { display: none; }
231
-
232
- :deep(.ant-tabs-bar) { border-bottom: 2px solid transparent; }
233
-
234
- :deep(.ant-tabs-ink-bar) {
235
- display: block;
236
- background-color: #0057FE;
237
- bottom: 8px;
238
- height: 2px;
239
- /* 宽度交给 antd 自身计算,避免固定值影响自适应 */
240
- margin-left: 0;
241
- }
242
-
243
- :deep(.ant-tabs-nav) {
244
- display: flex;
245
- flex-wrap: wrap;
246
- gap: 8px;
247
- .ant-tabs-tab {
248
- background-color: transparent;
249
- border-radius: 0;
250
- color: #333333;
251
- font-weight: 500;
252
- /* 自适应宽度,允许通过变量覆盖最小宽度 */
253
- min-width: var(--tab-min-width, 96px);
254
- width: auto;
255
- padding: 0 12px;
256
- font-size: 16px;
257
- line-height: 10px;
258
- font-family: "Source Han Sans";
259
- transition: all 0.3s;
260
- height: 40px;
261
- text-align: center;
262
- margin-right: 0 !important;
263
- }
264
- .ant-tabs-tab-active {
265
- background-color: transparent;
266
- color: #0057FE;
267
- font-weight: 600;
268
- width: auto;
269
- line-height: 10px;
270
- height: 40px;
271
- text-align: center;
272
- }
273
- }
274
-
275
- // 可选:标签左侧圆点
276
- &.h-tab-useCycle {
277
- :deep(.ant-tabs-tab) {
278
- position: relative;
279
- padding-left: 18px !important;
280
- margin-right: 20px !important;
281
- display: inline-flex !important; // 使用inline-flex保持水平布局
282
- align-items: center !important; // 确保内容垂直居中
283
- line-height: normal !important; // 重置line-height避免冲突
284
- vertical-align: top !important; // 确保垂直对齐
285
- }
286
- :deep(.ant-tabs-tab::before) {
287
- content: "" !important;
288
- position: absolute !important;
289
- left: 0 !important;
290
- top: 50% !important;
291
- transform: translateY(-50%) !important;
292
- width: 8px !important;
293
- height: 8px !important;
294
- background: #0057FE !important;
295
- border-radius: 50% !important;
296
- display: block !important;
297
- z-index: 1 !important; // 确保圆点在最上层
298
- }
299
- :deep(.ant-tabs-nav) {
300
- display: flex !important;
301
- flex-direction: row !important; // 明确指定水平方向
302
- flex-wrap: nowrap !important;
303
- align-items: center !important; // 确保导航栏垂直居中
304
- }
305
- }
306
- }
307
- // 用户词条使用样式
308
- &.h-tab-useStyle8 {
309
- :deep(.ant-tabs-tab-next),
310
- :deep(.ant-tabs-tab-prev-icon-target),
311
- :deep(.ant-tabs-tab-next-icon) { display: none; }
312
-
313
- // Make the main Ant Design tabs container a flex column to arrange tab bar and content vertically
314
- :deep(.ant-tabs) {
315
- display: flex !important;
316
- flex-direction: column !important; // 确保选项卡栏在顶部,内容区域在下方
317
- height: auto !important; // 高度自适应
318
- }
319
-
320
- :deep(.ant-tabs-bar) {
321
- border-bottom: 1px solid #d9d9d9; // 底部边框
322
- border-right: none; // 移除右侧边框
323
- margin-right: 0 !important; // 移除重叠修复
324
- flex-shrink: 1 !important; // 允许收缩
325
- height: auto !important; // 高度自适应
326
- margin-bottom: 0px !important;
327
- }
328
-
329
- :deep(.ant-tabs-content) {
330
- flex: none !important; // 移除 flex: 1,允许内容区域自然流淌
331
- }
332
-
333
- :deep(.ant-tabs-nav) {
334
- .ant-tabs-nav-container,
335
- .ant-tabs-nav-wrap,
336
- .ant-tabs-nav-scroll,
337
- & > div:first-child {
338
- display: flex !important;
339
- flex-direction: row !important;
340
- flex-wrap: nowrap !important; // 确保不换行
341
- width: 100% !important; // 占据全部宽度
342
- height: auto !important;
343
- }
344
-
345
- height: auto !important; // 高度自适应内容
346
- width: 100% !important; // 确保容器占据全部宽度
347
-
348
- .ant-tabs-tab {
349
- flex: 1 !important; // 宽度等分布局
350
- margin-right: 0 !important;
351
- margin-bottom: 0 !important; // 移除底部间距
352
- border-top: 1px solid #d9d9d9;
353
- border-left: 1px solid #d9d9d9;
354
- border-bottom: 1px solid #d9d9d9; // 所有选项卡都有底部边框
355
- border-right: none; // 默认没有右边框
356
- &:last-child {
357
- border-right: 1px solid #d9d9d9; // 最后一个选项卡有右边框
358
- }
359
- border-radius: 0; // 默认无圆角,避免中间相邻处出现圆角
360
- background-color: #f5f5f5;
361
- color: #333333;
362
- font-weight: 500;
363
- font-size: 16px;
364
- height: 40px; // 固定高度
365
- width: auto !important; // 移除固定宽度,以便等分
366
- display: flex;
367
- justify-content: center;
368
- align-items: center;
369
- padding: 0;
370
- }
371
- // 首项:仅左侧圆角
372
- .ant-tabs-tab:first-child {
373
- border-top-left-radius: 10px;
374
- border-bottom-left-radius: 10px;
375
- }
376
- // 末项:仅右侧圆角
377
- .ant-tabs-tab:last-child {
378
- border-top-right-radius: 10px;
379
- border-bottom-right-radius: 10px;
380
- }
381
- .ant-tabs-tab-active {
382
- border-bottom: 1px solid transparent; // 激活时隐藏底部边框,与 ant-tabs-bar 的边框衔接
383
- background-color: #0057FE;
384
- color: #ffffff;
385
- font-weight: 600;
386
- }
387
- }
388
- :deep(.ant-tabs-ink-bar) {
389
- display: none; // 隐藏下划线
390
- }
391
- }
392
- &.h-tab-extra-wrapper-multiple {
393
- :deep(.h-tab-extra-wrapper){
394
- display: flex;
395
- justify-content: end;
396
- gap: 8px;
397
- }
398
- :deep(.x-radio-group){
399
- height: 32px;
400
- }
401
- :deep(.x-radio-item){
402
- height: 32px;
403
- display: flex;
404
- align-items: center;
405
- margin-bottom: 0px;
406
- }
407
- :deep(.ant-tabs-tab){
408
- height: 34px;
409
- }
410
- :deep(.ant-tabs-nav-container){
411
- padding-top: 2px;
412
- }
413
- :deep(.ant-tabs-extra-content){
414
- line-height: 0px !important;
415
- }
416
- }
417
-
418
- &.h-tab-out-tab {
419
- :deep(.ant-tabs-nav-wrap) {
420
- margin-top: 0px !important;
421
- margin-bottom: 0px !important;
422
- }
423
- :deep(.ant-tabs-nav) {
424
- margin-bottom: 0px !important;
425
- }
426
- :deep(.ant-tabs-nav-container) {
427
- padding-top: 0px !important;
428
- padding-bottom: 0px !important;
429
- }
430
-
431
- :deep(.ant-tabs-bar) {
432
- margin-top: 0px !important;
433
- margin-bottom: 0px !important;
434
- height: auto !important;
435
- min-height: 0px !important;
436
- }
437
-
438
- :deep(.ant-tabs-content) {
439
- margin-top: 0px !important;
440
- }
441
- }
442
- }
443
- </style>
1
+ <script setup>
2
+ import XTab from '@vue2-client/base-client/components/common/XTab/XTab.vue'
3
+ import { ref, computed, useAttrs, useSlots, watch, onMounted } from 'vue'
4
+ import { getConfigByName } from '@vue2-client/services/api/common'
5
+
6
+ const props = defineProps({
7
+ // 标签栏右侧附加区域的配置名(可选)。提供时将自动加载配置并渲染到 tabBar 右侧。
8
+ tabBarExtraConfig: {
9
+ type: String,
10
+ default: undefined
11
+ },
12
+ // 控制标签间距,覆盖内部 XTab 的默认 10px;默认置 0 清除外边距
13
+ tabBarGutter: {
14
+ type: Number,
15
+ default: 0
16
+ }
17
+ })
18
+
19
+ // 兼容多种样式配置
20
+ const attrs = useAttrs()
21
+ const wrapperClassObject = computed(() => {
22
+ const a = attrs
23
+ const classes = {}
24
+
25
+ // 通用布尔样式开关(以存在/空字符串/'true' 为真)
26
+ const booleanStyleKeys = [
27
+ 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8', 'out-tab'
28
+ ]
29
+ for (const key of booleanStyleKeys) {
30
+ const val = a[key]
31
+ const truthy = val === true || val === '' || val === 'true'
32
+ if (truthy) classes[`h-tab-${key}`] = true
33
+ }
34
+ return classes
35
+ })
36
+
37
+ // 创建对XTab组件的引用
38
+ const xTabRef = ref()
39
+
40
+ // 获取插槽(避免模板中直接使用 $slots 触发类型检查错误)
41
+ const slots = useSlots()
42
+ const slotNames = computed(() => {
43
+ try {
44
+ return Object.keys(slots || {})
45
+ } catch (e) {
46
+ return []
47
+ }
48
+ })
49
+
50
+ // 右侧附加区域的动态配置
51
+ const extraConfig = ref(null)
52
+ const extraItems = computed(() => {
53
+ const cfg = extraConfig.value
54
+ return cfg && cfg.value ? cfg.value : []
55
+ })
56
+
57
+ // 本地异步组件映射(未全局注册时生效)
58
+ const localMap = {
59
+ 'x-input': () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
60
+ 'x-select': () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
61
+ 'x-radio': () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
62
+ 'x-buttons': () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
63
+ 'h-buttons': () => import('@vue2-client/base-client/components/common/HIS/HButtons/HButtons.vue')
64
+ }
65
+
66
+ // 从 attrs 中读取 serverName 与 env(保持向后兼容)
67
+ const serverName = computed(() => (attrs && attrs.serverName))
68
+ const env = computed(() => (attrs && attrs.env) || 'prod')
69
+
70
+ const loadExtraConfig = (configName) => {
71
+ if (!configName) {
72
+ extraConfig.value = null
73
+ return
74
+ }
75
+ getConfigByName(configName, serverName.value, (res) => {
76
+ extraConfig.value = res
77
+ }, env.value === 'dev')
78
+ }
79
+
80
+ onMounted(() => loadExtraConfig(props.tabBarExtraConfig))
81
+ watch(() => props.tabBarExtraConfig, loadExtraConfig)
82
+
83
+ // 暴露方法给父组件使用
84
+ defineExpose({
85
+ // 为了兼容性,保留getXTabInstance方法
86
+ getXTabInstance: () => xTabRef.value,
87
+ })
88
+ </script>
89
+
90
+ <template>
91
+ <div
92
+ class="h-tab-wrapper"
93
+ :class="[wrapperClassObject, extraItems.length > 1 ? 'h-tab-extra-wrapper-multiple' : '']">
94
+ <x-tab
95
+ ref="xTabRef"
96
+ :tabBarGutter="props.tabBarGutter"
97
+ v-bind="$attrs"
98
+ v-on="$listeners"
99
+ >
100
+ <template v-if="extraItems.length" #tabBarExtraContent>
101
+ <!-- 父级可接管渲染;未提供则按配置兜底渲染 -->
102
+ <slot name="tabBarExtraContent" :config="extraConfig" :items="extraItems">
103
+ <div class="h-tab-extra-wrapper">
104
+ <component
105
+ v-for="(item, idx) in extraItems"
106
+ :is="localMap[item.slotType] || item.slotType"
107
+ :key="idx"
108
+ :ref="item.slotRef || `extra_${idx}`"
109
+ :serviceName="item.serviceName || serverName"
110
+ :serverName="item.serviceName || serverName"
111
+ :queryParamsName="item.slotConfig"
112
+ :env="env"
113
+ v-on="$listeners"
114
+ v-bind="item.attrs"
115
+ />
116
+ </div>
117
+ </slot>
118
+ </template>
119
+ <template v-for="name in slotNames" #[name]="slotData">
120
+ <slot :name="name" v-bind="slotData" />
121
+ </template>
122
+ </x-tab>
123
+ </div>
124
+ </template>
125
+
126
+ <style scoped lang="less">
127
+ .h-tab-wrapper {
128
+ // 基础样式
129
+ :deep(.ant-tabs-tab-next) {
130
+ display: none;
131
+ }
132
+ :deep(.ant-tabs-nav-wrap) {
133
+ margin-top: 18px !important;
134
+ margin-bottom: 0 !important;
135
+ }
136
+ :deep(.ant-tabs-nav) {
137
+ // 去除导航容器默认左右内边距,避免收缩时左侧多出一截
138
+ .ant-tabs-nav-container,
139
+ .ant-tabs-nav-scroll {
140
+ margin: 0px;
141
+ }
142
+
143
+ // 移除左右切换箭头带来的占位
144
+ .ant-tabs-tab-prev,
145
+ .ant-tabs-tab-next {
146
+ display: none !important;
147
+ width: 0 !important;
148
+ }
149
+ .ant-tabs-tab-next-icon {
150
+ display: none;
151
+ }
152
+ .ant-tabs-tab {
153
+ background-color: transparent;
154
+ border-radius: 6px 6px 0 0;
155
+ color: #5D5C5C;
156
+ font-weight: bold;
157
+ width: 134px;
158
+ font-size: 18px;
159
+ line-height: 26px;
160
+ font-family: "Source Han Sans";
161
+ transition: all 0.3s;
162
+ height: 32px;
163
+ text-align: center;
164
+ margin: 0 !important;
165
+ padding: 0 !important;
166
+ }
167
+ .ant-tabs-tab-active {
168
+ background-color: #0057FE;
169
+ color: #ffffff;
170
+ width: 134px;
171
+ line-height: 26px;
172
+ height: 32px;
173
+ text-align: center;
174
+ margin: 0 !important;
175
+ padding: 0 !important;
176
+ }
177
+ }
178
+
179
+ :deep(.ant-tabs-bar) {
180
+ border-bottom: 2px solid #0057FE;
181
+ margin: 0px 0px;
182
+ width: 100%;
183
+ height: 50px;
184
+ }
185
+
186
+ // 滚动状态下的容器左右内边距清零,避免左侧多出一截
187
+ :deep(.ant-tabs-nav-container-scrolling) {
188
+ padding-left: 0 !important;
189
+ padding-right: 0 !important;
190
+ }
191
+
192
+ :deep(.ant-tabs-tab-arrow-show) {
193
+ display: none;
194
+ }
195
+
196
+ :deep(.ant-tabs-ink-bar) {
197
+ background-color: transparent;
198
+ bottom: 0px;
199
+ display: none;
200
+ height: 0;
201
+ }
202
+
203
+ :deep(.ant-tabs-tab-prev-icon-target) {
204
+ display: none;
205
+ }
206
+
207
+ // 带顶部边距的样式
208
+ &.h-tab-hasTopMargin {
209
+ :deep(.ant-tabs-nav) {
210
+ margin-top: 6px;
211
+ }
212
+
213
+ :deep(.ant-tabs-bar) {
214
+ margin: 0 6px;
215
+ }
216
+
217
+ :deep(.ant-card-body) {
218
+ padding: 6px 0;
219
+
220
+ .ant-card-body {
221
+ padding: 6px;
222
+ }
223
+ }
224
+ }
225
+
226
+ // 通用样式7:细下划线、透明背景、可配置宽度
227
+ &.h-tab-useStyle7 {
228
+ :deep(.ant-tabs-tab-next),
229
+ :deep(.ant-tabs-tab-prev-icon-target),
230
+ :deep(.ant-tabs-tab-next-icon) { display: none; }
231
+
232
+ :deep(.ant-tabs-bar) { border-bottom: 2px solid transparent; }
233
+
234
+ :deep(.ant-tabs-ink-bar) {
235
+ display: block;
236
+ background-color: #0057FE;
237
+ bottom: 8px;
238
+ height: 2px;
239
+ /* 宽度交给 antd 自身计算,避免固定值影响自适应 */
240
+ margin-left: 0;
241
+ }
242
+
243
+ :deep(.ant-tabs-nav) {
244
+ display: flex;
245
+ flex-wrap: wrap;
246
+ gap: 8px;
247
+ .ant-tabs-tab {
248
+ background-color: transparent;
249
+ border-radius: 0;
250
+ color: #333333;
251
+ font-weight: 500;
252
+ /* 自适应宽度,允许通过变量覆盖最小宽度 */
253
+ min-width: var(--tab-min-width, 96px);
254
+ width: auto;
255
+ padding: 0 12px;
256
+ font-size: 16px;
257
+ line-height: 10px;
258
+ font-family: "Source Han Sans";
259
+ transition: all 0.3s;
260
+ height: 40px;
261
+ text-align: center;
262
+ margin-right: 0 !important;
263
+ }
264
+ .ant-tabs-tab-active {
265
+ background-color: transparent;
266
+ color: #0057FE;
267
+ font-weight: 600;
268
+ width: auto;
269
+ line-height: 10px;
270
+ height: 40px;
271
+ text-align: center;
272
+ }
273
+ }
274
+
275
+ // 可选:标签左侧圆点
276
+ &.h-tab-useCycle {
277
+ :deep(.ant-tabs-tab) {
278
+ position: relative;
279
+ padding-left: 18px !important;
280
+ margin-right: 20px !important;
281
+ display: inline-flex !important; // 使用inline-flex保持水平布局
282
+ align-items: center !important; // 确保内容垂直居中
283
+ line-height: normal !important; // 重置line-height避免冲突
284
+ vertical-align: top !important; // 确保垂直对齐
285
+ }
286
+ :deep(.ant-tabs-tab::before) {
287
+ content: "" !important;
288
+ position: absolute !important;
289
+ left: 0 !important;
290
+ top: 50% !important;
291
+ transform: translateY(-50%) !important;
292
+ width: 8px !important;
293
+ height: 8px !important;
294
+ background: #0057FE !important;
295
+ border-radius: 50% !important;
296
+ display: block !important;
297
+ z-index: 1 !important; // 确保圆点在最上层
298
+ }
299
+ :deep(.ant-tabs-nav) {
300
+ display: flex !important;
301
+ flex-direction: row !important; // 明确指定水平方向
302
+ flex-wrap: nowrap !important;
303
+ align-items: center !important; // 确保导航栏垂直居中
304
+ }
305
+ }
306
+ }
307
+ // 用户词条使用样式
308
+ &.h-tab-useStyle8 {
309
+ :deep(.ant-tabs-tab-next),
310
+ :deep(.ant-tabs-tab-prev-icon-target),
311
+ :deep(.ant-tabs-tab-next-icon) { display: none; }
312
+
313
+ // Make the main Ant Design tabs container a flex column to arrange tab bar and content vertically
314
+ :deep(.ant-tabs) {
315
+ display: flex !important;
316
+ flex-direction: column !important; // 确保选项卡栏在顶部,内容区域在下方
317
+ height: auto !important; // 高度自适应
318
+ }
319
+
320
+ :deep(.ant-tabs-bar) {
321
+ border-bottom: 1px solid #d9d9d9; // 底部边框
322
+ border-right: none; // 移除右侧边框
323
+ margin-right: 0 !important; // 移除重叠修复
324
+ flex-shrink: 1 !important; // 允许收缩
325
+ height: auto !important; // 高度自适应
326
+ margin-bottom: 0px !important;
327
+ }
328
+
329
+ :deep(.ant-tabs-content) {
330
+ flex: none !important; // 移除 flex: 1,允许内容区域自然流淌
331
+ }
332
+
333
+ :deep(.ant-tabs-nav) {
334
+ .ant-tabs-nav-container,
335
+ .ant-tabs-nav-wrap,
336
+ .ant-tabs-nav-scroll,
337
+ & > div:first-child {
338
+ display: flex !important;
339
+ flex-direction: row !important;
340
+ flex-wrap: nowrap !important; // 确保不换行
341
+ width: 100% !important; // 占据全部宽度
342
+ height: auto !important;
343
+ }
344
+
345
+ height: auto !important; // 高度自适应内容
346
+ width: 100% !important; // 确保容器占据全部宽度
347
+
348
+ .ant-tabs-tab {
349
+ flex: 1 !important; // 宽度等分布局
350
+ margin-right: 0 !important;
351
+ margin-bottom: 0 !important; // 移除底部间距
352
+ border-top: 1px solid #d9d9d9;
353
+ border-left: 1px solid #d9d9d9;
354
+ border-bottom: 1px solid #d9d9d9; // 所有选项卡都有底部边框
355
+ border-right: none; // 默认没有右边框
356
+ &:last-child {
357
+ border-right: 1px solid #d9d9d9; // 最后一个选项卡有右边框
358
+ }
359
+ border-radius: 0; // 默认无圆角,避免中间相邻处出现圆角
360
+ background-color: #f5f5f5;
361
+ color: #333333;
362
+ font-weight: 500;
363
+ font-size: 16px;
364
+ height: 40px; // 固定高度
365
+ width: auto !important; // 移除固定宽度,以便等分
366
+ display: flex;
367
+ justify-content: center;
368
+ align-items: center;
369
+ padding: 0;
370
+ }
371
+ // 首项:仅左侧圆角
372
+ .ant-tabs-tab:first-child {
373
+ border-top-left-radius: 10px;
374
+ border-bottom-left-radius: 10px;
375
+ }
376
+ // 末项:仅右侧圆角
377
+ .ant-tabs-tab:last-child {
378
+ border-top-right-radius: 10px;
379
+ border-bottom-right-radius: 10px;
380
+ }
381
+ .ant-tabs-tab-active {
382
+ border-bottom: 1px solid transparent; // 激活时隐藏底部边框,与 ant-tabs-bar 的边框衔接
383
+ background-color: #0057FE;
384
+ color: #ffffff;
385
+ font-weight: 600;
386
+ }
387
+ }
388
+ :deep(.ant-tabs-ink-bar) {
389
+ display: none; // 隐藏下划线
390
+ }
391
+ }
392
+ &.h-tab-extra-wrapper-multiple {
393
+ :deep(.h-tab-extra-wrapper){
394
+ display: flex;
395
+ justify-content: end;
396
+ gap: 8px;
397
+ }
398
+ :deep(.x-radio-group){
399
+ height: 32px;
400
+ }
401
+ :deep(.x-radio-item){
402
+ height: 32px;
403
+ display: flex;
404
+ align-items: center;
405
+ margin-bottom: 0px;
406
+ }
407
+ :deep(.ant-tabs-tab){
408
+ height: 34px;
409
+ }
410
+ :deep(.ant-tabs-nav-container){
411
+ padding-top: 2px;
412
+ }
413
+ :deep(.ant-tabs-extra-content){
414
+ line-height: 0px !important;
415
+ }
416
+ }
417
+
418
+ &.h-tab-out-tab {
419
+ :deep(.ant-tabs-nav-wrap) {
420
+ margin-top: 0px !important;
421
+ margin-bottom: 0px !important;
422
+ }
423
+ :deep(.ant-tabs-nav) {
424
+ margin-bottom: 0px !important;
425
+ }
426
+ :deep(.ant-tabs-nav-container) {
427
+ padding-top: 0px !important;
428
+ padding-bottom: 0px !important;
429
+ }
430
+
431
+ :deep(.ant-tabs-bar) {
432
+ margin-top: 0px !important;
433
+ margin-bottom: 0px !important;
434
+ height: auto !important;
435
+ min-height: 0px !important;
436
+ }
437
+
438
+ :deep(.ant-tabs-content) {
439
+ margin-top: 0px !important;
440
+ }
441
+ }
442
+ }
443
+ </style>