Demo:输入的标签数据为空不允许添加
This commit is contained in:
parent
3c63d94d9c
commit
8a36675b8d
@ -102,7 +102,9 @@ export default {
|
|||||||
* @Desc: 添加
|
* @Desc: 添加
|
||||||
*/
|
*/
|
||||||
add() {
|
add() {
|
||||||
this.tagArr.push(this.tag)
|
const text = this.tag.trim()
|
||||||
|
if (!text) return
|
||||||
|
this.tagArr.push(text)
|
||||||
this.tag = ''
|
this.tag = ''
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user