chore: prettier source code

This commit is contained in:
chenjiahan
2020-04-02 15:36:02 +08:00
parent 340c56b3b5
commit 2fb5cca49a
93 changed files with 272 additions and 283 deletions
+5 -3
View File
@@ -84,7 +84,7 @@ export default {
currentContact() {
const id = this.chosenContactId;
return id !== null ? this.list.filter(item => item.id === id)[0] : {};
return id !== null ? this.list.filter((item) => item.id === id)[0] : {};
},
},
@@ -114,7 +114,9 @@ export default {
this.showList = false;
if (this.isEdit) {
this.list = this.list.map(item => (item.id === info.id ? info : item));
this.list = this.list.map((item) =>
(item.id === info.id ? info : item)
);
} else {
this.list.push(info);
}
@@ -123,7 +125,7 @@ export default {
onDelete(info) {
this.showEdit = false;
this.list = this.list.filter(item => item.id !== info.id);
this.list = this.list.filter((item) => item.id !== info.id);
if (this.chosenContactId === info.id) {
this.chosenContactId = null;
}