2016-11-07 05:28:37 +11:00
|
|
|
<template>
|
2019-07-05 17:17:44 +10: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"
|
|
|
|
></input>
|
2016-11-07 05:28:37 +11:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./media_upload.js" ></script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.media-upload {
|
|
|
|
font-size: 26px;
|
2019-06-19 06:28:31 +10:00
|
|
|
min-width: 50px;
|
2016-11-07 05:28:37 +11:00
|
|
|
}
|
2016-11-23 09:58:25 +11:00
|
|
|
|
|
|
|
.icon-upload {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2016-11-07 05:28:37 +11:00
|
|
|
</style>
|