gpt-3.5-turbo-0301· openai
Suzhen/CodeChat
<vxe-table show-footer :scroll-y="{enabled: false}" align="center" ref="xTable"…
- User
差异 显示 应出减去实出的值
- Assistant
可以使用计算属性来实现,在表格中添加一个自定义的 column,计算出差异值,代码如下:
<vxe-column title="差异" align="center" width="95"> <template slot-scope="{ row }">{{ row.planAmount - row.doneAmount }}</template> </vxe-column>其中,
row为当前数据行的对象,通过row.planAmount - row.doneAmount计算出差异值,然后在模板中显示出来即可。