Skip to content

Commit 91a9a8d

Browse files
committed
fix(components): 修正 chart 和 drawer 的错误
1 parent 94f7626 commit 91a9a8d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/components/src/chart/chart/locale.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as echarts from 'echarts';
88
/**
99
* 创建用于加载 echarts 语言包的加载器
1010
* @param obj - 需要加载的内容,比如 `(await import(`../../node_modules/echarts/lib/i18n/langEN.js`)).default`;
11-
* @returns 返回的是一个 {@link DictLoader} 函数,可在 {@link Locale.addDict} 中使用
11+
* @returns 返回的是一个 {@link DictLoader} 函数;
1212
*/
1313
export function createChartLocaleLoader(obj: Parameters<typeof echarts.registerLocale>[1]): DictLoader {
1414
return async (locale: string): Promise<Dict | undefined> => {

packages/components/src/chart/chart/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function Root(props: Props): JSX.Element {
127127
props.ref({
128128
root: () => el,
129129
echarts: () => inst,
130-
update: inst.setOption,
130+
update: o => inst.setOption(o),
131131
});
132132
}
133133
}}

packages/components/src/drawer/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export type ToggleButtonProps = Omit<TB.RootProps, 'onToggle' | 'value' | 'on' |
7171
* 生成一个用于显示和隐藏侧边栏的按钮组件
7272
*/
7373
export function ToggleButton(p: ToggleButtonProps): JSX.Element {
74-
const [hidden, setHidden] = createSignal(!!p.drawer); // 按钮的显示状态
74+
const [hidden, setHidden] = createSignal(!p.drawer); // 按钮的显示状态
7575

7676
const ob = new ResizeObserver(e => {
7777
setHidden(getComputedStyle(e[0].target).getPropertyValue('position') !== 'absolute');

0 commit comments

Comments
 (0)