vue2-client 1.16.57 → 1.16.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.16.57",
3
+ "version": "1.16.60",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -21,7 +21,7 @@ const wrapperClassObject = computed(() => {
21
21
 
22
22
  // 通用布尔样式开关(以存在/空字符串/'true' 为真)
23
23
  const booleanStyleKeys = [
24
- 'max-width200'
24
+ 'max-width200', 'width173'
25
25
  ]
26
26
  for (const key of booleanStyleKeys) {
27
27
  const val = a[key]
@@ -176,9 +176,6 @@ defineExpose({
176
176
  .ant-btn {
177
177
  border: 1px solid #CDCDCD;
178
178
  color: #5D5C5C;
179
- width: auto;
180
- min-width: 124px;
181
- max-width: 140px;
182
179
  white-space: nowrap;
183
180
  overflow: hidden;
184
181
  margin-right: 0px;
@@ -196,9 +193,6 @@ defineExpose({
196
193
  :deep(.ant-btn-group) {
197
194
  justify-content: flex-start;
198
195
  gap: 12px;
199
- .ant-btn {
200
- flex: 1 1 auto;
201
- }
202
196
  }
203
197
  }
204
198
  // button-center样式 - 按钮居中排列
@@ -206,9 +200,6 @@ defineExpose({
206
200
  :deep(.ant-btn-group) {
207
201
  justify-content: center;
208
202
  gap: 12px;
209
- .ant-btn {
210
- flex: 1 1 auto;
211
- }
212
203
  }
213
204
  }
214
205
  // button-right样式 - 按钮从右到左排列
@@ -216,18 +207,12 @@ defineExpose({
216
207
  :deep(.ant-btn-group) {
217
208
  justify-content: flex-end;
218
209
  gap: 12px;
219
- .ant-btn {
220
- flex: 1 1 auto;
221
- }
222
210
  }
223
211
  }
224
212
  // button-space-between样式 - 按钮两端对齐(两个按钮时分布在两端)
225
213
  &.h-buttons-button-space-between {
226
214
  :deep(.ant-btn-group) {
227
215
  justify-content: space-between;
228
- .ant-btn {
229
- flex: 1 1 auto;
230
- }
231
216
  }
232
217
  }
233
218
 
@@ -375,6 +360,10 @@ defineExpose({
375
360
  align-items: center;
376
361
  }
377
362
  }
378
-
363
+ &.h-buttons-width173 {
364
+ :deep(.ant-btn) {
365
+ width: 173px !important;
366
+ }
367
+ }
379
368
  }
380
369
  </style>
@@ -4,10 +4,12 @@ import { ref, onMounted, getCurrentInstance, watch } from 'vue'
4
4
  import { getConfigByNameAsync } from '@vue2-client/services/api/common'
5
5
 
6
6
  // 与 HTab 保持一致的样式开关
7
- defineProps({
7
+ const props = defineProps({
8
8
  hasTopMargin: { type: Boolean, default: true },
9
9
  // 隐藏左侧索引栏(样式控制)
10
- leftHide: { type: Boolean, default: false }
10
+ leftHide: { type: Boolean, default: false },
11
+ // 标题蓝色圆圈样式
12
+ showDot: { type: Boolean, default: false }
11
13
  })
12
14
 
13
15
  // 内部 XFormGroup 实例引用
@@ -70,14 +72,16 @@ watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName,
70
72
  <div
71
73
  class="h-form-group-wrapper"
72
74
  :class="{
73
- 'h-form-group-has-top-margin': hasTopMargin,
74
- 'left-hide': leftHide
75
+ 'h-form-group-has-top-margin': props.hasTopMargin,
76
+ 'left-hide': props.leftHide,
77
+ 'show-dot': props.showDot
75
78
  }"
76
79
  >
77
80
  <x-form-group
78
81
  ref="xFormGroupRef"
79
82
  v-bind="$attrs"
80
83
  v-on="$listeners"
84
+ :showDot="props.showDot"
81
85
  >
82
86
  <template v-for="(_, name) in $slots" #[name]="slotData">
83
87
  <slot :name="name" v-bind="slotData" />
@@ -89,6 +93,7 @@ watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName,
89
93
 
90
94
  <style scoped lang="less">
91
95
  .h-form-group-wrapper {
96
+ padding: 6px;
92
97
  // XFormGroup 自身容器
93
98
  :deep(.XFormGroupClass) {
94
99
  height: 100%;
@@ -116,5 +121,18 @@ watch(() => [vm?.proxy?.$attrs?.queryParamsName, vm?.proxy?.$attrs?.serviceName,
116
121
  }
117
122
  }
118
123
  }
124
+ &.show-dot {
125
+ :deep(.x-title) {
126
+ font-size: 16px;
127
+ .title-content {
128
+ gap: 6px;
129
+ .title-dot {
130
+ height: 12px;
131
+ width: 12px;
132
+ }
133
+ }
134
+
135
+ }
136
+ }
119
137
  }
120
138
  </style>
@@ -24,7 +24,7 @@ const wrapperClassObject = computed(() => {
24
24
 
25
25
  // 通用布尔样式开关(以存在/空字符串/'true' 为真)
26
26
  const booleanStyleKeys = [
27
- 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8', 'ant-tabs-bar-left0'
27
+ 'hasTopMargin', 'useStyle7', 'useCycle', 'useStyle8'
28
28
  ]
29
29
  for (const key of booleanStyleKeys) {
30
30
  const val = a[key]
@@ -175,7 +175,7 @@ defineExpose({
175
175
 
176
176
  :deep(.ant-tabs-bar) {
177
177
  border-bottom: 2px solid #0057FE;
178
- margin: 20px 10px 0 10px;
178
+ margin: 20px 0px 0 0px;
179
179
  }
180
180
 
181
181
  // 滚动状态下的容器左右内边距清零,避免左侧多出一截
@@ -229,7 +229,7 @@ defineExpose({
229
229
  :deep(.ant-tabs-ink-bar) {
230
230
  display: block;
231
231
  background-color: #0057FE;
232
- bottom: 8px;
232
+ bottom: 1px;
233
233
  height: 2px;
234
234
  /* 宽度交给 antd 自身计算,避免固定值影响自适应 */
235
235
  margin-left: 0;
@@ -247,7 +247,7 @@ defineExpose({
247
247
  /* 自适应宽度,允许通过变量覆盖最小宽度 */
248
248
  min-width: var(--tab-min-width, 96px);
249
249
  width: auto;
250
- padding: 0 12px;
250
+ padding: 0 12px 10px 12px;
251
251
  font-size: 16px;
252
252
  line-height: 10px;
253
253
  font-family: "Source Han Sans";
@@ -277,15 +277,16 @@ defineExpose({
277
277
  align-items: center !important; // 确保内容垂直居中
278
278
  line-height: normal !important; // 重置line-height避免冲突
279
279
  vertical-align: top !important; // 确保垂直对齐
280
+ justify-content: flex-start !important; // 确保内容左对齐
280
281
  }
281
282
  :deep(.ant-tabs-tab::before) {
282
283
  content: "" !important;
283
284
  position: absolute !important;
284
- left: 0 !important;
285
- top: 50% !important;
285
+ left: 3px !important;
286
+ top: calc(50% - 4px) !important;
286
287
  transform: translateY(-50%) !important;
287
- width: 8px !important;
288
- height: 8px !important;
288
+ width: 12px !important;
289
+ height: 12px !important;
289
290
  background: #0057FE !important;
290
291
  border-radius: 50% !important;
291
292
  display: block !important;
@@ -405,12 +406,5 @@ defineExpose({
405
406
  line-height: 0px !important;
406
407
  }
407
408
  }
408
- // 侧边栏tab页签移除左侧空白区域
409
- &.t-tab-ant-tabs-bar-left0 {
410
- :deep(.ant-tabs-bar) {
411
- border-bottom: 2px solid #0057FE;
412
- margin: 20px 0px 0 4px;
413
- }
414
- }
415
409
  }
416
410
  </style>
@@ -18,7 +18,8 @@
18
18
  <div class="group-item" :ref="`group-${index}`" :key="index" v-for="(item, index) in groups">
19
19
  <a-row :style="{ marginTop: index === 0 ? '' : '8px' }" v-if="formShow[`show${item.groupName}`] || formShow[`show${item.slotName}`]">
20
20
  <a-col :span="5">
21
- <span class="xFormGroupTitle">{{ item.describe }}</span>
21
+ <x-title v-if="showDot === true || showDot === 'true'" :title="item.describe" :dot="true" />
22
+ <span v-else class="xFormGroupTitle">{{ item.describe }}</span>
22
23
  </a-col>
23
24
  </a-row>
24
25
  <div v-show="formShow[`show${item.slotName}`]">
@@ -41,11 +42,19 @@
41
42
 
42
43
  <script>
43
44
  import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
45
+ import XTitle from '@vue2-client/base-client/components/his/XTitle/XTitle.vue'
44
46
 
45
47
  export default {
46
48
  name: 'XFormGroup',
47
49
  components: {
48
- XAddNativeForm
50
+ XAddNativeForm,
51
+ XTitle
52
+ },
53
+ props: {
54
+ showDot: {
55
+ type: Boolean,
56
+ default: false
57
+ }
49
58
  },
50
59
  data () {
51
60
  return {
@@ -645,7 +645,17 @@ export default {
645
645
  // 应用根节点样式
646
646
  if (Object.keys(rootStyles).length > 0) {
647
647
  Object.entries(rootStyles).forEach(([property, value]) => {
648
- component.$el.style.setProperty(property, value, 'important')
648
+ // 兼容 Ant Row gutter 在列上写入的行内 padding-left/right,
649
+ // 这里同时写入四个方向的长属性,确保覆盖。
650
+ if (property === 'padding') {
651
+ component.$el.style.setProperty('padding', value, 'important')
652
+ component.$el.style.setProperty('padding-left', value, 'important')
653
+ component.$el.style.setProperty('padding-right', value, 'important')
654
+ component.$el.style.setProperty('padding-top', value, 'important')
655
+ component.$el.style.setProperty('padding-bottom', value, 'important')
656
+ } else {
657
+ component.$el.style.setProperty(property, value, 'important')
658
+ }
649
659
  })
650
660
  }
651
661
 
@@ -683,8 +693,25 @@ export default {
683
693
  const hasNewNodes = mutations.some(mutation =>
684
694
  mutation.type === 'childList' && mutation.addedNodes.length > 0
685
695
  )
696
+ const styleChanged = mutations.some(mutation =>
697
+ mutation.type === 'attributes' && mutation.attributeName === 'style'
698
+ )
686
699
 
687
- if (hasNewNodes) {
700
+ if (hasNewNodes || styleChanged) {
701
+ // 重新应用根样式(处理 gutter 改写列 padding 的情况)
702
+ if (Object.keys(rootStyles).length > 0) {
703
+ Object.entries(rootStyles).forEach(([property, value]) => {
704
+ if (property === 'padding') {
705
+ component.$el.style.setProperty('padding', value, 'important')
706
+ component.$el.style.setProperty('padding-left', value, 'important')
707
+ component.$el.style.setProperty('padding-right', value, 'important')
708
+ component.$el.style.setProperty('padding-top', value, 'important')
709
+ component.$el.style.setProperty('padding-bottom', value, 'important')
710
+ } else {
711
+ component.$el.style.setProperty(property, value, 'important')
712
+ }
713
+ })
714
+ }
688
715
  applyStyles()
689
716
  }
690
717
  })
@@ -693,7 +720,8 @@ export default {
693
720
  observer.observe(component.$el, {
694
721
  childList: true,
695
722
  subtree: true,
696
- attributes: false
723
+ attributes: true,
724
+ attributeFilter: ['style']
697
725
  })
698
726
 
699
727
  // 3秒后停止观察
@@ -17,6 +17,7 @@ export default {
17
17
  tipMsg: '正在获取汇总数据。。。',
18
18
  exportType: false,
19
19
  type: 'export',
20
+ modalTitle: '',
20
21
  selectedExportColumns: [],
21
22
  exportSelectedRows: false,
22
23
  allColumnsSelected: false,
@@ -29,12 +30,14 @@ export default {
29
30
  methods: {
30
31
  // 导出选中或本页数据
31
32
  handleExport (type, title) {
33
+ this.modalTitle = '选择导出列'
32
34
  this.exportFileName = title || '查询导出'
33
35
  this.type = 'export'
34
36
  this.handle(type)
35
37
  },
36
- // 导出选中或本页数据
38
+ // 打印选中或本页数据
37
39
  handlePrint (type, printData) {
40
+ this.modalTitle = '选择打印数据列'
38
41
  this.type = 'print'
39
42
  this.printData = printData
40
43
  this.handle(type)
@@ -224,7 +227,7 @@ export default {
224
227
 
225
228
  <template>
226
229
  <a-modal
227
- title="选择导出列"
230
+ :title="modalTitle"
228
231
  width="35vw"
229
232
  :z-index="1001"
230
233
  :confirmLoading="confirmLoading"
@@ -127,6 +127,7 @@ export default {
127
127
  },
128
128
  // 更新card-body的padding
129
129
  updateCardBodyPadding () {
130
+ if (this.widthMode) { return }
130
131
  this.$nextTick(() => {
131
132
  const cardBody = this.$el.querySelector('.ant-card-body')
132
133
  if (cardBody) {
@@ -176,7 +177,6 @@ export default {
176
177
  updateLayout (isOpen) {
177
178
  this.$nextTick(() => {
178
179
  try {
179
- // 获取所有同级a-col(仅筛选出 .ant-col-12)
180
180
  const otherCols = this.getSiblingCols()
181
181
  if (otherCols.length > 0) {
182
182
  let currentCol = this.$el.parentNode
@@ -184,7 +184,6 @@ export default {
184
184
  currentCol = currentCol.parentNode
185
185
  }
186
186
  if (currentCol) {
187
- // 触发XTab组件重新计算宽度
188
187
  const triggerResize = () => {
189
188
  this.$nextTick(() => {
190
189
  const tabComponent = this.$el.querySelector('.ant-tabs')
@@ -196,40 +195,34 @@ export default {
196
195
  }
197
196
 
198
197
  if (isOpen) {
199
- // 展开:仅当显式允许时才改变布局;否则恢复默认宽度
200
198
  if (this.affectLayout) {
201
199
  if (this.widthMode === 'px') {
202
- // px模式:使用固定像素宽度
203
200
  const drawerWidth = this.expandedWidth || 584
204
- currentCol.style.cssText = `
205
- flex: 0 0 ${drawerWidth}px !important;
206
- max-width: ${drawerWidth}px !important;
207
- transition: all 0.3s;`
201
+ // 使用 style 对象逐个设置属性,保留其他样式
202
+ currentCol.style.flex = `0 0 ${drawerWidth}px`
203
+ currentCol.style.maxWidth = `${drawerWidth}px`
204
+ currentCol.style.transition = 'all 0.3s'
208
205
  if (otherCols.length === 1) {
209
206
  const mainCol = otherCols[0]
210
- mainCol.style.cssText = `
211
- flex: 1 1 auto !important;
212
- max-width: calc(${this.totalWidth} - ${drawerWidth}px) !important;
213
- transition: all 0.3s;`
207
+ mainCol.style.flex = '1 1 auto'
208
+ mainCol.style.maxWidth = `calc(${this.totalWidth} - ${drawerWidth}px)`
209
+ mainCol.style.transition = 'all 0.3s'
214
210
  }
215
211
  } else {
216
- // percent模式:使用百分比宽度(原有逻辑)
217
212
  const drawerWidth = (this.expandedWidthPercent || 33.3)
218
- currentCol.style.cssText = `
219
- flex: 0 0 ${drawerWidth}% !important;
220
- max-width: ${drawerWidth}% !important;
221
- transition: all 0.3s;`
213
+ currentCol.style.flex = `0 0 ${drawerWidth}%`
214
+ currentCol.style.maxWidth = `${drawerWidth}%`
215
+ currentCol.style.transition = 'all 0.3s'
222
216
  if (otherCols.length === 1) {
223
217
  const mainCol = otherCols[0]
224
218
  const mainWidth = Math.max(0, Math.min(this.totalWidth, 100) - drawerWidth)
225
- mainCol.style.cssText = `
226
- flex: 0 0 ${mainWidth}% !important;
227
- max-width: ${mainWidth}% !important;
228
- transition: all 0.3s;`
219
+ mainCol.style.flex = `0 0 ${mainWidth}%`
220
+ mainCol.style.maxWidth = `${mainWidth}%`
221
+ mainCol.style.transition = 'all 0.3s'
229
222
  }
230
223
  }
231
224
  } else {
232
- // 恢复默认(移除我们加的内联样式)
225
+ // 恢复默认:只移除我们设置的属性
233
226
  currentCol.style.removeProperty('flex')
234
227
  currentCol.style.removeProperty('max-width')
235
228
  if (otherCols.length === 1) {
@@ -240,17 +233,15 @@ export default {
240
233
  }
241
234
  triggerResize()
242
235
  } else {
243
- // 收缩:为了消除空白,始终把侧栏压到 26px,并让相邻主列占满剩余
244
- currentCol.style.cssText = `
245
- flex: 0 0 26px !important;
246
- max-width: 26px !important;
247
- transition: all 0.3s;`
236
+ // 收缩状态
237
+ currentCol.style.flex = '0 0 26px'
238
+ currentCol.style.maxWidth = '26px'
239
+ currentCol.style.transition = 'all 0.3s'
248
240
  if (otherCols.length === 1) {
249
241
  const mainCol = otherCols[0]
250
- mainCol.style.cssText = `
251
- flex: 1 1 auto !important;
252
- max-width: calc(100% - 26px) !important;
253
- transition: all 0.3s;`
242
+ mainCol.style.flex = '1 1 auto'
243
+ mainCol.style.maxWidth = 'calc(100% - 26px)'
244
+ mainCol.style.transition = 'all 0.3s'
254
245
  }
255
246
  triggerResize()
256
247
  }
@@ -65,7 +65,6 @@ path: 'example',
65
65
  // component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
66
66
  // component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
67
67
  // component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
68
- component: () => import('@vue2-client/base-client/components/common/XReport/XReportHospitalizationDemo.vue'),
69
68
  // component: () => import('@vue2-client/base-client/components/common/XForm/demo.vue'),
70
69
  // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelectDemo.vue'),
71
70
  // component: () => import('@vue2-client/base-client/components/his/XCharge/XChargeDemo.vue'),