This commit is contained in:
Lan
2024-10-07 15:39:57 +08:00
parent ebd268d125
commit 78632563cd
+7 -5
View File
@@ -132,19 +132,22 @@
<option value="count">按查看次数</option> <option value="count">按查看次数</option>
<option value="forever">永久</option> <option value="forever">永久</option>
</select> </select>
<div v-if="expirationMethod !== 'forever'" class="flex items-center space-x-2"> <div
v-if="expirationMethod !== 'forever'"
class="flex flex-wrap items-center space-x-2"
>
<input <input
v-model="expirationValue" v-model="expirationValue"
type="number" type="number"
:placeholder="getPlaceholder()" :placeholder="getPlaceholder()"
:class="[ :class="[
'flex-grow px-4 py-2 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500', 'flex-grow px-4 py-2 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 mb-2 sm:mb-0',
isDarkMode isDarkMode
? 'bg-gray-800 bg-opacity-50 text-white' ? 'bg-gray-800 bg-opacity-50 text-white'
: 'bg-white text-gray-900 border border-gray-300' : 'bg-white text-gray-900 border border-gray-300'
]" ]"
/> />
<span :class="[isDarkMode ? 'text-gray-300' : 'text-gray-700']"> <span :class="['whitespace-nowrap', isDarkMode ? 'text-gray-300' : 'text-gray-700']">
{{ getUnit() }} {{ getUnit() }}
</span> </span>
</div> </div>
@@ -594,7 +597,6 @@ const handleSubmit = async () => {
if (sendType.value === 'file') { if (sendType.value === 'file') {
formData.append('file', selectedFile.value!) formData.append('file', selectedFile.value!)
} else { } else {
// 创建一个文本文件并添加到 FormData
const textBlob = new Blob([textContent.value], { type: 'text/plain' }) const textBlob = new Blob([textContent.value], { type: 'text/plain' })
formData.append('file', textBlob, 'text_content.txt') formData.append('file', textBlob, 'text_content.txt')
} }
@@ -707,7 +709,7 @@ const copyRetrieveLink = async (code: string) => {
alertStore.showAlert('取件链接已复制到剪贴板', 'success') alertStore.showAlert('取件链接已复制到剪贴板', 'success')
} catch (err) { } catch (err) {
console.error('无法复制取件链接: ', err) console.error('无法复制取件链接: ', err)
alertStore.showAlert('复制失败,请动复制取件链接', 'error') alertStore.showAlert('复制失败,请动复制取件链接', 'error')
} }
} }