vue2-client 1.22.26 → 1.22.28

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 (96) hide show
  1. package/.env.his +19 -19
  2. package/.history/.eslintrc_20260521171150.js +74 -0
  3. package/.history/.eslintrc_20260521171213.js +74 -0
  4. package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +726 -0
  5. package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +478 -0
  6. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +755 -0
  7. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702161223.vue +748 -0
  8. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702163310.vue +832 -0
  9. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702163324.vue +748 -0
  10. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702165416.vue +748 -0
  11. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702174939.vue +793 -0
  12. package/.history/src/base-client/components/common/HIS/HForm/HForm_20260702115430.vue +1463 -0
  13. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +512 -0
  14. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +511 -0
  15. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +696 -0
  16. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +693 -0
  17. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +677 -0
  18. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260625173703.vue +767 -0
  19. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260626112425.vue +803 -0
  20. package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260626173854.vue +1522 -0
  21. package/.history/src/base-client/components/common/XCollapse/XCollapse_20260703180349.vue +862 -0
  22. package/.history/src/base-client/components/common/XCollapse/XCollapse_20260703180623.vue +862 -0
  23. package/.history/src/base-client/components/common/XCollapse/XCollapse_20260703180702.vue +842 -0
  24. package/.history/src/base-client/components/common/XForm/XFormItem_20260703101840.vue +1621 -0
  25. package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +643 -0
  26. package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +628 -0
  27. package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +104 -0
  28. package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +102 -0
  29. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20260703180412.vue +1102 -0
  30. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20260703180623.vue +1093 -0
  31. package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +1241 -0
  32. package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +1223 -0
  33. package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +472 -0
  34. package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +538 -0
  35. package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +650 -0
  36. package/.history/src/base-client/components/his/HAi/HAi_20260618140214.vue +1396 -0
  37. package/.history/src/base-client/components/his/HAi/HAi_20260618140556.vue +1396 -0
  38. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +1469 -0
  39. package/.history/src/base-client/components/his/XRadio/XRadio_20260702140351.vue +774 -0
  40. package/.history/src/base-client/components/his/XRadio/XRadio_20260702140441.vue +774 -0
  41. package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171133.vue +788 -0
  42. package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171151.vue +780 -0
  43. package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511170841.vue +585 -0
  44. package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511171138.vue +787 -0
  45. package/.history/src/base-client/components/his/XTransfer/XTransfer_20260512141830.vue +739 -0
  46. package/.history/src/components/STable/index_20260409155138.js +806 -0
  47. package/.history/src/components/STable/index_20260409155218.js +814 -0
  48. package/.history/src/expression/core/Expression_20260305164427.js +1371 -0
  49. package/.history/src/expression/core/Expression_20260305170258.js +1358 -0
  50. package/.history/src/expression/core/Program_20260305111830.js +944 -0
  51. package/.history/src/expression/core/Program_20260305112041.js +931 -0
  52. package/.history/src/logic/LogicRunner_20260304154306.js +170 -0
  53. package/.history/src/logic/LogicRunner_20260304155553.js +112 -0
  54. package/.history/src/logic/LogicRunner_20260305105834.js +112 -0
  55. package/.history/src/logic/LogicRunner_20260305112718.js +129 -0
  56. package/.history/src/logic/LogicRunner_20260305182436.js +133 -0
  57. package/.history/src/logic/LogicRunner_20260306151301.js +213 -0
  58. package/.history/src/logic/LogicRunner_20260306152419.js +213 -0
  59. package/.history/src/logic/plugins/common/DateTools_20260305154159.js +61 -0
  60. package/.history/src/logic/plugins/common/DateTools_20260305154217.js +44 -0
  61. package/.history/src/logic/plugins/common/DateTools_20260305161014.js +44 -0
  62. package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +80 -0
  63. package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +75 -0
  64. package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +75 -0
  65. package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +72 -0
  66. package/.history/src/services/api/restTools_20260427142149.js +245 -0
  67. package/.history/src/services/api/restTools_20260427142853.js +230 -0
  68. package/.history/src/services/api/restTools_20260519135558.js +230 -0
  69. package/.history/src/services/api/restTools_20260519140825.js +230 -0
  70. package/.history/src/services/api/restTools_20260519151223.js +230 -0
  71. package/.history/src/theme/global_20260703101634.less +370 -0
  72. package/.history/src/theme/global_20260703101840.less +337 -0
  73. package/.history/src/theme/global_20260703104511.less +337 -0
  74. package/.history/src/utils/indexedDB_20260306150918.js +593 -0
  75. package/.history/src/utils/indexedDB_20260306151301.js +586 -0
  76. package/.idea/codeStyles/Project.xml +62 -0
  77. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  78. package/.idea/misc.xml +5 -87
  79. package/docs/XCollapse/345/261/225/345/274/200/347/251/272/347/231/275/346/216/222/346/237/245/350/256/260/345/275/225.md +153 -0
  80. package/package.json +1 -1
  81. package/preview-input-box.html +180 -0
  82. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +775 -748
  83. package/src/base-client/components/common/HIS/HForm/HForm.vue +1708 -1186
  84. package/src/base-client/components/common/HIS/HTab/HTab.vue +790 -790
  85. package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
  86. package/src/base-client/components/his/XRadio/XRadio.vue +73 -1
  87. package/src/base-client/components/his/XTitle/XTitle.vue +63 -3
  88. package/src/base-client/components/his/XTransfer/index.md +327 -327
  89. package/src/services/user.js +1 -0
  90. package/.idea/.name +0 -1
  91. package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -8
  92. package/.idea/deployment.xml +0 -14
  93. package/.idea/gradle.xml +0 -7
  94. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  95. package/.idea/libraries/contour_plot.xml +0 -9
  96. package/.idea/material_theme_project_new.xml +0 -18
