Solution to the Failure of dialog Popup Window Close Button in element ui
- 2021-08-28 18:48:33
- OfStack
As shown below:
<el-dialog title=" Modify inventory " :visible.sync="kcDialog" @close="kcDialog = false">
...
</el-dialog>
Adding 1 @ close can be a method or directly operating kcDialog to false
Supplementary knowledge: webpack external extension, dependency preposition
External js introduced
index.html
<script
src="https://code.jquery.com/jquery-3.1.0.js"
integrity="sha256-slogkvB1K3VOkzAI8QITxV3VzpOnkeNVsKvtkYLMjfk="
crossorigin="anonymous">
</script>
In js
import $ from 'jquery'
At this time, it will be reported to jquery, undefined and so on
In the webpack configuration file
module.exports = {
entry: [],
externals: {
jquery: 'jQuery'
},
output: {...}
}