Problem Description
提示:这里描述项目中遇到的问题:
Recently, I used the scroll-view component when developing small programs, and found that setting display:flex did not take effect.
solution:
This bug existed before. I originally planned to wrap a layer of view in scroll-view and set display:flex.
After checking the WeChat developer documentation, I found something new. I only need to set enable-flex.
<scroll-view
scroll-x="true"
enable-flex
scroll-left="{
{scrollLeft}}">
</scroll-view>
In conclusion, if you encounter problems in mini program development, please read the documentation. Maybe some bugs in the mini program have been officially fixed.