jquery官网:https://jquery.com/
cdn链接:https://code.jquery.com/jquery-3.7.1.js
<template>
<div class="">
测试jq
<div id="jq">这是一个盒子</div>
</div>
</template>
<script>
import $ from '@/utils/jquery-3.7.1.min.js'
export default {
data() {
return {}
},
mounted() {
console.log($('#jq'))
console.log($('#jq')[0].innerText)
}
}
</script>
<style lang="scss" scoped></style>