docs(Form): fix Area demo (#7249)

This commit is contained in:
neverland 2020-09-26 14:31:50 +08:00 committed by GitHub
parent 15d8f8fad9
commit 0a837e49a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -379,7 +379,10 @@ export default {
}, },
methods: { methods: {
onConfirm(values) { onConfirm(values) {
this.value = values.map((item) => item.name).join('/'); this.value = values
.filter((item) => !!item)
.map((item) => item.name)
.join('/');
this.showArea = false; this.showArea = false;
}, },
}, },

View File

@ -412,7 +412,10 @@ export default {
}, },
methods: { methods: {
onConfirm(values) { onConfirm(values) {
this.value = values.map((item) => item.name).join('/'); this.value = values
.filter((item) => !!item)
.map((item) => item.name)
.join('/');
this.showArea = false; this.showArea = false;
}, },
}, },

View File

@ -52,7 +52,10 @@ export default {
methods: { methods: {
onConfirm(values) { onConfirm(values) {
this.value = values.map((item) => item.name).join('/'); this.value = values
.filter((item) => !!item)
.map((item) => item.name)
.join('/');
this.showArea = false; this.showArea = false;
}, },