hrms-recruit/src/modules/01_exam/components/Image.vue

45 lines
1.1 KiB
Vue

<!-- card ปถาย -->
<template>
<q-card flat bordered class="col-12 row q-px-lg q-py-md">
<HeaderTop
v-model:edit="edit"
header="รูปถ่าย"
icon="mdi-image-area"
:history="false"
:addData="addData"
/>
<div class="row col-12 q-gutter-sm q-pt-sm">
<q-img
class="items-center"
src="https://picsum.photos/500/300"
style="max-width: 150px; height: 150px"
fit="contain"
>
</q-img>
<q-uploader
v-show="edit"
color="blue"
type="file"
flat
auto-upload
:factory="fileUpload"
class="full-width"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
bordered
/>
</div>
</q-card>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import HeaderTop from '@/components/top.vue'
const edit = ref<boolean>(false)
const addData = ref<boolean>(false)
const fileUpload = async (file: any) => {
return {
url: 'http://localhost:4444/upload',
method: 'POST'
}
}
</script>