Skip to content

Commit

Permalink
feat: 📦 lodash to lodash-es
Browse files Browse the repository at this point in the history
  • Loading branch information
FairyEver committed Nov 17, 2020
1 parent 790f69a commit f539271
Show file tree
Hide file tree
Showing 25 changed files with 307 additions and 299 deletions.
1 change: 0 additions & 1 deletion dependencies-cdn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

559 changes: 284 additions & 275 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"highlight.js": "^10.0.2",
"hotkeys-js": "^3.7.3",
"js-cookie": "^2.2.1",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15",
"lowdb": "^1.0.0",
"marked": "^1.0.0",
"nprogress": "^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assign, map } from 'lodash'
import { assign, map } from 'lodash-es'
import faker from 'faker/locale/zh_CN'
import { service, request, serviceForMock, requestForMock, mock } from './service'
import * as tools from './tools'
Expand Down
2 changes: 1 addition & 1 deletion src/api/modules/demo.api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { find, map, random } from 'lodash'
import { find, map, random } from 'lodash-es'

const businessIssue142Db = [
{ id: '1', name: '用户 1', address: '上海市普陀区金沙江路 1518 弄' },
Expand Down
2 changes: 1 addition & 1 deletion src/api/modules/sys.user.api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { find, assign } from 'lodash'
import { find, assign } from 'lodash-es'

const users = [
{ username: 'admin', password: 'admin', uuid: 'admin-uuid', name: 'Admin' },
Expand Down
2 changes: 1 addition & 1 deletion src/api/service.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import Adapter from 'axios-mock-adapter'
import { get } from 'lodash'
import { get } from 'lodash-es'
import util from '@/libs/util'
import { errorLog, errorCreate } from './tools'

Expand Down
2 changes: 1 addition & 1 deletion src/components/d2-container/components/d2-source.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script>
import { last, get } from 'lodash'
import { last, get } from 'lodash-es'
export default {
data () {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/components/d2-container/components/mixins/normal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 提供滚动方面的功能
// 非滚动优化模式通用

import { throttle } from 'lodash'
import { throttle } from 'lodash-es'

// 生成滚动事件的 handler
function handleMaker (wait) {
Expand Down
2 changes: 1 addition & 1 deletion src/layout/header-aside/components/menu-header/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { throttle } from 'lodash'
import { throttle } from 'lodash-es'
import { mapState } from 'vuex'
import menuMixin from '../mixin/menu'
import { createMenu } from '../libs/util.menu'
Expand Down
2 changes: 1 addition & 1 deletion src/libs/util.db.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import low from 'lowdb'
import LocalStorage from 'lowdb/adapters/LocalStorage'
import util from '@/libs/util'
import { cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash-es'

const adapter = new LocalStorage(`d2admin-${process.env.VUE_APP_VERSION}`)
const db = low(adapter)
Expand Down
2 changes: 1 addition & 1 deletion src/menu/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'

// 插件
import demoPlugins from './modules/demo-plugins'
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/error/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get, isObject } from 'lodash'
import { get, isObject } from 'lodash-es'
import store from '@/store'
import util from '@/libs/util'

Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/d2admin/modules/color.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash-es'
import client from 'webpack-theme-color-replacer/client'
import forElementUI from 'webpack-theme-color-replacer/forElementUI'

Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/d2admin/modules/db.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import router from '@/router'
import { cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash-es'
import { database as getDatabase, dbGet, dbSet } from '@/libs/util.db'

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/d2admin/modules/log.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import dayjs from 'dayjs'
import { get } from 'lodash'
import { get } from 'lodash-es'
import util from '@/libs/util.js'

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/d2admin/modules/page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cloneDeep, uniq, get } from 'lodash'
import { cloneDeep, uniq, get } from 'lodash-es'
import router from '@/router'
import setting from '@/setting.js'

Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/d2admin/modules/theme.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get } from 'lodash'
import { get } from 'lodash-es'
import setting from '@/setting.js'

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/playground/add-routes/routes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<script>
import { cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash-es'
import { mapState, mapMutations } from 'vuex'
import { frameInRoutes } from '@/router/routes'
import layoutHeaderAside from '@/layout/header-aside'
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/playground/db/page-public/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</template>

<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/playground/db/page-user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</template>

<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/playground/db/public/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</template>

<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/playground/db/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</template>

<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {
Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/playground/store/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</template>

<script>
import { cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash-es'
import { mapState, mapMutations, mapActions } from 'vuex'
export default {
data () {
Expand Down
2 changes: 1 addition & 1 deletion src/views/system/log/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

<script>
import { mapState } from 'vuex'
import { get } from 'lodash'
import { get } from 'lodash-es'
export default {
data () {
return {
Expand Down

0 comments on commit f539271

Please sign in to comment.