vue2-client 1.16.51 → 1.16.54

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.51",
3
+ "version": "1.16.54",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -1,371 +1,380 @@
1
- <script setup lang="ts">
2
- import XButtons from '@vue2-client/base-client/components/common/XButtons/XButtons.vue'
3
- import { ref, computed, useAttrs } from 'vue'
4
-
5
- defineProps({
6
- // HButtons特有的属性
7
- buttonStyle: {
8
- type: String,
9
- default: 'button24'
10
- }
11
- })
12
-
13
- // 内部 XButtons 实例引用
14
- const xButtonsRef = ref()
15
-
16
- // 兼容多种样式配置
17
- const attrs = useAttrs()
18
- const wrapperClassObject = computed(() => {
19
- const a = attrs
20
- const classes = {}
21
-
22
- // 通用布尔样式开关(以存在/空字符串/'true' 为真)
23
- const booleanStyleKeys = [
24
- 'max-width200'
25
- ]
26
- for (const key of booleanStyleKeys) {
27
- const val = a[key]
28
- const truthy = val === true || val === '' || val === 'true'
29
- if (truthy) classes[`h-buttons-${key}`] = true
30
- }
31
- return classes
32
- })
33
-
34
- // 暴露方法:获取内部 XButtons 实例
35
- defineExpose({
36
- getXButtonsInstance: function () { return xButtonsRef.value }
37
- })
38
- </script>
39
-
40
- <template>
41
- <div
42
- class="h-buttons-wrapper"
43
- :class="[
44
- `h-buttons-${buttonStyle}`,
45
- wrapperClassObject
46
- ]"
47
- >
48
- <x-buttons
49
- ref="xButtonsRef"
50
- v-bind="$attrs"
51
- v-on="$listeners"
52
- >
53
- <template v-for="(_, name) in $slots" v-slot:[name]="slotData">
54
- <slot :name="name" v-bind="slotData" />
55
- </template>
56
- </x-buttons>
57
- </div>
58
- </template>
59
-
60
- <style scoped lang="less">
61
- .h-buttons-wrapper {
62
- // 基础样式
63
- :deep(.ant-btn-group) {
64
- .ant-btn {
65
- border-radius: 6px;
66
- background-color: #FFFFFF;
67
- border: 1px solid #9499A0;
68
- color: #313131;
69
- font-weight: normal;
70
- letter-spacing: 0em;
71
- width: 110px;
72
- font-size: 16px;
73
- font-family: "Source Han Sans";
74
- line-height: normal;
75
- margin-right: 25px;
76
- height: 32px;
77
- }
78
- }
79
- // button24样式
80
- &.h-buttons-button24 {
81
- :deep(.ant-btn-group) {
82
- .ant-btn {
83
- border: 1px solid #CDCDCD;
84
- color: #5D5C5C;
85
- // top: -100px;
86
- width: fit-content;
87
- min-width: 110px;
88
- }
89
- }
90
- }
91
- // button23样式
92
- &.h-buttons-button23 {
93
- :deep(.ant-btn-group) {
94
- .ant-btn {
95
- border: none;
96
- padding: 0 !important;
97
- color: #FFFFFF;
98
- border-radius: 50%;
99
- background-color: #1890FF;
100
- margin-left: 10px;
101
- top: -88px;
102
- width: 30px;
103
- height: 30px;
104
- }
105
- }
106
- }
107
- // +号样式(共享基础样式)
108
- &.h-buttons-table-height-button23,
109
- &.h-buttons-table-height-button23-no-transform {
110
- :deep(.ant-btn-group) {
111
- display: inline-flex;
112
- align-items: center;
113
- height: 100%;
114
-
115
- .ant-btn {
116
- display: inline-flex;
117
- align-items: center;
118
- justify-content: center;
119
- border: none;
120
- padding: 0 !important;
121
- color: #FFFFFF;
122
- border-radius: 50%;
123
- background-color: #1890FF;
124
- margin-left: 10px;
125
- width: 30px;
126
- height: 30px;
127
- }
128
- }
129
- }
130
- // 仅在有分页的场景上移
131
- &.h-buttons-table-height-button23 {
132
- :deep(.ant-btn-group) {
133
- .ant-btn { transform: translateY(-100%); }
134
- }
135
- }
136
- // 居中+悬停高亮的新样式
137
- &.h-buttons-plus-center {
138
- :deep(.ant-btn-group) {
139
- display: flex;
140
- align-items: center;
141
- justify-content: center;
142
- gap: 16px;
143
-
144
- .ant-btn {
145
- display: inline-flex;
146
- align-items: center;
147
- justify-content: center;
148
- border: 1px solid #CDCDCD;
149
- color: #5D5C5C;
150
- min-width: 110px;
151
- transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
152
-
153
- &:hover {
154
- background-color: #0057FE;
155
- border-color: #0057FE;
156
- color: #FFFFFF;
157
- }
158
- /* 支持通过 data-type 改变悬停颜色 */
159
- &[data-type='success']:hover {
160
- background-color: #34C76E;
161
- border-color: #34C76E;
162
- color: #FFFFFF;
163
- }
164
- }
165
- }
166
- }
167
- // 按钮布局样式公共部分
168
- &.h-buttons-button-left,
169
- &.h-buttons-button-center,
170
- &.h-buttons-button-right,
171
- &.h-buttons-button-space-between {
172
- :deep(.ant-btn-group) {
173
- width: 100%;
174
- display: flex;
175
- flex-wrap: nowrap;
176
- .ant-btn {
177
- border: 1px solid #CDCDCD;
178
- color: #5D5C5C;
179
- width: auto;
180
- min-width: 124px;
181
- max-width: 170px;
182
- white-space: nowrap;
183
- overflow: hidden;
184
- margin-right: 0px;
185
- text-overflow: ellipsis;
186
- }
187
- }
188
- }
189
- &.h-buttons-max-width200 {
190
- :deep(.ant-btn) {
191
- max-width: 200px !important;
192
- }
193
- }
194
- // button-left样式 - 按钮从左到右排列
195
- &.h-buttons-button-left {
196
- :deep(.ant-btn-group) {
197
- justify-content: flex-start;
198
- gap: 12px;
199
- .ant-btn {
200
- flex: 1 1 auto;
201
- }
202
- }
203
- }
204
- // button-center样式 - 按钮居中排列
205
- &.h-buttons-button-center {
206
- :deep(.ant-btn-group) {
207
- justify-content: center;
208
- gap: 12px;
209
- .ant-btn {
210
- flex: 1 1 auto;
211
- }
212
- }
213
- }
214
- // button-right样式 - 按钮从右到左排列
215
- &.h-buttons-button-right {
216
- :deep(.ant-btn-group) {
217
- justify-content: flex-end;
218
- gap: 12px;
219
- .ant-btn {
220
- flex: 1 1 auto;
221
- }
222
- }
223
- }
224
- // button-space-between样式 - 按钮两端对齐(两个按钮时分布在两端)
225
- &.h-buttons-button-space-between {
226
- :deep(.ant-btn-group) {
227
- justify-content: space-between;
228
- .ant-btn {
229
- flex: 1 1 auto;
230
- }
231
- }
232
- }
233
-
234
- // button-icon-tiles样式 - 左侧彩色图标块 + 右侧文字
235
- &.h-buttons-button-icon-tiles {
236
- :deep(.ant-btn-group) {
237
- width: 100%;
238
- display: flex;
239
- flex-wrap: wrap; // 允许自动换行
240
- justify-content: flex-start; // 左对齐
241
- gap: 0; // 取消统一间距
242
-
243
- .ant-btn {
244
- position: relative;
245
- display: inline-flex;
246
- align-items: center;
247
- gap: 10px; // 控制图标与文字间距
248
- border: 1px solid #E6E8EB;
249
- font-size: 14px;
250
- height: 44px;
251
- padding: 0 10px 0 10px;
252
- border-radius: 8px;
253
- min-width: 116px;
254
- box-shadow: 0 2px 0 rgba(0,0,0,0.02);
255
- margin-right: 12px; // 用margin控制横向间距,末尾一排自然换行
256
- }
257
-
258
- .ant-btn .anticon {
259
- width: 26px;
260
- height: 26px;
261
- display: inline-flex;
262
- align-items: center;
263
- justify-content: center;
264
- border-radius: 6px;
265
- color: #fff;
266
- font-size: 14px;
267
- flex: 0 0 26px; // 固定正方形,防止随文本挤压变形
268
- box-sizing: border-box;
269
- }
270
-
271
- /* 默认蓝色,支持通过 data-type 改变色块(success/warning/error/default)*/
272
- .ant-btn .anticon { background: #3FA7FF; }
273
- .ant-btn[data-type='success'] .anticon { background: #34C76E; }
274
- .ant-btn[data-type='warning'] .anticon { background: #FFA940; }
275
- .ant-btn[data-type='error'] .anticon { background: #FF7875; }
276
- .ant-btn[disabled] .anticon { background: #BFBFBF; }
277
-
278
- /* 图标与文字间距在有图标时更自然 */
279
- .ant-btn > .anticon + span { margin-left: 10px; }
280
- }
281
- }
282
- // 水印图标与按钮容器布局调整
283
- &.h-buttons-button-watermark-icon {
284
- :deep(.watermark-icon) { transform: translate(-50%, -54%) !important; }
285
- :deep(.x-button) { display: flex !important; }
286
- :deep(.ant-btn-group) {
287
- margin: 0 auto;
288
- display: block;
289
- }
290
- }
291
- &.h-buttons-0padding-button {
292
- padding: 0px 4px;
293
- }
294
- // button25样式 用于会诊申请侧边栏按钮样式
295
- &.h-buttons-button25 {
296
- :deep(.x-buttons) {
297
- .ant-btn-group {
298
- width: 173px;
299
- justify-content: space-between;
300
-
301
- .ant-btn {
302
- width: 173px;
303
- }
304
- }
305
- }
306
- }
307
- // 居中样式 用于门诊收费左侧按钮样式(三个按钮居中样式)
308
- &.h-buttons-out-button {
309
- :deep(.x-buttons) {
310
- margin-top: 0vw;
311
- display: flex;
312
- justify-content: center;
313
- .ant-btn-group {
314
- display: flex;
315
- flex-wrap: nowrap;
316
- gap: 12px;
317
- .ant-btn {
318
- box-sizing: border-box;
319
- margin-right: 0px;
320
- width: auto;
321
- min-width: 130px;
322
- white-space: nowrap;
323
- overflow: hidden;
324
- text-overflow: ellipsis;
325
- }
326
- }
327
- }
328
- }
329
- // button15样式 - 垂直排列的深色按钮组
330
- &.h-buttons-button15 {
331
- :deep(.x-buttons) {
332
- margin-top: -22px;
333
- .ant-btn-group {
334
- flex-direction: column; /* 按钮垂直排列 */
335
- display: flex; /* 启用flex布局 */
336
- gap: 6px; /* 按钮间距 */
337
- .ant-btn {
338
- border: none; /* 移除边框 */
339
- color: #FFFFFF; /* 字体颜色 */
340
- background-color: #5D5C5C; /* 背景色 */
341
- box-sizing: border-box; /* 盒模型 */
342
- left: 12px; /* 左偏移 */
343
- width: 280px; /* 宽度 */
344
- }
345
- }
346
- }
347
- }
348
- // button2样式
349
- &.h-buttons-button2 {
350
- :deep(.x-buttons) {
351
- margin: -20px 6px -20px 6px;
352
- .ant-btn-group {
353
- width: 100%;
354
- justify-content: space-between;
355
- display: flex; /* 确保flex布局 */
356
- flex-wrap: nowrap; /* 防止换行 */
357
- .ant-btn {
358
- border-radius: 6px; /* 边框圆角 */
359
- border: none; /* 移除边框 */
360
- flex: 0 0 46%; /* flex-grow: 0, flex-shrink: 0, flex-basis: 46% */
361
- min-width: 0; /* 覆盖可能的默认最小宽度 */
362
- font-size: 16px; /* 字体大小 */
363
- height: 32px; /* 高度 */
364
- color: #FFFFFF; /* 字体颜色 */
365
- background-color: #1890FF; /* 背景颜色 */
366
- }
367
- }
368
- }
369
- }
370
- }
371
- </style>
1
+ <script setup lang="ts">
2
+ import XButtons from '@vue2-client/base-client/components/common/XButtons/XButtons.vue'
3
+ import { ref, computed, useAttrs } from 'vue'
4
+
5
+ defineProps({
6
+ // HButtons特有的属性
7
+ buttonStyle: {
8
+ type: String,
9
+ default: 'button24'
10
+ }
11
+ })
12
+
13
+ // 内部 XButtons 实例引用
14
+ const xButtonsRef = ref()
15
+
16
+ // 兼容多种样式配置
17
+ const attrs = useAttrs()
18
+ const wrapperClassObject = computed(() => {
19
+ const a = attrs
20
+ const classes = {}
21
+
22
+ // 通用布尔样式开关(以存在/空字符串/'true' 为真)
23
+ const booleanStyleKeys = [
24
+ 'max-width200'
25
+ ]
26
+ for (const key of booleanStyleKeys) {
27
+ const val = a[key]
28
+ const truthy = val === true || val === '' || val === 'true'
29
+ if (truthy) classes[`h-buttons-${key}`] = true
30
+ }
31
+ return classes
32
+ })
33
+
34
+ // 暴露方法:获取内部 XButtons 实例
35
+ defineExpose({
36
+ getXButtonsInstance: function () { return xButtonsRef.value }
37
+ })
38
+ </script>
39
+
40
+ <template>
41
+ <div
42
+ class="h-buttons-wrapper"
43
+ :class="[
44
+ `h-buttons-${buttonStyle}`,
45
+ wrapperClassObject
46
+ ]"
47
+ >
48
+ <x-buttons
49
+ ref="xButtonsRef"
50
+ v-bind="$attrs"
51
+ v-on="$listeners"
52
+ >
53
+ <template v-for="(_, name) in $slots" v-slot:[name]="slotData">
54
+ <slot :name="name" v-bind="slotData" />
55
+ </template>
56
+ </x-buttons>
57
+ </div>
58
+ </template>
59
+
60
+ <style scoped lang="less">
61
+ .h-buttons-wrapper {
62
+ // 基础样式
63
+ :deep(.ant-btn-group) {
64
+ .ant-btn {
65
+ border-radius: 6px;
66
+ background-color: #FFFFFF;
67
+ border: 1px solid #9499A0;
68
+ color: #313131;
69
+ font-weight: normal;
70
+ letter-spacing: 0em;
71
+ width: 110px;
72
+ font-size: 16px;
73
+ font-family: "Source Han Sans";
74
+ line-height: normal;
75
+ margin-right: 25px;
76
+ height: 32px;
77
+ }
78
+ }
79
+ // button24样式
80
+ &.h-buttons-button24 {
81
+ :deep(.ant-btn-group) {
82
+ .ant-btn {
83
+ border: 1px solid #CDCDCD;
84
+ color: #5D5C5C;
85
+ // top: -100px;
86
+ width: fit-content;
87
+ min-width: 110px;
88
+ }
89
+ }
90
+ }
91
+ // button23样式
92
+ &.h-buttons-button23 {
93
+ :deep(.ant-btn-group) {
94
+ .ant-btn {
95
+ border: none;
96
+ padding: 0 !important;
97
+ color: #FFFFFF;
98
+ border-radius: 50%;
99
+ background-color: #1890FF;
100
+ margin-left: 10px;
101
+ top: -88px;
102
+ width: 30px;
103
+ height: 30px;
104
+ }
105
+ }
106
+ }
107
+ // +号样式(共享基础样式)
108
+ &.h-buttons-table-height-button23,
109
+ &.h-buttons-table-height-button23-no-transform {
110
+ :deep(.ant-btn-group) {
111
+ display: inline-flex;
112
+ align-items: center;
113
+ height: 100%;
114
+
115
+ .ant-btn {
116
+ display: inline-flex;
117
+ align-items: center;
118
+ justify-content: center;
119
+ border: none;
120
+ padding: 0 !important;
121
+ color: #FFFFFF;
122
+ border-radius: 50%;
123
+ background-color: #1890FF;
124
+ margin-left: 10px;
125
+ width: 30px;
126
+ height: 30px;
127
+ }
128
+ }
129
+ }
130
+ // 仅在有分页的场景上移
131
+ &.h-buttons-table-height-button23 {
132
+ :deep(.ant-btn-group) {
133
+ .ant-btn { transform: translateY(-100%); }
134
+ }
135
+ }
136
+ // 居中+悬停高亮的新样式
137
+ &.h-buttons-plus-center {
138
+ :deep(.ant-btn-group) {
139
+ display: flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ gap: 16px;
143
+
144
+ .ant-btn {
145
+ display: inline-flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ border: 1px solid #CDCDCD;
149
+ color: #5D5C5C;
150
+ min-width: 110px;
151
+ transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
152
+
153
+ &:hover {
154
+ background-color: #0057FE;
155
+ border-color: #0057FE;
156
+ color: #FFFFFF;
157
+ }
158
+ /* 支持通过 data-type 改变悬停颜色 */
159
+ &[data-type='success']:hover {
160
+ background-color: #34C76E;
161
+ border-color: #34C76E;
162
+ color: #FFFFFF;
163
+ }
164
+ }
165
+ }
166
+ }
167
+ // 按钮布局样式公共部分
168
+ &.h-buttons-button-left,
169
+ &.h-buttons-button-center,
170
+ &.h-buttons-button-right,
171
+ &.h-buttons-button-space-between {
172
+ :deep(.ant-btn-group) {
173
+ width: 100%;
174
+ display: flex;
175
+ flex-wrap: nowrap;
176
+ .ant-btn {
177
+ border: 1px solid #CDCDCD;
178
+ color: #5D5C5C;
179
+ width: auto;
180
+ min-width: 124px;
181
+ max-width: 140px;
182
+ white-space: nowrap;
183
+ overflow: hidden;
184
+ margin-right: 0px;
185
+ text-overflow: ellipsis;
186
+ }
187
+ }
188
+ }
189
+ &.h-buttons-max-width200 {
190
+ :deep(.ant-btn) {
191
+ max-width: 200px !important;
192
+ }
193
+ }
194
+ // button-left样式 - 按钮从左到右排列
195
+ &.h-buttons-button-left {
196
+ :deep(.ant-btn-group) {
197
+ justify-content: flex-start;
198
+ gap: 12px;
199
+ .ant-btn {
200
+ flex: 1 1 auto;
201
+ }
202
+ }
203
+ }
204
+ // button-center样式 - 按钮居中排列
205
+ &.h-buttons-button-center {
206
+ :deep(.ant-btn-group) {
207
+ justify-content: center;
208
+ gap: 12px;
209
+ .ant-btn {
210
+ flex: 1 1 auto;
211
+ }
212
+ }
213
+ }
214
+ // button-right样式 - 按钮从右到左排列
215
+ &.h-buttons-button-right {
216
+ :deep(.ant-btn-group) {
217
+ justify-content: flex-end;
218
+ gap: 12px;
219
+ .ant-btn {
220
+ flex: 1 1 auto;
221
+ }
222
+ }
223
+ }
224
+ // button-space-between样式 - 按钮两端对齐(两个按钮时分布在两端)
225
+ &.h-buttons-button-space-between {
226
+ :deep(.ant-btn-group) {
227
+ justify-content: space-between;
228
+ .ant-btn {
229
+ flex: 1 1 auto;
230
+ }
231
+ }
232
+ }
233
+
234
+ // button-icon-tiles样式 - 左侧彩色图标块 + 右侧文字
235
+ &.h-buttons-button-icon-tiles {
236
+ :deep(.ant-btn-group) {
237
+ width: 100%;
238
+ display: flex;
239
+ flex-wrap: wrap; // 允许自动换行
240
+ justify-content: flex-start; // 左对齐
241
+ gap: 0; // 取消统一间距
242
+
243
+ .ant-btn {
244
+ position: relative;
245
+ display: inline-flex;
246
+ align-items: center;
247
+ gap: 10px; // 控制图标与文字间距
248
+ border: 1px solid #E6E8EB;
249
+ font-size: 14px;
250
+ height: 44px;
251
+ padding: 0 10px 0 10px;
252
+ border-radius: 8px;
253
+ min-width: 116px;
254
+ box-shadow: 0 2px 0 rgba(0,0,0,0.02);
255
+ margin-right: 12px; // 用margin控制横向间距,末尾一排自然换行
256
+ }
257
+
258
+ .ant-btn .anticon {
259
+ width: 26px;
260
+ height: 26px;
261
+ display: inline-flex;
262
+ align-items: center;
263
+ justify-content: center;
264
+ border-radius: 6px;
265
+ color: #fff;
266
+ font-size: 14px;
267
+ flex: 0 0 26px; // 固定正方形,防止随文本挤压变形
268
+ box-sizing: border-box;
269
+ }
270
+
271
+ /* 默认蓝色,支持通过 data-type 改变色块(success/warning/error/default)*/
272
+ .ant-btn .anticon { background: #3FA7FF; }
273
+ .ant-btn[data-type='success'] .anticon { background: #34C76E; }
274
+ .ant-btn[data-type='warning'] .anticon { background: #FFA940; }
275
+ .ant-btn[data-type='error'] .anticon { background: #FF7875; }
276
+ .ant-btn[disabled] .anticon { background: #BFBFBF; }
277
+
278
+ /* 图标与文字间距在有图标时更自然 */
279
+ .ant-btn > .anticon + span { margin-left: 10px; }
280
+ }
281
+ }
282
+ // 水印图标与按钮容器布局调整
283
+ &.h-buttons-button-watermark-icon {
284
+ :deep(.watermark-icon) { transform: translate(-50%, -54%) !important; }
285
+ :deep(.x-button) { display: flex !important; }
286
+ :deep(.ant-btn-group) {
287
+ margin: 0 auto;
288
+ display: block;
289
+ }
290
+ }
291
+ &.h-buttons-0padding-button {
292
+ padding: 0px 4px;
293
+ }
294
+ // button25样式 用于会诊申请侧边栏按钮样式
295
+ &.h-buttons-button25 {
296
+ :deep(.x-buttons) {
297
+ .ant-btn-group {
298
+ width: 173px;
299
+ justify-content: space-between;
300
+
301
+ .ant-btn {
302
+ width: 173px;
303
+ }
304
+ }
305
+ }
306
+ }
307
+ // 居中样式 用于门诊收费左侧按钮样式(三个按钮居中样式)
308
+ &.h-buttons-out-button {
309
+ :deep(.x-buttons) {
310
+ margin-top: 0vw;
311
+ display: flex;
312
+ justify-content: center;
313
+ .ant-btn-group {
314
+ display: flex;
315
+ flex-wrap: nowrap;
316
+ gap: 12px;
317
+ .ant-btn {
318
+ box-sizing: border-box;
319
+ margin-right: 0px;
320
+ width: auto;
321
+ min-width: 130px;
322
+ white-space: nowrap;
323
+ overflow: hidden;
324
+ text-overflow: ellipsis;
325
+ }
326
+ }
327
+ }
328
+ }
329
+ // button15样式 - 垂直排列的深色按钮组
330
+ &.h-buttons-button15 {
331
+ :deep(.x-buttons) {
332
+ margin-top: -22px;
333
+ .ant-btn-group {
334
+ flex-direction: column; /* 按钮垂直排列 */
335
+ display: flex; /* 启用flex布局 */
336
+ gap: 6px; /* 按钮间距 */
337
+ .ant-btn {
338
+ border: none; /* 移除边框 */
339
+ color: #FFFFFF; /* 字体颜色 */
340
+ background-color: #5D5C5C; /* 背景色 */
341
+ box-sizing: border-box; /* 盒模型 */
342
+ left: 12px; /* 左偏移 */
343
+ width: 280px; /* 宽度 */
344
+ }
345
+ }
346
+ }
347
+ }
348
+ // button2样式
349
+ &.h-buttons-button2 {
350
+ :deep(.x-buttons) {
351
+ margin: -20px 6px -20px 6px;
352
+ .ant-btn-group {
353
+ width: 100%;
354
+ justify-content: space-between;
355
+ display: flex; /* 确保flex布局 */
356
+ flex-wrap: nowrap; /* 防止换行 */
357
+ .ant-btn {
358
+ border-radius: 6px; /* 边框圆角 */
359
+ border: none; /* 移除边框 */
360
+ flex: 0 0 46%; /* flex-grow: 0, flex-shrink: 0, flex-basis: 46% */
361
+ min-width: 0; /* 覆盖可能的默认最小宽度 */
362
+ font-size: 16px; /* 字体大小 */
363
+ height: 32px; /* 高度 */
364
+ color: #FFFFFF; /* 字体颜色 */
365
+ background-color: #1890FF; /* 背景颜色 */
366
+ }
367
+ }
368
+ }
369
+ }
370
+ // 与表单项内联使用时的垂直居中对齐样式
371
+ &.h-buttons-form-inline {
372
+ :deep(.ant-btn-group){
373
+ height: 45px;
374
+ display: flex;
375
+ align-items: center;
376
+ }
377
+ }
378
+
379
+ }
380
+ </style>
@@ -1,10 +1,17 @@
1
1
  <script setup lang="ts">
2
2
  import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
3
- import { ref, computed, useAttrs } from 'vue'
3
+ import { ref, computed, useAttrs, defineProps } from 'vue'
4
4
 
5
5
  const xAddNativeFormRef = ref()
6
6
 
7
7
  const attrs = useAttrs()
8
+ const props = defineProps({
9
+ // 是否启用 horizontal 模式的自定义配置
10
+ enableHorizontalCustom: {
11
+ type: Boolean,
12
+ default: false
13
+ }
14
+ })
8
15
  const wrapperClassObject = computed(() => {
9
16
  const a = attrs
10
17
  const classes = {}
@@ -14,7 +21,9 @@ const wrapperClassObject = computed(() => {
14
21
  'query-conditions',
15
22
  'padding-50',
16
23
  'label-text-horizontal',
17
- 'label-text-justify'
24
+ 'item-control-width90',
25
+ 'label-text-justify',
26
+ 'item-control-width700',
18
27
  ]
19
28
  for (const key of booleanStyleKeys) {
20
29
  const val = a[key]
@@ -44,6 +53,7 @@ defineExpose({
44
53
  <x-add-native-form
45
54
  ref="xAddNativeFormRef"
46
55
  v-bind="$attrs"
56
+ :enable-horizontal-custom="props.enableHorizontalCustom"
47
57
  v-on="$listeners"
48
58
  >
49
59
  <template v-for="(_, name) in $slots" #[name]="slotData">
@@ -150,5 +160,18 @@ defineExpose({
150
160
  }
151
161
  }
152
162
  }
163
+
164
+ /**表单项90%宽度 */
165
+ &.h-form-item-control-width90 {
166
+ :deep(.ant-form-item-control){
167
+ width: 90%;
168
+ }
169
+ }
170
+ /**表单项700宽度 */
171
+ &.h-form-item-control-width700{
172
+ :deep(.ant-form-item-control-wrapper){
173
+ width: 700px;
174
+ }
175
+ }
153
176
  }
154
177
  </style>
@@ -1,32 +1,80 @@
1
- <script setup lang="ts">
1
+ <script setup>
2
2
  import XTab from '@vue2-client/base-client/components/common/XTab/XTab.vue'
3
- import { ref } from 'vue'
4
-
5
- defineProps({
6
- // HTab特有的属性
7
- hasTopMargin: {
8
- type: Boolean,
9
- default: true
10
- },
11
- // 是否启用 style7 样式(细下划线、自适应)
12
- useStyle7: {
13
- type: Boolean,
14
- default: false
15
- },
16
- // 是否叠加圆点样式(仅在 useStyle7 true 时生效)
17
- useCycle: {
18
- type: Boolean,
19
- default: false
20
- },
21
- useStyle8: {
22
- type: Boolean,
23
- default: false
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
+ })
13
+
14
+ // 兼容多种样式配置
15
+ const attrs = useAttrs()
16
+ const wrapperClassObject = computed(() => {
17
+ const a = attrs
18
+ const classes = {}
19
+
20
+ // 通用布尔样式开关(以存在/空字符串/'true' 为真)
21
+ const booleanStyleKeys = [
22
+ 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8'
23
+ ]
24
+ for (const key of booleanStyleKeys) {
25
+ const val = a[key]
26
+ const truthy = val === true || val === '' || val === 'true'
27
+ if (truthy) classes[`h-tab-${key}`] = true
24
28
  }
29
+ return classes
25
30
  })
26
31
 
27
32
  // 创建对XTab组件的引用
28
33
  const xTabRef = ref()
29
34
 
35
+ // 获取插槽(避免模板中直接使用 $slots 触发类型检查错误)
36
+ const slots = useSlots()
37
+ const slotNames = computed(() => {
38
+ try {
39
+ return Object.keys(slots || {})
40
+ } catch (e) {
41
+ return []
42
+ }
43
+ })
44
+
45
+ // 右侧附加区域的动态配置
46
+ const extraConfig = ref(null)
47
+ const extraItems = computed(() => {
48
+ const cfg = extraConfig.value
49
+ return cfg && cfg.value ? cfg.value : []
50
+ })
51
+
52
+ // 本地异步组件映射(未全局注册时生效)
53
+ const localMap = {
54
+ 'x-input': () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
55
+ 'x-select': () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
56
+ 'x-radio': () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
57
+ 'x-buttons': () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
58
+ 'h-buttons': () => import('@vue2-client/base-client/components/common/HIS/HButtons/HButtons.vue')
59
+ }
60
+
61
+ // 从 attrs 中读取 serverName 与 env(保持向后兼容)
62
+ const serverName = computed(() => (attrs && attrs.serverName))
63
+ const env = computed(() => (attrs && attrs.env) || 'prod')
64
+
65
+ const loadExtraConfig = (configName) => {
66
+ if (!configName) {
67
+ extraConfig.value = null
68
+ return
69
+ }
70
+ getConfigByName(configName, serverName.value, (res) => {
71
+ extraConfig.value = res
72
+ }, env.value === 'dev')
73
+ }
74
+
75
+ onMounted(() => loadExtraConfig(props.tabBarExtraConfig))
76
+ watch(() => props.tabBarExtraConfig, loadExtraConfig)
77
+
30
78
  // 暴露方法给父组件使用
31
79
  defineExpose({
32
80
  // 为了兼容性,保留getXTabInstance方法
@@ -37,16 +85,32 @@ defineExpose({
37
85
  <template>
38
86
  <div
39
87
  class="h-tab-wrapper"
40
- :class="{ 'h-tab-has-top-margin': hasTopMargin,
41
- 'h-tab-style7': useStyle7,
42
- 'h-tab-cycle': useStyle7 && useCycle,
43
- 'h-tab-style8': useStyle8}">
88
+ :class="[wrapperClassObject, extraItems.length > 1 ? 'h-tab-extra-wrapper-multiple' : '']">
44
89
  <x-tab
45
90
  ref="xTabRef"
46
91
  v-bind="$attrs"
47
92
  v-on="$listeners"
48
93
  >
49
- <template v-for="(_, name) in $slots" #[name]="slotData">
94
+ <template v-if="extraItems.length" #tabBarExtraContent>
95
+ <!-- 父级可接管渲染;未提供则按配置兜底渲染 -->
96
+ <slot name="tabBarExtraContent" :config="extraConfig" :items="extraItems">
97
+ <div class="h-tab-extra-wrapper">
98
+ <component
99
+ v-for="(item, idx) in extraItems"
100
+ :is="localMap[item.slotType] || item.slotType"
101
+ :key="idx"
102
+ :ref="item.slotRef || `extra_${idx}`"
103
+ :serviceName="item.serviceName || serverName"
104
+ :serverName="item.serviceName || serverName"
105
+ :queryParamsName="item.slotConfig"
106
+ :env="env"
107
+ v-on="$listeners"
108
+ v-bind="item.attrs"
109
+ />
110
+ </div>
111
+ </slot>
112
+ </template>
113
+ <template v-for="name in slotNames" #[name]="slotData">
50
114
  <slot :name="name" v-bind="slotData" />
51
115
  </template>
52
116
  </x-tab>
@@ -109,7 +173,7 @@ defineExpose({
109
173
  }
110
174
 
111
175
  // 带顶部边距的样式
112
- &.h-tab-has-top-margin {
176
+ &.h-tab-hasTopMargin {
113
177
  :deep(.ant-tabs-nav) {
114
178
  margin-top: 6px;
115
179
  }
@@ -128,7 +192,7 @@ defineExpose({
128
192
  }
129
193
 
130
194
  // 通用样式7:细下划线、透明背景、可配置宽度
131
- &.h-tab-style7 {
195
+ &.h-tab-useStyle7 {
132
196
  :deep(.ant-tabs-tab-next),
133
197
  :deep(.ant-tabs-tab-prev-icon-target),
134
198
  :deep(.ant-tabs-tab-next-icon) { display: none; }
@@ -177,7 +241,7 @@ defineExpose({
177
241
  }
178
242
 
179
243
  // 可选:标签左侧圆点
180
- &.h-tab-cycle {
244
+ &.h-tab-useCycle {
181
245
  :deep(.ant-tabs-tab) {
182
246
  position: relative;
183
247
  padding-left: 18px !important;
@@ -209,7 +273,7 @@ defineExpose({
209
273
  }
210
274
  }
211
275
  // 用户词条使用样式
212
- &.h-tab-style8 {
276
+ &.h-tab-useStyle8 {
213
277
  :deep(.ant-tabs-tab-next),
214
278
  :deep(.ant-tabs-tab-prev-icon-target),
215
279
  :deep(.ant-tabs-tab-next-icon) { display: none; }
@@ -289,5 +353,30 @@ defineExpose({
289
353
  display: none; // 隐藏下划线
290
354
  }
291
355
  }
356
+ &.h-tab-extra-wrapper-multiple {
357
+ :deep(.h-tab-extra-wrapper){
358
+ display: flex;
359
+ justify-content: end;
360
+ gap: 8px;
361
+ }
362
+ :deep(.x-radio-group){
363
+ height: 32px;
364
+ }
365
+ :deep(.x-radio-item){
366
+ height: 32px;
367
+ display: flex;
368
+ align-items: center;
369
+ margin-bottom: 0px;
370
+ }
371
+ :deep(.ant-tabs-tab){
372
+ height: 34px;
373
+ }
374
+ :deep(.ant-tabs-nav-container){
375
+ padding-top: 2px;
376
+ }
377
+ :deep(.ant-tabs-extra-content){
378
+ line-height: 0px !important;
379
+ }
380
+ }
292
381
  }
293
382
  </style>
@@ -186,7 +186,13 @@ export default {
186
186
  default: null
187
187
  }
188
188
  },
189
- props: {},
189
+ props: {
190
+ // 是否启用 horizontal 模式的自定义配置
191
+ enableHorizontalCustom: {
192
+ type: Boolean,
193
+ default: false
194
+ }
195
+ },
190
196
  data () {
191
197
  return {
192
198
  DEFAULT_GROUP_NAME,
@@ -324,6 +330,17 @@ export default {
324
330
  },
325
331
  formItemLayoutGen () {
326
332
  if (this.layout === 'horizontal') {
333
+ // 如果启用了自定义配置,从 formItemLayout 读取(支持 0 值)
334
+ if (this.enableHorizontalCustom && this.formItemLayout) {
335
+ return {
336
+ labelCol: {
337
+ span: (this.formItemLayout.labelCol ?? 4),
338
+ offset: (this.formItemLayout.offset ?? 2)
339
+ },
340
+ wrapperCol: { span: (this.formItemLayout.wrapperCol ?? 14) },
341
+ }
342
+ }
343
+ // 默认配置
327
344
  return {
328
345
  labelCol: { span: 4, offset: 2 },
329
346
  wrapperCol: { span: 14 },
@@ -84,7 +84,7 @@
84
84
  </template>
85
85
  </template>
86
86
  </div>
87
- <a-card v-else class="flexItem" :bordered="false">
87
+ <a-card v-else class="flexItem" :bordered="false" :body-style="{ padding: 0 }">
88
88
  <!-- 插槽渲染 -->
89
89
  <template v-if="Array.isArray(cell)">
90
90
  <!-- 处理 cell 是数组的情况 -->
@@ -580,7 +580,7 @@ export default {
580
580
  })
581
581
 
582
582
  // 处理子节点样式
583
- this.parseNestedStyles(classConfig, childStyles)
583
+ // this.parseNestedStyles(classConfig, childStyles)
584
584
  })
585
585
  return {
586
586
  rootStyles,
@@ -7,6 +7,9 @@
7
7
  :hideAdd="true"
8
8
  :tabBarStyle="{ display: showTabBar ? 'block' : 'none' }"
9
9
  >
10
+ <template #tabBarExtraContent v-if="$slots.tabBarExtraContent || tabBarExtraContent">
11
+ <slot name="tabBarExtraContent"></slot>
12
+ </template>
10
13
  <slot name="extraBeforeTabs"></slot>
11
14
  <a-tab-pane
12
15
  :forceRender="true"
@@ -67,6 +70,7 @@ export default {
67
70
  activeKey: 0,
68
71
  // 配置
69
72
  config: undefined,
73
+ tabBarExtraContent: undefined,
70
74
  attr: {},
71
75
  showTabBar: true // 默认显示页签
72
76
  }
@@ -13,6 +13,7 @@
13
13
  :scroll="{ x: tableContext.scrollXWidth, y: tableContext.scrollYHeight }"
14
14
  :showPagination="tableContext.showPagination"
15
15
  :hidePagination="tableContext.simpleMode"
16
+ :customPagination="tableContext.customPagination"
16
17
  :showSelected="!tableContext.simpleMode"
17
18
  :pageSize="tableContext.simpleMode ? 1000 : undefined"
18
19
  :pageMaxSize="tableContext.pageMaxSize"
@@ -4,7 +4,10 @@
4
4
  v-if="config.type === 'title'"
5
5
  class="x-title"
6
6
  :class="{ 'with-underline': config.line === 'line' }">
7
- <span>{{ config.label }}</span>
7
+ <div class="title-content">
8
+ <div class="title-dot"></div>
9
+ <span>{{ config.label }}</span>
10
+ </div>
8
11
  <div
9
12
  v-if="config.line === 'line'"
10
13
  class="underline"
@@ -55,7 +58,7 @@ const attrs = useAttrs()
55
58
  const wrapperClassObject = computed(() => {
56
59
  const classes = {}
57
60
  const booleanStyleKeys = [
58
- 'center', 'littlefont'
61
+ 'center', 'littlefont', 'dot', 'nodot'
59
62
  ]
60
63
  booleanStyleKeys.forEach(key => {
61
64
  const val = attrs[key]
@@ -151,4 +154,45 @@ onMounted(() => {
151
154
  }
152
155
  }
153
156
  }
157
+
158
+ // dot 和 nodot 样式的公共部分
159
+ .x-title-dot,
160
+ .x-title-nodot {
161
+ &.x-title-container,
162
+ .x-title-container {
163
+ :deep(.title-content) {
164
+ display: flex;
165
+ align-items: center;
166
+ gap: 8px;
167
+ }
168
+
169
+ :deep(.title-dot) {
170
+ width: 14px;
171
+ height: 14px;
172
+ flex-shrink: 0;
173
+ }
174
+ }
175
+ }
176
+
177
+ // dot 样式特有部分
178
+ .x-title-dot {
179
+ &.x-title-container,
180
+ .x-title-container {
181
+ :deep(.title-dot) {
182
+ border-radius: 50%;
183
+ background-color: #3362DA;
184
+ }
185
+ }
186
+ }
187
+
188
+ // nodot 样式特有部分
189
+ .x-title-nodot {
190
+ &.x-title-container,
191
+ .x-title-container {
192
+ :deep(.title-dot) {
193
+ /* 透明圆点,保持占位但不显示 */
194
+ background-color: transparent;
195
+ }
196
+ }
197
+ }
154
198
  </style>