feat(income-curve): wire chartRef + onChartComplete placeholder

This commit is contained in:
zerosaturation 2026-06-08 23:41:38 +08:00
parent 12d484e215
commit 7e5377861a

View File

@ -21,6 +21,7 @@
<view v-else class="chart-wrap"> <view v-else class="chart-wrap">
<view class="chart-canvas"> <view class="chart-canvas">
<qiun-data-charts <qiun-data-charts
ref="chartRef"
type="area" type="area"
:opts="chartOpts" :opts="chartOpts"
:chartData="chartData" :chartData="chartData"
@ -33,6 +34,7 @@
:canvasHeight="240" :canvasHeight="240"
ontap ontap
@tap="onChartTap" @tap="onChartTap"
@complete="onChartComplete"
/> />
</view> </view>
</view> </view>
@ -40,7 +42,7 @@
</template> </template>
<script setup> <script setup>
import { computed, ref, watch } from "vue"; import { computed, nextTick, ref, watch } from "vue";
// import easycom // import easycom
import QiunDataCharts from "@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"; import QiunDataCharts from "@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue";
@ -51,6 +53,16 @@ const props = defineProps({
}); });
defineEmits(["retry"]); defineEmits(["retry"]);
// [] qiun-data-charts tooltip
const chartRef = ref(null);
// [] tooltip
const lastShownLen = ref(0);
// [] Task 2
const onChartComplete = (_e) => {
// Task 2 fake event
};
// tap // tap
const currentIndex = ref(0); const currentIndex = ref(0);
watch( watch(