|
@ -0,0 +1,29 @@ |
|
|
|
|
|
<template> |
|
|
|
|
|
<div class="upload_container"> |
|
|
|
|
|
<div style="width: 350px"> |
|
|
|
|
|
<t-upload |
|
|
|
|
|
action="http://127.0.0.1:8899/upload" |
|
|
|
|
|
:tips="tips" |
|
|
|
|
|
v-model="files" |
|
|
|
|
|
@fail="handleFail" |
|
|
|
|
|
@success="onSuccess" |
|
|
|
|
|
status="success" |
|
|
|
|
|
theme="file-input" |
|
|
|
|
|
placeholder="未选择文件" |
|
|
|
|
|
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" |
|
|
|
|
|
></t-upload> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
|
|
import { ref } from 'vue' |
|
|
|
|
|
const files = ref([]) |
|
|
|
|
|
const tips = ref('上传格式仅支持xls、xlsx') |
|
|
|
|
|
const handleFail = ({ file }) => {} |
|
|
|
|
|
const onSuccess = () => { |
|
|
|
|
|
tips.value = '' |
|
|
|
|
|
} |
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style> |