diff --git a/common/changes/@visactor/vchart/fix-setenv_2025-06-17-07-07.json b/common/changes/@visactor/vchart/fix-setenv_2025-06-17-07-07.json new file mode 100644 index 0000000000..4192da83ee --- /dev/null +++ b/common/changes/@visactor/vchart/fix-setenv_2025-06-17-07-07.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "fix: fix issue with feishu block and call setenv when create vchart", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file diff --git a/packages/vchart/src/compile/compiler.ts b/packages/vchart/src/compile/compiler.ts index 99cafde114..85ab9dd2c1 100644 --- a/packages/vchart/src/compile/compiler.ts +++ b/packages/vchart/src/compile/compiler.ts @@ -24,7 +24,7 @@ import { type IGraphicContext, type IMark, type IMarkGraphic } from '../mark/int import { Factory } from '../core/factory'; import type { Gesture } from '@visactor/vrender-kits'; import { findMarkGraphic, getDatumOfGraphic } from '../util/mark'; -import { diffMarks, findSimpleMarks, traverseGroupMark } from './util'; +import { diffMarks, findSimpleMarks, toRenderMode, traverseGroupMark } from './util'; import { log } from '../util/debug'; type EventListener = { @@ -107,8 +107,18 @@ export class Compiler implements ICompiler { return; } - const { autoRefreshDpr, dpr, mode, gestureConfig, interactive, clickInterval, autoPreventDefault, background } = - this._option; + const { + autoRefreshDpr, + dpr, + mode, + modeParams, + gestureConfig, + interactive, + clickInterval, + autoPreventDefault, + background + } = this._option; + vglobal.setEnv(toRenderMode(mode), modeParams ?? {}); this._stage = this._option.stage ?? (new Stage({