add lodash
Former-commit-id: 7906aee3e7b214b4d70d73d60f9ac001155ebdf6 [formerly 7906aee3e7b214b4d70d73d60f9ac001155ebdf6 [formerly 7906aee3e7b214b4d70d73d60f9ac001155ebdf6 [formerly 7906aee3e7b214b4d70d73d60f9ac001155ebdf6 [formerly 73ea160b23495f950ee69827a5c13d36a3e97fbb [formerly 9ef81430726fa668b012ee37224e42c19bd10ead]]]]] Former-commit-id: 6ab56dac7d0f52becc925f670792f9670f33b558 Former-commit-id: b288cfb0c1c6878a42c886c3500692ff1c91f23a Former-commit-id: b3ceec55c70f26d49f4e258c3515d453f040b365 [formerly efb78f7126a3512f4522965ea7a114b300506693] Former-commit-id: 2c78d9a1540bc86e3cee333f2ae4053e349b141c Former-commit-id: fc17089e3aaf1d3297cd0756f309c6fd332e90c4 Former-commit-id: ba1a80dd8dccbc54a34b904f341ce22cb4de6f27 Former-commit-id: d26afea6acaee187772fe9308cb7e8c4e889ec40 Former-commit-id: b1037ca3fdb2886a5544b04d47eef55bacbb1199
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import get from 'lodash.get'
|
||||
import { get } from 'lodash'
|
||||
import ExpandItem from './components/ExpandItem'
|
||||
export default {
|
||||
name: 'd2-error-log-list',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-menu-item :index="menu.path || uniqueid">
|
||||
<el-menu-item :index="menu.path || uniqueId">
|
||||
<i :class="`fa fa-${menu.icon || 'file-o'}`"></i>
|
||||
<span slot="title">{{menu.title || '未命名菜单'}}</span>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniqueid from 'lodash.uniqueid'
|
||||
import { uniqueId } from 'lodash'
|
||||
export default {
|
||||
name: 'd2-layout-header-aside-menu-item',
|
||||
props: {
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
uniqueid: uniqueid('d2-menu-empty-')
|
||||
uniqueId: uniqueId('d2-menu-empty-')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-submenu :index="menu.path || uniqueid">
|
||||
<el-submenu :index="menu.path || uniqueId">
|
||||
<template slot="title">
|
||||
<i :class="`fa fa-${menu.icon || 'folder-o'}`"></i>
|
||||
<span slot="title">{{menu.title}}</span>
|
||||
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniqueid from 'lodash.uniqueid'
|
||||
import { uniqueId } from 'lodash'
|
||||
// 组件
|
||||
import d2LayoutMainMenuItem from '../menu-item'
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
uniqueid: uniqueid('d2-menu-empty-')
|
||||
uniqueId: uniqueId('d2-menu-empty-')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sortby from 'lodash.sortby'
|
||||
import { sortBy } from 'lodash'
|
||||
const req = context => context.keys().map(context)
|
||||
const tables = req(require.context('./components', true, /\.vue$/))
|
||||
const components = {}
|
||||
const tableList = []
|
||||
sortby(tables.map(e => ({
|
||||
sortBy(tables.map(e => ({
|
||||
component: e.default,
|
||||
index: e.default.index
|
||||
})), ['index']).forEach((table, index) => {
|
||||
|
||||
@@ -84,8 +84,7 @@ export default {
|
||||
* 清空当前用户的数据
|
||||
*/
|
||||
async handleClear () {
|
||||
const db = await this.databaseClear()
|
||||
// db 是已经清空了的数据库对象 没有后续操作的话可以不接收这个值
|
||||
await this.databaseClear()
|
||||
this.load()
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -84,8 +84,7 @@ export default {
|
||||
* 清空当前用户的数据
|
||||
*/
|
||||
async handleClear () {
|
||||
const db = await this.databaseByUserClear()
|
||||
// db 是已经清空了的数据库对象 没有后续操作的话可以不接收这个值
|
||||
await this.databaseByUserClear()
|
||||
this.load()
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import clonedeep from 'lodash.clonedeep'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
@@ -55,8 +55,8 @@ export default {
|
||||
])
|
||||
},
|
||||
created () {
|
||||
this.headerBak = clonedeep(this.header)
|
||||
this.asideBak = clonedeep(this.aside)
|
||||
this.headerBak = cloneDeep(this.header)
|
||||
this.asideBak = cloneDeep(this.aside)
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.headerChanged && this.asideChanged) {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import _clonedeep from 'lodash.clonedeep'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import Mock from 'mockjs'
|
||||
import settingDPD from './data/settingDPD'
|
||||
import doc from './md/doc.md'
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
return {
|
||||
mockResult: [],
|
||||
settingDPD,
|
||||
settingDPDClone: _clonedeep(settingDPD),
|
||||
settingDPDClone: cloneDeep(settingDPD),
|
||||
doc
|
||||
}
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import _clonedeep from 'lodash.clonedeep'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import Mock from 'mockjs'
|
||||
import settingDTD from './data/settingDTD'
|
||||
import regexp from './mixins/regexp'
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
return {
|
||||
mockResult: [],
|
||||
settingDTD,
|
||||
settingDTDClone: _clonedeep(settingDTD),
|
||||
settingDTDClone: cloneDeep(settingDTD),
|
||||
doc
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import dayjs from 'dayjs'
|
||||
import get from 'lodash.get'
|
||||
import toString from 'lodash.tostring'
|
||||
import { get, toString } from 'lodash'
|
||||
import util from '@/libs/util.js'
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user