Tag Archives: ElementUI

[Solved] SyntaxError: E:\IdeaProject\src\main.js: Identifier ‘ElementPlus‘ has already been declared

Problems encountered

 

Module build failed (from .de_modules/babel-loaderb/index.js):
SyntaxError: E:\IdeaProjects\![Please add image description](https://img-blog.csdnimg.cn/c9d36e8ab6984fc390345ad4d7129c70.png)
springboot_vue\src\main.js: Identifier 'ElementPlus' has already been declared. (8:7)


Solution:
by checking the project source code, it is found that the reason for this error is that elementplus has been imported twice. The solution is to delete one!

The effects after the solution are as follows:


Summary

As a back-end R & D personnel, I think it is necessary to have a little understanding of the front-end. Although I may not take the road of R & D in the future, I feel that with the existence of the epidemic, the reduction of Posts and the improvement of academic qualifications, the internal volume may become more and more serious, and the iron still needs to be hard! Choose a road and stick to it. At least the result won’t be too bad. Come on~

How to Solve Error: [Vue warn]: Missing required prop: “value”

I Error reporting scenario

This error occurs when using the El-select component of element-UI in Vue

Operation results: (the following errors will be reported when the interface is initially loaded, and will continue to be reported when clicking El-select and switching El-option)

[Vue warn]: Missing required prop: "value"  

II Error reporting reason

2.1. There is no bidirectional data binding (V-model) in El-select

2.2 El-option does not assign value

You can also try to check errors like these!

[Solved] Errors: 1 http://eslint.org/docs/rules/quotes…elementUI Import Error

Introduction of elementui

Add the following in main.js of src:

import Element from 'element-ui'
import "element-ui/lib/theme-chalk/index.css"
Vue.use(Element)

Introduce error reporting

Errors:
  1  http://eslint.org/docs/rules/quotes

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.

Solution:

In the build/webpack.base.conf.js file, comment out or remove the rule about eslint in: module->rules

Then re-execute the command: npm run dev

It’s normal

Vue ElementUI el-dropdown Error: Uncaught TypeError: Cannot read property ‘disabled‘ of null

Inadvertently shield El dropdown menu and report an error when you click the page at will, causing confusion of the whole HTML elements! Reported a very strange mistake!

Uncaught TypeError: Cannot read property ‘disabled’ of null
You have to have children….

<el-dropdown>
  <span class="el-dropdown-link">
    Dropdown menu<i class="el-icon-arrow-down el-icon---right"></i>
  </span>
  <! -- <el-dropdown-menu slot="dropdown">
    <el-dropdown-item>goldencake</el-dropdown-item>
    <el-dropdown-item>Lion's Head</el-dropdown-item>
    <el-dropdown-item> Spiral noodles</el-dropdown-item>
    <el-dropdown-item disabled>Double-skinned milk</el-dropdown-item>
    <el-dropdown-item divided>Oyster Omelet</el-dropdown-item>
  </el-dropdown-menu> -->
</el-dropdown>