From 29bc2b16a018b47f4fda622770072f324301655d Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Tue, 17 Jun 2025 14:51:22 +0800 Subject: [PATCH 1/2] fix: call setenv when create vchart --- packages/vchart/src/compile/compiler.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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({ From 6f50bf36012dd98e492e1bdb4f899c78c9b764ad Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Tue, 17 Jun 2025 15:07:44 +0800 Subject: [PATCH 2/2] feat: add rush change file --- .../@visactor/vchart/fix-setenv_2025-06-17-07-07.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vchart/fix-setenv_2025-06-17-07-07.json 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