iviewでテーブルを使用する場合、render関数を使用してカスタムコンテンツまたはコンポーネントをレンダリングすることは避けられません。ただし、通常の使用では、propsパスの値を認識できません。
公式サイトによると、次のように小道具を使用します。
render: (h, params) => {
return h('div', [
h('Input', {
props: {
value: params.row.maxCommissionAmount,
type: 'number',
min:'0'
},
style: {
width: '100%',
height: '25px',
border: '1px solid #dcdee2',
borderRadius: '4px',
textAlign: 'center',
outline: 'none',
},
})
])
}
小道具の割り当てを使用して直接認識されません
プロップをdomPropsに転送して、通常通り値を渡すことができるようにする
render: (h, params) => {
return h('div', [
h('Input', {
domProps: {
value: params.row.maxCommissionAmount,
type: 'number',
min:'0'
},
style: {
width: '100%',
height: '25px',
border: '1px solid #dcdee2',
borderRadius: '4px',
textAlign: 'center',
outline: 'none',
},
})
])
}
この記事の複製:Ape 2048→ https : //www.mk2048.com/blog/blog.php ?id=h01ki2jh2bb