vue2-client 1.22.2 → 1.22.3

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 (170) hide show
  1. package/.claude/settings.local.json +30 -30
  2. package/.env.his +19 -19
  3. package/.eslintrc.js +74 -74
  4. package/.history/.eslintrc_20260521171150.js +74 -0
  5. package/.history/.eslintrc_20260521171213.js +74 -0
  6. package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +726 -0
  7. package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +478 -0
  8. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175435.vue +706 -0
  9. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260512175450.vue +694 -0
  10. package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +755 -0
  11. package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513145941.vue +524 -0
  12. package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513153133.vue +731 -0
  13. package/.history/src/base-client/components/common/HIS/HForm/HForm_20260513160316.vue +525 -0
  14. package/.history/src/base-client/components/common/HIS/HForm/HForm_20260601144150.vue +1046 -0
  15. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +512 -0
  16. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +511 -0
  17. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +696 -0
  18. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +693 -0
  19. package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +677 -0
  20. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164645.vue +758 -0
  21. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508164714.vue +693 -0
  22. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260508171651.vue +716 -0
  23. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509133717.vue +695 -0
  24. package/.history/src/base-client/components/common/HIS/HTab/HTab_20260509171115.vue +664 -0
  25. package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140637.vue +1455 -0
  26. package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513140935.vue +1441 -0
  27. package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513150818.vue +1441 -0
  28. package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153119.vue +1442 -0
  29. package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260513153126.vue +1486 -0
  30. package/.history/src/base-client/components/common/XForm/XFormItem_20260513140854.vue +1607 -0
  31. package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +643 -0
  32. package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +628 -0
  33. package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +104 -0
  34. package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +102 -0
  35. package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +1241 -0
  36. package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +1223 -0
  37. package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +472 -0
  38. package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +538 -0
  39. package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +650 -0
  40. package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +1469 -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/utils/indexedDB_20260306150918.js +593 -0
  72. package/.history/src/utils/indexedDB_20260306151301.js +586 -0
  73. package/.idea/af-vue2-client.iml +9 -0
  74. package/.idea/codeStyles/Project.xml +62 -0
  75. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  76. package/.idea/misc.xml +6 -0
  77. package/.idea/modules.xml +1 -1
  78. package/Components.md +60 -60
  79. package/index.js +31 -31
  80. package/jest-transform-stub.js +8 -8
  81. package/jest.setup.js +7 -7
  82. package/package.json +1 -1
  83. package/preview-input-box.html +180 -0
  84. package/src/assets/img/querySlotDemo.svg +15 -15
  85. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  86. package/src/base-client/components/common/CitySelect/index.js +3 -3
  87. package/src/base-client/components/common/CitySelect/index.md +109 -109
  88. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  89. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  90. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +55 -1
  91. package/src/base-client/components/common/HIS/HForm/HForm.vue +1186 -1186
  92. package/src/base-client/components/common/HIS/HTab/HTab.vue +88 -1
  93. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  94. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  95. package/src/base-client/components/common/Tree/index.js +2 -2
  96. package/src/base-client/components/common/Upload/index.js +3 -3
  97. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  98. package/src/base-client/components/common/XAddReport/XAddReport.vue +16 -1
  99. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  100. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  101. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  102. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  103. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  104. package/src/base-client/components/common/XDescriptions/index.md +382 -382
  105. package/src/base-client/components/common/XForm/index.md +178 -178
  106. package/src/base-client/components/common/XInput/XInput.vue +32 -1
  107. package/src/base-client/components/common/XInspectionDetailDrawer/index.vue +1 -1
  108. package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
  109. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  110. package/src/base-client/components/common/XStepView/index.js +3 -3
  111. package/src/base-client/components/common/XStepView/index.md +31 -31
  112. package/src/base-client/components/common/XTable/index.md +255 -255
  113. package/src/base-client/components/his/HAi/HAi.vue +1177 -436
  114. package/src/base-client/components/his/XList/XList.vue +337 -58
  115. package/src/base-client/components/his/XSidebar/XSidebar.vue +36 -12
  116. package/src/base-client/components/his/XTransfer/index.md +327 -327
  117. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  118. package/src/base-client/plugins/Config.js +19 -19
  119. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  120. package/src/components/Charts/Bar.vue +62 -62
  121. package/src/components/Charts/ChartCard.vue +134 -134
  122. package/src/components/Charts/Liquid.vue +67 -67
  123. package/src/components/Charts/MiniArea.vue +39 -39
  124. package/src/components/Charts/MiniBar.vue +39 -39
  125. package/src/components/Charts/MiniProgress.vue +75 -75
  126. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  127. package/src/components/Charts/Radar.vue +68 -68
  128. package/src/components/Charts/RankList.vue +77 -77
  129. package/src/components/Charts/TagCloud.vue +113 -113
  130. package/src/components/Charts/TransferBar.vue +64 -64
  131. package/src/components/Charts/Trend.vue +82 -82
  132. package/src/components/Charts/chart.less +12 -12
  133. package/src/components/Charts/smooth.area.less +13 -13
  134. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  135. package/src/components/NumberInfo/index.js +3 -3
  136. package/src/components/NumberInfo/index.less +54 -54
  137. package/src/components/NumberInfo/index.md +43 -43
  138. package/src/components/STable/index.js +953 -953
  139. package/src/components/card/ChartCard.vue +79 -79
  140. package/src/components/chart/Bar.vue +60 -60
  141. package/src/components/chart/MiniArea.vue +67 -67
  142. package/src/components/chart/MiniBar.vue +59 -59
  143. package/src/components/chart/MiniProgress.vue +57 -57
  144. package/src/components/chart/Radar.vue +80 -80
  145. package/src/components/chart/RankingList.vue +60 -60
  146. package/src/components/chart/Trend.vue +79 -79
  147. package/src/components/chart/index.less +9 -9
  148. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  149. package/src/components/input/IInput.vue +66 -66
  150. package/src/components/menu/SideMenu.vue +75 -75
  151. package/src/components/menu/menu.js +273 -273
  152. package/src/components/tool/AStepItem.vue +60 -60
  153. package/src/layouts/CommonLayout.vue +56 -56
  154. package/src/lib.js +1 -1
  155. package/src/mock/extend/index.js +84 -84
  156. package/src/mock/goods/index.js +108 -108
  157. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  158. package/src/pages/system/dictionary/index.vue +44 -44
  159. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  160. package/src/pages/system/monitor/operLog/index.vue +37 -37
  161. package/src/services/api/cas.js +79 -79
  162. package/src/store/modules/setting.js +119 -119
  163. package/src/utils/errorCode.js +6 -6
  164. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
  165. package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -7
  166. package/.idea/google-java-format.xml +0 -6
  167. package/.idea/inspectionProfiles/Project_Default.xml +0 -24
  168. package/.idea/jsLinters/eslint.xml +0 -6
  169. package/.idea/vue2-client.iml +0 -12
  170. package/.vscode/settings.json +0 -28
