Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c3ec6e72
authored
Jan 15, 2022
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改输入框相同出现的bug
1 parent
c9b6f0d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
src/views/tagsManage/index.vue
src/views/tagsManage/index.vue
View file @
c3ec6e7
...
@@ -509,6 +509,18 @@ export default {
...
@@ -509,6 +509,18 @@ export default {
break
break
}
}
},
},
isHasSome
(
array
)
{
var
temp
=
[]
//一个新的临时数组
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
temp
.
indexOf
(
array
[
i
])
!==
-
1
)
{
return
true
}
if
(
temp
.
indexOf
(
array
[
i
])
==
-
1
)
{
temp
.
push
(
array
[
i
])
}
}
return
false
},
//编辑触发事件
//编辑触发事件
editEvent
(
rowData
)
{
editEvent
(
rowData
)
{
this
.
handleClose
()
this
.
handleClose
()
...
@@ -545,6 +557,17 @@ export default {
...
@@ -545,6 +557,17 @@ export default {
this
.
$message
.
error
(
'不能提交空标签'
)
this
.
$message
.
error
(
'不能提交空标签'
)
return
return
}
}
//如果存在添加标签的输入框的内容的标签相同则不提交
let
isSameTagFlag
=
false
var
tempArr
=
this
.
tagForm
.
tagsList
.
map
(
item
=>
item
.
name
)
isSameTagFlag
=
this
.
isHasSome
(
tempArr
)
console
.
log
(
'dayin'
,
isSameTagFlag
,
tempArr
)
if
(
isSameTagFlag
)
{
this
.
$message
.
error
(
'不能提交相同的标签,请修改'
)
return
}
this
.
newAddTagFun
()
this
.
newAddTagFun
()
//this.handleClose() //这里不管
//this.handleClose() //这里不管
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment