0👍
The problem is, that you try to enclose your JavaScript
code in a <style>
tag and close it with a <script>
tag. That doesn´t work.
You have to use this structure:
<template>
// Your HTML
</template>
<script>
// Your Javsscript code
</script>
<style scoped>
// Your CSS
</style>
You can read more about the structure of Vue.js
components here: Single File Components
- [Vuejs]-Vue Js – focusing on element programatically
- [Vuejs]-HMR tls issues with Visual Studio 2022 Vue template
Source:stackexchange.com