Skip to content

Commit 36eaece

Browse files
authored
Merge pull request #1566 from wuchenguang1998/grid-config
fix:修复grid颜色样式被覆盖问题
2 parents 4da3db7 + c0fcba7 commit 36eaece

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/options.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assign } from 'lodash-es';
1+
import { merge } from 'lodash-es';
22
import { VNode } from 'preact';
33
import { GridOptions } from './view/overlay/Grid';
44
import { BackgroundConfig } from './view/overlay/BackgroundOverlay';
@@ -149,7 +149,7 @@ export function get(options: Definition) {
149149
throw new Error('width或height不支持传入字符串,请传数字');
150150
}
151151
if (grid) {
152-
options.grid = assign({
152+
options.grid = merge({
153153
size: 20,
154154
type: 'dot',
155155
visible: true,
@@ -159,7 +159,7 @@ export function get(options: Definition) {
159159
},
160160
}, grid);
161161
}
162-
return assign({}, defaults, options);
162+
return merge({}, defaults, options);
163163
}
164164

165165
// 默认 options

0 commit comments

Comments
 (0)