add lodash to eval scope

This commit is contained in:
Bowen Tan 2021-11-12 17:47:42 +08:00
parent afc8d8d32f
commit 8b883ba716
2 changed files with 3 additions and 1 deletions

View File

@ -71,6 +71,7 @@ const TreeSelectImpl: ComponentImplementation<Static<typeof PropsSchema>> = ({
ref={popContainerRef}
>
<TreeSelect
showArrow={true}
multiple={multiple}
treeData={treeData}
value={value}

View File

@ -1,4 +1,4 @@
import { toNumber, mapValues, isArray, isPlainObject, set } from 'lodash-es';
import _, { toNumber, mapValues, isArray, isPlainObject, set } from 'lodash-es';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import isLeapYear from 'dayjs/plugin/isLeapYear';
@ -22,6 +22,7 @@ type ExpChunk = {
// TODO: use web worker
const builtIn = {
dayjs,
_,
// TODO: It is a custom dependency, should not be add here
arrayToTree,
};