Skip to content

Commit

Permalink
enableEcharts
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Dec 20, 2024
1 parent 5b222aa commit 8f5bead
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
{{- end -}}

{{- /* ECharts */ -}}
{{- if (.Scratch.Get "this").echarts -}}
{{- if .Scratch.Get "enableEcharts" -}}
{{- $config = dict "echarts" true | merge $config -}}
{{- $options := dict -}}
{{- $shims := dict "echarts" "js/shims/echarts.js" -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/echarts.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
{{- $width := cond .IsNamedParams (.Get "width") (.Get 0) | default "100%" -}}
{{- $height := cond .IsNamedParams (.Get "height") (.Get 1) | default "30rem" -}}
<div class="echarts" id="{{ $id }}" style="width: {{ $width }}; height: {{ $height }};"></div>
{{- .Page.Scratch.SetInMap "this" "echarts" true -}}
{{- .Page.Scratch.Set "enableEcharts" true -}}

0 comments on commit 8f5bead

Please sign in to comment.