vue中table中render渲染input并给input赋值用props

{
                        title: '入库数量',
                        key: 'quantity',
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Input', {
                                    style: {
                                        padding: '8px'
                                    },
                                    props: {
                                        value: params.row.quantity
                                    },
                                    on: {
                                        'on-change': (event) => {
                                            this.tableData[params.index].quantity = event.target.value
                                        }
                                    }
                                })
                            ])
                        }
                    }
posted @ 2019-10-10 10:32  苏小白啊  阅读(8468)  评论(0编辑  收藏  举报