Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
najiu-frontend
najiu-admin-template
Commits
05329ce9
Commit
05329ce9
authored
Jul 09, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(upload): ensure the value type is correct
修复BasicUpload组件在设置null值时的问题
parent
7b76945b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
BasicUpload.vue
src/components/Upload/src/BasicUpload.vue
+2
-1
UploadPreviewModal.vue
src/components/Upload/src/UploadPreviewModal.vue
+2
-0
No files found.
CHANGELOG.zh_CN.md
View file @
05329ce9
...
...
@@ -6,6 +6,7 @@
-
新增
`headerTop`
插槽
-
**AppSearch**
修复可能会搜索隐藏菜单的问题
-
**TableAction**
仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
-
**BasicUpload**
修复处理非
`array`
值时报错的问题
-
**其它**
-
修复菜单默认折叠的配置不起作用的问题
-
修复
`safari`
浏览器报错导致网站打不开
...
...
src/components/Upload/src/BasicUpload.vue
View file @
05329ce9
...
...
@@ -46,6 +46,7 @@
import
{
uploadContainerProps
}
from
'
./props
'
;
import
{
omit
}
from
'
lodash-es
'
;
import
{
useI18n
}
from
'
/@/hooks/web/useI18n
'
;
import
{
isArray
}
from
'
/@/utils/is
'
;
export
default
defineComponent
({
name
:
'
BasicUpload
'
,
...
...
@@ -77,7 +78,7 @@
watch
(
()
=>
props
.
value
,
(
value
=
[])
=>
{
fileList
.
value
=
value
;
fileList
.
value
=
isArray
(
value
)
?
value
:
[]
;
},
{
immediate
:
true
}
);
...
...
src/components/Upload/src/UploadPreviewModal.vue
View file @
05329ce9
...
...
@@ -20,6 +20,7 @@
import
{
downloadByUrl
}
from
'
/@/utils/file/download
'
;
import
{
createPreviewColumns
,
createPreviewActionColumn
}
from
'
./data
'
;
import
{
useI18n
}
from
'
/@/hooks/web/useI18n
'
;
import
{
isArray
}
from
'
/@/utils/is
'
;
export
default
defineComponent
({
components
:
{
BasicModal
,
FileList
},
...
...
@@ -33,6 +34,7 @@
watch
(
()
=>
props
.
value
,
(
value
)
=>
{
if
(
!
isArray
(
value
))
value
=
[];
fileListRef
.
value
=
value
.
filter
((
item
)
=>
!!
item
)
.
map
((
item
)
=>
{
...
...
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