uniapp使用 uCharts 在h5上使用正常,在app上报module rdcharts not found的原因是模块解决比较慢视图层还没显示出来,可以加一个v-if的判断,如下所示
报错的:
<qiun-data-charts class="water-topic-chart" type="line" :ontouch="true"
:reshow="chartData.categories?.length > 0" :chartData="chartData" :opts="chartOpts" ref="charts" />
修改后:
<qiun-data-charts class="water-topic-chart" type="line" :ontouch="true"
v-if="chartData.categories?.length > 0" :reshow="chartData.categories?.length > 0"
:chartData="chartData" :opts="chartOpts" ref="charts" />