docs: fix typo in sample code

This commit is contained in:
Justineo
2021-02-23 18:51:43 +08:00
parent 39437ba907
commit c1bf3695cc
4 changed files with 7 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import {
ref,
unref,
shallowRef,
toRef,
toRefs,
watch,
computed,
@ -77,7 +78,9 @@ export default defineComponent({
() => props.updateOptions || unref(defaultUpdateOptions) || {}
);
const { autoresize, manualUpdate, loading, loadingOptions } = toRefs(props);
const { autoresize, manualUpdate, loading } = toRefs(props);
const loadingOptions = toRef(props, "loadingOptions");
const a = toRef(props, "autoresize");
function init(option?: Option) {
if (chart.value || !root.value) {

View File

@ -6,7 +6,7 @@ export const LOADING_OPTIONS_KEY = "ecLoadingOptions";
export function useLoading(
chart: Ref<EChartsType | undefined>,
loading: Ref<boolean>,
loadingOptions?: Ref<object | undefined>
loadingOptions: Ref<object | undefined>
): void {
const defaultLoadingOptions = inject(LOADING_OPTIONS_KEY, {}) as
| object