2026.3.26
使用ucharts图表,兼容app 每个图表组件添加:canvas2d="false" 加载方法改成onMounted
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<ChartCard margin="30rpx 0 0 0" title="质量验收数据">
|
||||
<view class="ys">
|
||||
<qiun-data-charts type="mix" :opts="opts" :chartData="chartData" @getIndex="handleTap" />
|
||||
<qiun-data-charts type="mix" :canvas2d="false" :opts="opts" :chartData="chartData" @getIndex="handleTap" />
|
||||
</view>
|
||||
<view class="ys u-margin-top-30">
|
||||
<qiun-data-charts type="mix" :opts="opts" :chartData="chartData" @getIndex="handleTap" />
|
||||
<qiun-data-charts type="mix" :canvas2d="false" :opts="opts" :chartData="chartData" @getIndex="handleTap" />
|
||||
</view>
|
||||
</ChartCard>
|
||||
</template>
|
||||
@@ -12,12 +12,9 @@
|
||||
<script setup>
|
||||
import ChartCard from '@/components/chartCard.vue'
|
||||
import {
|
||||
ref
|
||||
ref,onMounted
|
||||
} from 'vue';
|
||||
import {
|
||||
onReady
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
|
||||
const opts = ref({
|
||||
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
||||
padding: [15, 15, 0, 15],
|
||||
@@ -65,7 +62,7 @@
|
||||
}
|
||||
|
||||
|
||||
onReady(() => {
|
||||
onMounted(() => {
|
||||
let res = {
|
||||
categories: ["关键工序验收", "特殊工程验收", "隐藏工程验收"],
|
||||
series: [{
|
||||
|
||||
Reference in New Issue
Block a user