mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-10-28 11:33:57 +08:00
docs: fix typo in sample code
This commit is contained in:
@ -37,7 +37,7 @@ import {
|
|||||||
} from 'echarts/renderers'
|
} from 'echarts/renderers'
|
||||||
import {
|
import {
|
||||||
BarChart
|
BarChart
|
||||||
} from 'echarts/chart'
|
} from 'echarts/charts'
|
||||||
import {
|
import {
|
||||||
GridComponent,
|
GridComponent,
|
||||||
TooltipComponent
|
TooltipComponent
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import {
|
|||||||
} from 'echarts/renderers'
|
} from 'echarts/renderers'
|
||||||
import {
|
import {
|
||||||
BarChart
|
BarChart
|
||||||
} from 'echarts/chart'
|
} from 'echarts/charts'
|
||||||
import {
|
import {
|
||||||
GridComponent,
|
GridComponent,
|
||||||
TooltipComponent
|
TooltipComponent
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
unref,
|
unref,
|
||||||
shallowRef,
|
shallowRef,
|
||||||
|
toRef,
|
||||||
toRefs,
|
toRefs,
|
||||||
watch,
|
watch,
|
||||||
computed,
|
computed,
|
||||||
@ -77,7 +78,9 @@ export default defineComponent({
|
|||||||
() => props.updateOptions || unref(defaultUpdateOptions) || {}
|
() => 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) {
|
function init(option?: Option) {
|
||||||
if (chart.value || !root.value) {
|
if (chart.value || !root.value) {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export const LOADING_OPTIONS_KEY = "ecLoadingOptions";
|
|||||||
export function useLoading(
|
export function useLoading(
|
||||||
chart: Ref<EChartsType | undefined>,
|
chart: Ref<EChartsType | undefined>,
|
||||||
loading: Ref<boolean>,
|
loading: Ref<boolean>,
|
||||||
loadingOptions?: Ref<object | undefined>
|
loadingOptions: Ref<object | undefined>
|
||||||
): void {
|
): void {
|
||||||
const defaultLoadingOptions = inject(LOADING_OPTIONS_KEY, {}) as
|
const defaultLoadingOptions = inject(LOADING_OPTIONS_KEY, {}) as
|
||||||
| object
|
| object
|
||||||
|
|||||||
Reference in New Issue
Block a user