<template>
<div >
<input type="button" value="点击" @click="print" />
</div>
</template>
<script>
export default {
methods: {
print() {
console.log("hello world");
}
}
};
</script>
1.
题主打开edge开发工具看下是不是console.log信息没勾上
,如下图
看下控制台有没有报错
应该是你用了edge浏览器不支持的代码吧
edge浏览器引入模块,必须给script标签添加type=“module”
参考
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!