feat: 📦 lodash to lodash-es

This commit is contained in:
FairyEver
2020-11-17 08:32:46 +08:00
parent 790f69a751
commit f53927121e
25 changed files with 307 additions and 299 deletions

View File

@@ -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'

View File

@@ -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 弄' },

View File

@@ -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' },

View File

@@ -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'

View File

@@ -9,7 +9,7 @@
</template>
<script>
import { last, get } from 'lodash'
import { last, get } from 'lodash-es'
export default {
data () {
return {

View File

@@ -1,7 +1,7 @@
// 提供滚动方面的功能
// 非滚动优化模式通用
import { throttle } from 'lodash'
import { throttle } from 'lodash-es'
// 生成滚动事件的 handler
function handleMaker (wait) {

View File

@@ -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'

View File

@@ -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)

View File

@@ -1,4 +1,4 @@
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
// 插件
import demoPlugins from './modules/demo-plugins'

View File

@@ -1,4 +1,4 @@
import { get, isObject } from 'lodash'
import { get, isObject } from 'lodash-es'
import store from '@/store'
import util from '@/libs/util'

View File

@@ -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'

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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'

View File

@@ -1,4 +1,4 @@
import { get } from 'lodash'
import { get } from 'lodash-es'
import setting from '@/setting.js'
export default {

View File

@@ -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'

View File

@@ -41,7 +41,7 @@
</template>
<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {

View File

@@ -43,7 +43,7 @@
</template>
<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {

View File

@@ -37,7 +37,7 @@
</template>
<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {

View File

@@ -39,7 +39,7 @@
</template>
<script>
import { uniqueId } from 'lodash'
import { uniqueId } from 'lodash-es'
import { mapActions } from 'vuex'
export default {
data () {

View File

@@ -21,7 +21,7 @@
</template>
<script>
import { cloneDeep } from 'lodash'
import { cloneDeep } from 'lodash-es'
import { mapState, mapMutations, mapActions } from 'vuex'
export default {
data () {

View File

@@ -70,7 +70,7 @@
<script>
import { mapState } from 'vuex'
import { get } from 'lodash'
import { get } from 'lodash-es'
export default {
data () {
return {