@@ -1,1186 +1,1186 @@
1
- <script setup>
2
- import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
3
- import { ref, computed, useAttrs } from 'vue'
4
-
5
- const xAddNativeFormRef = ref()
6
-
7
- const attrs = useAttrs()
8
- const props = defineProps({
9
- // 是否启用 horizontal 模式的自定义配置
10
- enableHorizontalCustom: {
11
- type: Boolean,
12
- default: false
13
- }
14
- })
15
- // 从 radio-style_1 属性值中获取 padding
16
- const radioPadding = computed(() => {
17
- const val = attrs['radio-style_1']
18
- if (val !== undefined && val !== '' && val !== null) {
19
- const num = Number(val)
20
- return isNaN(num) ? 9 : num
21
- }
22
- return 9
23
- })
24
-
25
- // 包装器样式对象
26
- const wrapperStyleObject = computed(() => {
27
- return {
28
- '--radio-padding': `${radioPadding.value}px`
29
- }
30
- })
31
-
32
- // 启动时间选择框弹出到body
33
- const enablePopupToBody = computed(() => {
34
- const a = attrs
35
- return a.enablePopupToBody === 'true' || a.enablePopupToBody === true
36
- })
37
- const wrapperClassObject = computed(() => {
38
- const a = attrs
39
- const classes = {}
40
-
41
- // 1) 多个布尔型样式开关(存在且为真则生效)
42
- const booleanStyleKeys = [
43
- 'query-conditions',
44
- 'padding-50',
45
- 'label-text-horizontal',
46
- 'label-text-justify',
47
- 'simple-inline',
48
- 'simple-inline-show-label',
49
- 'label-justify',
50
- 'charge-form',
51
- 'mini-form',
52
- 'content-right',
53
- 'label-font-style',
54
- 'small-input-style',
55
- 'select-inside-label-style'
56
- ]
57
- // 只要属性存在就生效的样式开关
58
- const existStyleKeys = ['radio-style_1']
59
- for (const key of booleanStyleKeys) {
60
- const val = a[key]
61
- const truthy = val === true || val === '' || val === 'true'
62
- if (truthy) classes[`h-form-${key}`] = true
63
- }
64
- // 检查存在即生效的样式开关
65
- for (const key of existStyleKeys) {
66
- if (key in a) classes[`h-form-${key}`] = true
67
- }
68
-
69
- return classes
70
- })
71
-
72
- defineExpose({
73
- getXAddNativeFormInstance: () => xAddNativeFormRef.value,
74
- init: (params) => xAddNativeFormRef.value && xAddNativeFormRef.value.init && xAddNativeFormRef.value.init(params),
75
- asyncSubmit: () => xAddNativeFormRef.value && xAddNativeFormRef.value.asyncSubmit && xAddNativeFormRef.value.asyncSubmit(),
76
- validateForm: () => xAddNativeFormRef.value && xAddNativeFormRef.value.validateForm && xAddNativeFormRef.value.validateForm(),
77
- /** 等待配置结束的异步方法,委托给内部 XAddNativeForm */
78
- waitConfigEnd: () => xAddNativeFormRef.value?.waitConfigEnd?.() ?? Promise.resolve()
79
- })
80
-
81
- </script>
82
-
83
- <template>
84
- <div
85
- class="h-form-wrapper"
86
- :class="[
87
- wrapperClassObject
88
- ]"
89
- :style="wrapperStyleObject"
90
- >
91
-
92
- <x-add-native-form
93
- ref="xAddNativeFormRef"
94
- v-bind="$attrs"
95
- :enable-popup-to-body="enablePopupToBody"
96
- :enable-horizontal-custom="props.enableHorizontalCustom"
97
- @configEnd="$emit('configEnd')"
98
- v-on="$listeners"
99
- >
100
- <template v-for="(_, name) in $slots" #[name]="slotData">
101
- <slot :name="name" v-bind="slotData" />
102
- </template>
103
- </x-add-native-form>
104
- </div>
105
- </template>
106
-
107
- <style scoped lang="less">
108
- // 单选框 padding 变量
109
- @radio-padding: var(--radio-padding, 9px);
110
-
111
- .h-form-wrapper {
112
- // 基础样式
113
- :deep(.ant-form-item) {
114
- margin-bottom: 4px;
115
- }
116
-
117
- &.h-form-mini-form {
118
- :deep(.ant-form-inline) {
119
- .ant-row-flex {
120
- .ant-col {
121
- flex: auto !important;
122
- max-width: 250px !important;
123
- }
124
- }
125
- }
126
-
127
- :deep(.ant-form-item) {
128
- margin-right: 0px !important;
129
- }
130
- }
131
-
132
- &.h-form-content-right {
133
- :deep(.ant-form-inline) {
134
- .ant-row-flex {
135
- justify-content: right;
136
- }
137
- }
138
- }
139
-
140
- // query-conditions 样式
141
- &.h-form-query-conditions {
142
- :deep(.ant-card-body) {
143
- padding: 0px;
144
- }
145
-
146
- :deep(.ant-row-flex) {
147
- .x-form-col-wrapper {
148
- .ant-form-item {
149
- display: flex !important;
150
- width: 100%;
151
- height: 100%;
152
- margin-bottom: 0px;
153
- justify-content: space-between;
154
-
155
- .ant-form-item-label {
156
- display: flex;
157
- align-items: center;
158
- height: 100%;
159
-
160
- label {
161
- height: auto;
162
- font-family: Source Han Sans;
163
- font-size: 16px;
164
- font-weight: normal;
165
- line-height: normal;
166
- color: #313131;
167
- display: block !important; // 保持 block 以支持两端对齐
168
- width: 100%;
169
- white-space: nowrap;
170
- margin: 0;
171
- text-align: justify;
172
- text-align-last: justify;
173
- text-justify: inter-ideograph;
174
- box-sizing: border-box;
175
- padding-right: 0 !important; // 移除冒号预留空间
176
-
177
- // 使用 line-height 实现垂直居中
178
- line-height: 40px; // 设置与容器高度相同的行高
179
- }
180
-
181
- & > label::after {
182
- display: none !important;
183
- }
184
- }
185
- }
186
- }
187
-
188
- .ant-col-24 {
189
- padding: 0px 4px !important;
190
- }
191
- }
192
- }
193
-
194
- // 单选框样式设计图中切换模式的样式
195
- &.h-form-radio-style_1 {
196
- :deep(.ant-radio-button-wrapper) {
197
- padding: 0 @radio-padding;
198
- }
199
-
200
- :deep(.ant-radio-button-wrapper-checked) {
201
- background-color: #0057FE;
202
- color: white;
203
- }
204
- }
205
-
206
- &.h-form-simple-inline {
207
- :deep(.ant-form-item-label) {
208
- display: none !important;
209
- }
210
-
211
- :deep(.ant-form-item-control-wrapper) {
212
- width: 100%;
213
- }
214
- }
215
-
216
- &.h-form-padding-50 {
217
- // ant-row-flex 样式
218
- :deep(.ant-row-flex) {
219
- padding-left: 50px;
220
- padding-right: 50px
221
- }
222
- }
223
-
224
- // 单选框样式设计图中切换模式的样式
225
- &.h-form-radio-style_1 {
226
- :deep(.ant-radio-button-wrapper) {
227
- padding: 0 @radio-padding;
228
- }
229
-
230
- :deep(.ant-radio-button-wrapper-checked) {
231
- background-color: #0057FE;
232
- color: white;
233
- }
234
- }
235
-
236
- // charge-form 样式
237
- &.h-form-charge-form {
238
- margin-top: 2px !important;
239
- // 定义变量
240
- @font-common: {
241
- font-family: 'Source Han Sans', sans-serif;
242
- font-size: 16px;
243
- font-weight: normal;
244
- letter-spacing: 0em;
245
- font-feature-settings: "kern" on;
246
- };
247
-
248
- @color-primary: #313131;
249
- @color-placeholder: #999999;
250
-
251
- // 定义混合宏
252
- .input-base() {
253
- width: 100%;
254
- height: 30px;
255
- line-height: 30px;
256
- vertical-align: top;
257
- margin: 0;
258
- text-align: left;
259
- color: @color-primary;
260
- opacity: 1;
261
- @font-common();
262
- }
263
-
264
- .placeholder-base() {
265
- color: @color-placeholder;
266
- opacity: 1;
267
- @font-common();
268
- }
269
-
270
- .option-group-base() {
271
- height: 30px;
272
- line-height: 30px;
273
- display: flex;
274
- align-items: center;
275
-
276
- .ant-radio-wrapper,
277
- .ant-checkbox-wrapper {
278
- height: 30px;
279
- line-height: 30px;
280
- margin-right: 16px;
281
- }
282
- }
283
-
284
- :deep(.ant-form-item) {
285
- margin-bottom: 16px;
286
- margin-top: 0;
287
- padding: 0;
288
- display: flex;
289
- align-items: center;
290
-
291
- .ant-form-item-label {
292
- text-align: left;
293
- margin: 0 11px 0 0 !important;
294
- width: 64px;
295
- min-width: 64px;
296
- max-width: 64px;
297
- flex-shrink: 0;
298
-
299
- label {
300
- height: 23px;
301
- opacity: 1;
302
- line-height: 23px;
303
- color: @color-primary;
304
- margin: 0;
305
- padding: 0;
306
- white-space: nowrap;
307
- display: block;
308
- @font-common();
309
-
310
- // 移除冒号
311
- &::after {
312
- content: '';
313
- }
314
- }
315
- }
316
-
317
- .ant-form-item-control-wrapper {
318
- margin: 0;
319
- padding: 0;
320
- flex: 1;
321
- min-width: 0;
322
- display: flex;
323
- align-items: center;
324
-
325
- .ant-form-item-control {
326
- margin: 0;
327
- padding: 0;
328
- width: 100%;
329
- text-align: left;
330
- line-height: 30px !important;
331
-
332
- // 输入框样式统一
333
- .ant-input,
334
- .ant-input-affix-wrapper,
335
- .ant-select,
336
- .ant-input-number,
337
- .ant-picker,
338
- .ant-radio-group,
339
- .ant-checkbox-group {
340
- .input-base();
341
- }
342
-
343
- // 选择器样式
344
- .ant-select {
345
- .ant-select-selector {
346
- .input-base();
347
- height: 30px;
348
- line-height: 30px;
349
-
350
- .ant-select-selection-item {
351
- .input-base();
352
- line-height: 30px;
353
- }
354
-
355
- .ant-select-selection-placeholder {
356
- .placeholder-base();
357
- line-height: 30px;
358
- color: #313131;
359
- }
360
- }
361
- }
362
-
363
- // 日期选择器样式
364
- .ant-picker {
365
- height: 30px;
366
-
367
- .ant-picker-input {
368
- height: 30px;
369
- line-height: 30px;
370
- .input-base();
371
-
372
- input {
373
- .input-base();
374
- height: 30px;
375
- line-height: 30px;
376
- }
377
- }
378
- }
379
-
380
- // 数字输入框样式
381
- .ant-input-number {
382
- height: 30px;
383
-
384
- .ant-input-number-input {
385
- .input-base();
386
- height: 30px;
387
- line-height: 30px;
388
- }
389
- }
390
-
391
- // 单选框组样式
392
- .ant-radio-group {
393
- .option-group-base();
394
- }
395
-
396
- // 复选框组样式
397
- .ant-checkbox-group {
398
- .option-group-base();
399
- }
400
- }
401
- }
402
- }
403
-
404
- // 重置可能的容器边距
405
- :deep(.ant-row) {
406
- margin: 0;
407
- padding: 0;
408
-
409
- .ant-col {
410
- margin: 0;
411
- padding: 0;
412
- }
413
- }
414
-
415
- // 强制重置所有可能的表单项样式
416
- :deep(.ant-form-item) {
417
- margin: 0 0 16px 0 !important;
418
-
419
- // 重置可能的内部边距
420
- .ant-form-item-control-input,
421
- .ant-form-item-control-input-content {
422
- margin: 0 !important;
423
- padding: 0 !important;
424
- }
425
- }
426
- }
427
-
428
- // label-text-horizontal 样式 - 只控制label文字从左到右排列
429
- &.h-form-label-text-horizontal {
430
- :deep(.ant-form-item-label) {
431
- text-align: left;
432
- direction: ltr;
433
-
434
- // 标签文字水平排列
435
- .ant-form-item-label-text {
436
- display: inline-block;
437
- text-align: left;
438
- direction: ltr;
439
- unicode-bidi: normal;
440
- }
441
-
442
- // 必填标识水平排列
443
- .ant-form-item-required::before {
444
- margin-right: 4px;
445
- margin-left: 0;
446
- }
447
- }
448
- }
449
-
450
- // label-text-justify 样式 - 标签文字两端对齐分散占满 必填*可能会有问题
451
- &.h-form-label-text-justify {
452
- :deep(.ant-form-item-label) {
453
- padding-left: 0;
454
- padding-right: 8px;
455
-
456
- label {
457
- position: relative;
458
- display: block;
459
- width: 100%;
460
- white-space: nowrap;
461
- margin: 0;
462
- text-indent: 0;
463
- text-align: justify;
464
- text-align-last: justify;
465
- text-justify: inter-ideograph;
466
- box-sizing: border-box;
467
- padding-right: 12px; // 给绝对定位的冒号留出空间
468
- }
469
-
470
- // 将冒号绝对定位到最右侧,避免参与两端对齐计算
471
- label::after {
472
- position: absolute;
473
- right: 0;
474
- }
475
- }
476
- }
477
-
478
- // label-justify 样式 - 两端对齐,应用指定字体样式
479
- &.h-form-label-justify {
480
- padding-left: 8px;
481
-
482
- :deep(.ant-form-item-label) {
483
- padding-left: 0;
484
- padding-right: 8px;
485
- // 限制label容器的宽度,强制两端对齐
486
- width: 80px !important;
487
- min-width: 80px;
488
- max-width: 80px;
489
-
490
- label {
491
- position: relative;
492
- display: block;
493
- width: 100%;
494
- white-space: nowrap;
495
- margin: 0;
496
- text-indent: 0;
497
- text-align: justify;
498
- text-align-last: justify;
499
- text-justify: inter-ideograph;
500
- box-sizing: border-box;
501
- padding-right: 12px; // 给绝对定位的冒号留出空间
502
-
503
- // 应用指定的字体样式
504
- height: 39px;
505
- opacity: 1;
506
- font-family: 'Source Han Sans', sans-serif;
507
- font-size: 16px;
508
- font-weight: normal;
509
- line-height: 39px;
510
- color: #313131;
511
- }
512
-
513
- // 去掉冒号
514
- label::after {
515
- content: '';
516
- }
517
- }
518
- }
519
-
520
- // label-font-style 样式 - 独立的label字体样式
521
- &.h-form-label-font-style {
522
- :deep(.ant-form-item-label) {
523
- label {
524
- height: 23px;
525
- opacity: 1;
526
- font-family: Source Han Sans;
527
- font-size: 16px;
528
- font-weight: normal;
529
- line-height: normal;
530
- letter-spacing: 0em;
531
- font-feature-settings: "kern" on;
532
- color: #313131;
533
- }
534
- }
535
- }
536
-
537
- &.h-form-simple-inline-show-label {
538
- // ========== 公共字体样式变量 ==========
539
- @common-font: {
540
- font-family: Source Han Sans !important;
541
- font-size: 16px !important;
542
- font-weight: normal !important;
543
- letter-spacing: 0em !important;
544
- font-feature-settings: "kern" on !important;
545
- };
546
-
547
- @common-text-color: #313131;
548
- @common-placeholder-color: #999;
549
- @common-border-color: #E5E9F0;
550
- @common-focus-color: #0057FE;
551
-
552
- // ========== 表单项基础布局 ==========
553
- :deep(.ant-form-item) {
554
- display: flex !important;
555
- flex-direction: row !important;
556
- align-items: flex-start !important;
557
- margin: 0 !important;
558
- padding: 0 !important;
559
- margin-bottom: 0 !important;
560
- }
561
-
562
- // 修复 ant-row 伪元素
563
- :deep(.ant-row) {
564
- &::before,
565
- &::after {
566
- display: table !important;
567
- content: '' !important;
568
- }
569
- }
570
-
571
- // ========== Label 样式 ==========
572
- :deep(.ant-form-item-label) {
573
- display: flex !important;
574
- align-items: flex-start !important;
575
- padding: 0 8px 0 0 !important;
576
- width: 90px !important;
577
- min-width: 90px !important;
578
- max-width: 90px !important;
579
- flex-shrink: 0 !important;
580
- flex: none !important;
581
-
582
- label {
583
- position: relative !important;
584
- display: block !important;
585
- width: 100% !important;
586
- height: 39px !important;
587
- margin: 0 !important;
588
- padding: 0 !important;
589
- opacity: 1 !important;
590
- @common-font();
591
- line-height: 39px !important;
592
- color: @common-text-color !important;
593
- text-align: justify !important;
594
- text-align-last: justify !important;
595
- text-justify: inter-ideograph !important;
596
- text-indent: 12px !important;
597
- box-sizing: border-box !important;
598
-
599
- &::after {
600
- display: none !important;
601
- content: none !important;
602
- }
603
-
604
- &:not(.ant-form-item-required)::before {
605
- display: none !important;
606
- content: none !important;
607
- }
608
- }
609
- }
610
-
611
- // 必填项星号
612
- :deep(.ant-form-item-required) {
613
- &::before {
614
- display: block !important;
615
- visibility: visible !important;
616
- content: '*' !important;
617
- position: absolute !important;
618
- left: -8px !important;
619
- top: 40% !important;
620
- transform: translateY(-50%) !important;
621
- color: #ff4d4f !important;
622
- font-size: 14px !important;
623
- font-family: SimSun, sans-serif !important;
624
- z-index: 1 !important;
625
- line-height: 1 !important;
626
- }
627
- }
628
-
629
- // ========== 控件容器 ==========
630
- :deep(.ant-form-item-control-wrapper) {
631
- flex: 1 !important;
632
- min-width: 0 !important;
633
- width: auto !important;
634
-
635
- .ant-form-item-control {
636
- width: 100% !important;
637
-
638
- .ant-form-item-children {
639
- display: block !important;
640
- width: 100% !important;
641
- padding-right: 41px;
642
- padding-left: 6px;
643
- }
644
- }
645
- }
646
-
647
- // ========== 公共输入框样式 Mixin ==========
648
- .input-common() {
649
- border-radius: 6px !important;
650
- box-sizing: border-box !important;
651
- border: 1px solid @common-border-color !important;
652
- @common-font();
653
- color: @common-text-color !important;
654
-
655
- &:hover,
656
- &:focus {
657
- border-color: @common-focus-color !important;
658
- box-shadow: none !important;
659
- }
660
-
661
- &[readonly] {
662
- background-color: #f5f5f5;
663
- cursor: not-allowed;
664
- }
665
- }
666
-
667
- // ========== 普通输入框(不包括文本域) ==========
668
- :deep(.ant-input:not(textarea)) {
669
- .input-common();
670
- height: 39px !important;
671
- line-height: 37px !important;
672
- padding: 0 11px !important;
673
-
674
- &::placeholder {
675
- line-height: 37px !important;
676
- color: @common-placeholder-color !important;
677
- }
678
- }
679
-
680
- // ========== 文本域样式 ==========
681
- :deep(textarea.ant-input) {
682
- .input-common();
683
- min-height: 80px !important;
684
- padding: 8px 11px !important;
685
- line-height: 22px !important;
686
- resize: vertical !important;
687
-
688
- &::placeholder {
689
- color: @common-placeholder-color !important;
690
- line-height: 22px !important;
691
- }
692
- }
693
-
694
- // ========== 下拉框样式 ==========
695
- :deep(.ant-select) {
696
- .ant-select-selection {
697
- border-radius: 6px !important;
698
- border: 1px solid @common-border-color !important;
699
- height: 39px !important;
700
-
701
- &:hover {
702
- border-color: @common-focus-color !important;
703
- }
704
- }
705
-
706
- .ant-select-selection__rendered {
707
- height: 39px !important;
708
- line-height: 39px !important;
709
- margin: 0 !important;
710
- padding: 0 11px !important;
711
- }
712
-
713
- .ant-select-selection__placeholder {
714
- @common-font();
715
- color: @common-placeholder-color !important;
716
- line-height: 37px !important;
717
- height: 37px !important;
718
- top: 0 !important;
719
- margin-top: 0 !important;
720
- padding-left: 11px;
721
- }
722
-
723
- .ant-select-selection-selected-value {
724
- @common-font();
725
- color: @common-text-color !important;
726
- line-height: 37px !important;
727
- padding: 0 !important;
728
- }
729
-
730
- .ant-select-arrow {
731
- right: 11px !important;
732
- top: 50% !important;
733
- transform: translateY(-50%) !important;
734
-
735
- .ant-select-arrow-icon {
736
- color: @common-placeholder-color !important;
737
- }
738
- }
739
- }
740
-
741
- :deep(.ant-select-focused) {
742
- .ant-select-selection {
743
- border-color: @common-focus-color !important;
744
- box-shadow: none !important;
745
- }
746
- }
747
-
748
- // ========== 单选框样式 ==========
749
- :deep(.ant-radio-group) {
750
- display: flex !important;
751
- align-items: center !important;
752
- height: 39px !important;
753
- line-height: 39px !important;
754
- }
755
-
756
- :deep(.ant-radio-wrapper) {
757
- @common-font();
758
- line-height: 39px !important;
759
- color: @common-text-color !important;
760
- margin-right: 16px !important;
761
- height: 39px !important;
762
- display: inline-flex !important;
763
- align-items: center !important;
764
-
765
- // 单选框后面的文字
766
- span:not(.ant-radio) {
767
- @common-font();
768
- line-height: 39px !important;
769
- color: @common-text-color !important;
770
- padding: 0 !important;
771
- }
772
- }
773
-
774
- // 单选框圆圈
775
- :deep(.ant-radio) {
776
- margin-right: 4px !important;
777
-
778
- .ant-radio-inner {
779
- width: 16px !important;
780
- height: 16px !important;
781
- background: #FFFFFF !important;
782
- border: 1px solid #CDCFD4 !important;
783
- border-radius: 50% !important;
784
- position: relative !important;
785
-
786
- &::after {
787
- width: 10px !important;
788
- height: 10px !important;
789
- background: @common-focus-color !important;
790
- border-radius: 50% !important;
791
- position: absolute !important;
792
- top: 50% !important;
793
- left: 50% !important;
794
- transform: translate(-50%, -50%) !important;
795
- margin: 0 !important;
796
- }
797
- }
798
-
799
- // 选中状态
800
- &.ant-radio-checked .ant-radio-inner {
801
- border-color: @common-focus-color !important;
802
- background: #FFFFFF !important;
803
- }
804
-
805
- // hover 状态
806
- &:hover .ant-radio-inner {
807
- border-color: @common-focus-color !important;
808
- }
809
- }
810
- }
811
-
812
- // small-input-style 小输入框文字样式(32px高度,234px宽度)
813
- &.h-form-small-input-style {
814
- // 输入框基础样式
815
- :deep(.ant-input) {
816
- width: 234px;
817
- height: 32px;
818
- border-radius: 6px;
819
- opacity: 1;
820
- box-sizing: border-box;
821
- border: 1px solid #E5E9F0;
822
-
823
- &::placeholder {
824
- height: 23px;
825
- opacity: 1;
826
- font-family: Source Han Sans;
827
- font-size: 16px;
828
- font-weight: normal;
829
- line-height: 32px;
830
- letter-spacing: 0em;
831
- font-feature-settings: "kern" on;
832
- color: #A7A7A7;
833
- }
834
- }
835
-
836
- :deep(.ant-input-affix-wrapper) {
837
- width: 234px;
838
- height: 32px;
839
- border-radius: 6px;
840
- opacity: 1;
841
- box-sizing: border-box;
842
- border: 1px solid #E5E9F0;
843
-
844
- &::placeholder {
845
- height: 23px;
846
- opacity: 1;
847
- font-family: Source Han Sans;
848
- font-size: 16px;
849
- font-weight: normal;
850
- line-height: 32px;
851
- letter-spacing: 0em;
852
-
853
- font-feature-settings: "kern" on;
854
- color: #A7A7A7;
855
- }
856
-
857
- .ant-input {
858
- font-family: Source Han Sans;
859
- font-size: 16px;
860
- font-weight: normal;
861
- line-height: 32px;
862
- letter-spacing: 0em;
863
-
864
- font-feature-settings: "kern" on;
865
- color: #313131;
866
- }
867
- }
868
-
869
- // 输入框文字样式
870
- :deep(.ant-input) {
871
- font-family: Source Han Sans;
872
- font-size: 16px;
873
- font-weight: normal;
874
- line-height: 32px;
875
- letter-spacing: 0em;
876
-
877
- font-feature-settings: "kern" on;
878
- color: #313131;
879
- }
880
-
881
- // 下拉框样式
882
- :deep(.ant-select) {
883
- width: 234px;
884
-
885
- .ant-select-selector {
886
- width: 234px !important;
887
- height: 32px !important;
888
- padding: 0 11px !important;
889
- border-radius: 6px !important;
890
- border: 1px solid #E5E9F0 !important;
891
- background: #fff !important;
892
- }
893
-
894
- .ant-select-selection-placeholder,
895
- .ant-select-selection__placeholder,
896
- .ant-select-search__field__placeholder {
897
- position: absolute !important;
898
- top: 0 !important;
899
- right: 11px !important;
900
- max-width: 100% !important;
901
- height: 32px !important;
902
- margin-top: 0 !important;
903
- overflow: hidden !important;
904
- color: #A7A7A7 !important;
905
- line-height: 30px !important;
906
- white-space: nowrap !important;
907
- text-overflow: ellipsis !important;
908
- font-family: Source Han Sans !important;
909
- font-size: 16px !important;
910
- font-weight: normal !important;
911
- letter-spacing: 0em !important;
912
- font-feature-settings: "kern" on !important;
913
- }
914
-
915
- .ant-select-selection-selected-value {
916
- opacity: 1;
917
- font-family: Source Han Sans;
918
- font-size: 16px;
919
- font-weight: normal;
920
- line-height: 32px;
921
- letter-spacing: 0em;
922
-
923
- font-feature-settings: "kern" on;
924
- color: #313131;
925
- }
926
- }
927
-
928
- // 单选按钮组样式
929
- :deep(.ant-radio-group) {
930
- display: inline-flex;
931
- flex-wrap: wrap;
932
- gap: 0;
933
- }
934
-
935
- :deep(.ant-radio-button-wrapper) {
936
- height: 32px;
937
- line-height: 32px;
938
- padding: 0 7px;
939
- font-family: Source Han Sans;
940
- font-size: 16px;
941
- font-weight: normal;
942
- letter-spacing: 0em;
943
-
944
- font-feature-settings: "kern" on;
945
- color: #313131;
946
- background: #fff;
947
- border: 1px solid #E5E9F0;
948
- border-radius: 0;
949
-
950
- &:first-child {
951
- border-radius: 6px 0 0 6px;
952
- }
953
-
954
- &:last-child {
955
- border-radius: 0 6px 6px 0;
956
- }
957
-
958
- &:not(:first-child)::before {
959
- display: none;
960
- }
961
-
962
- .ant-radio-button {
963
- display: none;
964
- }
965
-
966
- .ant-radio-button-input {
967
- display: none;
968
- }
969
-
970
- & > span:not(.ant-radio-button) {
971
- font-family: Source Han Sans;
972
- font-size: 16px;
973
- font-weight: normal;
974
- line-height: 32px;
975
- letter-spacing: 0em;
976
- color: #313131;
977
-
978
- font-feature-settings: "kern" on;
979
- }
980
- }
981
-
982
- :deep(.ant-radio-button-wrapper-checked) {
983
- background: #0057FE;
984
- border-color: #0057FE;
985
-
986
- & > span:not(.ant-radio-button) {
987
- color: #fff;
988
- }
989
- }
990
-
991
- // 单选框样式
992
- :deep(.ant-radio-wrapper) {
993
- height: 40px;
994
- line-height: 40px;
995
- font-family: Source Han Sans;
996
- font-size: 16px;
997
- font-weight: normal;
998
- letter-spacing: 0em;
999
- font-feature-settings: "kern" on;
1000
- color: #313131;
1001
-
1002
- .ant-radio {
1003
- width: 16px;
1004
- height: 16px;
1005
- opacity: 1;
1006
-
1007
- .ant-radio-inner {
1008
- width: 16px;
1009
- height: 16px;
1010
- background: #FFFFFF;
1011
- box-sizing: border-box;
1012
- border: 1px solid #CDCFD4;
1013
- border-radius: 50%;
1014
-
1015
- &::after {
1016
- width: 8px;
1017
- height: 8px;
1018
- background: #0057FE;
1019
- border-radius: 50%;
1020
- top: 50%;
1021
- left: 50%;
1022
- transform: translate(-50%, -50%);
1023
- }
1024
- }
1025
- }
1026
-
1027
- .ant-radio-checked {
1028
- .ant-radio-inner {
1029
- border-color: #0057FE;
1030
- }
1031
- }
1032
-
1033
- span:not(.ant-radio) {
1034
- font-family: Source Han Sans;
1035
- font-size: 16px;
1036
- font-weight: normal;
1037
- line-height: 40px;
1038
- letter-spacing: 0em;
1039
- color: #313131;
1040
-
1041
- font-feature-settings: "kern" on;
1042
- }
1043
- }
1044
- }
1045
- // select-inside-label-style 下拉框label在选择框内部样式
1046
- &.h-form-select-inside-label-style {
1047
- // 隐藏原有的 label
1048
- :deep(.ant-form-item-label) {
1049
- display: none !important;
1050
- }
1051
-
1052
- // 普通输入框样式
1053
- :deep(.ant-input:not(textarea)) {
1054
- border-radius: 6px !important;
1055
- border: 1px solid #E5E9F0 !important;
1056
- height: 32px !important;
1057
- line-height: 37px !important;
1058
- padding: 0 11px !important;
1059
- font-family: 'Source Han Sans', sans-serif;
1060
- font-size: 16px;
1061
- font-weight: normal;
1062
- line-height: normal;
1063
- letter-spacing: 0em;
1064
- color: #313131;
1065
-
1066
- &::placeholder {
1067
- color: #999 !important;
1068
- }
1069
-
1070
- &:hover,
1071
- &:focus {
1072
- border-color: #0057FE !important;
1073
- }
1074
- }
1075
-
1076
- // 文本域样式
1077
- :deep(textarea.ant-input) {
1078
- border-radius: 6px !important;
1079
- border: 1px solid #E5E9F0 !important;
1080
- min-height: 80px !important;
1081
- padding: 8px 11px !important;
1082
- font-family: 'Source Han Sans', sans-serif;
1083
- font-size: 16px;
1084
- font-weight: normal;
1085
- line-height: normal;
1086
- letter-spacing: 0em;
1087
- color: #313131;
1088
-
1089
- &::placeholder {
1090
- color: #999 !important;
1091
- }
1092
- }
1093
-
1094
- // 下拉框样式
1095
- :deep(.ant-select) {
1096
- .ant-select-selector {
1097
- border-radius: 6px !important;
1098
- border: 1px solid #E5E9F0 !important;
1099
- background: #fff !important;
1100
- height: 32px !important;
1101
- padding: 0 11px !important;
1102
- position: relative !important;
1103
-
1104
- &:hover,
1105
- &:focus {
1106
- border-color: #0057FE !important;
1107
- }
1108
- }
1109
-
1110
- // 聚焦时去掉阴影,保持与输入框一致
1111
- &.ant-select-focused .ant-select-selector {
1112
- border-color: #0057FE !important;
1113
- box-shadow: none !important;
1114
- }
1115
-
1116
- // 强制 placeholder 始终显示
1117
- .ant-select-selection__placeholder {
1118
- position: absolute !important;
1119
- left: 0 !important;
1120
- top: 50% !important;
1121
- transform: translateY(-50%) !important;
1122
- opacity: 1 !important;
1123
- visibility: visible !important;
1124
- display: flex !important;
1125
- align-items: center !important;
1126
- height: 32px !important;
1127
- font-family: 'Source Han Sans', sans-serif !important;
1128
- font-size: 16px !important;
1129
- font-weight: normal !important;
1130
- color: #313131 !important;
1131
- pointer-events: none !important;
1132
- z-index: 10 !important;
1133
- margin: 0 !important;
1134
- padding: 0 !important;
1135
- }
1136
-
1137
- // 选中的值
1138
- .ant-select-selection-selected-value {
1139
- display: block !important;
1140
- margin-left: 111px !important;
1141
- font-family: 'Source Han Sans', sans-serif !important;
1142
- font-size: 16px !important;
1143
- font-weight: normal !important;
1144
- color: #313131 !important;
1145
- line-height: 32px !important;
1146
- height: 32px !important;
1147
- overflow: hidden !important;
1148
- text-overflow: ellipsis !important;
1149
- white-space: nowrap !important;
1150
- max-width: calc(234px - 111px - 22px) !important;
1151
- }
1152
- }
1153
-
1154
- // 强制覆盖 antd 隐藏 placeholder 的规则
1155
- :deep(.ant-select-single.ant-select-show-arrow .ant-select-selection__placeholder) {
1156
- opacity: 1 !important;
1157
- visibility: visible !important;
1158
- }
1159
-
1160
- // ========== 新增样式:覆盖下拉框宽度、高度、边框 ==========
1161
- :deep(.ant-select) {
1162
- width: 234px !important;
1163
-
1164
- .ant-select-selector {
1165
- width: 234px !important;
1166
- height: 32px !important;
1167
- border-radius: 6px !important;
1168
- background: #FFFFFF !important;
1169
- box-sizing: border-box !important;
1170
- border: 1px solid #E5E9F0 !important;
1171
- }
1172
- }
1173
-
1174
- // ========== 新增样式:下拉框图标 ==========
1175
- :deep(.ant-select-arrow) {
1176
- .anticon {
1177
- svg {
1178
- width: 7px !important;
1179
- height: 13px !important;
1180
- fill: #94979E !important;
1181
- }
1182
- }
1183
- }
1184
- }
1185
- }
1186
- </style>
1
+ <script setup>
2
+ import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
3
+ import { ref, computed, useAttrs } from 'vue'
4
+
5
+ const xAddNativeFormRef = ref()
6
+
7
+ const attrs = useAttrs()
8
+ const props = defineProps({
9
+ // 是否启用 horizontal 模式的自定义配置
10
+ enableHorizontalCustom: {
11
+ type: Boolean,
12
+ default: false
13
+ }
14
+ })
15
+ // 从 radio-style_1 属性值中获取 padding
16
+ const radioPadding = computed(() => {
17
+ const val = attrs['radio-style_1']
18
+ if (val !== undefined && val !== '' && val !== null) {
19
+ const num = Number(val)
20
+ return isNaN(num) ? 9 : num
21
+ }
22
+ return 9
23
+ })
24
+
25
+ // 包装器样式对象
26
+ const wrapperStyleObject = computed(() => {
27
+ return {
28
+ '--radio-padding': `${radioPadding.value}px`
29
+ }
30
+ })
31
+
32
+ // 启动时间选择框弹出到body
33
+ const enablePopupToBody = computed(() => {
34
+ const a = attrs
35
+ return a.enablePopupToBody === 'true' || a.enablePopupToBody === true
36
+ })
37
+ const wrapperClassObject = computed(() => {
38
+ const a = attrs
39
+ const classes = {}
40
+
41
+ // 1) 多个布尔型样式开关(存在且为真则生效)
42
+ const booleanStyleKeys = [
43
+ 'query-conditions',
44
+ 'padding-50',
45
+ 'label-text-horizontal',
46
+ 'label-text-justify',
47
+ 'simple-inline',
48
+ 'simple-inline-show-label',
49
+ 'label-justify',
50
+ 'charge-form',
51
+ 'mini-form',
52
+ 'content-right',
53
+ 'label-font-style',
54
+ 'small-input-style',
55
+ 'select-inside-label-style'
56
+ ]
57
+ // 只要属性存在就生效的样式开关
58
+ const existStyleKeys = ['radio-style_1']
59
+ for (const key of booleanStyleKeys) {
60
+ const val = a[key]
61
+ const truthy = val === true || val === '' || val === 'true'
62
+ if (truthy) classes[`h-form-${key}`] = true
63
+ }
64
+ // 检查存在即生效的样式开关
65
+ for (const key of existStyleKeys) {
66
+ if (key in a) classes[`h-form-${key}`] = true
67
+ }
68
+
69
+ return classes
70
+ })
71
+
72
+ defineExpose({
73
+ getXAddNativeFormInstance: () => xAddNativeFormRef.value,
74
+ init: (params) => xAddNativeFormRef.value && xAddNativeFormRef.value.init && xAddNativeFormRef.value.init(params),
75
+ asyncSubmit: () => xAddNativeFormRef.value && xAddNativeFormRef.value.asyncSubmit && xAddNativeFormRef.value.asyncSubmit(),
76
+ validateForm: () => xAddNativeFormRef.value && xAddNativeFormRef.value.validateForm && xAddNativeFormRef.value.validateForm(),
77
+ /** 等待配置结束的异步方法,委托给内部 XAddNativeForm */
78
+ waitConfigEnd: () => xAddNativeFormRef.value?.waitConfigEnd?.() ?? Promise.resolve()
79
+ })
80
+
81
+ </script>
82
+
83
+ <template>
84
+ <div
85
+ class="h-form-wrapper"
86
+ :class="[
87
+ wrapperClassObject
88
+ ]"
89
+ :style="wrapperStyleObject"
90
+ >
91
+
92
+ <x-add-native-form
93
+ ref="xAddNativeFormRef"
94
+ v-bind="$attrs"
95
+ :enable-popup-to-body="enablePopupToBody"
96
+ :enable-horizontal-custom="props.enableHorizontalCustom"
97
+ @configEnd="$emit('configEnd')"
98
+ v-on="$listeners"
99
+ >
100
+ <template v-for="(_, name) in $slots" #[name]="slotData">
101
+ <slot :name="name" v-bind="slotData" />
102
+ </template>
103
+ </x-add-native-form>
104
+ </div>
105
+ </template>
106
+
107
+ <style scoped lang="less">
108
+ // 单选框 padding 变量
109
+ @radio-padding: var(--radio-padding, 9px);
110
+
111
+ .h-form-wrapper {
112
+ // 基础样式
113
+ :deep(.ant-form-item) {
114
+ margin-bottom: 4px;
115
+ }
116
+
117
+ &.h-form-mini-form {
118
+ :deep(.ant-form-inline) {
119
+ .ant-row-flex {
120
+ .ant-col {
121
+ flex: auto !important;
122
+ max-width: 250px !important;
123
+ }
124
+ }
125
+ }
126
+
127
+ :deep(.ant-form-item) {
128
+ margin-right: 0px !important;
129
+ }
130
+ }
131
+
132
+ &.h-form-content-right {
133
+ :deep(.ant-form-inline) {
134
+ .ant-row-flex {
135
+ justify-content: right;
136
+ }
137
+ }
138
+ }
139
+
140
+ // query-conditions 样式
141
+ &.h-form-query-conditions {
142
+ :deep(.ant-card-body) {
143
+ padding: 0px;
144
+ }
145
+
146
+ :deep(.ant-row-flex) {
147
+ .x-form-col-wrapper {
148
+ .ant-form-item {
149
+ display: flex !important;
150
+ width: 100%;
151
+ height: 100%;
152
+ margin-bottom: 0px;
153
+ justify-content: space-between;
154
+
155
+ .ant-form-item-label {
156
+ display: flex;
157
+ align-items: center;
158
+ height: 100%;
159
+
160
+ label {
161
+ height: auto;
162
+ font-family: Source Han Sans;
163
+ font-size: 16px;
164
+ font-weight: normal;
165
+ line-height: normal;
166
+ color: #313131;
167
+ display: block !important; // 保持 block 以支持两端对齐
168
+ width: 100%;
169
+ white-space: nowrap;
170
+ margin: 0;
171
+ text-align: justify;
172
+ text-align-last: justify;
173
+ text-justify: inter-ideograph;
174
+ box-sizing: border-box;
175
+ padding-right: 0 !important; // 移除冒号预留空间
176
+
177
+ // 使用 line-height 实现垂直居中
178
+ line-height: 40px; // 设置与容器高度相同的行高
179
+ }
180
+
181
+ & > label::after {
182
+ display: none !important;
183
+ }
184
+ }
185
+ }
186
+ }
187
+
188
+ .ant-col-24 {
189
+ padding: 0px 4px !important;
190
+ }
191
+ }
192
+ }
193
+
194
+ // 单选框样式设计图中切换模式的样式
195
+ &.h-form-radio-style_1 {
196
+ :deep(.ant-radio-button-wrapper) {
197
+ padding: 0 @radio-padding;
198
+ }
199
+
200
+ :deep(.ant-radio-button-wrapper-checked) {
201
+ background-color: #0057FE;
202
+ color: white;
203
+ }
204
+ }
205
+
206
+ &.h-form-simple-inline {
207
+ :deep(.ant-form-item-label) {
208
+ display: none !important;
209
+ }
210
+
211
+ :deep(.ant-form-item-control-wrapper) {
212
+ width: 100%;
213
+ }
214
+ }
215
+
216
+ &.h-form-padding-50 {
217
+ // ant-row-flex 样式
218
+ :deep(.ant-row-flex) {
219
+ padding-left: 50px;
220
+ padding-right: 50px
221
+ }
222
+ }
223
+
224
+ // 单选框样式设计图中切换模式的样式
225
+ &.h-form-radio-style_1 {
226
+ :deep(.ant-radio-button-wrapper) {
227
+ padding: 0 @radio-padding;
228
+ }
229
+
230
+ :deep(.ant-radio-button-wrapper-checked) {
231
+ background-color: #0057FE;
232
+ color: white;
233
+ }
234
+ }
235
+
236
+ // charge-form 样式
237
+ &.h-form-charge-form {
238
+ margin-top: 2px !important;
239
+ // 定义变量
240
+ @font-common: {
241
+ font-family: 'Source Han Sans', sans-serif;
242
+ font-size: 16px;
243
+ font-weight: normal;
244
+ letter-spacing: 0em;
245
+ font-feature-settings: "kern" on;
246
+ };
247
+
248
+ @color-primary: #313131;
249
+ @color-placeholder: #999999;
250
+
251
+ // 定义混合宏
252
+ .input-base() {
253
+ width: 100%;
254
+ height: 30px;
255
+ line-height: 30px;
256
+ vertical-align: top;
257
+ margin: 0;
258
+ text-align: left;
259
+ color: @color-primary;
260
+ opacity: 1;
261
+ @font-common();
262
+ }
263
+
264
+ .placeholder-base() {
265
+ color: @color-placeholder;
266
+ opacity: 1;
267
+ @font-common();
268
+ }
269
+
270
+ .option-group-base() {
271
+ height: 30px;
272
+ line-height: 30px;
273
+ display: flex;
274
+ align-items: center;
275
+
276
+ .ant-radio-wrapper,
277
+ .ant-checkbox-wrapper {
278
+ height: 30px;
279
+ line-height: 30px;
280
+ margin-right: 16px;
281
+ }
282
+ }
283
+
284
+ :deep(.ant-form-item) {
285
+ margin-bottom: 16px;
286
+ margin-top: 0;
287
+ padding: 0;
288
+ display: flex;
289
+ align-items: center;
290
+
291
+ .ant-form-item-label {
292
+ text-align: left;
293
+ margin: 0 11px 0 0 !important;
294
+ width: 64px;
295
+ min-width: 64px;
296
+ max-width: 64px;
297
+ flex-shrink: 0;
298
+
299
+ label {
300
+ height: 23px;
301
+ opacity: 1;
302
+ line-height: 23px;
303
+ color: @color-primary;
304
+ margin: 0;
305
+ padding: 0;
306
+ white-space: nowrap;
307
+ display: block;
308
+ @font-common();
309
+
310
+ // 移除冒号
311
+ &::after {
312
+ content: '';
313
+ }
314
+ }
315
+ }
316
+
317
+ .ant-form-item-control-wrapper {
318
+ margin: 0;
319
+ padding: 0;
320
+ flex: 1;
321
+ min-width: 0;
322
+ display: flex;
323
+ align-items: center;
324
+
325
+ .ant-form-item-control {
326
+ margin: 0;
327
+ padding: 0;
328
+ width: 100%;
329
+ text-align: left;
330
+ line-height: 30px !important;
331
+
332
+ // 输入框样式统一
333
+ .ant-input,
334
+ .ant-input-affix-wrapper,
335
+ .ant-select,
336
+ .ant-input-number,
337
+ .ant-picker,
338
+ .ant-radio-group,
339
+ .ant-checkbox-group {
340
+ .input-base();
341
+ }
342
+
343
+ // 选择器样式
344
+ .ant-select {
345
+ .ant-select-selector {
346
+ .input-base();
347
+ height: 30px;
348
+ line-height: 30px;
349
+
350
+ .ant-select-selection-item {
351
+ .input-base();
352
+ line-height: 30px;
353
+ }
354
+
355
+ .ant-select-selection-placeholder {
356
+ .placeholder-base();
357
+ line-height: 30px;
358
+ color: #313131;
359
+ }
360
+ }
361
+ }
362
+
363
+ // 日期选择器样式
364
+ .ant-picker {
365
+ height: 30px;
366
+
367
+ .ant-picker-input {
368
+ height: 30px;
369
+ line-height: 30px;
370
+ .input-base();
371
+
372
+ input {
373
+ .input-base();
374
+ height: 30px;
375
+ line-height: 30px;
376
+ }
377
+ }
378
+ }
379
+
380
+ // 数字输入框样式
381
+ .ant-input-number {
382
+ height: 30px;
383
+
384
+ .ant-input-number-input {
385
+ .input-base();
386
+ height: 30px;
387
+ line-height: 30px;
388
+ }
389
+ }
390
+
391
+ // 单选框组样式
392
+ .ant-radio-group {
393
+ .option-group-base();
394
+ }
395
+
396
+ // 复选框组样式
397
+ .ant-checkbox-group {
398
+ .option-group-base();
399
+ }
400
+ }
401
+ }
402
+ }
403
+
404
+ // 重置可能的容器边距
405
+ :deep(.ant-row) {
406
+ margin: 0;
407
+ padding: 0;
408
+
409
+ .ant-col {
410
+ margin: 0;
411
+ padding: 0;
412
+ }
413
+ }
414
+
415
+ // 强制重置所有可能的表单项样式
416
+ :deep(.ant-form-item) {
417
+ margin: 0 0 16px 0 !important;
418
+
419
+ // 重置可能的内部边距
420
+ .ant-form-item-control-input,
421
+ .ant-form-item-control-input-content {
422
+ margin: 0 !important;
423
+ padding: 0 !important;
424
+ }
425
+ }
426
+ }
427
+
428
+ // label-text-horizontal 样式 - 只控制label文字从左到右排列
429
+ &.h-form-label-text-horizontal {
430
+ :deep(.ant-form-item-label) {
431
+ text-align: left;
432
+ direction: ltr;
433
+
434
+ // 标签文字水平排列
435
+ .ant-form-item-label-text {
436
+ display: inline-block;
437
+ text-align: left;
438
+ direction: ltr;
439
+ unicode-bidi: normal;
440
+ }
441
+
442
+ // 必填标识水平排列
443
+ .ant-form-item-required::before {
444
+ margin-right: 4px;
445
+ margin-left: 0;
446
+ }
447
+ }
448
+ }
449
+
450
+ // label-text-justify 样式 - 标签文字两端对齐分散占满 必填*可能会有问题
451
+ &.h-form-label-text-justify {
452
+ :deep(.ant-form-item-label) {
453
+ padding-left: 0;
454
+ padding-right: 8px;
455
+
456
+ label {
457
+ position: relative;
458
+ display: block;
459
+ width: 100%;
460
+ white-space: nowrap;
461
+ margin: 0;
462
+ text-indent: 0;
463
+ text-align: justify;
464
+ text-align-last: justify;
465
+ text-justify: inter-ideograph;
466
+ box-sizing: border-box;
467
+ padding-right: 12px; // 给绝对定位的冒号留出空间
468
+ }
469
+
470
+ // 将冒号绝对定位到最右侧,避免参与两端对齐计算
471
+ label::after {
472
+ position: absolute;
473
+ right: 0;
474
+ }
475
+ }
476
+ }
477
+
478
+ // label-justify 样式 - 两端对齐,应用指定字体样式
479
+ &.h-form-label-justify {
480
+ padding-left: 8px;
481
+
482
+ :deep(.ant-form-item-label) {
483
+ padding-left: 0;
484
+ padding-right: 8px;
485
+ // 限制label容器的宽度,强制两端对齐
486
+ width: 80px !important;
487
+ min-width: 80px;
488
+ max-width: 80px;
489
+
490
+ label {
491
+ position: relative;
492
+ display: block;
493
+ width: 100%;
494
+ white-space: nowrap;
495
+ margin: 0;
496
+ text-indent: 0;
497
+ text-align: justify;
498
+ text-align-last: justify;
499
+ text-justify: inter-ideograph;
500
+ box-sizing: border-box;
501
+ padding-right: 12px; // 给绝对定位的冒号留出空间
502
+
503
+ // 应用指定的字体样式
504
+ height: 39px;
505
+ opacity: 1;
506
+ font-family: 'Source Han Sans', sans-serif;
507
+ font-size: 16px;
508
+ font-weight: normal;
509
+ line-height: 39px;
510
+ color: #313131;
511
+ }
512
+
513
+ // 去掉冒号
514
+ label::after {
515
+ content: '';
516
+ }
517
+ }
518
+ }
519
+
520
+ // label-font-style 样式 - 独立的label字体样式
521
+ &.h-form-label-font-style {
522
+ :deep(.ant-form-item-label) {
523
+ label {
524
+ height: 23px;
525
+ opacity: 1;
526
+ font-family: Source Han Sans;
527
+ font-size: 16px;
528
+ font-weight: normal;
529
+ line-height: normal;
530
+ letter-spacing: 0em;
531
+ font-feature-settings: "kern" on;
532
+ color: #313131;
533
+ }
534
+ }
535
+ }
536
+
537
+ &.h-form-simple-inline-show-label {
538
+ // ========== 公共字体样式变量 ==========
539
+ @common-font: {
540
+ font-family: Source Han Sans !important;
541
+ font-size: 16px !important;
542
+ font-weight: normal !important;
543
+ letter-spacing: 0em !important;
544
+ font-feature-settings: "kern" on !important;
545
+ };
546
+
547
+ @common-text-color: #313131;
548
+ @common-placeholder-color: #999;
549
+ @common-border-color: #E5E9F0;
550
+ @common-focus-color: #0057FE;
551
+
552
+ // ========== 表单项基础布局 ==========
553
+ :deep(.ant-form-item) {
554
+ display: flex !important;
555
+ flex-direction: row !important;
556
+ align-items: flex-start !important;
557
+ margin: 0 !important;
558
+ padding: 0 !important;
559
+ margin-bottom: 0 !important;
560
+ }
561
+
562
+ // 修复 ant-row 伪元素
563
+ :deep(.ant-row) {
564
+ &::before,
565
+ &::after {
566
+ display: table !important;
567
+ content: '' !important;
568
+ }
569
+ }
570
+
571
+ // ========== Label 样式 ==========
572
+ :deep(.ant-form-item-label) {
573
+ display: flex !important;
574
+ align-items: flex-start !important;
575
+ padding: 0 8px 0 0 !important;
576
+ width: 90px !important;
577
+ min-width: 90px !important;
578
+ max-width: 90px !important;
579
+ flex-shrink: 0 !important;
580
+ flex: none !important;
581
+
582
+ label {
583
+ position: relative !important;
584
+ display: block !important;
585
+ width: 100% !important;
586
+ height: 39px !important;
587
+ margin: 0 !important;
588
+ padding: 0 !important;
589
+ opacity: 1 !important;
590
+ @common-font();
591
+ line-height: 39px !important;
592
+ color: @common-text-color !important;
593
+ text-align: justify !important;
594
+ text-align-last: justify !important;
595
+ text-justify: inter-ideograph !important;
596
+ text-indent: 12px !important;
597
+ box-sizing: border-box !important;
598
+
599
+ &::after {
600
+ display: none !important;
601
+ content: none !important;
602
+ }
603
+
604
+ &:not(.ant-form-item-required)::before {
605
+ display: none !important;
606
+ content: none !important;
607
+ }
608
+ }
609
+ }
610
+
611
+ // 必填项星号
612
+ :deep(.ant-form-item-required) {
613
+ &::before {
614
+ display: block !important;
615
+ visibility: visible !important;
616
+ content: '*' !important;
617
+ position: absolute !important;
618
+ left: -8px !important;
619
+ top: 40% !important;
620
+ transform: translateY(-50%) !important;
621
+ color: #ff4d4f !important;
622
+ font-size: 14px !important;
623
+ font-family: SimSun, sans-serif !important;
624
+ z-index: 1 !important;
625
+ line-height: 1 !important;
626
+ }
627
+ }
628
+
629
+ // ========== 控件容器 ==========
630
+ :deep(.ant-form-item-control-wrapper) {
631
+ flex: 1 !important;
632
+ min-width: 0 !important;
633
+ width: auto !important;
634
+
635
+ .ant-form-item-control {
636
+ width: 100% !important;
637
+
638
+ .ant-form-item-children {
639
+ display: block !important;
640
+ width: 100% !important;
641
+ padding-right: 41px;
642
+ padding-left: 6px;
643
+ }
644
+ }
645
+ }
646
+
647
+ // ========== 公共输入框样式 Mixin ==========
648
+ .input-common() {
649
+ border-radius: 6px !important;
650
+ box-sizing: border-box !important;
651
+ border: 1px solid @common-border-color !important;
652
+ @common-font();
653
+ color: @common-text-color !important;
654
+
655
+ &:hover,
656
+ &:focus {
657
+ border-color: @common-focus-color !important;
658
+ box-shadow: none !important;
659
+ }
660
+
661
+ &[readonly] {
662
+ background-color: #f5f5f5;
663
+ cursor: not-allowed;
664
+ }
665
+ }
666
+
667
+ // ========== 普通输入框(不包括文本域) ==========
668
+ :deep(.ant-input:not(textarea)) {
669
+ .input-common();
670
+ height: 39px !important;
671
+ line-height: 37px !important;
672
+ padding: 0 11px !important;
673
+
674
+ &::placeholder {
675
+ line-height: 37px !important;
676
+ color: @common-placeholder-color !important;
677
+ }
678
+ }
679
+
680
+ // ========== 文本域样式 ==========
681
+ :deep(textarea.ant-input) {
682
+ .input-common();
683
+ min-height: 80px !important;
684
+ padding: 8px 11px !important;
685
+ line-height: 22px !important;
686
+ resize: vertical !important;
687
+
688
+ &::placeholder {
689
+ color: @common-placeholder-color !important;
690
+ line-height: 22px !important;
691
+ }
692
+ }
693
+
694
+ // ========== 下拉框样式 ==========
695
+ :deep(.ant-select) {
696
+ .ant-select-selection {
697
+ border-radius: 6px !important;
698
+ border: 1px solid @common-border-color !important;
699
+ height: 39px !important;
700
+
701
+ &:hover {
702
+ border-color: @common-focus-color !important;
703
+ }
704
+ }
705
+
706
+ .ant-select-selection__rendered {
707
+ height: 39px !important;
708
+ line-height: 39px !important;
709
+ margin: 0 !important;
710
+ padding: 0 11px !important;
711
+ }
712
+
713
+ .ant-select-selection__placeholder {
714
+ @common-font();
715
+ color: @common-placeholder-color !important;
716
+ line-height: 37px !important;
717
+ height: 37px !important;
718
+ top: 0 !important;
719
+ margin-top: 0 !important;
720
+ padding-left: 11px;
721
+ }
722
+
723
+ .ant-select-selection-selected-value {
724
+ @common-font();
725
+ color: @common-text-color !important;
726
+ line-height: 37px !important;
727
+ padding: 0 !important;
728
+ }
729
+
730
+ .ant-select-arrow {
731
+ right: 11px !important;
732
+ top: 50% !important;
733
+ transform: translateY(-50%) !important;
734
+
735
+ .ant-select-arrow-icon {
736
+ color: @common-placeholder-color !important;
737
+ }
738
+ }
739
+ }
740
+
741
+ :deep(.ant-select-focused) {
742
+ .ant-select-selection {
743
+ border-color: @common-focus-color !important;
744
+ box-shadow: none !important;
745
+ }
746
+ }
747
+
748
+ // ========== 单选框样式 ==========
749
+ :deep(.ant-radio-group) {
750
+ display: flex !important;
751
+ align-items: center !important;
752
+ height: 39px !important;
753
+ line-height: 39px !important;
754
+ }
755
+
756
+ :deep(.ant-radio-wrapper) {
757
+ @common-font();
758
+ line-height: 39px !important;
759
+ color: @common-text-color !important;
760
+ margin-right: 16px !important;
761
+ height: 39px !important;
762
+ display: inline-flex !important;
763
+ align-items: center !important;
764
+
765
+ // 单选框后面的文字
766
+ span:not(.ant-radio) {
767
+ @common-font();
768
+ line-height: 39px !important;
769
+ color: @common-text-color !important;
770
+ padding: 0 !important;
771
+ }
772
+ }
773
+
774
+ // 单选框圆圈
775
+ :deep(.ant-radio) {
776
+ margin-right: 4px !important;
777
+
778
+ .ant-radio-inner {
779
+ width: 16px !important;
780
+ height: 16px !important;
781
+ background: #FFFFFF !important;
782
+ border: 1px solid #CDCFD4 !important;
783
+ border-radius: 50% !important;
784
+ position: relative !important;
785
+
786
+ &::after {
787
+ width: 10px !important;
788
+ height: 10px !important;
789
+ background: @common-focus-color !important;
790
+ border-radius: 50% !important;
791
+ position: absolute !important;
792
+ top: 50% !important;
793
+ left: 50% !important;
794
+ transform: translate(-50%, -50%) !important;
795
+ margin: 0 !important;
796
+ }
797
+ }
798
+
799
+ // 选中状态
800
+ &.ant-radio-checked .ant-radio-inner {
801
+ border-color: @common-focus-color !important;
802
+ background: #FFFFFF !important;
803
+ }
804
+
805
+ // hover 状态
806
+ &:hover .ant-radio-inner {
807
+ border-color: @common-focus-color !important;
808
+ }
809
+ }
810
+ }
811
+
812
+ // small-input-style 小输入框文字样式(32px高度,234px宽度)
813
+ &.h-form-small-input-style {
814
+ // 输入框基础样式
815
+ :deep(.ant-input) {
816
+ width: 234px;
817
+ height: 32px;
818
+ border-radius: 6px;
819
+ opacity: 1;
820
+ box-sizing: border-box;
821
+ border: 1px solid #E5E9F0;
822
+
823
+ &::placeholder {
824
+ height: 23px;
825
+ opacity: 1;
826
+ font-family: Source Han Sans;
827
+ font-size: 16px;
828
+ font-weight: normal;
829
+ line-height: 32px;
830
+ letter-spacing: 0em;
831
+ font-feature-settings: "kern" on;
832
+ color: #A7A7A7;
833
+ }
834
+ }
835
+
836
+ :deep(.ant-input-affix-wrapper) {
837
+ width: 234px;
838
+ height: 32px;
839
+ border-radius: 6px;
840
+ opacity: 1;
841
+ box-sizing: border-box;
842
+ border: 1px solid #E5E9F0;
843
+
844
+ &::placeholder {
845
+ height: 23px;
846
+ opacity: 1;
847
+ font-family: Source Han Sans;
848
+ font-size: 16px;
849
+ font-weight: normal;
850
+ line-height: 32px;
851
+ letter-spacing: 0em;
852
+
853
+ font-feature-settings: "kern" on;
854
+ color: #A7A7A7;
855
+ }
856
+
857
+ .ant-input {
858
+ font-family: Source Han Sans;
859
+ font-size: 16px;
860
+ font-weight: normal;
861
+ line-height: 32px;
862
+ letter-spacing: 0em;
863
+
864
+ font-feature-settings: "kern" on;
865
+ color: #313131;
866
+ }
867
+ }
868
+
869
+ // 输入框文字样式
870
+ :deep(.ant-input) {
871
+ font-family: Source Han Sans;
872
+ font-size: 16px;
873
+ font-weight: normal;
874
+ line-height: 32px;
875
+ letter-spacing: 0em;
876
+
877
+ font-feature-settings: "kern" on;
878
+ color: #313131;
879
+ }
880
+
881
+ // 下拉框样式
882
+ :deep(.ant-select) {
883
+ width: 234px;
884
+
885
+ .ant-select-selector {
886
+ width: 234px !important;
887
+ height: 32px !important;
888
+ padding: 0 11px !important;
889
+ border-radius: 6px !important;
890
+ border: 1px solid #E5E9F0 !important;
891
+ background: #fff !important;
892
+ }
893
+
894
+ .ant-select-selection-placeholder,
895
+ .ant-select-selection__placeholder,
896
+ .ant-select-search__field__placeholder {
897
+ position: absolute !important;
898
+ top: 0 !important;
899
+ right: 11px !important;
900
+ max-width: 100% !important;
901
+ height: 32px !important;
902
+ margin-top: 0 !important;
903
+ overflow: hidden !important;
904
+ color: #A7A7A7 !important;
905
+ line-height: 30px !important;
906
+ white-space: nowrap !important;
907
+ text-overflow: ellipsis !important;
908
+ font-family: Source Han Sans !important;
909
+ font-size: 16px !important;
910
+ font-weight: normal !important;
911
+ letter-spacing: 0em !important;
912
+ font-feature-settings: "kern" on !important;
913
+ }
914
+
915
+ .ant-select-selection-selected-value {
916
+ opacity: 1;
917
+ font-family: Source Han Sans;
918
+ font-size: 16px;
919
+ font-weight: normal;
920
+ line-height: 32px;
921
+ letter-spacing: 0em;
922
+
923
+ font-feature-settings: "kern" on;
924
+ color: #313131;
925
+ }
926
+ }
927
+
928
+ // 单选按钮组样式
929
+ :deep(.ant-radio-group) {
930
+ display: inline-flex;
931
+ flex-wrap: wrap;
932
+ gap: 0;
933
+ }
934
+
935
+ :deep(.ant-radio-button-wrapper) {
936
+ height: 32px;
937
+ line-height: 32px;
938
+ padding: 0 7px;
939
+ font-family: Source Han Sans;
940
+ font-size: 16px;
941
+ font-weight: normal;
942
+ letter-spacing: 0em;
943
+
944
+ font-feature-settings: "kern" on;
945
+ color: #313131;
946
+ background: #fff;
947
+ border: 1px solid #E5E9F0;
948
+ border-radius: 0;
949
+
950
+ &:first-child {
951
+ border-radius: 6px 0 0 6px;
952
+ }
953
+
954
+ &:last-child {
955
+ border-radius: 0 6px 6px 0;
956
+ }
957
+
958
+ &:not(:first-child)::before {
959
+ display: none;
960
+ }
961
+
962
+ .ant-radio-button {
963
+ display: none;
964
+ }
965
+
966
+ .ant-radio-button-input {
967
+ display: none;
968
+ }
969
+
970
+ & > span:not(.ant-radio-button) {
971
+ font-family: Source Han Sans;
972
+ font-size: 16px;
973
+ font-weight: normal;
974
+ line-height: 32px;
975
+ letter-spacing: 0em;
976
+ color: #313131;
977
+
978
+ font-feature-settings: "kern" on;
979
+ }
980
+ }
981
+
982
+ :deep(.ant-radio-button-wrapper-checked) {
983
+ background: #0057FE;
984
+ border-color: #0057FE;
985
+
986
+ & > span:not(.ant-radio-button) {
987
+ color: #fff;
988
+ }
989
+ }
990
+
991
+ // 单选框样式
992
+ :deep(.ant-radio-wrapper) {
993
+ height: 40px;
994
+ line-height: 40px;
995
+ font-family: Source Han Sans;
996
+ font-size: 16px;
997
+ font-weight: normal;
998
+ letter-spacing: 0em;
999
+ font-feature-settings: "kern" on;
1000
+ color: #313131;
1001
+
1002
+ .ant-radio {
1003
+ width: 16px;
1004
+ height: 16px;
1005
+ opacity: 1;
1006
+
1007
+ .ant-radio-inner {
1008
+ width: 16px;
1009
+ height: 16px;
1010
+ background: #FFFFFF;
1011
+ box-sizing: border-box;
1012
+ border: 1px solid #CDCFD4;
1013
+ border-radius: 50%;
1014
+
1015
+ &::after {
1016
+ width: 8px;
1017
+ height: 8px;
1018
+ background: #0057FE;
1019
+ border-radius: 50%;
1020
+ top: 50%;
1021
+ left: 50%;
1022
+ transform: translate(-50%, -50%);
1023
+ }
1024
+ }
1025
+ }
1026
+
1027
+ .ant-radio-checked {
1028
+ .ant-radio-inner {
1029
+ border-color: #0057FE;
1030
+ }
1031
+ }
1032
+
1033
+ span:not(.ant-radio) {
1034
+ font-family: Source Han Sans;
1035
+ font-size: 16px;
1036
+ font-weight: normal;
1037
+ line-height: 40px;
1038
+ letter-spacing: 0em;
1039
+ color: #313131;
1040
+
1041
+ font-feature-settings: "kern" on;
1042
+ }
1043
+ }
1044
+ }
1045
+ // select-inside-label-style 下拉框label在选择框内部样式
1046
+ &.h-form-select-inside-label-style {
1047
+ // 隐藏原有的 label
1048
+ :deep(.ant-form-item-label) {
1049
+ display: none !important;
1050
+ }
1051
+
1052
+ // 普通输入框样式
1053
+ :deep(.ant-input:not(textarea)) {
1054
+ border-radius: 6px !important;
1055
+ border: 1px solid #E5E9F0 !important;
1056
+ height: 32px !important;
1057
+ line-height: 37px !important;
1058
+ padding: 0 11px !important;
1059
+ font-family: 'Source Han Sans', sans-serif;
1060
+ font-size: 16px;
1061
+ font-weight: normal;
1062
+ line-height: normal;
1063
+ letter-spacing: 0em;
1064
+ color: #313131;
1065
+
1066
+ &::placeholder {
1067
+ color: #999 !important;
1068
+ }
1069
+
1070
+ &:hover,
1071
+ &:focus {
1072
+ border-color: #0057FE !important;
1073
+ }
1074
+ }
1075
+
1076
+ // 文本域样式
1077
+ :deep(textarea.ant-input) {
1078
+ border-radius: 6px !important;
1079
+ border: 1px solid #E5E9F0 !important;
1080
+ min-height: 80px !important;
1081
+ padding: 8px 11px !important;
1082
+ font-family: 'Source Han Sans', sans-serif;
1083
+ font-size: 16px;
1084
+ font-weight: normal;
1085
+ line-height: normal;
1086
+ letter-spacing: 0em;
1087
+ color: #313131;
1088
+
1089
+ &::placeholder {
1090
+ color: #999 !important;
1091
+ }
1092
+ }
1093
+
1094
+ // 下拉框样式
1095
+ :deep(.ant-select) {
1096
+ .ant-select-selector {
1097
+ border-radius: 6px !important;
1098
+ border: 1px solid #E5E9F0 !important;
1099
+ background: #fff !important;
1100
+ height: 32px !important;
1101
+ padding: 0 11px !important;
1102
+ position: relative !important;
1103
+
1104
+ &:hover,
1105
+ &:focus {
1106
+ border-color: #0057FE !important;
1107
+ }
1108
+ }
1109
+
1110
+ // 聚焦时去掉阴影,保持与输入框一致
1111
+ &.ant-select-focused .ant-select-selector {
1112
+ border-color: #0057FE !important;
1113
+ box-shadow: none !important;
1114
+ }
1115
+
1116
+ // 强制 placeholder 始终显示
1117
+ .ant-select-selection__placeholder {
1118
+ position: absolute !important;
1119
+ left: 0 !important;
1120
+ top: 50% !important;
1121
+ transform: translateY(-50%) !important;
1122
+ opacity: 1 !important;
1123
+ visibility: visible !important;
1124
+ display: flex !important;
1125
+ align-items: center !important;
1126
+ height: 32px !important;
1127
+ font-family: 'Source Han Sans', sans-serif !important;
1128
+ font-size: 16px !important;
1129
+ font-weight: normal !important;
1130
+ color: #313131 !important;
1131
+ pointer-events: none !important;
1132
+ z-index: 10 !important;
1133
+ margin: 0 !important;
1134
+ padding: 0 !important;
1135
+ }
1136
+
1137
+ // 选中的值
1138
+ .ant-select-selection-selected-value {
1139
+ display: block !important;
1140
+ margin-left: 111px !important;
1141
+ font-family: 'Source Han Sans', sans-serif !important;
1142
+ font-size: 16px !important;
1143
+ font-weight: normal !important;
1144
+ color: #313131 !important;
1145
+ line-height: 32px !important;
1146
+ height: 32px !important;
1147
+ overflow: hidden !important;
1148
+ text-overflow: ellipsis !important;
1149
+ white-space: nowrap !important;
1150
+ max-width: calc(234px - 111px - 22px) !important;
1151
+ }
1152
+ }
1153
+
1154
+ // 强制覆盖 antd 隐藏 placeholder 的规则
1155
+ :deep(.ant-select-single.ant-select-show-arrow .ant-select-selection__placeholder) {
1156
+ opacity: 1 !important;
1157
+ visibility: visible !important;
1158
+ }
1159
+
1160
+ // ========== 新增样式:覆盖下拉框宽度、高度、边框 ==========
1161
+ :deep(.ant-select) {
1162
+ width: 234px !important;
1163
+
1164
+ .ant-select-selector {
1165
+ width: 234px !important;
1166
+ height: 32px !important;
1167
+ border-radius: 6px !important;
1168
+ background: #FFFFFF !important;
1169
+ box-sizing: border-box !important;
1170
+ border: 1px solid #E5E9F0 !important;
1171
+ }
1172
+ }
1173
+
1174
+ // ========== 新增样式:下拉框图标 ==========
1175
+ :deep(.ant-select-arrow) {
1176
+ .anticon {
1177
+ svg {
1178
+ width: 7px !important;
1179
+ height: 13px !important;
1180
+ fill: #94979E !important;
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+ </style>