1.首先在index.html中引入jquery
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
2.在页面中使用,以点击按钮为例
var vm = null;//介质
$('body').on('click', '.detailBtn', function () {
console.log("点击按钮")
//这里可以使用vm调用下面的方法或变量
})
export default {
data() {
return {
};
},
created() {
vm = this
},
}