vue2-client 1.12.32 → 1.12.33
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
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
<!-- 自定义标题 -->
|
|
17
17
|
<template #title>
|
|
18
|
-
<div class="custom-title" @click="clickFooter(card, 'cardclick')">
|
|
18
|
+
<div class="custom-title" @click="clickFooter(card, 'cardclick', itemIndex)">
|
|
19
19
|
<a-tooltip placement="top">
|
|
20
20
|
<template #title>{{ card[config.id] }}</template>
|
|
21
21
|
<div class="title-id" v-if="card[config.id]">{{ card[config.id] }}</div>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
<template #actions>
|
|
90
90
|
<a-row align="middle" class="custom-actions" v-if="config && config.footer && config.footer.length > 0">
|
|
91
91
|
<template v-for="(item, footerIndex) in config.footer">
|
|
92
|
-
<a-col :key="'footer_' + footerIndex" class="footer-item" :span="11" @click="clickFooter(card, item.emit)">
|
|
92
|
+
<a-col :key="'footer_' + footerIndex" class="footer-item" :span="11" @click="clickFooter(card, item.emit, itemIndex)">
|
|
93
93
|
<span>
|
|
94
94
|
<a-icon :type="item.icon" class="footer-icon" />
|
|
95
95
|
<span>{{ item.label }}</span>
|
|
@@ -195,7 +195,8 @@ export default {
|
|
|
195
195
|
// 分页大小选项
|
|
196
196
|
pageSizeOptions: ['4', '6', '8', '10'],
|
|
197
197
|
// 数据总数
|
|
198
|
-
total: 0
|
|
198
|
+
total: 0,
|
|
199
|
+
activeCardIndex: null, // 新增:记录当前激活的卡片索引
|
|
199
200
|
}
|
|
200
201
|
},
|
|
201
202
|
created () {
|
|
@@ -211,8 +212,8 @@ export default {
|
|
|
211
212
|
} else {
|
|
212
213
|
this.config = {
|
|
213
214
|
id: '未获取到配置',
|
|
214
|
-
title: '
|
|
215
|
-
title2: '
|
|
215
|
+
title: '未获取到配置',
|
|
216
|
+
title2: '未获取到配置',
|
|
216
217
|
title3: '未获取到配置',
|
|
217
218
|
subtitle2: '未获取到配置',
|
|
218
219
|
subtitle3: '未获取到配置',
|
|
@@ -269,16 +270,14 @@ export default {
|
|
|
269
270
|
// this.loadData()
|
|
270
271
|
// }
|
|
271
272
|
} else {
|
|
272
|
-
this.data =
|
|
273
|
+
this.data = {
|
|
273
274
|
one: '未获取到配置',
|
|
274
275
|
two: '未获取到配置',
|
|
275
276
|
three: '未获取到配置',
|
|
276
277
|
four: '未获取到配置',
|
|
277
278
|
five: '未获取到配置',
|
|
278
|
-
six: 70
|
|
279
|
-
|
|
280
|
-
title2: '大苏旦'
|
|
281
|
-
}]
|
|
279
|
+
six: 70
|
|
280
|
+
}
|
|
282
281
|
}
|
|
283
282
|
// 测试数据初始化
|
|
284
283
|
if (this.testData) {
|
|
@@ -307,10 +306,18 @@ export default {
|
|
|
307
306
|
return result
|
|
308
307
|
},
|
|
309
308
|
// 点击按钮
|
|
310
|
-
clickFooter (data, eventName) {
|
|
309
|
+
clickFooter (data, eventName, index) {
|
|
311
310
|
if (eventName === 'cardclick') {
|
|
312
|
-
//
|
|
313
|
-
this
|
|
311
|
+
// 清除所有卡片的点击状态
|
|
312
|
+
if (this.data && Array.isArray(this.data)) {
|
|
313
|
+
this.data.forEach(item => {
|
|
314
|
+
if (item.isClicked) {
|
|
315
|
+
this.$set(item, 'isClicked', false)
|
|
316
|
+
}
|
|
317
|
+
})
|
|
318
|
+
}
|
|
319
|
+
// 设置当前卡片的点击状态
|
|
320
|
+
this.$set(data, 'isClicked', true)
|
|
314
321
|
}
|
|
315
322
|
this.$emit('cardEmit', data, eventName)
|
|
316
323
|
},
|
|
@@ -470,7 +477,7 @@ export default {
|
|
|
470
477
|
|
|
471
478
|
&.card-clicked {
|
|
472
479
|
:deep(.ant-card-head) {
|
|
473
|
-
background-color: #e6f7ff;
|
|
480
|
+
background-color: #e6f7ff;
|
|
474
481
|
transition: background-color 0.3s ease;
|
|
475
482
|
}
|
|
476
483
|
}
|