Валидация файла, убрал кнопку Excel

This commit is contained in:
Alex committed 2023-10-26 11:10:14 +03:00
1 parent 51e61e01bc
commit 00ff10d2c5
1 file changed
+3 -11
+3 -11
View File
@@ -5,12 +5,12 @@
<v-col cols="6" <v-col cols="6"
class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light" class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light"
> >
<v-btn <!-- <v-btn
class="mr-2" class="mr-2"
color="app_bar" color="app_bar"
> >
Excel Excel
</v-btn> </v-btn> -->
<!-- :href="`${baseURL}media/DailyRoundUp.xlsx`" <!-- :href="`${baseURL}media/DailyRoundUp.xlsx`"
download --> download -->
<v-btn <v-btn
@@ -24,7 +24,7 @@
<!-- <v-spacer></v-spacer> --> <!-- <v-spacer></v-spacer> -->
<v-file-input <v-file-input
:rules="rules" :rules="[val => !!val || 'Добавьте файл']"
v-model="dailyfiles" v-model="dailyfiles"
variant="underlined" variant="underlined"
density="compact" density="compact"
@@ -76,20 +76,12 @@ export default {
} }
function checkFile(value) {
return value.length > 0 || 'Добавьте файл'
}
const rules = [checkFile]
return { return {
visiting, visiting,
excelOp, excelOp,
baseURL, baseURL,
dailyfiles, dailyfiles,
onPickFile, onPickFile,
rules,
} }
} }