vue-element-admin中如何打断点
1、vue.config.js中加一行 devtool: ‘source-map’,
configureWebpack: {
devtool: 'source-map',
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: name,
resolve: {
alias: {
'@': resolve('src')
}
}
},
参考:https://cn.vuejs.org/v2/cookbook/debugging-in-vscode.html#在浏览器中展示源代码
在vue-element-admin项目中,为了进行调试,可以在vue.config.js中配置devtool为'source-map',然后在源码关键位置添加debugger关键字来设定断点。参考官方文档以在浏览器中查看源代码。
1837

被折叠的 条评论
为什么被折叠?



