vue2-client 1.16.84 → 1.16.86

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.16.84",
3
+ "version": "1.16.86",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -16,7 +16,8 @@ const wrapperClassObject = computed(() => {
16
16
  'label-text-horizontal',
17
17
  'label-text-justify',
18
18
  'left-form',
19
- 'charge-form'
19
+ 'charge-form',
20
+ 'aligned-form'
20
21
  ]
21
22
  for (const key of booleanStyleKeys) {
22
23
  const val = a[key]
@@ -344,5 +345,148 @@ defineExpose({
344
345
  }
345
346
  }
346
347
  }
348
+
349
+ // aligned-form 样式 - 实现标签左对齐、输入框垂直对齐的整齐布局
350
+ &.h-form-aligned-form {
351
+ :deep(.ant-form-item) {
352
+ margin-bottom: 16px;
353
+ display: flex;
354
+ align-items: center;
355
+ width: 100%;
356
+
357
+ .ant-form-item-label {
358
+ text-align: left;
359
+ margin-right: 12px;
360
+ flex-shrink: 0;
361
+ min-width: 80px; // 确保标签有最小宽度,保持对齐
362
+ max-width: 120px; // 限制最大宽度,避免过宽
363
+
364
+ label {
365
+ margin: 0;
366
+ padding: 0;
367
+ white-space: nowrap;
368
+ display: block;
369
+ text-align: left;
370
+ line-height: 32px;
371
+ height: 32px;
372
+ color: rgba(0, 0, 0, 0.85);
373
+ font-size: 14px;
374
+
375
+ // 移除默认冒号
376
+ &::after {
377
+ content: '';
378
+ }
379
+ }
380
+ }
381
+
382
+ .ant-form-item-control-wrapper {
383
+ flex: 1;
384
+ min-width: 0;
385
+ display: flex;
386
+ align-items: center;
387
+
388
+ .ant-form-item-control {
389
+ width: 100%;
390
+ margin: 0;
391
+ padding: 0;
392
+
393
+ // 统一输入框样式
394
+ .ant-input,
395
+ .ant-input-affix-wrapper,
396
+ .ant-select,
397
+ .ant-input-number,
398
+ .ant-picker,
399
+ .ant-radio-group,
400
+ .ant-checkbox-group {
401
+ width: 100%;
402
+ height: 32px;
403
+ line-height: 32px;
404
+ vertical-align: top;
405
+ margin: 0;
406
+ text-align: left;
407
+ }
408
+
409
+ // 选择器样式
410
+ .ant-select {
411
+ .ant-select-selector {
412
+ height: 32px;
413
+ line-height: 32px;
414
+
415
+ .ant-select-selection-item,
416
+ .ant-select-selection-placeholder {
417
+ line-height: 32px;
418
+ height: 32px;
419
+ }
420
+ }
421
+ }
422
+
423
+ // 日期选择器样式
424
+ .ant-picker {
425
+ height: 32px;
426
+
427
+ .ant-picker-input {
428
+ height: 32px;
429
+ line-height: 32px;
430
+
431
+ input {
432
+ height: 32px;
433
+ line-height: 32px;
434
+ }
435
+ }
436
+ }
437
+
438
+ // 数字输入框样式
439
+ .ant-input-number {
440
+ height: 32px;
441
+
442
+ .ant-input-number-input {
443
+ height: 32px;
444
+ line-height: 32px;
445
+ }
446
+ }
447
+
448
+ // 单选框组和复选框组样式
449
+ .ant-radio-group,
450
+ .ant-checkbox-group {
451
+ height: 32px;
452
+ line-height: 32px;
453
+ display: flex;
454
+ align-items: center;
455
+
456
+ .ant-radio-wrapper,
457
+ .ant-checkbox-wrapper {
458
+ height: 32px;
459
+ line-height: 32px;
460
+ margin-right: 16px;
461
+ }
462
+ }
463
+ }
464
+ }
465
+ }
466
+
467
+ // 确保行容器样式
468
+ :deep(.ant-row) {
469
+ margin: 0;
470
+ padding: 0;
471
+
472
+ .ant-col {
473
+ margin: 0;
474
+ padding: 0 8px; // 列与列之间的间距
475
+ display: flex;
476
+ flex-direction: column;
477
+ }
478
+ }
479
+
480
+ // 重置可能的容器边距
481
+ :deep(.ant-form-item) {
482
+ margin: 0 0 16px 0 !important;
483
+
484
+ .ant-form-item-control-input,
485
+ .ant-form-item-control-input-content {
486
+ margin: 0 !important;
487
+ padding: 0 !important;
488
+ }
489
+ }
490
+ }
347
491
  }
