流程表单页面使用数据模板组件,版本8.0.2
我在数据模板中用一个checkbox来控制另一个元素的显隐状态(默认是隐藏,checkbox值为是时显示display: flex,否时隐藏display: none),测试正常,但是当我点击添加新的一条数据时,display从flex变为none了,数据没丢
代码如下:
[JavaScript] 纯文本查看 复制代码 const zhongbiao = this.target.parentLine.getModule("zhongbiaotongzhishu").getData()
const tongzhishufujian = this.target.parentLine.node.getElementById("table_2_table$Td_11")
if(zhongbiao === '是') {
tongzhishufujian.style.display = "flex"
} else {
tongzhishufujian.style.display = "none"
}
把上面的代码在新增按钮的onclick事件中写进去,也不好使
录屏如下:
|