Does the "component" mentioned in [component system] and [single file component] in vue refer to one thing?

Do the components mentioned in component system and single File component in

vue refer to the same thing?

Mar.09,2021

single file component refers to the file format written by vue-cli scaffolding tools. It is convenient to manage and develop
component system is the general term for vue components, that is to say, a project is composed of a component, and the components are related to each other to form a web page

.

vue-cli project building


There are two ways to register components described in the

component system. Global registration and local registration. A single file component is a local component.
single file component

*componentA.vue*
<template></template>
<script>
  export default {
    data: function () {}
  }
</script>

ordinary js

*componentB.js*
let componentB = {
  data: function () {}
}
export default componentB

use local components

import ComponentA from './ComponentA'
import ComponentB from './ComponentB'
export default {
  components: {
      componentA, componentB
    }
}

"component" refers to the ide/components.html" rel=" nofollow noreferrer "component" of Vue , and the
"single file" component means that you can write all the elements of the component in the same file, thus achieving what is officially called

.
in a component, its templates, logic, and styles are internally coupled, and putting them together actually makes the component more cohesive and maintainable
ide/single-file-components.html" rel=" nofollow noreferrer "> links

of course, you can also organize in your own way, not in the same file

Menu