Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
da5d9a8d
Commit
da5d9a8d
authored
Dec 03, 2024
by
tyyin lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(首页): 文件不能重复上传
parent
03ac1362
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
0 deletions
+31
-0
en.yaml
src/locales/langs/en.yaml
+5
-0
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+5
-0
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+5
-0
footer-operation.vue
src/views/home/components/footer-operation.vue
+10
-0
locales.d.ts
types/locales.d.ts
+6
-0
No files found.
src/locales/langs/en.yaml
View file @
da5d9a8d
...
@@ -102,6 +102,8 @@ common_module:
...
@@ -102,6 +102,8 @@ common_module:
stop_playing
:
'
stop'
stop_playing
:
'
stop'
response_error
:
'
Response
error'
response_error
:
'
Response
error'
agent_exception
:
'
Agent
exception,
please
try
again
later!'
agent_exception
:
'
Agent
exception,
please
try
again
later!'
equity
:
'
Equity'
file_size_limit
:
'
The
file
size
cannot
exceed
{size}'
dialogue_module
:
dialogue_module
:
continue_question_message
:
'
You
can
keep
asking
questions'
continue_question_message
:
'
You
can
keep
asking
questions'
...
@@ -479,3 +481,6 @@ personal_settings_module:
...
@@ -479,3 +481,6 @@ personal_settings_module:
upload_file
:
'
Upload
file'
upload_file
:
'
Upload
file'
file_type_restriction_doc
:
'
Only.pdf,.txt,
.md,
.doc,
and.docx
file
types
are
supported'
file_type_restriction_doc
:
'
Only.pdf,.txt,
.md,
.doc,
and.docx
file
types
are
supported'
the_file_type_cannot_be_uploaded
:
'
The
file
type
cannot
be
uploaded'
the_file_type_cannot_be_uploaded
:
'
The
file
type
cannot
be
uploaded'
equity_Module
:
file_empty_tip
:
'
The
file
content
cannot
be
empty'
src/locales/langs/zh-cn.yaml
View file @
da5d9a8d
...
@@ -101,6 +101,8 @@ common_module:
...
@@ -101,6 +101,8 @@ common_module:
stop_playing
:
'
停止播放'
stop_playing
:
'
停止播放'
response_error
:
'
响应错误'
response_error
:
'
响应错误'
agent_exception
:
'
应用异常,请稍后重试!'
agent_exception
:
'
应用异常,请稍后重试!'
equity
:
'
权益'
file_size_limit
:
'
文件大小不能超过
{size}'
dialogue_module
:
dialogue_module
:
continue_question_message
:
'
你可以继续提问'
continue_question_message
:
'
你可以继续提问'
...
@@ -477,3 +479,6 @@ personal_settings_module:
...
@@ -477,3 +479,6 @@ personal_settings_module:
upload_file
:
'
上传文件'
upload_file
:
'
上传文件'
file_type_restriction_doc
:
'
只支持.pdf,
.txt,.md,.doc,.docx文件类型'
file_type_restriction_doc
:
'
只支持.pdf,
.txt,.md,.doc,.docx文件类型'
the_file_type_cannot_be_uploaded
:
'
暂不支持上传该文件类型'
the_file_type_cannot_be_uploaded
:
'
暂不支持上传该文件类型'
equity_Module
:
file_empty_tip
:
'
文件内容不能为空'
src/locales/langs/zh-hk.yaml
View file @
da5d9a8d
...
@@ -101,6 +101,8 @@ common_module:
...
@@ -101,6 +101,8 @@ common_module:
stop_playing
:
'
停止播放'
stop_playing
:
'
停止播放'
response_error
:
'
響應錯誤'
response_error
:
'
響應錯誤'
agent_exception
:
'
應用異常,請稍後重試!'
agent_exception
:
'
應用異常,請稍後重試!'
equity
:
'
权益'
file_size_limit
:
'
文件大小不能超過
{size}'
dialogue_module
:
dialogue_module
:
continue_question_message
:
'
你可以繼續提問'
continue_question_message
:
'
你可以繼續提問'
...
@@ -477,3 +479,6 @@ personal_settings_module:
...
@@ -477,3 +479,6 @@ personal_settings_module:
upload_file
:
'
上傳文件'
upload_file
:
'
上傳文件'
file_type_restriction_doc
:
'
只支持.pdf,
.txt,.md,.doc,.docx文件類型'
file_type_restriction_doc
:
'
只支持.pdf,
.txt,.md,.doc,.docx文件類型'
the_file_type_cannot_be_uploaded
:
'
暫不支持上傳該文件類型'
the_file_type_cannot_be_uploaded
:
'
暫不支持上傳該文件類型'
equity_Module
:
file_empty_tip
:
'
文件內容不能為空'
src/views/home/components/footer-operation.vue
View file @
da5d9a8d
...
@@ -223,6 +223,14 @@ function handleFileUpload(e: Event) {
...
@@ -223,6 +223,14 @@ function handleFileUpload(e: Event) {
return
return
}
}
if
(
file
.
size
===
0
)
{
window
.
$message
.
warning
(
t
(
'equity_Module.file_empty_tip'
))
return
}
else
if
(
file
.
size
>
1024
*
1024
*
10
)
{
window
.
$message
.
warning
(
t
(
'common_module.file_size_limit'
,
{
size
:
'10MB'
}))
return
}
currentInputFileInfo
.
value
=
{
currentInputFileInfo
.
value
=
{
fileName
:
file
.
name
,
fileName
:
file
.
name
,
url
:
URL
.
createObjectURL
(
file
),
url
:
URL
.
createObjectURL
(
file
),
...
@@ -262,6 +270,8 @@ function handleFileUploadCancel() {
...
@@ -262,6 +270,8 @@ function handleFileUploadCancel() {
uploading
:
false
,
uploading
:
false
,
}
}
inputFileRef
.
value
&&
(
inputFileRef
.
value
.
value
=
''
)
if
(
fileUploadController
.
value
)
{
if
(
fileUploadController
.
value
)
{
fileUploadController
.
value
.
abort
()
fileUploadController
.
value
.
abort
()
fileUploadController
.
value
=
null
fileUploadController
.
value
=
null
...
...
types/locales.d.ts
View file @
da5d9a8d
...
@@ -102,6 +102,8 @@ declare namespace I18n {
...
@@ -102,6 +102,8 @@ declare namespace I18n {
stop_playing
:
string
stop_playing
:
string
response_error
:
string
response_error
:
string
agent_exception
:
string
agent_exception
:
string
equity
:
string
file_size_limit
:
string
dialogue_module
:
{
dialogue_module
:
{
continue_question_message
:
string
continue_question_message
:
string
...
@@ -494,5 +496,9 @@ declare namespace I18n {
...
@@ -494,5 +496,9 @@ declare namespace I18n {
file_type_restriction_doc
:
string
file_type_restriction_doc
:
string
the_file_type_cannot_be_uploaded
:
string
the_file_type_cannot_be_uploaded
:
string
}
}
equity_Module
:
{
file_empty_tip
:
string
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment