mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Demo:输入的标签数据为空不允许添加
This commit is contained in:
parent
3c63d94d9c
commit
8a36675b8d
@ -102,7 +102,9 @@ export default {
|
||||
* @Desc: 添加
|
||||
*/
|
||||
add() {
|
||||
this.tagArr.push(this.tag)
|
||||
const text = this.tag.trim()
|
||||
if (!text) return
|
||||
this.tagArr.push(text)
|
||||
this.tag = ''
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user