yandere_fe/src/components/media_upload/media_upload.vue

45 lines
734 B
Vue
Raw Normal View History

2016-11-06 10:28:37 -08:00
<template>
2019-07-05 00:17:44 -07:00
<div
class="media-upload"
@drop.prevent
@dragover.prevent="fileDrag"
@drop="fileDrop"
>
<label
class="btn btn-default"
:title="$t('tool_tip.media_upload')"
>
<i
v-if="uploading"
class="icon-spin4 animate-spin"
/>
<i
v-if="!uploading"
class="icon-upload"
/>
<input
v-if="uploadReady"
type="file"
style="position: fixed; top: -100em"
multiple="true"
@change="change"
2019-07-06 14:54:17 -07:00
>
2016-11-06 10:28:37 -08:00
</label>
</div>
</template>
<script src="./media_upload.js" ></script>
<style>
.media-upload {
.icon-upload {
cursor: pointer;
}
label {
display: block;
width: 100%;
}
}
2016-11-06 10:28:37 -08:00
</style>