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.
- package/.env.his +19 -19
- package/.history/.eslintrc_20260521171150.js +74 -0
- package/.history/.eslintrc_20260521171213.js +74 -0
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154443.vue +726 -0
- package/.history/src/base-client/components/common/HIS/HAddNativeForm/HAddNativeForm_20260601154700.vue +478 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260611152602.vue +755 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702161223.vue +748 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702163310.vue +832 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702163324.vue +748 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702165416.vue +748 -0
- package/.history/src/base-client/components/common/HIS/HButtons/HButtons_20260702174939.vue +793 -0
- package/.history/src/base-client/components/common/HIS/HForm/HForm_20260702115430.vue +1463 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310142713.vue +512 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260310145118.vue +511 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260311094834.vue +696 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260320143028.vue +693 -0
- package/.history/src/base-client/components/common/HIS/HFormTable/HFormTable_20260409101450.vue +677 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260625173703.vue +767 -0
- package/.history/src/base-client/components/common/HIS/HTab/HTab_20260626112425.vue +803 -0
- package/.history/src/base-client/components/common/XAddNativeForm/XAddNativeForm_20260626173854.vue +1522 -0
- package/.history/src/base-client/components/common/XCollapse/XCollapse_20260703180349.vue +862 -0
- package/.history/src/base-client/components/common/XCollapse/XCollapse_20260703180623.vue +862 -0
- package/.history/src/base-client/components/common/XCollapse/XCollapse_20260703180702.vue +842 -0
- package/.history/src/base-client/components/common/XForm/XFormItem_20260703101840.vue +1621 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140403.vue +643 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/XMarkdownViewer_20260519140829.vue +628 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519142824.vue +104 -0
- package/.history/src/base-client/components/common/XMarkdownViewer/demo_20260519143155.vue +102 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20260703180412.vue +1102 -0
- package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20260703180623.vue +1093 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171231.vue +1241 -0
- package/.history/src/base-client/components/common/XReportGrid/XReport_20260309171441.vue +1223 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260612174826.vue +472 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260612175839.vue +538 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260615103331.vue +650 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260618140214.vue +1396 -0
- package/.history/src/base-client/components/his/HAi/HAi_20260618140556.vue +1396 -0
- package/.history/src/base-client/components/his/XHDescriptions/XHDescriptions_20260424134504.vue +1469 -0
- package/.history/src/base-client/components/his/XRadio/XRadio_20260702140351.vue +774 -0
- package/.history/src/base-client/components/his/XRadio/XRadio_20260702140441.vue +774 -0
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171133.vue +788 -0
- package/.history/src/base-client/components/his/XSidebar/XSidebar_20260610171151.vue +780 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511170841.vue +585 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260511171138.vue +787 -0
- package/.history/src/base-client/components/his/XTransfer/XTransfer_20260512141830.vue +739 -0
- package/.history/src/components/STable/index_20260409155138.js +806 -0
- package/.history/src/components/STable/index_20260409155218.js +814 -0
- package/.history/src/expression/core/Expression_20260305164427.js +1371 -0
- package/.history/src/expression/core/Expression_20260305170258.js +1358 -0
- package/.history/src/expression/core/Program_20260305111830.js +944 -0
- package/.history/src/expression/core/Program_20260305112041.js +931 -0
- package/.history/src/logic/LogicRunner_20260304154306.js +170 -0
- package/.history/src/logic/LogicRunner_20260304155553.js +112 -0
- package/.history/src/logic/LogicRunner_20260305105834.js +112 -0
- package/.history/src/logic/LogicRunner_20260305112718.js +129 -0
- package/.history/src/logic/LogicRunner_20260305182436.js +133 -0
- package/.history/src/logic/LogicRunner_20260306151301.js +213 -0
- package/.history/src/logic/LogicRunner_20260306152419.js +213 -0
- package/.history/src/logic/plugins/common/DateTools_20260305154159.js +61 -0
- package/.history/src/logic/plugins/common/DateTools_20260305154217.js +44 -0
- package/.history/src/logic/plugins/common/DateTools_20260305161014.js +44 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305164352.js +80 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305170258.js +75 -0
- package/.history/src/logic/plugins/common/HttpTools_20260305171634.js +75 -0
- package/.history/src/logic/plugins/common/HttpTools_20260306152419.js +72 -0
- package/.history/src/services/api/restTools_20260427142149.js +245 -0
- package/.history/src/services/api/restTools_20260427142853.js +230 -0
- package/.history/src/services/api/restTools_20260519135558.js +230 -0
- package/.history/src/services/api/restTools_20260519140825.js +230 -0
- package/.history/src/services/api/restTools_20260519151223.js +230 -0
- package/.history/src/theme/global_20260703101634.less +370 -0
- package/.history/src/theme/global_20260703101840.less +337 -0
- package/.history/src/theme/global_20260703104511.less +337 -0
- package/.history/src/utils/indexedDB_20260306150918.js +593 -0
- package/.history/src/utils/indexedDB_20260306151301.js +586 -0
- package/.idea/codeStyles/Project.xml +62 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/misc.xml +5 -87
- 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
- package/package.json +1 -1
- package/preview-input-box.html +180 -0
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +775 -748
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1708 -1186
- package/src/base-client/components/common/HIS/HTab/HTab.vue +790 -790
- package/src/base-client/components/common/XMarkdownViewer/demo.vue +102 -102
- package/src/base-client/components/his/XRadio/XRadio.vue +73 -1
- package/src/base-client/components/his/XTitle/XTitle.vue +63 -3
- package/src/base-client/components/his/XTransfer/index.md +327 -327
- package/src/services/user.js +1 -0
- package/.idea/.name +0 -1
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -8
- package/.idea/deployment.xml +0 -14
- package/.idea/gradle.xml +0 -7
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/libraries/contour_plot.xml +0 -9
- package/.idea/material_theme_project_new.xml +0 -18
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="x-radio-container" :class="wrapperClassObject()">
|
|
3
|
+
<!-- 按钮模式 -->
|
|
4
|
+
<a-radio-group
|
|
5
|
+
v-if="config.buttonMode"
|
|
6
|
+
v-model="innerValue"
|
|
7
|
+
@change="onChange"
|
|
8
|
+
:name="name"
|
|
9
|
+
:class="['x-radio-group', 'x-radio-group-button', { 'x-radio-group-left': config.alignLeft }]"
|
|
10
|
+
button-style="solid">
|
|
11
|
+
<a-radio-button
|
|
12
|
+
v-for="(item, idx) in data"
|
|
13
|
+
:key="'xradio-' + idx"
|
|
14
|
+
:value="item.value"
|
|
15
|
+
class="x-radio-button-item"
|
|
16
|
+
>
|
|
17
|
+
{{ item.label }}
|
|
18
|
+
</a-radio-button>
|
|
19
|
+
</a-radio-group>
|
|
20
|
+
|
|
21
|
+
<!-- 普通模式 -->
|
|
22
|
+
<a-radio-group
|
|
23
|
+
v-else
|
|
24
|
+
v-model="innerValue"
|
|
25
|
+
@change="onChange"
|
|
26
|
+
:name="name"
|
|
27
|
+
:class="['x-radio-group', { 'x-radio-group-left': config.alignLeft }]">
|
|
28
|
+
<div
|
|
29
|
+
v-for="(item, idx) in data"
|
|
30
|
+
:key="'xradio-' + idx"
|
|
31
|
+
class="x-radio-item-container"
|
|
32
|
+
:class="{
|
|
33
|
+
'x-radio-item-bordered': config.showBorder,
|
|
34
|
+
'x-radio-item-highlight': config.highlightBorder,
|
|
35
|
+
'x-radio-item-selected': isOptionSelected(item)
|
|
36
|
+
}"
|
|
37
|
+
:style="getHighlightBorderStyle(item)">
|
|
38
|
+
<div class="x-radio-item-wrapper">
|
|
39
|
+
<div
|
|
40
|
+
v-if="config.showIndicator && item.bottomLine !== false"
|
|
41
|
+
class="x-radio-indicator-left"
|
|
42
|
+
:style="{
|
|
43
|
+
width: item.indicatorWidth || '4px',
|
|
44
|
+
backgroundColor: item.indicatorColor || config.indicatorActiveColor,
|
|
45
|
+
height: item.indicatorHeight || '16px'
|
|
46
|
+
}"
|
|
47
|
+
></div>
|
|
48
|
+
<div
|
|
49
|
+
v-if="isTabStyle"
|
|
50
|
+
class="x-radio-tab-icon"
|
|
51
|
+
:class="{ 'x-radio-tab-icon-active': isOptionSelected(item) }"
|
|
52
|
+
></div>
|
|
53
|
+
<a-radio
|
|
54
|
+
:value="item.value"
|
|
55
|
+
class="x-radio-item"
|
|
56
|
+
:class="{ 'x-radio-item-no-dot': config.highlightBorder || isTabStyle }"
|
|
57
|
+
>
|
|
58
|
+
{{ item.label }}
|
|
59
|
+
</a-radio>
|
|
60
|
+
</div>
|
|
61
|
+
<div
|
|
62
|
+
v-if="config.showIndicator && item.bottomLine !== false && !config.showBorder && !config.highlightBorder && !isTabStyle"
|
|
63
|
+
class="x-radio-indicator-bottom"
|
|
64
|
+
:style="{
|
|
65
|
+
width: item.indicatorWidth || '100%',
|
|
66
|
+
backgroundColor: item.indicatorColor || config.indicatorActiveColor,
|
|
67
|
+
height: config.indicatorHeight + 'px'
|
|
68
|
+
}"
|
|
69
|
+
></div>
|
|
70
|
+
<div
|
|
71
|
+
v-if="isTabStyle && isOptionSelected(item)"
|
|
72
|
+
class="x-radio-tab-underline"
|
|
73
|
+
></div>
|
|
74
|
+
</div>
|
|
75
|
+
</a-radio-group>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script>
|
|
80
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
81
|
+
|
|
82
|
+
export default {
|
|
83
|
+
name: 'XRadio',
|
|
84
|
+
inject: ['getComponentByName'],
|
|
85
|
+
props: {
|
|
86
|
+
queryParamsName: {
|
|
87
|
+
type: [String, Object],
|
|
88
|
+
default: null
|
|
89
|
+
},
|
|
90
|
+
/** 选项列表(每项 { label, value });传入时优先使用,不走 queryParamsName 配置 */
|
|
91
|
+
options: {
|
|
92
|
+
type: Array,
|
|
93
|
+
default: null
|
|
94
|
+
},
|
|
95
|
+
/** radio-group 的 name,用于区分同页多组 */
|
|
96
|
+
name: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: ''
|
|
99
|
+
},
|
|
100
|
+
/** 为 true 时单选不默认选中第一项,便于区分用户是否真的选过 */
|
|
101
|
+
noDefaultFirst: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: false
|
|
104
|
+
},
|
|
105
|
+
// eslint-disable-next-line vue/require-default-prop
|
|
106
|
+
value: [String, Number, Object]
|
|
107
|
+
},
|
|
108
|
+
data () {
|
|
109
|
+
return {
|
|
110
|
+
data: [],
|
|
111
|
+
innerValue: null,
|
|
112
|
+
config: {
|
|
113
|
+
showIndicator: true,
|
|
114
|
+
indicatorHeight: 3,
|
|
115
|
+
indicatorActiveColor: '#1890ff',
|
|
116
|
+
alignLeft: false,
|
|
117
|
+
showBorder: false,
|
|
118
|
+
highlightBorder: false,
|
|
119
|
+
buttonMode: false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
created () {
|
|
124
|
+
if (this.options != null && Array.isArray(this.options)) {
|
|
125
|
+
this.useOptionsProp()
|
|
126
|
+
} else {
|
|
127
|
+
this.getData(this.queryParamsName)
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
watch: {
|
|
131
|
+
value (val) {
|
|
132
|
+
this.innerValue = this.resolveValueToOption(val)
|
|
133
|
+
},
|
|
134
|
+
options: {
|
|
135
|
+
handler (val) {
|
|
136
|
+
if (val != null && Array.isArray(val)) {
|
|
137
|
+
this.data = val
|
|
138
|
+
this.innerValue = this.resolveValueToOption(this.value)
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
deep: true
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
computed: {
|
|
145
|
+
isTabStyle () {
|
|
146
|
+
const val = this.$attrs && this.$attrs['tab-style']
|
|
147
|
+
return val === true || val === '' || val === 'true'
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
emits: ['change', 'init'],
|
|
151
|
+
methods: {
|
|
152
|
+
/** 使用 options 参数作为数据源(不请求配置) */
|
|
153
|
+
useOptionsProp () {
|
|
154
|
+
this.data = this.options || []
|
|
155
|
+
if (this.value !== undefined && this.value !== null) {
|
|
156
|
+
this.innerValue = this.resolveValueToOption(this.value)
|
|
157
|
+
} else if (this.data.length > 0 && !this.noDefaultFirst) {
|
|
158
|
+
this.innerValue = this.data[0].value
|
|
159
|
+
} else {
|
|
160
|
+
this.innerValue = null
|
|
161
|
+
}
|
|
162
|
+
this.$emit('init', this.innerValue)
|
|
163
|
+
},
|
|
164
|
+
async getData (data) {
|
|
165
|
+
getConfigByName(data, 'af-his', res => {
|
|
166
|
+
// 1. 先加载选项
|
|
167
|
+
if (res.radio && Array.isArray(res.radio)) {
|
|
168
|
+
this.data = res.radio
|
|
169
|
+
// 2. 加载指示器配置
|
|
170
|
+
if (res.indicator !== undefined) {
|
|
171
|
+
// 如果indicator是布尔值,则只控制显示/隐藏
|
|
172
|
+
if (typeof res.indicator === 'boolean') {
|
|
173
|
+
this.config.showIndicator = res.indicator
|
|
174
|
+
} else if (typeof res.indicator === 'object') {
|
|
175
|
+
this.config = {
|
|
176
|
+
...this.config,
|
|
177
|
+
...res.indicator
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// 3. 加载布局配置
|
|
182
|
+
if (res.layout !== undefined) {
|
|
183
|
+
if (typeof res.layout === 'object') {
|
|
184
|
+
this.config = {
|
|
185
|
+
...this.config,
|
|
186
|
+
...res.layout
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// 4. 加载按钮模式配置
|
|
191
|
+
if (res.buttonMode !== undefined) {
|
|
192
|
+
this.config.buttonMode = res.buttonMode
|
|
193
|
+
}
|
|
194
|
+
// 5. 初始化默认值(优先级: 配置defaultValue > 第一个选项;noDefaultFirst 为 true 时不选第一项)
|
|
195
|
+
if (this.value !== undefined && this.value !== null) {
|
|
196
|
+
this.innerValue = this.resolveValueToOption(this.value)
|
|
197
|
+
} else if (res.defaultValue !== undefined && res.defaultValue !== null) {
|
|
198
|
+
// 使用配置中的 defaultValue(对象时匹配到选项引用,保证 v-model 一致)
|
|
199
|
+
this.innerValue = this.resolveValueToOption(res.defaultValue)
|
|
200
|
+
} else if (this.data.length > 0 && !this.noDefaultFirst) {
|
|
201
|
+
// 如果没有默认值但有选项且允许默认第一项,使用第一个选项
|
|
202
|
+
this.innerValue = this.data[0].value
|
|
203
|
+
} else {
|
|
204
|
+
this.innerValue = null
|
|
205
|
+
}
|
|
206
|
+
// 6. 触发初始化事件
|
|
207
|
+
this.$emit('init', this.innerValue)
|
|
208
|
+
} else {
|
|
209
|
+
this.$message.error('配置错误,radio字段不是数组')
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
},
|
|
213
|
+
onChange (e) {
|
|
214
|
+
this.innerValue = e.target.value
|
|
215
|
+
this.$emit('change', e.target.value)
|
|
216
|
+
},
|
|
217
|
+
/** 判断当前选项是否被选中(支持基本类型与对象 value) */
|
|
218
|
+
isOptionSelected (item) {
|
|
219
|
+
if (this.innerValue === item.value) return true
|
|
220
|
+
if (typeof this.innerValue === 'object' && this.innerValue !== null && typeof item.value === 'object' && item.value !== null) {
|
|
221
|
+
return this.deepEqual(this.innerValue, item.value)
|
|
222
|
+
}
|
|
223
|
+
return false
|
|
224
|
+
},
|
|
225
|
+
/** 将外部 value/defaultValue 解析为选项引用(对象时用 deepEqual 匹配,保证与 options 同引用) */
|
|
226
|
+
resolveValueToOption (val) {
|
|
227
|
+
if (val === undefined || val === null) return val
|
|
228
|
+
if (this.data.length === 0) return val
|
|
229
|
+
const opt = this.data.find(item => this.deepEqual(item.value, val))
|
|
230
|
+
return opt ? opt.value : val
|
|
231
|
+
},
|
|
232
|
+
/** 深度相等(用于对象 value 比较与匹配) */
|
|
233
|
+
deepEqual (a, b) {
|
|
234
|
+
if (a === b) return true
|
|
235
|
+
if (a == null || b == null || typeof a !== 'object' || typeof b !== 'object') return false
|
|
236
|
+
const keysA = Object.keys(a)
|
|
237
|
+
const keysB = Object.keys(b)
|
|
238
|
+
if (keysA.length !== keysB.length) return false
|
|
239
|
+
return keysA.every(key => keysB.includes(key) && this.deepEqual(a[key], b[key]))
|
|
240
|
+
},
|
|
241
|
+
wrapperClassObject () {
|
|
242
|
+
const attrs = this.$attrs || {}
|
|
243
|
+
const classes = {}
|
|
244
|
+
const booleanStyleKeys = [
|
|
245
|
+
'item-0padding', 'compact', 'out-radio', 'distributed', 'tab-style', 'three-column'
|
|
246
|
+
]
|
|
247
|
+
booleanStyleKeys.forEach(key => {
|
|
248
|
+
const val = attrs[key]
|
|
249
|
+
const truthy = val === true || val === '' || val === 'true'
|
|
250
|
+
if (truthy) classes[`x-radio-${key}`] = true
|
|
251
|
+
})
|
|
252
|
+
return classes
|
|
253
|
+
},
|
|
254
|
+
getHighlightBorderStyle (item) {
|
|
255
|
+
if (!this.config.highlightBorder) return {}
|
|
256
|
+
|
|
257
|
+
// 如果当前选项被选中且有边框颜色配置,使用配置的颜色
|
|
258
|
+
if (this.isOptionSelected(item) && item.borderColor) {
|
|
259
|
+
return {
|
|
260
|
+
borderColor: item.borderColor
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 如果当前选项被选中且有indicatorColor配置,使用indicatorColor作为边框颜色
|
|
265
|
+
if (this.isOptionSelected(item) && item.indicatorColor) {
|
|
266
|
+
return {
|
|
267
|
+
borderColor: item.indicatorColor
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// 默认返回空对象,使用CSS中的默认灰色边框
|
|
272
|
+
return {}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
</script>
|
|
277
|
+
|
|
278
|
+
<style scoped lang="less">
|
|
279
|
+
.x-radio-container {
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.x-radio-group {
|
|
285
|
+
display: flex;
|
|
286
|
+
justify-content: space-around;
|
|
287
|
+
|
|
288
|
+
&.x-radio-group-left {
|
|
289
|
+
justify-content: flex-start;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
&.x-radio-group-button {
|
|
293
|
+
display: flex;
|
|
294
|
+
justify-content: flex-end; // 居右对齐
|
|
295
|
+
gap: 0; // 移除间距,让按钮紧密相连
|
|
296
|
+
&.x-radio-group-left {
|
|
297
|
+
justify-content: flex-start;
|
|
298
|
+
}
|
|
299
|
+
:deep(.ant-radio-button-wrapper) {
|
|
300
|
+
border-radius: 0; // 先移除所有圆角
|
|
301
|
+
border: 1px solid #d9d9d9;
|
|
302
|
+
background: #fff;
|
|
303
|
+
color: #000;
|
|
304
|
+
transition: all 0.3s;
|
|
305
|
+
min-width: 80px;
|
|
306
|
+
text-align: center;
|
|
307
|
+
margin: 0; // 确保没有外边距
|
|
308
|
+
|
|
309
|
+
&:hover {
|
|
310
|
+
border-color: #40a9ff;
|
|
311
|
+
color: #40a9ff;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&.ant-radio-button-wrapper-checked {
|
|
315
|
+
background-color: #0057FE;
|
|
316
|
+
border-color: #0057FE;
|
|
317
|
+
color: #fff;
|
|
318
|
+
|
|
319
|
+
&:hover {
|
|
320
|
+
background-color: #0057FE;
|
|
321
|
+
border-color: #0057FE;
|
|
322
|
+
color: #fff;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
// 第一个按钮只保留左侧圆角
|
|
326
|
+
&:first-child {
|
|
327
|
+
border-top-left-radius: 6px;
|
|
328
|
+
border-bottom-left-radius: 6px;
|
|
329
|
+
border-right: none; // 移除右边框,与下一个按钮连接
|
|
330
|
+
}
|
|
331
|
+
// 最后一个按钮只保留右侧圆角
|
|
332
|
+
&:last-child {
|
|
333
|
+
border-top-right-radius: 6px;
|
|
334
|
+
border-bottom-right-radius: 6px;
|
|
335
|
+
}
|
|
336
|
+
// 中间按钮(如果有)移除所有圆角和右边框
|
|
337
|
+
&:not(:first-child):not(:last-child) {
|
|
338
|
+
border-radius: 0;
|
|
339
|
+
border-right: none;
|
|
340
|
+
}
|
|
341
|
+
// 除了最后一个按钮,其他按钮都移除右边框
|
|
342
|
+
&:not(:last-child) {
|
|
343
|
+
border-right: none;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.x-radio-item-container {
|
|
350
|
+
flex: 1;
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: column;
|
|
353
|
+
align-items: center;
|
|
354
|
+
text-align: center;
|
|
355
|
+
padding: 0 8px;
|
|
356
|
+
box-sizing: border-box;
|
|
357
|
+
|
|
358
|
+
.x-radio-group-left & {
|
|
359
|
+
flex: none;
|
|
360
|
+
align-items: flex-start;
|
|
361
|
+
text-align: left;
|
|
362
|
+
margin-right: 16px;
|
|
363
|
+
padding: 0 4px;
|
|
364
|
+
|
|
365
|
+
&:last-child {
|
|
366
|
+
margin-right: 0;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
&.x-radio-item-bordered {
|
|
371
|
+
border: 1px solid #d9d9d9;
|
|
372
|
+
border-radius: 173px;
|
|
373
|
+
padding: 8px 12px;
|
|
374
|
+
margin-right: 8px;
|
|
375
|
+
background-color: #fff;
|
|
376
|
+
transition: all 0.3s;
|
|
377
|
+
|
|
378
|
+
&:hover {
|
|
379
|
+
border-color: #40a9ff;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
&:last-child {
|
|
383
|
+
margin-right: 0;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.x-radio-group-left & {
|
|
387
|
+
margin-right: 8px;
|
|
388
|
+
|
|
389
|
+
&:last-child {
|
|
390
|
+
margin-right: 0;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
&.x-radio-item-highlight {
|
|
396
|
+
border: 2px solid #d9d9d9;
|
|
397
|
+
border-radius: 173px;
|
|
398
|
+
padding: 8px 12px;
|
|
399
|
+
margin-right: 8px;
|
|
400
|
+
background-color: #fff;
|
|
401
|
+
transition: all 0.3s;
|
|
402
|
+
position: relative;
|
|
403
|
+
|
|
404
|
+
&:last-child {
|
|
405
|
+
margin-right: 0;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.x-radio-group-left & {
|
|
409
|
+
margin-right: 8px;
|
|
410
|
+
|
|
411
|
+
&:last-child {
|
|
412
|
+
margin-right: 0;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// 动态边框颜色通过内联样式设置
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.x-radio-item-wrapper {
|
|
421
|
+
display: flex;
|
|
422
|
+
align-items: center;
|
|
423
|
+
width: 100%;
|
|
424
|
+
|
|
425
|
+
.x-radio-group-left & {
|
|
426
|
+
justify-content: flex-start;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.x-radio-item {
|
|
431
|
+
margin-bottom: 8px;
|
|
432
|
+
|
|
433
|
+
.x-radio-item-bordered & {
|
|
434
|
+
margin-bottom: 0;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
&.x-radio-item-no-dot {
|
|
438
|
+
:deep(.ant-radio) {
|
|
439
|
+
display: none;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
:deep(.ant-radio-wrapper) {
|
|
443
|
+
padding-left: 0;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.x-radio-indicator-left {
|
|
449
|
+
width: 4px;
|
|
450
|
+
height: 16px;
|
|
451
|
+
margin-right: 8px;
|
|
452
|
+
border-radius: 6px;
|
|
453
|
+
transition: all 0.3s;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.x-radio-indicator-bottom {
|
|
457
|
+
height: 3px;
|
|
458
|
+
transition: all 0.3s;
|
|
459
|
+
max-width: 100%;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.x-radio-description {
|
|
463
|
+
padding: 4px 4px 4px 4px;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.x-radio-item-0padding {
|
|
467
|
+
&.x-radio-container,
|
|
468
|
+
.x-radio-container {
|
|
469
|
+
:deep(.x-radio-item-container) {
|
|
470
|
+
padding: 0px;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
.x-radio-compact {
|
|
475
|
+
&.x-radio-container,
|
|
476
|
+
.x-radio-container {
|
|
477
|
+
:deep(.simple-inline-item){
|
|
478
|
+
padding: 0px !important;
|
|
479
|
+
}
|
|
480
|
+
:deep(.ant-radio-group){
|
|
481
|
+
display: flex;
|
|
482
|
+
justify-content: space-between;
|
|
483
|
+
}
|
|
484
|
+
:deep(.x-radio-item) > span:last-child {
|
|
485
|
+
padding-right: 2px;
|
|
486
|
+
padding-left: 2px;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/* 门诊收费样式:字体规格与间距 42px */
|
|
491
|
+
.x-radio-out-radio {
|
|
492
|
+
&.x-radio-container,
|
|
493
|
+
.x-radio-container {
|
|
494
|
+
:deep(.x-radio-group) {
|
|
495
|
+
justify-content: flex-start !important; /* 覆盖默认的 space-around */
|
|
496
|
+
}
|
|
497
|
+
:deep(.ant-radio-wrapper) {
|
|
498
|
+
/* 仅归零内外边距,避免额外空隙 */
|
|
499
|
+
padding: 0;
|
|
500
|
+
margin: 0;
|
|
501
|
+
}
|
|
502
|
+
/* 确保文字本身也应用同样的字体样式(提高优先级并可视化高度) */
|
|
503
|
+
:deep(.ant-radio-wrapper > span:last-child) {
|
|
504
|
+
display: inline-block;
|
|
505
|
+
height: 23px !important;
|
|
506
|
+
line-height: 23px !important;
|
|
507
|
+
font-family: "Source Han Sans" !important;
|
|
508
|
+
font-size: 16px !important;
|
|
509
|
+
font-weight: normal !important;
|
|
510
|
+
letter-spacing: 0em !important;
|
|
511
|
+
color: #313131 !important;
|
|
512
|
+
}
|
|
513
|
+
/* 单选框与文字之间保持 5px 间距 */
|
|
514
|
+
:deep(.ant-radio) { margin-right: 0; }
|
|
515
|
+
:deep(.ant-radio + span) { padding: 0; margin-left: 5px; }
|
|
516
|
+
/* 单选框外圈视觉 16x16,边框 #CDCFD4,背景白色 */
|
|
517
|
+
:deep(.ant-radio-inner) {
|
|
518
|
+
width: 16px;
|
|
519
|
+
height: 16px;
|
|
520
|
+
background: #FFFFFF;
|
|
521
|
+
box-sizing: border-box;
|
|
522
|
+
border: 1px solid #CDCFD4;
|
|
523
|
+
}
|
|
524
|
+
/* 选中时内部实心点 10x10,背景 #0057FE */
|
|
525
|
+
:deep(.ant-radio-checked .ant-radio-inner::after) {
|
|
526
|
+
width: 10px;
|
|
527
|
+
height: 10px;
|
|
528
|
+
background: #0057FE;
|
|
529
|
+
margin: 0;
|
|
530
|
+
left: 50%;
|
|
531
|
+
top: 50%;
|
|
532
|
+
transform: translate(-50%, -50%) scale(1);
|
|
533
|
+
}
|
|
534
|
+
/* 保持外圈边框颜色不被默认覆盖 */
|
|
535
|
+
:deep(.ant-radio-checked .ant-radio-inner) {
|
|
536
|
+
border-color: #CDCFD4;
|
|
537
|
+
background: #FFFFFF;
|
|
538
|
+
}
|
|
539
|
+
:deep(.x-radio-item-container) {
|
|
540
|
+
margin-right: 42px; /* 直接设置42px间距,让第二个单选框与第一个文字距离为42px */
|
|
541
|
+
padding: 0 !important;
|
|
542
|
+
flex: none !important; /* 覆盖默认的 flex: 1 */
|
|
543
|
+
align-items: flex-start !important; /* 覆盖默认的 center */
|
|
544
|
+
text-align: left !important; /* 覆盖默认的 center */
|
|
545
|
+
}
|
|
546
|
+
:deep(.x-radio-item-wrapper) {
|
|
547
|
+
width: auto !important; /* 覆盖默认的 width: 100% */
|
|
548
|
+
}
|
|
549
|
+
:deep(.x-radio-item-container:first-child) {
|
|
550
|
+
margin-left: 4px;
|
|
551
|
+
}
|
|
552
|
+
:deep(.x-radio-item-container:last-child) {
|
|
553
|
+
margin-right: 0;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* 三列布局样式 */
|
|
559
|
+
.x-radio-three-column {
|
|
560
|
+
&.x-radio-container,
|
|
561
|
+
.x-radio-container {
|
|
562
|
+
padding-right: 11px;
|
|
563
|
+
:deep(.x-radio-group) {
|
|
564
|
+
display: grid;
|
|
565
|
+
grid-template-columns: repeat(3, 1fr);
|
|
566
|
+
gap: 0;
|
|
567
|
+
}
|
|
568
|
+
:deep(.x-radio-item-container) {
|
|
569
|
+
flex: none;
|
|
570
|
+
max-width: none;
|
|
571
|
+
padding: 0 !important;
|
|
572
|
+
margin-right: 0 !important;
|
|
573
|
+
margin-left: 0 !important;
|
|
574
|
+
align-items: flex-start !important;
|
|
575
|
+
text-align: left !important;
|
|
576
|
+
box-sizing: border-box;
|
|
577
|
+
}
|
|
578
|
+
:deep(.x-radio-item-wrapper) {
|
|
579
|
+
width: 100% !important;
|
|
580
|
+
justify-content: flex-start;
|
|
581
|
+
}
|
|
582
|
+
:deep(.x-radio-indicator-left) {
|
|
583
|
+
display: none !important;
|
|
584
|
+
}
|
|
585
|
+
:deep(.x-radio-indicator-bottom) {
|
|
586
|
+
display: none !important;
|
|
587
|
+
}
|
|
588
|
+
:deep(.ant-radio-wrapper) {
|
|
589
|
+
padding: 0;
|
|
590
|
+
margin: 0;
|
|
591
|
+
}
|
|
592
|
+
:deep(.ant-radio-wrapper > span:last-child) {
|
|
593
|
+
display: inline-block;
|
|
594
|
+
height: 23px !important;
|
|
595
|
+
opacity: 1;
|
|
596
|
+
font-family: "Source Han Sans" !important;
|
|
597
|
+
font-size: 16px !important;
|
|
598
|
+
font-weight: normal !important;
|
|
599
|
+
line-height: normal !important;
|
|
600
|
+
letter-spacing: 0em !important;
|
|
601
|
+
color: #313131 !important;
|
|
602
|
+
}
|
|
603
|
+
:deep(.ant-radio) { margin-right: 0; }
|
|
604
|
+
:deep(.ant-radio + span) { padding: 0; margin-left: 1px; }
|
|
605
|
+
:deep(.ant-radio-inner) {
|
|
606
|
+
width: 16px;
|
|
607
|
+
height: 16px;
|
|
608
|
+
opacity: 1;
|
|
609
|
+
background: #FFFFFF;
|
|
610
|
+
box-sizing: border-box;
|
|
611
|
+
border: 1px solid #CDCFD4;
|
|
612
|
+
}
|
|
613
|
+
:deep(.ant-radio-checked .ant-radio-inner::after) {
|
|
614
|
+
width: 10px;
|
|
615
|
+
height: 10px;
|
|
616
|
+
opacity: 1;
|
|
617
|
+
background: #0057FE;
|
|
618
|
+
margin: 0;
|
|
619
|
+
left: 50%;
|
|
620
|
+
top: 50%;
|
|
621
|
+
transform: translate(-50%, -50%) scale(1);
|
|
622
|
+
}
|
|
623
|
+
:deep(.ant-radio-checked .ant-radio-inner) {
|
|
624
|
+
border-color: #CDCFD4;
|
|
625
|
+
background: #FFFFFF;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/* 分布布局样式 */
|
|
631
|
+
.x-radio-distributed {
|
|
632
|
+
&.x-radio-container,
|
|
633
|
+
.x-radio-container {
|
|
634
|
+
width: 100%;
|
|
635
|
+
:deep(.x-radio-group) {
|
|
636
|
+
width: 100%;
|
|
637
|
+
display: flex;
|
|
638
|
+
justify-content: space-between;
|
|
639
|
+
flex-wrap: nowrap;
|
|
640
|
+
gap: 0;
|
|
641
|
+
overflow: hidden;
|
|
642
|
+
}
|
|
643
|
+
:deep(.x-radio-item-container) {
|
|
644
|
+
flex: 0 0 auto;
|
|
645
|
+
display: flex;
|
|
646
|
+
justify-content: center;
|
|
647
|
+
align-items: center;
|
|
648
|
+
padding: 0 2px;
|
|
649
|
+
min-width: 0;
|
|
650
|
+
}
|
|
651
|
+
:deep(.x-radio-item-wrapper) {
|
|
652
|
+
display: flex;
|
|
653
|
+
align-items: center;
|
|
654
|
+
justify-content: flex-start;
|
|
655
|
+
}
|
|
656
|
+
:deep(.ant-radio-wrapper) {
|
|
657
|
+
padding: 0;
|
|
658
|
+
margin: 0;
|
|
659
|
+
display: flex;
|
|
660
|
+
align-items: center;
|
|
661
|
+
}
|
|
662
|
+
:deep(.ant-radio) {
|
|
663
|
+
margin-right: 0;
|
|
664
|
+
}
|
|
665
|
+
:deep(.ant-radio + span) {
|
|
666
|
+
margin-left: 3px;
|
|
667
|
+
padding: 0;
|
|
668
|
+
}
|
|
669
|
+
:deep(.ant-radio-inner) {
|
|
670
|
+
width: 16px;
|
|
671
|
+
height: 16px;
|
|
672
|
+
opacity: 1;
|
|
673
|
+
background: #FFFFFF;
|
|
674
|
+
box-sizing: border-box;
|
|
675
|
+
border: 1px solid #CDCFD4;
|
|
676
|
+
transition: none !important;
|
|
677
|
+
}
|
|
678
|
+
:deep(.ant-radio-checked .ant-radio-inner::after) {
|
|
679
|
+
width: 10px;
|
|
680
|
+
height: 10px;
|
|
681
|
+
opacity: 1;
|
|
682
|
+
background: #0057FE;
|
|
683
|
+
margin: 0;
|
|
684
|
+
left: 50%;
|
|
685
|
+
top: 50%;
|
|
686
|
+
transform: translate(-50%, -50%) scale(1);
|
|
687
|
+
transition: none !important;
|
|
688
|
+
animation: none !important;
|
|
689
|
+
}
|
|
690
|
+
:deep(.ant-radio-checked .ant-radio-inner) {
|
|
691
|
+
border-color: #CDCFD4;
|
|
692
|
+
background: #FFFFFF;
|
|
693
|
+
transition: none !important;
|
|
694
|
+
}
|
|
695
|
+
:deep(.ant-radio-wrapper > span:last-child) {
|
|
696
|
+
height: 23px;
|
|
697
|
+
opacity: 1;
|
|
698
|
+
font-family: "Source Han Sans";
|
|
699
|
+
font-size: 16px;
|
|
700
|
+
font-weight: normal;
|
|
701
|
+
line-height: normal;
|
|
702
|
+
letter-spacing: 0em;
|
|
703
|
+
color: #5D5C5C;
|
|
704
|
+
white-space: nowrap;
|
|
705
|
+
}
|
|
706
|
+
/* 改为内容自适应宽度,父容器使用 space-between 保证等距 */
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/* 标签页样式:带圆形图标和下划线 */
|
|
711
|
+
.x-radio-tab-style {
|
|
712
|
+
&.x-radio-container,
|
|
713
|
+
.x-radio-container {
|
|
714
|
+
:deep(.x-radio-group) {
|
|
715
|
+
display: flex;
|
|
716
|
+
justify-content: flex-start;
|
|
717
|
+
align-items: center;
|
|
718
|
+
gap: 0;
|
|
719
|
+
flex-wrap: nowrap;
|
|
720
|
+
}
|
|
721
|
+
:deep(.x-radio-item-container) {
|
|
722
|
+
flex: none;
|
|
723
|
+
display: flex;
|
|
724
|
+
flex-direction: column;
|
|
725
|
+
align-items: center;
|
|
726
|
+
position: relative;
|
|
727
|
+
padding: 0;
|
|
728
|
+
margin-right: 0;
|
|
729
|
+
}
|
|
730
|
+
:deep(.x-radio-item-wrapper) {
|
|
731
|
+
display: flex;
|
|
732
|
+
align-items: center;
|
|
733
|
+
justify-content: center;
|
|
734
|
+
width: auto;
|
|
735
|
+
position: relative;
|
|
736
|
+
}
|
|
737
|
+
:deep(.x-radio-item) {
|
|
738
|
+
margin-bottom: 0;
|
|
739
|
+
display: none;
|
|
740
|
+
padding-left: 0;
|
|
741
|
+
display: flex;
|
|
742
|
+
align-items: center;
|
|
743
|
+
font-family: "Source Han Sans" !important;
|
|
744
|
+
font-size: 16px !important;
|
|
745
|
+
font-weight: bold !important;
|
|
746
|
+
color: #5D5C5C;
|
|
747
|
+
line-height: normal;
|
|
748
|
+
padding: 0;
|
|
749
|
+
margin: 0;
|
|
750
|
+
}
|
|
751
|
+
:deep(.x-radio-tab-icon) {
|
|
752
|
+
width: 12px;
|
|
753
|
+
height: 12px;
|
|
754
|
+
background-color: #0057FE;
|
|
755
|
+
border-radius: 50%;
|
|
756
|
+
margin-right: 8px;
|
|
757
|
+
flex-shrink: 0;
|
|
758
|
+
display: block;
|
|
759
|
+
}
|
|
760
|
+
:deep(.x-radio-tab-underline) {
|
|
761
|
+
position: absolute;
|
|
762
|
+
bottom: -8px;
|
|
763
|
+
left: 0;
|
|
764
|
+
right: 0;
|
|
765
|
+
height: 2px;
|
|
766
|
+
background-color: #0057FE;
|
|
767
|
+
border-radius: 2px;
|
|
768
|
+
}
|
|
769
|
+
:deep(.x-radio-item-container:not(:last-child)) {
|
|
770
|
+
margin-right: 12px;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
</style>
|