Commit f2930a8a authored by linxin's avatar linxin

长字数换行

parent 1249fff2
......@@ -30,16 +30,25 @@
</item>
<item>
<div slot="name">发票地址及电话</div>
<input slot="content" v-model="invoiceInfo.invoice_bp_address_phone_num" type="text" placeholder="请输入发票地址及电话" >
<textarea
slot="content"
ref="myTestarea"
v-model="invoiceInfo.invoice_bp_address_phone_num"
cols="30" rows="1" type="text" placeholder="请输入发票地址及电话"
@input="addRows(invoiceInfo.invoice_bp_address_phone_num)" />
</item>
<item>
<div slot="name">发票开户行及账号</div>
<input
<textarea
slot="content"
ref="myTestareaLive"
v-model="invoiceInfo.invoice_bp_bank_account"
cols="30"
rows="1"
type="text"
placeholder="请输入发票开户行及账号"
>
@input="addRowsLive(invoiceInfo.invoice_bp_bank_account)"
/>
</item>
</list-item>
</template>
......@@ -85,6 +94,22 @@ export default {
this.sendList()
},
methods: {
addRows (e) {
let addNum = parseInt(e.length / 25)
if (addNum === 0) {
this.$refs.myTestarea.rows = 1
} else if (addNum >= addNum - 1 && addNum < addNum + 1) {
this.$refs.myTestarea.rows = addNum + 1
}
},
addRowsLive (e) {
let addNum = parseInt(e.length / 25)
if (addNum === 0) {
this.$refs.myTestareaLive.rows = 1
} else if (addNum >= addNum - 1 && addNum < addNum + 1) {
this.$refs.myTestareaLive.rows = addNum + 1
}
},
getInvoiceType () {
let vm = this
let url = process.env.basePath + 'bp_invoice_kind_query'
......
This diff is collapsed.
......@@ -35,15 +35,22 @@
</item>
<item>
<div slot="name" class="font-color">发票地址及电话</div>
<input slot="content" v-model="invoiceInfo.invoice_bp_address_phone_num" type="text" placeholder="请输入发票地址及电话" >
<textarea
slot="content" ref="myTestarea" v-model="invoiceInfo.invoice_bp_address_phone_num" cols="30"
rows="1"
type="text" placeholder="请输入发票地址及电话" @input="addRows(invoiceInfo.invoice_bp_address_phone_num)" />
</item>
<item>
<div slot="name" class="font-color">发票开户行及账号</div>
<input
slot="content"
ref="myTestareaLive"
v-model="invoiceInfo.invoice_bp_bank_account"
cols="30"
rows="1"
type="text"
placeholder="请输入发票开户行及账号"
@input="addRowsLive(invoiceInfo.invoice_bp_bank_account)"
>
</item>
<item>
......@@ -131,6 +138,22 @@ export default {
}
})
},
addRows (e) {
let addNum = parseInt(e.length / 25)
if (addNum === 0) {
this.$refs.myTestarea.rows = 1
} else if (addNum >= addNum - 1 && addNum < addNum + 1) {
this.$refs.myTestarea.rows = addNum + 1
}
},
addRowsLive (e) {
let addNum = parseInt(e.length / 25)
if (addNum === 0) {
this.$refs.myTestareaLive.rows = 1
} else if (addNum >= addNum - 1 && addNum < addNum + 1) {
this.$refs.myTestareaLive.rows = addNum + 1
}
},
getTaxpayer () {
let vm = this
let url = process.env.basePath + 'bp_taxpayer_type_query'
......
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