New to Vue and trying to understand exactly what things need to be pages (.html
files) and which things need to be Vue components (.vue
files). I understand that Vue components are meant to be reusable, but let's say I have a Log In screen which is the "entry point" to my web app.
The Log In screen doesn't need to be dynamic, can display the same for everyone, and doesn't need to be reusable.
So would I make a public/login.html
file or would I make a src/components/Login.vue
file? And why?
If I just make a public/login.html
file, does Vue provide any JavaScript APIs that I could place inside the <script>
tags to make my life easier (say, for submitting the login form), or is it standard to just use other JS frameworks like jQuery for this type of stuff?
And if I should make it an actual component (src/components/Login.vue
file), then whats the general rule for knowing when to make an HTML page and when to make it a VUE component?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…