File tree Expand file tree Collapse file tree 6 files changed +12
-4
lines changed Expand file tree Collapse file tree 6 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 33 "author" : " HC200ok" ,
44 "description" : " A customizable and easy-to-use data table component made with Vue.js 3.x." ,
55 "private" : false ,
6- "version" : " 1.5.40 " ,
6+ "version" : " 1.5.41 " ,
77 "types" : " ./types/main.d.ts" ,
88 "license" : " MIT" ,
99 "files" : [
Original file line number Diff line number Diff line change 11<template >
2- <!-- < ServerSideMode /> -- >
2+ <ServerSideMode />
33 <br ><br >
4- <ClientMode />
4+ <!-- < ClientMode /> -- >
55 <br ><br >
66 <!-- <ExpandLoading/> -->
77</template >
Original file line number Diff line number Diff line change @@ -410,6 +410,7 @@ const emits = defineEmits([
410410 ' update:serverOptions' ,
411411 ' updatePageItems' ,
412412 ' updateTotalItems' ,
413+ ' selectAll'
413414]);
414415
415416const isMultipleSelectable = computed ((): boolean => itemsSelected .value !== null );
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ export default function useTotalItems(
137137
138138 const toggleSelectAll = ( isChecked : boolean ) : void => {
139139 selectItemsComputed . value = isChecked ? totalItems . value : [ ] ;
140+ if ( isChecked ) emits ( 'selectAll' ) ;
140141 } ;
141142
142143 const toggleSelectItem = ( item : Item ) :void => {
Original file line number Diff line number Diff line change 2626 border-cell
2727 multi-sort
2828 @update-sort =" updateSort"
29+ @select-all =" selectAll"
2930 >
3031 <template #expand =" item " >
3132 <div style =" padding : 15px " >
@@ -134,6 +135,10 @@ export default defineComponent({
134135
135136 const loading = ref (false );
136137
138+ const selectAll = () => {
139+ console .log (" sssss" )
140+ }
141+
137142 const loadFromServer = async () => {
138143 loading .value = true ;
139144 const {
@@ -215,6 +220,7 @@ export default defineComponent({
215220 updatePage ,
216221 bodyRowClassName ,
217222 updateSort ,
223+ selectAll ,
218224 };
219225 },
220226
Original file line number Diff line number Diff line change @@ -26,4 +26,4 @@ export type ClickEventType = 'single' | 'double'
2626export type MultipleSelectStatus = 'allSelected' | 'noneSelected' | 'partSelected'
2727
2828// eslint-disable-next-line max-len
29- export type EmitsEventName = 'clickRow' | 'selectRow' | 'deselectRow' | 'expandRow' | 'updateSort' | 'update:itemsSelected' | 'update:serverOptions' | 'updateFilter' | 'updatePageItems' | 'updateTotalItems'
29+ export type EmitsEventName = 'clickRow' | 'selectRow' | 'deselectRow' | 'expandRow' | 'updateSort' | 'update:itemsSelected' | 'update:serverOptions' | 'updateFilter' | 'updatePageItems' | 'updateTotalItems' | 'selectAll'
You can’t perform that action at this time.
0 commit comments