My component vue is like this :
<script>
export default {
...
methods: {
deleteImageProduct(event) {
const payload = {id: this.productId}
const data = this.$store.dispatch('deleteProduct', payload);
data.then((res) =>
$('#test').remove();
)
}
}
}
</script>
When executed, on the gulp watch exist error :
Module build failed: SyntaxError: Unexpected token
And on the console exist error :
Uncaught ReferenceError: jQuery is not defined
I use jquery because the called div is in view or not located in the vue component
How can I solve this problem?