Skip to content

Commit 9a0a23d

Browse files
committed
Merge branch 'main' of github.com:devforth/adminforth-import-export
2 parents 2331dfb + 7515b3d commit 9a0a23d

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

custom/ExportCsv.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div @click="exportCsv" class="cursor-pointer flex gap-2 items-center">
2+
<div class="cursor-pointer flex gap-2 items-center">
33
{{$t("Export")}} {{ meta.select === 'all' ? $t('All'): $t('Filtered') }} {{$t('to CSV')}}
44

55
<svg v-if="inProgress"
@@ -19,6 +19,10 @@ const filtersStore = useFiltersStore();
1919
const coreStore = useCoreStore();
2020
const inProgress = ref(false);
2121
22+
defineExpose({
23+
click,
24+
});
25+
2226
const props = defineProps({
2327
meta: Object,
2428
record: Object,
@@ -77,4 +81,8 @@ async function exportCsv() {
7781
adminforth.list.closeThreeDotsDropdown();
7882
}
7983
}
84+
85+
function click() {
86+
exportCsv();
87+
}
8088
</script>

custom/ImportCsv.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div @click="handleImportClick"
2+
<div
33
:class="[
44
'cursor-pointer flex gap-2 items-center',
55
checkProgress ? 'opacity-50 pointer-events-none' : ''
@@ -55,6 +55,9 @@ import { useI18n } from 'vue-i18n';
5555
5656
5757
const { t } = useI18n();
58+
defineExpose({
59+
click,
60+
});
5861
5962
const importProgress: Ref<boolean> = ref(false);
6063
const checkProgress: Ref<boolean> = ref(false);
@@ -217,4 +220,8 @@ function handleImportClick() {
217220
importCsv();
218221
}
219222
}
223+
224+
function click() {
225+
importCsv();
226+
}
220227
</script>

0 commit comments

Comments
 (0)