@@ -0,0 +1,832 @@
1
+ <script setup >
2
+ import XButtons from '@vue2-client/base-client/components/common/XButtons/XButtons.vue'
3
+ import { ref, computed, useAttrs, nextTick, onMounted } from 'vue'
4
+
5
+ const props = defineProps({
6
+ // HButtons特有的属性
7
+ buttonStyle: {
8
+ type: String,
9
+ default: 'button24'
10
+ }
11
+ })
12
+
13
+ const emit = defineEmits(['update:activeIndex', 'activeChange', 'configEnd', 'expandChange', 'toggleExpand'])
14
+
15
+ // 内部 XButtons 实例引用
16
+ const xButtonsRef = ref()
17
+
18
+ // useStyle10模式下激活按钮的索引(从0开始)
19
+ const activeIndex = ref(0)
20
+
21
+ // 兼容多种样式配置
22
+ const attrs = useAttrs()
23
+
24
+ // 判断是否使用 useStyle10 模式
25
+ const isUseStyle10 = computed(() => {
26
+ return props.buttonStyle === 'useStyle10' || attrs.useStyle10 === true || attrs.useStyle10 === '' || attrs.useStyle10 === 'true'
27
+ })
28
+
29
+ const wrapperClassObject = computed(() => {
30
+ const a = attrs
31
+ const classes = {}
32
+
33
+ // 通用布尔样式开关(以存在/空字符串/'true' 为真)
34
+ const booleanStyleKeys = [
35
+ 'max-width200',
36
+ 'width173',
37
+ 'button_refresh',
38
+ 'border', 'no-style',
39
+ 'fill-container',
40
+ 'no-boder-style',
41
+ 'form-inline',
42
+ 'one-button-style', // 一个按钮样式,占满整个宽度
43
+ 'useStyle10', // 左侧蓝色圆点指示器样式
44
+ 'custom-icon-style', // 自定义图标边框样式
45
+ 'drop-down-style' // 展开/合并切换按钮样式
46
+ ]
47
+ for (const key of booleanStyleKeys) {
48
+ const val = a[key]
49
+ const truthy = val === true || val === '' || val === 'true'
50
+ if (truthy) classes[`h-buttons-${key}`] = true
51
+ }
52
+ return classes
53
+ })
54
+
55
+ // 展开/合并切换按钮状态
56
+ const isDropDownStyle = computed(() => {
57
+ const val = attrs['drop-down-style']
58
+ return val === true || val === '' || val === 'true'
59
+ })
60
+
61
+ const expanded = ref(false)
62
+
63
+ const toggleExpand = () => {
64
+ expanded.value = !expanded.value
65
+ emit('expandChange', expanded.value)
66
+ emit('toggleExpand', expanded.value)
67
+
68
+ const instance = xButtonsRef.value
69
+ if (instance && instance.renderConfig) {
70
+ const target = instance.renderConfig.find(btn => btn.icon === 'up' || btn.icon === 'down')
71
+ if (target) {
72
+ target.icon = expanded.value ? 'down' : 'up'
73
+ instance.$forceUpdate()
74
+ }
75
+ }
76
+ }
77
+
78
+ // 获取内部按钮元素列表
79
+ const getButtonElements = () => {
80
+ const xEl = xButtonsRef.value?.$el
81
+ if (!xEl) return []
82
+ return Array.from(xEl.querySelectorAll('.ant-btn'))
83
+ }
84
+
85
+ // 设置按钮激活状态
86
+ const setActiveState = (btn, isActive) => {
87
+ if (!btn) return
88
+ if (isActive) {
89
+ btn.classList.add('h-btn-active')
90
+ // 使用内联样式确保颜色生效
91
+ btn.style.color = '#0057FE'
92
+ } else {
93
+ btn.classList.remove('h-btn-active')
94
+ // 清除内联样式
95
+ btn.style.color = ''
96
+ }
97
+ }
98
+
99
+ // 清除所有按钮的激活样式
100
+ const clearAllActiveStyles = () => {
101
+ const buttons = getButtonElements()
102
+ buttons.forEach(btn => {
103
+ setActiveState(btn, false)
104
+ })
105
+ }
106
+
107
+ // 设置指定索引按钮为激活状态
108
+ const setActiveButton = (index) => {
109
+ const buttons = getButtonElements()
110
+ clearAllActiveStyles()
111
+
112
+ if (buttons[index]) {
113
+ setActiveState(buttons[index], true)
114
+ }
115
+ }
116
+
117
+ // 事件委托:处理按钮点击
118
+ const handleButtonClick = (event) => {
119
+ if (!isUseStyle10.value) return
120
+ if (isDropDownStyle.value) return
121
+
122
+ // 查找被点击的按钮元素
123
+ const target = event.target.closest('.ant-btn')
124
+ if (!target) return
125
+
126
+ const buttons = getButtonElements()
127
+ const index = buttons.indexOf(target)
128
+
129
+ if (index === -1) return
130
+
131
+
132
+ // 更新激活索引
133
+ activeIndex.value = index
134
+ emit('update:activeIndex', index)
135
+ emit('activeChange', index)
136
+
137
+ // 更新按钮样式
138
+ clearAllActiveStyles()
139
+ setActiveState(buttons[index], true)
140
+ }
141
+
142
+ // 初始化 useStyle10 样式(带重试机制)
143
+ const initUseStyle10 = (retryCount = 0) => {
144
+
145
+ if (!isUseStyle10.value) {
146
+ return
147
+ }
148
+
149
+ const buttons = getButtonElements()
150
+
151
+
152
+ // 如果没有找到按钮,重试最多10次
153
+ if (buttons.length === 0 && retryCount < 10) {
154
+ setTimeout(() => {
155
+ initUseStyle10(retryCount + 1)
156
+ }, 100)
157
+ return
158
+ }
159
+
160
+ if (buttons.length === 0) {
161
+
162
+ return
163
+ }
164
+
165
+ // 设置第一个按钮为激活状态
166
+ clearAllActiveStyles()
167
+ setActiveState(buttons[0], true)
168
+ }
169
+
170
+ // 监听 XButtons 配置结束,初始化激活状态
171
+ const handleConfigEnd = async () => {
172
+ await nextTick()
173
+ initUseStyle10()
174
+ emit('configEnd')
175
+ }
176
+
177
+ // 在挂载时也尝试初始化(作为备用方案)
178
+ onMounted(() => {
179
+ setTimeout(() => {
180
+ initUseStyle10()
181
+ }, 300)
182
+ })
183
+
184
+ // 暴露方法:获取内部 XButtons 实例
185
+ defineExpose({
186
+ getXButtonsInstance: function () { return xButtonsRef.value },
187
+ /** 等待配置结束的异步方法,委托给内部 XButtons */
188
+ waitConfigEnd: () => xButtonsRef.value?.waitConfigEnd?.() ?? Promise.resolve(),
189
+ /** 获取当前激活按钮索引 */
190
+ getActiveIndex: () => activeIndex.value,
191
+ /** 设置激活按钮索引 */
192
+ setActiveIndex: (index) => {
193
+ activeIndex.value = index
194
+ setActiveButton(index)
195
+ },
196
+ /** 获取当前激活按钮元素 */
197
+ getActiveButton: () => {
198
+ const buttons = getButtonElements()
199
+ return buttons[activeIndex.value]
200
+ },
201
+ /** 切换展开/合并状态 */
202
+ toggleExpand,
203
+ /** 当前是否展开 */
204
+ isExpanded: () => expanded.value
205
+ })
206
+ </script>
207
+
208
+ <template>
209
+ <div
210
+ class="h-buttons-wrapper"
211
+ :class="[
212
+ `h-buttons-${buttonStyle}`,
213
+ wrapperClassObject
214
+ ]"
215
+ @click="handleButtonClick"
216
+ >
217
+ <template v-if="isDropDownStyle">
218
+ <div class="h-buttons-drop-down-wrapper" @click="toggleExpand">
219
+ <a-button class="h-buttons-drop-down-button" type="default">
220
+ <span class="h-buttons-drop-down-icon" :class="{ 'is-expanded': expanded }">
221
+ <svg
222
+ viewBox="0 0 7.69 13.17"
223
+ width="7.69"
224
+ height="13.17"
225
+ fill="none"
226
+ xmlns="http://www.w3.org/2000/svg"
227
+ >
228
+ <path
229
+ d="M6.9 1.3L1.4 6.8a.7.7 0 0 1-1 0L.1 5.5a.7.7 0 0 1 0-1L5.3.1a.7.7 0 0 1 1 0l.6.6a.7.7 0 0 1 0 1.1z"
230
+ fill="currentColor"
231
+ />
232
+ </svg>
233
+ </span>
234
+ </a-button>
235
+ </div>
236
+ </template>
237
+ <template v-else>
238
+ <x-buttons
239
+ ref="xButtonsRef"
240
+ v-bind="$attrs"
241
+ v-on="$listeners"
242
+ @configEnd="handleConfigEnd"
243
+ >
244
+ <template v-for="(_, name) in $slots" #[name]="slotData">
245
+ <slot :name="name" v-bind="slotData" />
246
+ </template>
247
+ </x-buttons>
248
+ </template>
249
+ </div>
250
+ </template>
251
+
252
+ <style scoped lang="less">
253
+ .h-buttons-wrapper {
254
+ // 基础样式
255
+ :deep(.ant-btn-group) {
256
+ .ant-btn {
257
+ border-radius: 6px;
258
+ background-color: #FFFFFF;
259
+ border: 1px solid #9499A0;
260
+ color: #313131;
261
+ font-weight: normal;
262
+ letter-spacing: 0em;
263
+ width: 110px;
264
+ font-size: 16px;
265
+ font-family: "Source Han Sans";
266
+ line-height: normal;
267
+ margin-right: 25px;
268
+ height: 32px;
269
+ }
270
+ }
271
+ // button24样式
272
+ &.h-buttons-button24 {
273
+ :deep(.ant-btn-group) {
274
+ .ant-btn {
275
+ border: 1px solid #CDCDCD;
276
+ color: #5D5C5C;
277
+ // top: -100px;
278
+ width: fit-content;
279
+ min-width: 110px;
280
+ }
281
+ }
282
+ }
283
+ // button23样式
284
+ &.h-buttons-button23 {
285
+ :deep(.ant-btn-group) {
286
+ .ant-btn {
287
+ border: none;
288
+ padding: 0 !important;
289
+ color: #FFFFFF;
290
+ border-radius: 50%;
291
+ background-color: #1890FF;
292
+ margin-left: 10px;
293
+ top: -88px;
294
+ width: 30px;
295
+ height: 30px;
296
+ }
297
+ }
298
+ }
299
+ // +号样式(共享基础样式)
300
+ &.h-buttons-table-height-button23,
301
+ &.h-buttons-table-height-button23-no-transform {
302
+ :deep(.ant-btn-group) {
303
+ display: inline-flex;
304
+ align-items: center;
305
+ height: 100%;
306
+
307
+ .ant-btn {
308
+ display: inline-flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ border: none;
312
+ padding: 0 !important;
313
+ color: #FFFFFF;
314
+ border-radius: 50%;
315
+ background-color: #1890FF;
316
+ margin-left: 10px;
317
+ width: 30px;
318
+ height: 30px;
319
+ }
320
+ }
321
+ }
322
+ // 仅在有分页的场景上移
323
+ &.h-buttons-table-height-button23 {
324
+ :deep(.ant-btn-group) {
325
+ .ant-btn { transform: translateY(-100%); }
326
+ }
327
+ }
328
+ // 居中+悬停高亮的新样式
329
+ &.h-buttons-plus-center {
330
+ :deep(.ant-btn-group) {
331
+ display: flex;
332
+ align-items: center;
333
+ justify-content: center;
334
+ gap: 16px;
335
+
336
+ .ant-btn {
337
+ display: inline-flex;
338
+ align-items: center;
339
+ justify-content: center;
340
+ border: 1px solid #CDCDCD;
341
+ color: #5D5C5C;
342
+ min-width: 110px;
343
+ transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
344
+
345
+ &:hover {
346
+ background-color: #0057FE;
347
+ border-color: #0057FE;
348
+ color: #FFFFFF;
349
+ }
350
+ /* 支持通过 data-type 改变悬停颜色 */
351
+ &[data-type='success']:hover {
352
+ background-color: #34C76E;
353
+ border-color: #34C76E;
354
+ color: #FFFFFF;
355
+ }
356
+ }
357
+ }
358
+ }
359
+ // 按钮布局样式公共部分
360
+ &.h-buttons-button-left,
361
+ &.h-buttons-button-center,
362
+ &.h-buttons-button-right,
363
+ &.h-buttons-button-space-between {
364
+ :deep(.ant-btn-group) {
365
+ width: 100%;
366
+ display: flex;
367
+ flex-wrap: nowrap;
368
+ .ant-btn {
369
+ border: 1px solid #CDCDCD;
370
+ color: #5D5C5C;
371
+ white-space: nowrap;
372
+ overflow: hidden;
373
+ margin-right: 0px;
374
+ text-overflow: ellipsis;
375
+ }
376
+ }
377
+ }
378
+ &.h-buttons-max-width200 {
379
+ :deep(.ant-btn) {
380
+ max-width: 200px !important;
381
+ }
382
+ }
383
+ // button-left样式 - 按钮从左到右排列
384
+ &.h-buttons-button-left {
385
+ :deep(.ant-btn-group) {
386
+ justify-content: flex-start;
387
+ gap: 12px;
388
+ }
389
+ }
390
+ // button-center样式 - 按钮居中排列
391
+ &.h-buttons-button-center {
392
+ :deep(.ant-btn-group) {
393
+ justify-content: center;
394
+ gap: 12px;
395
+ }
396
+ }
397
+ // button-right样式 - 按钮从右到左排列
398
+ &.h-buttons-button-right {
399
+ :deep(.ant-btn-group) {
400
+ justify-content: flex-end;
401
+ gap: 12px;
402
+ }
403
+ }
404
+ // button-space-between样式 - 按钮两端对齐(两个按钮时分布在两端)
405
+ &.h-buttons-button-space-between {
406
+ :deep(.ant-btn-group) {
407
+ justify-content: space-between;
408
+ }
409
+ }
410
+
411
+ // button-icon-tiles样式 - 左侧彩色图标块 + 右侧文字
412
+ &.h-buttons-button-icon-tiles {
413
+ :deep(.ant-btn-group) {
414
+ width: 100%;
415
+ display: flex;
416
+ flex-wrap: wrap; // 允许自动换行
417
+ justify-content: flex-start; // 左对齐
418
+ gap: 0; // 取消统一间距
419
+
420
+ .ant-btn {
421
+ position: relative;
422
+ display: inline-flex;
423
+ align-items: center;
424
+ gap: 10px; // 控制图标与文字间距
425
+ border: 1px solid #E6E8EB;
426
+ font-size: 14px;
427
+ height: 44px;
428
+ padding: 0 10px 0 10px;
429
+ border-radius: 8px;
430
+ min-width: 116px;
431
+ box-shadow: 0 2px 0 rgba(0,0,0,0.02);
432
+ margin-right: 12px; // 用margin控制横向间距,末尾一排自然换行
433
+ }
434
+
435
+ .ant-btn .anticon {
436
+ width: 26px;
437
+ height: 26px;
438
+ display: inline-flex;
439
+ align-items: center;
440
+ justify-content: center;
441
+ border-radius: 6px;
442
+ color: #fff;
443
+ font-size: 14px;
444
+ flex: 0 0 26px; // 固定正方形,防止随文本挤压变形
445
+ box-sizing: border-box;
446
+ }
447
+
448
+ /* 默认蓝色,支持通过 data-type 改变色块(success/warning/error/default)*/
449
+ .ant-btn .anticon { background: #3FA7FF; }
450
+ .ant-btn[data-type='success'] .anticon { background: #34C76E; }
451
+ .ant-btn[data-type='warning'] .anticon { background: #FFA940; }
452
+ .ant-btn[data-type='error'] .anticon { background: #FF7875; }
453
+ .ant-btn[disabled] .anticon { background: #BFBFBF; }
454
+
455
+ /* 图标与文字间距在有图标时更自然 */
456
+ .ant-btn > .anticon + span { margin-left: 10px; }
457
+ }
458
+ }
459
+ // 水印图标与按钮容器布局调整
460
+ &.h-buttons-button-watermark-icon {
461
+ :deep(.watermark-icon) { transform: translate(-50%, -54%) !important; }
462
+ :deep(.x-button) { display: flex !important; }
463
+ :deep(.ant-btn-group) {
464
+ margin: 0 auto;
465
+ display: block;
466
+ }
467
+ }
468
+ &.h-buttons-0padding-button {
469
+ padding: 0px 4px;
470
+ }
471
+ // button25样式 用于会诊申请侧边栏按钮样式
472
+ &.h-buttons-button25 {
473
+ :deep(.x-buttons) {
474
+ .ant-btn-group {
475
+ width: 173px;
476
+ justify-content: space-between;
477
+
478
+ .ant-btn {
479
+ width: 173px;
480
+ }
481
+ }
482
+ }
483
+ }
484
+ &.h-buttons-button_refresh {
485
+ margin-top: 10px;
486
+ }
487
+ // 居中样式 用于门诊收费左侧按钮样式(三个按钮居中样式)
488
+ &.h-buttons-out-button {
489
+ :deep(.x-buttons) {
490
+ margin-top: 2px !important;
491
+ margin-bottom: 10px !important;
492
+ display: flex;
493
+ justify-content: center;
494
+ .ant-btn-group {
495
+ display: flex;
496
+ flex-wrap: nowrap;
497
+ gap: 12px;
498
+ .ant-btn {
499
+ width: 110px;
500
+ height: 32px;
501
+ border-radius: 6px;
502
+ opacity: 1;
503
+ background: #FFFFFF;
504
+ box-sizing: border-box;
505
+ border: 1px solid #9499A0;
506
+ margin-right: 0px;
507
+ /* 允许正常文本渲染,避免省略号导致的“变成点了” */
508
+ font-family: "Source Han Sans";
509
+ font-size: 16px;
510
+ font-weight: normal;
511
+ line-height: normal;
512
+ color: #313131;
513
+ }
514
+ /* 还原子元素默认高度,避免文字被压缩成点 */
515
+ }
516
+ }
517
+ }
518
+ // button15样式 - 垂直排列的深色按钮组
519
+ &.h-buttons-button15 {
520
+ :deep(.x-buttons) {
521
+ margin-top: -22px;
522
+ .ant-btn-group {
523
+ flex-direction: column; /* 按钮垂直排列 */
524
+ display: flex; /* 启用flex布局 */
525
+ gap: 6px; /* 按钮间距 */
526
+ .ant-btn {
527
+ border: none; /* 移除边框 */
528
+ color: #FFFFFF; /* 字体颜色 */
529
+ background-color: #0057FE; /* 背景色 */
530
+ box-sizing: border-box; /* 盒模型 */
531
+ left: 12px; /* 左偏移 */
532
+ width: 280px; /* 宽度 */
533
+ }
534
+ }
535
+ }
536
+ }
537
+ // button2样式
538
+ &.h-buttons-button2 {
539
+ :deep(.x-buttons) {
540
+ margin: -20px 6px -20px 6px;
541
+ .ant-btn-group {
542
+ width: 100%;
543
+ justify-content: space-between;
544
+ display: flex; /* 确保flex布局 */
545
+ flex-wrap: nowrap; /* 防止换行 */
546
+ .ant-btn {
547
+ border-radius: 6px; /* 边框圆角 */
548
+ border: none; /* 移除边框 */
549
+ flex: 0 0 46%; /* flex-grow: 0, flex-shrink: 0, flex-basis: 46% */
550
+ min-width: 0; /* 覆盖可能的默认最小宽度 */
551
+ font-size: 16px; /* 字体大小 */
552
+ height: 32px; /* 高度 */
553
+ color: #FFFFFF; /* 字体颜色 */
554
+ background-color: #1890FF; /* 背景颜色 */
555
+ }
556
+ }
557
+ }
558
+ }
559
+ // 与表单项内联使用时的垂直居中对齐样式
560
+ &.h-buttons-form-inline {
561
+ :deep(.ant-btn-group){
562
+ height: 45px;
563
+ display: flex;
564
+ align-items: center;
565
+ }
566
+ }
567
+ &.h-buttons-width173 {
568
+ :deep(.ant-btn) {
569
+ width: 173px !important;
570
+ }
571
+ }
572
+ // 按钮无边框+无图标+无阴影
573
+ &.h-button-no-style{
574
+ :deep(.ant-btn) {
575
+ border: 0px;
576
+ .anticon{
577
+ display: none;
578
+ }
579
+ }
580
+ :deep(.ant-btn-primary){
581
+ text-shadow: none;
582
+ box-shadow: none;
583
+ }
584
+ }
585
+ // 按钮组边距
586
+ &.h-button-border{
587
+ border: 1px solid #E5E9F0;
588
+ border-radius: 6px;
589
+ }
590
+ // 按钮撑开整个容器
591
+ &.h-buttons-fill-container{
592
+ :deep(.x-buttons) {
593
+ width: 100%;
594
+ .ant-btn-group{
595
+ width: 100%;
596
+ .ant-btn{
597
+ width: 100%;
598
+ margin-right: 0px;
599
+ }
600
+ }
601
+ }
602
+ }
603
+ &.h-buttons-one-button-style {
604
+ margin: 0 !important;
605
+ padding: 0 !important;
606
+ :deep(.x-buttons) {
607
+ margin: 0 !important;
608
+ padding: 0 !important;
609
+ .ant-btn-group {
610
+ width: 100%;
611
+ height: 32px;
612
+ justify-content: space-between;
613
+ display: flex;
614
+ flex-wrap: nowrap;
615
+ .ant-btn {
616
+ width: 100%;
617
+ margin-right: 0px !important;
618
+ min-width: 100% !important;
619
+ border-radius: 6px; /* 边框圆角 */
620
+ font-size: 18px; /* 字体大小 */
621
+ line-height: 26px;
622
+ font-weight: bold;
623
+ letter-spacing: 14px;
624
+ height: 32px; /* 高度 */
625
+ color: #FFFFFF; /* 字体颜色 */
626
+ background: #0057FE;/* 背景颜色 */
627
+ }
628
+ }
629
+ }
630
+ }
631
+ // no-boder-style样式 - 无边框样式
632
+ &.h-buttons-no-boder-style {
633
+ :deep(.ant-btn-group) {
634
+ margin-left: -20px;
635
+ .ant-btn {
636
+ border: none !important;
637
+ background: transparent !important;
638
+ height: 23px;
639
+ opacity: 1;
640
+ font-family: "Source Han Sans";
641
+ font-size: 16px;
642
+ font-weight: normal;
643
+ line-height: normal;
644
+ letter-spacing: 0em;
645
+ color: #313131;
646
+ padding: 0;
647
+ box-shadow: none;
648
+ margin-right: 0;
649
+ margin-left: 0;
650
+
651
+ // 图标样式
652
+ .anticon {
653
+ height: 16px;
654
+ width: 16px;
655
+ opacity: 1;
656
+ background: transparent;
657
+ display: inline-flex;
658
+ align-items: center;
659
+ justify-content: center;
660
+ color: #94979E;
661
+ margin-right: 4px;
662
+ }
663
+
664
+ &:hover {
665
+ background: transparent !important;
666
+ color: #313131;
667
+ }
668
+
669
+ &:focus {
670
+ background: transparent !important;
671
+ color: #313131;
672
+ }
673
+ }
674
+ }
675
+ }
676
+ // useStyle10样式 - 左侧蓝色圆点指示器样式,与HTab useStyle10效果一致
677
+ &.h-buttons-useStyle10 {
678
+ :deep(.ant-btn-group) {
679
+ display: flex;
680
+ flex-wrap: wrap;
681
+ gap: 8px;
682
+ margin-left: 0 !important;
683
+ padding: 0 !important;
684
+
685
+ .ant-btn {
686
+ position: relative;
687
+ background-color: transparent !important;
688
+ border: none !important;
689
+ border-radius: 0 !important;
690
+ color: #313131;
691
+ font-family: "Source Han Sans";
692
+ font-size: 16px;
693
+ font-weight: bold;
694
+ line-height: normal;
695
+ letter-spacing: 0em;
696
+ font-feature-settings: "kern" on;
697
+ font-variation-settings: "opsz" auto;
698
+ width: auto;
699
+ height: 40px;
700
+ padding: 0 12px 6px 18px;
701
+ text-align: center;
702
+ margin-right: 0 !important;
703
+ box-shadow: none !important;
704
+ display: inline-flex;
705
+ align-items: center;
706
+ vertical-align: top;
707
+ outline: none !important;
708
+ background: transparent !important;
709
+ background-image: none !important;
710
+ border-color: transparent !important;
711
+ border-width: 0 !important;
712
+
713
+ &::before {
714
+ content: "" !important;
715
+ position: absolute !important;
716
+ left: 5px !important;
717
+ top: 50% !important;
718
+ transform: translateY(-50%) !important;
719
+ width: 8px !important;
720
+ height: 8px !important;
721
+ background-color: #1890ff !important;
722
+ background-image: none !important;
723
+ border-radius: 50% !important;
724
+ display: block !important;
725
+ z-index: 10 !important;
726
+ pointer-events: none !important;
727
+ opacity: 1 !important;
728
+ mix-blend-mode: normal !important;
729
+ box-shadow: none !important;
730
+ filter: none !important;
731
+ -webkit-filter: none !important;
732
+ }
733
+
734
+ .anticon {
735
+ display: none !important;
736
+ }
737
+ }
738
+
739
+ // 激活状态:通过 h-btn-active 类控制
740
+ .ant-btn.h-btn-active {
741
+ color: #0057FE !important;
742
+ }
743
+ }
744
+ }
745
+
746
+ // 自定义图标边框样式
747
+ &.h-buttons-custom-icon-style {
748
+ :deep(.x-buttons) {
749
+ .ant-btn-group {
750
+ width: 100%;
751
+ justify-content: space-between;
752
+ display: flex;
753
+ flex-wrap: nowrap;
754
+
755
+ .ant-btn {
756
+ width: 100%;
757
+ margin-right: 0px !important;
758
+ min-width: 100% !important;
759
+ height: 32px;
760
+ border-radius: 6px;
761
+ opacity: 1;
762
+ background: #FFFFFF;
763
+ box-sizing: border-box;
764
+ border: 1px solid #9499A0;
765
+ font-family: "Source Han Sans";
766
+ font-size: 16px;
767
+ font-weight: normal;
768
+ line-height: normal;
769
+ letter-spacing: 0em;
770
+ color: #313131;
771
+ display: inline-flex;
772
+ align-items: center;
773
+ justify-content: center;
774
+ gap: 8px;
775
+
776
+ .anticon {
777
+ width: 18px;
778
+ height: 18px;
779
+ opacity: 1;
780
+ background: #0057FE;
781
+ border-radius: 50%;
782
+ display: inline-flex;
783
+ align-items: center;
784
+ justify-content: center;
785
+ position: relative;
786
+ flex-shrink: 0;
787
+ color: #FFFFFF;
788
+
789
+ svg {
790
+ width: 12px;
791
+ height: 12px;
792
+ }
793
+ }
794
+ }
795
+ }
796
+ }
797
+ }
798
+
799
+ // 按钮配置驱动的展开/合并切换按钮样式
800
+ .h-buttons-drop-down-wrapper {
801
+ display: inline-flex;
802
+ align-items: center;
803
+ justify-content: center;
804
+ }
805
+
806
+ .h-buttons-drop-down-button {
807
+ border: 1px solid #9499A0;
808
+ background: #FFFFFF;
809
+ border-radius: 6px;
810
+ height: 32px;
811
+ width: 32px;
812
+ min-width: 32px;
813
+ padding: 0;
814
+ display: inline-flex;
815
+ align-items: center;
816
+ justify-content: center;
817
+ color: #313131;
818
+ }
819
+
820
+ .h-buttons-drop-down-icon {
821
+ display: inline-flex;
822
+ align-items: center;
823
+ justify-content: center;
824
+ transition: transform 0.2s ease;
825
+ color: #313131;
826
+
827
+ &.is-expanded {
828
+ transform: rotate(180deg);
829
+ }
830
+ }
831
+ }
832
+ </style>