fix: update types

This commit is contained in:
Qiuxia Fan 2022-01-04 23:10:26 +08:00
parent 0f09e4b0f7
commit 32232e6f47
5 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,3 @@
import { string } from "vue-types";
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -29,7 +29,8 @@ const props = defineProps({
theme: { type: String, default: "dark" },
itemEvents: { type: Array as PropType<Event[]>, default: () => [] },
});
const chart = ref<any>(null);
/*global Nullable */
const chart = ref<Nullable<HTMLElement>>(null);
const option = computed(() => getOption());
function getOption() {

View File

@ -33,7 +33,8 @@ const props = defineProps({
default: () => ({}),
},
});
const chart = ref<any>(null);
/*global Nullable */
const chart = ref<Nullable<HTMLElement>>(null);
const option = computed(() => getOption());
function getOption() {
const source = (props.data.nodes || []).map((d: number[]) => d[2]);

View File

@ -30,7 +30,8 @@ const props = defineProps({
theme: { type: String, default: "dark" },
itemEvents: { type: Array as PropType<Event[]>, default: () => [] },
});
const chart = ref<any>(null);
/*global Nullable */
const chart = ref<Nullable<HTMLElement>>(null);
const option = computed(() => getOption());
// function resize() {
// chart.value.myChart.resize();

View File

@ -26,7 +26,8 @@ const props = defineProps({
},
theme: { type: String, default: "dark" },
});
const chart = ref<any>(null);
/*global Nullable */
const chart = ref<Nullable<HTMLElement>>(null);
const option = computed(() => getOption());
function getOption() {
return {