我有一个简单的工作Vue.js应用程序的以下代码。但是vue.js devtools没有响应。几天前它运行良好,现在不再运行,可能是哪里出了问题?当我转到https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd时,它说它已经被添加了。
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<title>Document</title>
</head>
<body>
<div class="container">
<div id="application">
<input type="text" v-model="message">
<p>The value of the input is: {{ message }}</p>
</div>
</div>
<script>
let data = {
message: 'Hello World'
}
new Vue({
el: '#application',
data: data
})
</script>
</body>
</html>
如OP 所述,一种替代方法是设置本地Web服务器。
另一个-IMHO速度更快且骚扰更少-是让扩展程序可以访问文件URL,该URL默认情况下处于禁用状态。
只需转到chrome://extensions
并保留Vue.js devtools 的“ 允许访问文件URL ”框。
来源:
https : //github.com/vuejs/vue-devtools#common-problems-and-how-to-fix
http://codersdeck.com/vue-js-2-setting-vue-devtools/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句