Skip to content

Commit 07afc77

Browse files
committed
chore: 修改 lodash 导入方式,优化代码可读性
1 parent c5fd10d commit 07afc77

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/basic/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import _ from 'lodash';
1+
import * as _ from 'lodash';
22
import Config, { setConfig } from './config';
33

44
export * from './apis';

packages/vue2/src/utils/install.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { _ } from '@/common';
22

3+
const { at } = _;
4+
35
/**
46
* 将 Components 数组转换为对象
57
* @deprecated
@@ -134,7 +136,7 @@ export function installOptions(Vue) {
134136
function (obj, propertyPath) {
135137
if (propertyPath === undefined || propertyPath === null) {
136138
return undefined;
137-
} else return _.at(obj, [propertyPath])[0];
139+
} else return at(obj, [propertyPath])[0];
138140
};
139141

140142
Vue.prototype.$setAt =

0 commit comments

Comments
 (0)