perf: url upload style
parent
97eb80882b
commit
7db2714197
|
|
@ -4,8 +4,7 @@
|
|||
<el-button class="border-primary video-stop-button" @click="stopChat">
|
||||
<app-icon iconName="app-video-stop" class="mr-8"></app-icon>
|
||||
{{ $t('chat.operation.stopChat') }}
|
||||
</el-button
|
||||
>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="operate-textarea">
|
||||
|
|
@ -180,7 +179,8 @@
|
|||
<video
|
||||
v-if="item.url"
|
||||
:src="item.url"
|
||||
controls style="width: 100px; display: block"
|
||||
controls
|
||||
style="width: 100px; display: block"
|
||||
class="border-r-6"
|
||||
autoplay
|
||||
/>
|
||||
|
|
@ -257,6 +257,16 @@
|
|||
|
||||
<template v-if="recorderStatus === 'STOP' || mode === 'mobile'">
|
||||
<span v-if="props.applicationDetails.file_upload_enable" class="flex align-center ml-4">
|
||||
<!-- 如果URL地址 -->
|
||||
<!-- <el-button
|
||||
text
|
||||
:disabled="checkMaxFilesLimit() || loading"
|
||||
class="mt-4"
|
||||
@click="showURLSetting = true"
|
||||
>
|
||||
<el-icon><Paperclip /></el-icon>
|
||||
</el-button> -->
|
||||
<!-- 没有URL地址 -->
|
||||
<el-upload
|
||||
action="#"
|
||||
multiple
|
||||
|
|
@ -275,10 +285,8 @@
|
|||
>
|
||||
<template #content>
|
||||
<div class="break-all pre-wrap">
|
||||
{{ $t('chat.uploadFile.label') }}:{{
|
||||
$t('chat.uploadFile.most')
|
||||
}}{{
|
||||
props.applicationDetails.file_upload_setting.maxFiles
|
||||
{{ $t('chat.uploadFile.label') }}:{{ $t('chat.uploadFile.most')
|
||||
}}{{ props.applicationDetails.file_upload_setting.maxFiles
|
||||
}}{{ $t('chat.uploadFile.limit') }}
|
||||
{{ props.applicationDetails.file_upload_setting.fileLimit }}MB<br />{{
|
||||
$t('chat.uploadFile.fileType')
|
||||
|
|
@ -323,6 +331,56 @@
|
|||
</auto-tooltip>
|
||||
</el-text>
|
||||
</div>
|
||||
|
||||
<!-- 弹出URL设置框 -->
|
||||
<div class="popperURLSetting" v-if="showURLSetting">
|
||||
<el-card shadow="always" class="border-r-8" style="--el-card-padding: 16px">
|
||||
<el-form label-position="top" ref="urlFormRef" :model="urlForm">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<div class="flex-between">
|
||||
<span>URL 地址</span>
|
||||
<el-select
|
||||
:teleported="false"
|
||||
v-model="urlForm.type"
|
||||
size="small"
|
||||
style="width: 85px"
|
||||
>
|
||||
<el-option :label="$t('common.fileUpload.image')" value="image" />
|
||||
<el-option :label="$t('common.fileUpload.audio')" value="audio" />
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="urlForm.source_url"
|
||||
placeholder="请输入URL地址,每行一个地址"
|
||||
:rows="5"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="text-right">
|
||||
<el-button @click="showURLSetting = false">{{ $t('common.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="showURLSetting = false">{{
|
||||
$t('common.confirm')
|
||||
}}</el-button>
|
||||
</div>
|
||||
<el-divider style="margin: 16px 0" />
|
||||
<el-upload
|
||||
action="#"
|
||||
multiple
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:accept="getAcceptList()"
|
||||
:on-change="(file: any, fileList: any) => uploadFile(file, fileList)"
|
||||
v-model:file-list="fileAllList"
|
||||
ref="upload"
|
||||
class="import-button"
|
||||
>
|
||||
<el-button class="w-full url-upload-button">本地上传</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -387,6 +445,12 @@ const localLoading = computed({
|
|||
},
|
||||
})
|
||||
|
||||
const showURLSetting = ref(false)
|
||||
const urlForm = reactive({
|
||||
source_url: '',
|
||||
type: '',
|
||||
})
|
||||
|
||||
const uploadLoading = computed(() => {
|
||||
return Object.values(filePromisionDict.value).length > 0
|
||||
})
|
||||
|
|
@ -612,8 +676,7 @@ const TouchEnd = (bool?: boolean) => {
|
|||
}
|
||||
}
|
||||
// 取消录音控制台日志
|
||||
Recorder.CLog = function () {
|
||||
}
|
||||
Recorder.CLog = function () {}
|
||||
|
||||
class RecorderManage {
|
||||
recorder?: any
|
||||
|
|
@ -1026,14 +1089,21 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
.popperURLSetting {
|
||||
right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.popperUserInput {
|
||||
.popperURLSetting {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 0;
|
||||
bottom: 50px;
|
||||
right: 60px;
|
||||
bottom: 65px;
|
||||
width: calc(100% - 50px);
|
||||
max-width: 400px;
|
||||
max-width: 320px;
|
||||
.url-upload-button {
|
||||
border-color: var(--el-color-primary);
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ export default {
|
|||
image: 'Image',
|
||||
audio: 'Audio',
|
||||
video: 'Video',
|
||||
other: 'Other',
|
||||
addExtensions: 'Add Extensions',
|
||||
existingExtensionsTip: 'The following extensions already exist',
|
||||
},
|
||||
status: {
|
||||
label: 'Status',
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ export default {
|
|||
image: '圖片',
|
||||
audio: '音頻',
|
||||
video: '視頻',
|
||||
other: '其他文件',
|
||||
addExtensions: '添加後綴名',
|
||||
existingExtensionsTip: '文件後綴已存在',
|
||||
},
|
||||
status: {
|
||||
label: '狀態',
|
||||
|
|
|
|||
Loading…
Reference in New Issue