vue2-client 1.12.37 → 1.12.38
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
|
@@ -197,6 +197,8 @@ export default {
|
|
|
197
197
|
// 数据总数
|
|
198
198
|
total: 0,
|
|
199
199
|
activeCardIndex: null, // 新增:记录当前激活的卡片索引
|
|
200
|
+
// 混入插槽组件的数据
|
|
201
|
+
mixinData: {},
|
|
200
202
|
}
|
|
201
203
|
},
|
|
202
204
|
created () {
|
|
@@ -308,8 +310,15 @@ export default {
|
|
|
308
310
|
// 点击按钮
|
|
309
311
|
clickFooter (data, eventName, index) {
|
|
310
312
|
if (eventName === 'cardclick') {
|
|
311
|
-
|
|
312
|
-
this
|
|
313
|
+
// 先触发 beforeSwitch 事件
|
|
314
|
+
if (this.data && Array.isArray(this.data)) {
|
|
315
|
+
this.data.forEach(item => {
|
|
316
|
+
if (item.isClicked) {
|
|
317
|
+
// 对当前选中的卡片触发 beforeSwitch 事件
|
|
318
|
+
this.$emit('cardEmit', item, 'beforeSwitch')
|
|
319
|
+
}
|
|
320
|
+
})
|
|
321
|
+
}
|
|
313
322
|
// 清除所有卡片的点击状态
|
|
314
323
|
if (this.data && Array.isArray(this.data)) {
|
|
315
324
|
this.data.forEach(item => {
|