mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
Refactor code language and ts types (#9300)
* 🎨 Code block language list adds custom languages * Update index.d.ts * 🎨 Improve global variable type definition * 🎨 Improve global variable type definition * 🎨 Add constant `EXTRA_CODE_LANGUAGES`
This commit is contained in:
parent
17d2a16a94
commit
b2a27bb54c
16 changed files with 86 additions and 72 deletions
|
|
@ -11,9 +11,9 @@ export const resize = (protyle: IProtyle) => {
|
|||
// 不能 clearTimeout,否则 split 时左侧无法 resize
|
||||
setTimeout(() => {
|
||||
if (abs.width > MIN_ABS || isNaN(abs.width)) {
|
||||
if (typeof echarts !== "undefined") {
|
||||
if (typeof window.echarts !== "undefined") {
|
||||
protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {
|
||||
const chartInstance = echarts.getInstanceById(chartItem.firstElementChild.nextElementSibling.getAttribute("_echarts_instance_"));
|
||||
const chartInstance = window.echarts.getInstanceById(chartItem.firstElementChild.nextElementSibling.getAttribute("_echarts_instance_"));
|
||||
if (chartInstance) {
|
||||
chartInstance.resize();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue