Commit 1ccd2a67 by fukai

优化istreaminput兼容性

parent d18d08e5
......@@ -12,6 +12,8 @@
export default {
props:['model'],
created:function(){
if(!this.model)
return;
this.model["rows"] = this.model["rows"]||[];
this.value=this.model["rows"].join("\n");
},
......@@ -22,9 +24,11 @@ export default {
},
methods:{
onChange(){
this.model["rows"]=this.value.split("\n");
console.log(this.model["rows"]);
this.$emit("change",this.value);
if(this.model && this.model.rows){
this.model["rows"]=this.value.split("\n");
console.log(this.model["rows"]);
this.$emit("change",this.value);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment