af-mobile-client-vue3 1.3.24 → 1.3.26

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,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.3.24",
4
+ "version": "1.3.26",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -8,6 +8,7 @@ import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEva
8
8
  import LoadError from '@af-mobile-client-vue3/views/common/LoadError.vue'
9
9
  import {
10
10
  showConfirmDialog,
11
+ showToast,
11
12
  ActionSheet as VanActionSheet,
12
13
  BackTop as VanBackTop,
13
14
  Button as VanButton,
@@ -72,7 +73,7 @@ const emit = defineEmits<{
72
73
  (e: string, item: any): void
73
74
  (e: 'updateCondition', params: any): void
74
75
  // 多选相关事件
75
- (e: 'multiSelectAction', action: string, selectedItems: any[]): void
76
+ (e: 'multiSelectAction', action: string, selectedItems: any[], selectedItemsArray: any[]): void
76
77
  (e: 'selectionChange', selectedItems: any[]): void
77
78
  }>()
78
79
 
@@ -657,8 +658,12 @@ function updateActionSheetActions() {
657
658
  }
658
659
 
659
660
  function handleActionSheetSelect(action: any) {
661
+ if (Array.from(selectedItems.value).length === 0 || selectedItemsArray.value.length === 0) {
662
+ showToast('请选择至少一条数据')
663
+ return
664
+ }
660
665
  showActionSheet.value = false
661
- emit('multiSelectAction', action, selectedItemsArray.value)
666
+ emit('multiSelectAction', action, Array.from(selectedItems.value), selectedItemsArray.value)
662
667
 
663
668
  // 执行操作后退出多选模式
664
669
  exitMultiSelectMode()
@@ -97,8 +97,8 @@ function deleteRow(result) {
97
97
  }
98
98
 
99
99
  // 多选操作处理
100
- function handleMultiSelectAction(action: string, selectedItems: any[]) {
101
- console.log('多选操作:', action, selectedItems)
100
+ function handleMultiSelectAction(action: string, selectedItems: any[], selectedItemsArray: any[]) {
101
+ console.log('多选操作:', action, selectedItems, selectedItemsArray)
102
102
  }
103
103
 
104
104
  // 选择变化处理