imported multiple times import/no-duplicates 解决方案

vue出错代码如下:

import Vue from 'vue'
import { Button, Form, FormItem } from 'element-ui'
import { Input } from 'element-ui'

Vue.use(Button)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)

imported multiple times import/no-duplicates 这句话是说导入多次的问题

Failed to compile.

./src/plugins/element.js

Module Error (from ./node_modules/eslint-loader/index.js):

D:\vueE-commerce\vue_shop\src\plugins\element.js

2:40 error 'D:\vueE-commerce\vue_shop\node_modules\element-ui\lib\element-ui.common.js' imported multiple times import/no-duplicates

3:23 error 'D:\vueE-commerce\vue_shop\node_modules\element-ui\lib\element-ui.common.js' imported multiple times import/no-duplicates

✖ 2 problems (2 errors, 0 warnings)

1 error and 0 warnings potentially fixable with the `--fix` option.

解决代码如下:

import Vue from 'vue'
import { Button, Form, FormItem, Input } from 'element-ui' // 合并成一行即可解决这个问题

Vue.use(Button)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)