【写在前面】
我们已经做了这样的一个表格
基于这个表格,我们再做一些Rule Editor的探索
【正文】
可以看到这个表单有两个地址表单区域
一个是账单地址 Bill Address
一个是商品邮寄地址 Shipping Address
根据场景,可以添加一个Check Box
叫 Use the same address as bill address 在Shipping Address的上方,如下图:
然后选中这个组件,点击一个锤子的图标,也就是Rule Editor的button
进入到Rule Editor的界面,点击Create按钮,开始创建规则
我们为这个CheckBox添加两条规则:
1.CheckBox选中的时候,隐藏Shipping Address这个Panel
2.当CheckBox没有选中的时候,显示Shipping Address这个Panel
创建后如下图显示
从Preview看看效果:
当CheckBox勾选时,Shipping Address区隐藏
当CheckBox没有勾选时,Shipping Address显示
以上,就是Rule Editor的简单应用
【写在后面】
以后,还会写一些关于Rule Editor深入应用的文章,敬请期待