This commit is contained in:
Lan
2024-09-25 19:40:39 +08:00
parent 024b905fb6
commit f33f8773bf
-5
View File
@@ -127,7 +127,6 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { UploadCloudIcon, SendIcon } from 'lucide-vue-next' import { UploadCloudIcon, SendIcon } from 'lucide-vue-next'
import { useRouter } from 'vue-router'
const sendType = ref('file') const sendType = ref('file')
const selectedFile = ref(null) const selectedFile = ref(null)
const textContent = ref('') const textContent = ref('')
@@ -135,7 +134,6 @@ const fileInput = ref(null)
const expirationMethod = ref('time') const expirationMethod = ref('time')
const expirationTime = ref('') const expirationTime = ref('')
const expirationViews = ref('') const expirationViews = ref('')
const router = useRouter()
const triggerFileUpload = () => { const triggerFileUpload = () => {
fileInput.value.click() fileInput.value.click()
} }
@@ -147,9 +145,6 @@ const handleFileUpload = (event) => {
const handleFileDrop = (event) => { const handleFileDrop = (event) => {
selectedFile.value = event.dataTransfer.files[0] selectedFile.value = event.dataTransfer.files[0]
} }
const toSend=()=>{
router.push('/')
}
const handleSubmit = () => { const handleSubmit = () => {
if (sendType.value === 'file' && !selectedFile.value) { if (sendType.value === 'file' && !selectedFile.value) {
alert('请选择要上传的文件') alert('请选择要上传的文件')