348
492
  </style>
@@ -21,7 +21,8 @@ const wrapperClassObject = computed(() => {
21
21
  'button-row-0margin',
22
22
  'top-hidden',
23
23
  'dialog-style',
24
- 'button-style'
24
+ 'button-style',
25
+ 'header-center'
25
26
  ]
26
27
  for (const key of booleanStyleKeys) {
27
28
  const val = a[key]
@@ -390,5 +391,13 @@ const isCustomPagination = computed(() => {
390
391
  line-height: normal;
391
392
  }
392
393
  }
394
+
395
+ // 表格内容全部居中样式
396
+ &.h-form-table-header-center {
397
+ :deep(.ant-table-thead > tr > th),
398
+ :deep(.ant-table-tbody > tr > td) {
399
+ text-align: center !important;
400
+ }
401
+ }
393
402
  }
394
403
  </style>
@@ -1,418 +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'
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
- </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>
@@ -5,12 +5,12 @@
5
5
  <div class="x-timeline-nav">
6
6
  <!-- 导航按钮:前一周、前一天 -->
7
7
  <a-button type="link" @click="goToPrevWeek">
8
- <a-icon type="double-left"/>
9
- {{ config?.prevWeekText || '前一周' }}
8
+ <a-icon type="vertical-right"/>
9
+ <span v-if="config?.prevWeekText !== false">{{ config?.prevWeekText || '前一周' }}</span>
10
10
  </a-button>
11
11
  <a-button type="link" @click="goToPrevDay">
12
12
  <a-icon type="left"/>
13
- {{ config?.prevDayText || '前一天' }}
13
+ <span v-if="config?.prevDayText !== false">{{ config?.prevDayText || '前一天' }}</span>
14
14
  </a-button>
15
15
  <!-- 日期显示区域 -->
16
16
  <div class="timeline-dates">
@@ -31,12 +31,12 @@
31
31
  </div>
32
32
  <!-- 导航按钮:后一天、后一周 -->
33
33
  <a-button type="link" @click="goToNextDay">
34
- {{ config?.nextDayText || '后一天' }}
34
+ <span v-if="config?.nextDayText !== false">{{ config?.nextDayText || '后一天' }}</span>
35
35
  <a-icon type="right"/>
36
36
  </a-button>
37
37
  <a-button type="link" @click="goToNextWeek">
38
- {{ config?.nextWeekText || '后一周' }}
39
- <a-icon type="double-right"/>
38
+ <span v-if="config?.nextWeekText !== false">{{ config?.nextWeekText || '后一周' }}</span>
39
+ <a-icon type="vertical-left"/>
40
40
  </a-button>
41
41
  </div>
42
42
  </div>
@@ -378,12 +378,12 @@ export default {
378
378
 
379
379
  /* Style1 样式配置 */
380
380
  .xtimeline-style1 {
381
- padding: 0px 4px;
381
+ padding: 0px 0px;
382
382
 
383
383
  .x-timeline-nav {
384
384
  padding: 0px;
385
385
  width: 140px;
386
- height: 55px;
386
+ height: 56px;
387
387
 
388
388
  .timeline-dates {
389
389
  margin: 0px;
@@ -397,7 +397,7 @@ export default {
397
397
 
398
398
  .ant-btn {
399
399
  border-radius: 6px;
400
- border: 1px solid #E5E9F0;
400
+ border: 1px solid #CDCFD4;
401
401
  font-weight: bold;
402
402
  letter-spacing: 0em;
403
403
  font-size: 16px;
@@ -405,9 +405,17 @@ export default {
405
405
  line-height: normal;
406
406
  opacity: 1;
407
407
  box-sizing: border-box;
408
- height: 54px;
409
- width: 120px;
408
+ height: 56px;
409
+ width: 112px;
410
+ min-width: 112px;
410
411
  background: #FFFFFF;
412
+ display: flex;
413
+ align-items: center;
414
+ justify-content: center;
415
+ }
416
+
417
+ .ant-btn .anticon {
418
+ color: #94979E;
411
419
  }
412
420
  }
413
421
 
@@ -415,10 +423,17 @@ export default {
415
423
  border-radius: 6px;
416
424
  border: 1px solid #CDCFD4;
417
425
  margin: 0px;
426
+ padding: 0;
418
427
  width: 140px;
419
428
  opacity: 1;
420
429
  box-sizing: border-box;
421
- height: 54px;
430
+ height: 56px;
431
+ flex: 0 0 140px;
432
+ display: flex;
433
+ flex-direction: column;
434
+ align-items: center;
435
+ justify-content: center;
436
+ text-align: center;
422
437
 
423
438
  .date {
424
439
  font-family: Inter;
@@ -427,13 +442,12 @@ export default {
427
442
  line-height: 17px;
428
443
  height: 17px;
429
444
  opacity: 1;
430
- display: flex;
431
- align-items: center;
445
+ display: block;
432
446
  letter-spacing: 0px;
433
- font-variation-settings: "opsz" auto;
434
447
  font-feature-settings: "kern" on;
435
- justify-content: center;
436
448
  color: #313131;
449
+ width: auto;
450
+ text-align: center;
437
451
  }
438
452
 
439
453
  .weekday {
@@ -441,14 +455,16 @@ export default {
441
455
  font-size: 18px;
442
456
  font-weight: bold;
443
457
  line-height: 17px;
444
- display: flex;
445
- align-items: center;
458
+ display: block;
446
459
  letter-spacing: 0px;
447
460
  font-feature-settings: "kern" on;
448
461
  color: #313131;
449
- justify-content: center;
450
- margin-bottom: 0px !important;
462
+ padding: 11px 0 2px 0;
463
+ margin: 0 !important;
464
+ width: auto;
465
+ text-align: center;
451
466
  }
467
+
452
468
  .date-item.ant-btn-primary .weekday,
453
469
  .date-item.ant-btn-primary .date {
454
470
  color: #ffffff !important;
@@ -22,11 +22,11 @@
22
22
  @change="onChange">
23
23
  <a-icon slot="prefix" type="search"/>
24
24
  </a-input>
25
- <span v-if="config.addParent.isShow" style="margin-left: 10px;">
25
+ <span v-if="config.addParent?.isShow" style="margin-left: 10px;">
26
26
  <a-icon
27
- :type="config.addParent.icon || 'plus-square'"
28
- :style="{ fontSize: config.addParent.size || '30px', color: config.addParent.color }"
29
- @click="addParent(config.addParent.func)"
27
+ :type="config.addParent?.icon || 'plus-square'"
28
+ :style="{ fontSize: config.addParent?.size || '30px', color: config.addParent?.color }"
29
+ @click="addParent(config.addParent?.func)"
30
30
  />
31
31
  </span>
32
32
  </div>
@@ -71,7 +71,8 @@ const wrapperClassObject = computed(() => {
71
71
  'dot',
72
72
  'nodot',
73
73
  'yizhu-title',
74
- 'left-title'
74
+ 'left-title',
75
+ 'line-style'
75
76
  ]
76
77
  booleanStyleKeys.forEach(key => {
77
78
  const val = attrs[key]
@@ -266,4 +267,8 @@ onMounted(() => {
266
267
  }
267
268
  }
268
269
  }
270
+ .x-title-line-style {
271
+ background: #0057FE;
272
+ height: 2px;
273
+ }
269
274
  </style>
@@ -15,7 +15,6 @@ const wrapperClassObject = computed(() => {
15
15
  'padding-50',
16
16
  'label-text-horizontal',
17
17
  'label-text-justify',
18
- 'left-form',
19
18
  'charge-form'
20
19
  ]
21
20
  for (const key of booleanStyleKeys) {
@@ -107,7 +106,7 @@ defineExpose({
107
106
 
108
107
  // charge-form 样式
109
108
  &.h-form-charge-form {
110
- padding: 10px 4px;
109
+ margin-top: 2px !important;
111
110
  // 定义变量
112
111
  @font-common: {
113
112
  font-family: 'Source Han Sans', sans-serif;
@@ -345,4 +344,4 @@ defineExpose({
345
344
  }
346
345
  }
347
346
  }
348
- </style>
347
+ </style>