feat(income-curve): wire chartRef + onChartComplete placeholder
This commit is contained in:
parent
12d484e215
commit
7e5377861a
@ -21,6 +21,7 @@
|
||||
<view v-else class="chart-wrap">
|
||||
<view class="chart-canvas">
|
||||
<qiun-data-charts
|
||||
ref="chartRef"
|
||||
type="area"
|
||||
:opts="chartOpts"
|
||||
:chartData="chartData"
|
||||
@ -33,6 +34,7 @@
|
||||
:canvasHeight="240"
|
||||
ontap
|
||||
@tap="onChartTap"
|
||||
@complete="onChartComplete"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@ -40,7 +42,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { computed, nextTick, ref, watch } from "vue";
|
||||
// 显式 import 兜底,避免 easycom 漏注册
|
||||
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"]);
|
||||
|
||||
// [新增] 拿到 qiun-data-charts 实例,用于首次渲染后触发默认 tooltip
|
||||
const chartRef = ref(null);
|
||||
// [新增] 上次已展示 tooltip 的数据点数量,避免重复触发
|
||||
const lastShownLen = ref(0);
|
||||
|
||||
// [新增] 图表首次渲染完成回调(占位,Task 2 填充真实逻辑)
|
||||
const onChartComplete = (_e) => {
|
||||
// 故意留空 — Task 2 接入 fake event 触发
|
||||
};
|
||||
|
||||
// 当前选中的数据点索引:默认指向最后一条,tap 时更新
|
||||
const currentIndex = ref(0);
|
||||
watch(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user