[{"id":"840f0737-df1d-47ae-bb0a-359b01fe0608","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5d9cdef-8854-4505-89be-a2bbc3cb4482","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3dc3dd55-35b0-4d23-bf62-47bc3650e4ee","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"80d84fbc-d0f8-4e4a-947f-e3e4de9b49b2","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"9152b7ca-0186-4fe3-a26f-5a05f322db07","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
        
(Showing Draft Content)

利用容器实现精准布局

在我们报表设计中,常常会有这样的需求:

113155yltzl6lnd4tzdgc0.png


上方是一个矩表,下方并列有几个图表,我们预览的时候会出现这样的效果:

114826zu6sfeuimaaelrgj.png

发现下面最右侧这个图表并没有按照设计时那样紧贴着第一个图表,那这是什么原因呢?其实是因为我们的报表在绘制元素的的时候,会根据第一个组件的位置相对其去绘制,所以预览时右侧的图表会跑到上方矩表的最右方显示。

那么说了这么多,怎么样才能保证所见即所得呢?答案就是利用容器!

操作方法

我们给下方图表外侧整体包一个容器,如下图:

120644a59777qlp3yn71k9.png


预览:

120659grw3t32toxoxo8om.png

可以看到呈现的效果即是我们设计时的效果,完美解决!