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:
parent
1e552a8199
commit
957b87e2e8
|
|
@ -1 +1 @@
|
|||
19d478d2f8f1eaf254a2f27de23d407916d28d0d
|
||||
7016ea14567961c24eb1fdee492e0c996099f752
|
||||
|
|
@ -297,6 +297,7 @@ export default [
|
|||
|
||||
| 名称 | 介绍 |
|
||||
| --- | --- |
|
||||
| [lodash](https://lodash.com/docs/4.17.10) | 一致性、模块化、高性能的 JavaScript 实用工具库 |
|
||||
| [axios](https://github.com/axios/axios) | 最流行的网络请求库 |
|
||||
| [better-scroll](https://github.com/ustbhuangyi/better-scroll) | [d2-container](../components/container.md) 的自定义滚动条依赖 |
|
||||
| [dayjs](https://github.com/iamkun/dayjs) | 日期处理库 |
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
913aab0c851084536806be4b44bae511e5810df4
|
||||
e02eeffce394806665f1c5d1cf3f414cdd4f9f59
|
||||
|
|
@ -26,12 +26,7 @@
|
|||
"github-markdown-css": "^2.10.0",
|
||||
"highlight.js": "^9.12.0",
|
||||
"js-cookie": "^2.2.0",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.set": "^4.3.2",
|
||||
"lodash.sortby": "^4.7.0",
|
||||
"lodash.tostring": "^4.1.4",
|
||||
"lodash.uniqueid": "^4.0.1",
|
||||
"lodash": "^4.17.10",
|
||||
"lowdb": "^1.0.0",
|
||||
"marked": "^0.3.9",
|
||||
"mockjs": "^1.0.1-beta3",
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue