选择联系人名称修改;
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -42,7 +42,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 编辑时回显的数据, 需要id,name两个字段
|
||||
initfContacts: {
|
||||
initContacts: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
/**
|
||||
* 编辑联系人变化
|
||||
*/
|
||||
initfContacts: {
|
||||
initContacts: {
|
||||
handler() {
|
||||
this.isFirstOpen = true
|
||||
},
|
||||
@@ -96,8 +96,8 @@ export default {
|
||||
}
|
||||
getContactsByCompany(params).then(res => {
|
||||
this.contactsList = res.result
|
||||
if (this.initfContacts && this.initfContacts.hasOwnProperty('id')) {
|
||||
this.contactsList.push(this.initfContacts)
|
||||
if (this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -121,9 +121,9 @@ export default {
|
||||
);
|
||||
},
|
||||
handleDropdownOpen() {
|
||||
if (this.isFirstOpen && this.initfContacts && this.initfContacts.hasOwnProperty('id')) {
|
||||
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
||||
this.contactsList.forEach((item, index) => {
|
||||
if (item.id === this.initfContacts.id) {
|
||||
if (item.id === this.initContacts.id) {
|
||||
this.$emit('change', undefined)
|
||||
this.contactsList.splice(index, 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user