Does the order of tags in the vue single file have any effect?

topic description

do I want to know whether the order of template,script,style affects the loading speed or something?

sources of topics and their own ideas

in the actual programming, I found that style and template are very close, if you follow: template,script,style with the massive increase in the script part, it becomes a lot of trouble for operating style, so I will choose:
template style script in which the main part of the style is maintained by the introduction, and the page only writes a little bit of important and closely related
style template script this form because template is associated with style,script, while 2s is not related to each other.
if it does affect loading, then I can only choose the standard way of the official website, if not, then.

Apr.02,2021

style can be brought up in a separate file and introduced through @ import, and you don't want to infect other components and add scoped.

<template>
  <div></div>
</template>
<script>
export default {
}
</script>
<style scoped>
@import url('../style/common.css');
</style>

does not affect, and style can write multiple


it is reasonable that a single file is compiled and packaged, that is, the order in the single file has nothing to do with the startup speed.

is only a personal guess.


the order of tags in the vue single file does not affect

Menu