现在需求是这样的:
select中有3个option,每个option有各自的编号number、操作人员person,现在需要监听select的change事件,更换option时相应的编号和操作人员会赋值给输入框中,如何实现?
vue的v-model方法pass掉,求其他办法。
更新:
html:
{{key+1}}
{{ opt.drug }}
{{number}}
{{ opt.store }}
script:
methods: {
chooseMedicine:function(rowItem){
rowItem.unit = 只;
rowItem.price = 5;
},
addTr: function () {
var trItem = {
medicine:"",
number:"",
size:"",
use:"",
unit:"",
way:"",
rate:"",
amount:"",
price:"",
money:"",
stores:"",
del:"