refactor: dialogConfirm onConfirmUpload
This commit is contained in:
parent
7211081d14
commit
52f4db00a9
2 changed files with 12 additions and 6 deletions
|
|
@ -1,11 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import moment from "moment";
|
||||
|
||||
import {
|
||||
parseExcelFile,
|
||||
formatFileSize,
|
||||
type ExcelPreviewData,
|
||||
} from "@/modules/04_registryPerson/utils/excelParser";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { dialogConfirm } = useCounterMixin();
|
||||
|
||||
interface Props {
|
||||
modal: boolean;
|
||||
|
|
@ -157,10 +162,12 @@ async function loadPreview() {
|
|||
}
|
||||
|
||||
function onConfirm() {
|
||||
if (props.file) {
|
||||
isUploading.value = true;
|
||||
emit("confirm", props.file);
|
||||
}
|
||||
dialogConfirm($q, () => {
|
||||
if (props.file) {
|
||||
isUploading.value = true;
|
||||
emit("confirm", props.file);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import * as XLSX from "xlsx";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue