Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
Overview
Overview
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
王立鹏
corporateCulture-qd
Commits
bebee4b2
Commit
bebee4b2
authored
Nov 13, 2025
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 17679】 perf: 优化组件
parent
067c7e80
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
index.vue
src/components/common/SelectTags/index.vue
+1
-1
index.vue
src/components/common/UploadFile/index.vue
+10
-2
No files found.
src/components/common/SelectTags/index.vue
View file @
bebee4b2
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
</div>
</div>
</div>
</div>
</el-popover>
</el-popover>
<div
class=
"flex flex-wrap gap-2"
>
<div
class=
"flex flex-wrap gap-2
mt-2
"
>
<el-tag
<el-tag
v-for=
"tag in selectedTags"
v-for=
"tag in selectedTags"
:key=
"tag.value"
:key=
"tag.value"
...
...
src/components/common/UploadFile/index.vue
View file @
bebee4b2
...
@@ -54,7 +54,16 @@ const initFileList = () => {
...
@@ -54,7 +54,16 @@ const initFileList = () => {
}
}
})
})
}
}
initFileList
()
// 监听 modelValue 变化,重新初始化 fileList
watch
(
()
=>
modelValue
.
value
,
(
newVal
)
=>
{
if
(
newVal
!=
undefined
)
{
initFileList
()
}
},
{
immediate
:
true
},
)
watch
(
fileList
,
(
newVal
)
=>
{
watch
(
fileList
,
(
newVal
)
=>
{
if
(
isArrayOfModelValue
)
{
if
(
isArrayOfModelValue
)
{
...
@@ -87,7 +96,6 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
...
@@ -87,7 +96,6 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
// 在这里处理上传逻辑
// 在这里处理上传逻辑
const
handleChange
=
async
(
uploadFile
:
UploadUserFile
,
uploadFiles
:
UploadUserFile
[])
=>
{
const
handleChange
=
async
(
uploadFile
:
UploadUserFile
,
uploadFiles
:
UploadUserFile
[])
=>
{
await
nextTick
()
if
(
hasReachedLimit
.
value
)
{
if
(
hasReachedLimit
.
value
)
{
ElMessage
.
error
(
`最多上传
${
limit
}
个文件`
)
ElMessage
.
error
(
`最多上传
${
limit
}
个文件`
)
uploadFiles
.
pop
()
uploadFiles
.
pop
()
...
...
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