iview 表格中的input实现数据的绑定

 {
            title: '操作',
            key: 'action',
            align: 'center',
            width:400,
            render: (h, params) => {
              return h('Form', [
                h('Input', {
                  style:{
                    marginLeft:"4px",
                    width:'150px'
                  },
                  props:{
                    type:'text',
                    value:params.row.action //使用key的键值
                  },
                  on: {
                    input: (event) => {
                     console.log(event)

                    }
                  }
                }),

                h('Button', {
                  style:{
                    marginLeft:"6px"
                  },
                  props: {
                    type: 'primary',

                  },
                  on: {
                    click: () => {

                    }
                  }
                }, '检索')
              ])
            }
          }

猜你喜欢

转载自blog.csdn.net/qq_41994549/article/details/83659462
今日推荐