Fix upload issue for chat (#23)

This commit is contained in:
AceDataCloud committed 2024-04-06 15:34:58 +00:00
1 parent 3392db2d0f
commit 83e88033ce
4 files changed
+40 -31

No files matched your search

@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix upload issue",
"packageName": "@acedatacloud/hub",
"email": "germey@acedata.cloud",
"dependentChangeType": "patch"
}
+31 -29
View File
@@ -1,27 +1,27 @@
<template>
<el-upload
v-if="canUpload"
v-model:file-list="fileList"
:class="{
upload: true
}"
:disabled="!canUpload"
name="file"
:show-file-list="true"
:limit="1"
:multiple="false"
:action="uploadUrl"
:on-exceed="onExceed"
:on-error="onError"
:headers="headers"
>
<el-tooltip class="box-item" effect="dark" :content="$t('chat.message.uploadFile')" placement="top">
<span class="btn btn-upload">
<font-awesome-icon icon="fa-solid fa-paperclip" class="icon icon-attachment" />
</span>
</el-tooltip>
</el-upload>
<div class="input-box">
<el-upload
v-model:file-list="fileList"
:class="{
upload: true,
disabled: !canUpload
}"
:disabled="!canUpload"
name="file"
:show-file-list="true"
:limit="1"
:multiple="false"
:action="uploadUrl"
:on-exceed="onExceed"
:on-error="onError"
:headers="headers"
>
<el-tooltip class="box-item" effect="dark" :content="$t('chat.message.uploadFile')" placement="top">
<span class="btn btn-upload">
<font-awesome-icon icon="fa-solid fa-paperclip" class="icon icon-attachment" />
</span>
</el-tooltip>
</el-upload>
<span
:class="{
btn: true,
@@ -138,6 +138,14 @@ export default defineComponent({
</script>
<style lang="scss">
.upload {
display: flex;
height: 40px;
.el-upload-list {
flex: 1;
}
}
.input-box {
position: relative;
.input {
@@ -151,11 +159,6 @@ export default defineComponent({
line-height: 30px;
}
}
.el-upload-list {
position: absolute;
width: 400px;
bottom: 45px;
}
.el-textarea.is-disabled .el-textarea__inner {
background-color: initial;
@@ -171,7 +174,7 @@ export default defineComponent({
background: none;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
.upload {
display: inline-block;
display: block;
&.disabled {
.btn-upload {
cursor: not-allowed;
@@ -184,7 +187,6 @@ export default defineComponent({
.input {
border: none;
width: calc(100% - 80px);
margin-left: 30px;
}
.btn {
display: block;
+1 -1
View File
@@ -289,7 +289,7 @@ export default defineComponent({
.dialogue {
flex: 1;
overflow-y: scroll;
padding: 20px 0;
margin: 15px 0;
position: relative;
.messages {
padding-top: 30px;
+1 -1
View File
@@ -256,7 +256,7 @@ export default defineComponent({
.dialogue {
flex: 1;
overflow-y: scroll;
padding: 20px 0;
margin: 15px 0;
position: relative;
.messages {
.message {