vue2-client 1.12.31 → 1.12.32

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.12.31",
3
+ "version": "1.12.32",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -2,7 +2,11 @@
2
2
  <div>
3
3
  <div v-if="render" class="XCard">
4
4
  <template v-for="(card, itemIndex) in data">
5
- <a-card :key="'card' + itemIndex" class="data-card">
5
+ <a-card
6
+ :key="'card' + itemIndex"
7
+ class="data-card"
8
+ :class="{ 'card-clicked': card.isClicked }"
9
+ >
6
10
  <div
7
11
  v-if="config && card[config.ribbon]"
8
12
  class="ribbon"
@@ -57,18 +61,18 @@
57
61
  <template v-else-if="item.type === 'custom' && tableColumns">
58
62
  <!-- 根据 tableColumns 显示自定义内容 -->
59
63
  <span v-for="column in tableColumns" v-if="column.dataIndex === item.key" :key="column.dataIndex">
60
- <template v-if="column.slotType === 'badge'">
61
- <x-badge
62
- :service-name="serviceName"
63
- :env="env"
64
- :dataCard="true"
65
- :badge-key="column.slotKeyMap"
66
- :value="card[item.key]" />
67
- </template>
68
- <template v-else>
69
- <slot :name="column.slots.customRender">{{ card[item.key] }}</slot>
70
- </template>
71
- </span>
64
+ <template v-if="column.slotType === 'badge'">
65
+ <x-badge
66
+ :service-name="serviceName"
67
+ :env="env"
68
+ :dataCard="true"
69
+ :badge-key="column.slotKeyMap"
70
+ :value="card[item.key]" />
71
+ </template>
72
+ <template v-else>
73
+ <slot :name="column.slots.customRender">{{ card[item.key] }}</slot>
74
+ </template>
75
+ </span>
72
76
  </template>
73
77
  <template v-else>
74
78
  <span class="body-item-value">{{ card[item.key] }}</span>
@@ -207,8 +211,8 @@ export default {
207
211
  } else {
208
212
  this.config = {
209
213
  id: '未获取到配置',
210
- title: '未获取到配置',
211
- title2: '未获取到配置',
214
+ title: 'title',
215
+ title2: 'title2',
212
216
  title3: '未获取到配置',
213
217
  subtitle2: '未获取到配置',
214
218
  subtitle3: '未获取到配置',
@@ -265,14 +269,16 @@ export default {
265
269
  // this.loadData()
266
270
  // }
267
271
  } else {
268
- this.data = {
272
+ this.data = [{
269
273
  one: '未获取到配置',
270
274
  two: '未获取到配置',
271
275
  three: '未获取到配置',
272
276
  four: '未获取到配置',
273
277
  five: '未获取到配置',
274
- six: 70
275
- }
278
+ six: 70,
279
+ title: '大苏打撒旦',
280
+ title2: '大苏旦'
281
+ }]
276
282
  }
277
283
  // 测试数据初始化
278
284
  if (this.testData) {
@@ -302,6 +308,10 @@ export default {
302
308
  },
303
309
  // 点击按钮
304
310
  clickFooter (data, eventName) {
311
+ if (eventName === 'cardclick') {
312
+ // 设置点击状态
313
+ this.$set(data, 'isClicked', !data.isClicked)
314
+ }
305
315
  this.$emit('cardEmit', data, eventName)
306
316
  },
307
317
  // 获取数据
@@ -457,6 +467,13 @@ export default {
457
467
  color: black;
458
468
  }
459
469
  }
470
+
471
+ &.card-clicked {
472
+ :deep(.ant-card-head) {
473
+ background-color: #e6f7ff; // 淡蓝色背景
474
+ transition: background-color 0.3s ease;
475
+ }
476
+ }
460
477
  }
461
478
 
462
479
  .custom-title {