Commit 0129b9ca by hulei

fix bugs [附言]

parent a365dbf3
<template>
<div>
<c-input
type="textarea"
v-model="text"
maxlength="60"
:autosize="{ minRows: 4, maxRows: 6 }"
show-word-limit
placeholder="请输入Infotext"
@change="syncStream"
v-bind="$attrs"
v-model="value"
@change="onChange"
></c-input>
</div>
</template>
<script>
export default {
props:['stream'],
props:['model'],
created:function(){
this.stream["rows"] = this.stream["rows"]||[];
this.text=this.stream["rows"].join();
this.model["rows"] = this.model["rows"]||[];
this.value=this.model["rows"].join("\n");
},
data:function(){
return {
text:""
value:""
}
},
computed:{
},
methods:{
syncStream(){
this.stream["rows"]=this.text.split("\r\n");
console.log(this.stream["rows"]);
this.$emit("change",this.text);
},
onChange(){
this.$emit("change",this.text);
this.model["rows"]=this.value.split("\n");
console.log(this.model["rows"]);
this.$emit("change",this.value);
}
}
......
......@@ -7,16 +7,16 @@
label="General"
prop="mtabut.coninf.oitinf.oit.inftxt"
>
<c-input
<i-stream-input
type="textarea"
:rows="6"
@change="valueChange($event, 'mtabut.coninf.oitinf.oit.inflev')"
v-model="model.mtabut.coninf.oitinf.oit.inftxt"
rows="6"
maxlength="60"
resize="none"
show-word-limit
placeholder="请输入Infotext"
></c-input>
@change="valueChange($event, 'mtabut.coninf.oitinf.oit.inflev')"
:model="model.mtabut.coninf.oitinf.oit.inftxt"
></i-stream-input>
</el-form-item>
</c-col>
<c-col :span="7" :offset="1">
......@@ -37,16 +37,16 @@
<c-col :span="24">
<c-col :span="15">
<el-form-item label="Settlement" prop="mtabut.coninf.oitset.oit.inftxt">
<c-input
<i-stream-input
type="textarea"
:rows="6"
@change="valueChange($event, 'mtabut.coninf.oitset.oit.inflev')"
v-model="model.mtabut.coninf.oitset.oit.inftxt"
rows="6"
maxlength="60"
resize="none"
show-word-limit
placeholder="请输入Infotext"
></c-input>
@change="valueChange($event, 'mtabut.coninf.oitset.oit.inflev')"
:model="model.mtabut.coninf.oitset.oit.inftxt"
></i-stream-input>
</el-form-item>
</c-col>
<c-col :span="7" :offset="1">
......@@ -90,7 +90,9 @@
// 附言页签,勿改
import _ from "~/utils/Lodash.js";
import CommonProcess from "~/mixin/CommonProcess";
import IStreamInput from '~/components/IStreamInput'
export default {
components: {IStreamInput},
inject: ["root"],
props: ["model", "codes"],
mixins: [CommonProcess],
......
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