|
|
|
|
@ -182,7 +182,7 @@ export default {
|
|
|
|
|
//监听并接收父组件的visible并赋值给isShow(子组件接收父组件props传过来的值时不能起一样的类名,会报重复定义的错)
|
|
|
|
|
visible: function(newVal){
|
|
|
|
|
this.isShow = newVal; //newVal即是visible
|
|
|
|
|
// newVal && this.showConfirm(); //newVal存在的话执行showConfirm函数
|
|
|
|
|
// newVal && this.xxx(); //newVal存在的话执行this.xxx()函数
|
|
|
|
|
},
|
|
|
|
|
modelTitle: function(newVal){
|
|
|
|
|
this.title = newVal;
|
|
|
|
|
@ -290,7 +290,7 @@ export default {
|
|
|
|
|
handleCancel() {
|
|
|
|
|
console.log('Clicked cancel button');
|
|
|
|
|
console.log(this.title);
|
|
|
|
|
this.$emit('close',false,{})
|
|
|
|
|
this.$emit('close',false,{}) //第二个参数表示每次$emit的时候就将modelData重新赋值,使watch 监听的modelData:函数不断监听到变化而触发,解决默认只触发一次下次再点开详情为空值的问题
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleSelectChangeLeft(value) {
|
|
|
|
|
|