提交 92414e2d authored 作者: 王鹏飞's avatar 王鹏飞

移除全局lodash

上级 6eea60e2
...@@ -6,8 +6,6 @@ import modules from './modules' ...@@ -6,8 +6,6 @@ import modules from './modules'
// 公共css // 公共css
import './assets/css/base.css' import './assets/css/base.css'
// lodash
import _ from 'lodash'
// Element-UI // Element-UI
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import './assets/theme/style.scss' import './assets/theme/style.scss'
...@@ -24,9 +22,6 @@ Vue.use(ElementUI, { size: 'small' }) ...@@ -24,9 +22,6 @@ Vue.use(ElementUI, { size: 'small' })
Vue.component('AppCard', AppCard) Vue.component('AppCard', AppCard)
Vue.component('AppList', AppList) Vue.component('AppList', AppList)
// 注册lodash
Vue.prototype.$_ = _
// 注册模块 // 注册模块
modules({ router, store }) modules({ router, store })
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
</template> </template>
<script> <script>
// lodash
import pick from 'lodash/pick'
import { createPermission, updatePermission } from '../api.js' import { createPermission, updatePermission } from '../api.js'
export default { export default {
props: { props: {
...@@ -84,7 +86,7 @@ export default { ...@@ -84,7 +86,7 @@ export default {
}, },
// 编辑权限 // 编辑权限
edit() { edit() {
const params = this.$_.pick(this.form, ['id', 'name', 'tag', 'type', 'desc', 'effect_uris']) const params = pick(this.form, ['id', 'name', 'tag', 'type', 'desc', 'effect_uris'])
updatePermission(params).then(res => { updatePermission(params).then(res => {
this.$message.success('修改成功') this.$message.success('修改成功')
this.$emit('update:visible', false) this.$emit('update:visible', false)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论