You can use locallyRegisterComponents to avoid global registration. Now only basic proof of concept is available which can load folder with.vue files, parse it and extract basic props of it. As for the $ prefix, its purpose within the Vue ecosystem is special instance properties that are exposed to the user, so using it for private properties would not be appropriate. Don’t Use v-if With v-for Elements. Child components that are tightly coupled with their parent should include the parent component name as a prefix. Logic is now decoupled from the presentation layer, making maintenance (change/extension of logic) much easier. These components never accept any props, since they are specific to your app, not their context within your app. 3. 100+ components), for these reasons: Components with no content should be self-closing in single-file components, string templates, and JSX - but never in DOM templates. Testing Vue Components. This guide is inspired by the RiotJS... Table of Contents. Refactoring becomes more difficult, because find-and-replace often isn't sufficient to update relative references to a moved component. Then you sort them alphabetically. 2. When components begin to feel cramped or difficult to read, adding spaces between multi-line properties can make them easier to skim again. Please do have a good reason though! Beware: do not be seduced into trading simplicity (being able to understand the flow of your state) for short-term convenience (writing less code). Component names should always be multi-word, except for root App components, and built-in components provided by Vue, such as or . The problem is, there are cases where it’s important not to delete elements that will remain in the DOM. Use module scoping to keep private functions inaccessible from the outside. When using the data property on a component (i.e. easier for IDEs to interpret the code and provide assistance. Documentation Style Guide. Getting Started # For example, we might decide to display a message telling the user how much money they saved. {{ todo.text }} By adapting to the community standard, you will: Some features of Vue exist to accommodate rare edge cases or smoother migrations from a legacy code base. Non-empty HTML attribute values should always be inside quotes (single or double, whichever is not used in JS). Never use v-if on the same element as v-for. Within HTML, kebab-case is. vue-docgen-api parses vue components and load their documentation in a JavaScript object. ButtonClose-icon) can provide some protection. Elements with multiple attributes should span multiple lines, with one attribute per line. Vue.js is a popular front-end framework for building single-page apps. The reasons are: Component names should prefer full words over abbreviations. The problem is, there are cases where it's important not to delete elements that will remain in the DOM. Unfortunately, HTML doesn’t allow custom elements to be self-closing - only official “void” elements. Within JavaScript, camelCase is more natural. Vue uses the _ prefix to define its own private properties, so using the same prefix (e.g. In development, Vue will warn you if a component is ever provided incorrectly formatted props, helping you catch potential sources of error. The style guide for this project is mainly based on the official style guide.It is recommended to read the guide before you start using the project, which will help you write more standardized and unified code. Base components (a.k.a. Instead, we recommend combining the two prefixes into $_, as a convention for user-defined private properties that guarantee no conflicts with Vue. For example: You can definitely include these connector words in component names if you'd like, but the order is still important. When Vue processes directives, v-for has a higher priority than v-if, so that this template: So even if we only render elements for a small fraction of users, we have to iterate over the entire list every time we re-render, whether or not the set of active users has changed. Uncommon abbreviations, in particular, should always be avoided. Not to be confused with a pattern or component library, which happens. Module based development. from a Vuex store). Beware: do not be seduced into trading simplicity (being able to understand the flow of your state) for short-term convenience (writing less code). When you use a CSS property that requires vendor prefixes in v-bind:style, for example transform, Vue will automatically detect and add appropriate prefixes to the applied styles. Directive shorthands (: for v-bind:, @ for v-on: and # for v-slot) should be used always or never. 4. Component/instance options should be ordered consistently. v-for="user in users" v-if="user.isActive"). Style guide. If that's not possible, always use the $_ prefix for custom private properties in a plugin, mixin, etc that should not be considered public API. Then in the rare, performance-critical scenarios where object constancy isn't necessary, you can make a conscious exception. Over time, a number of programming patterns and style preferences have emerged in our efforts to effectively test Vue components. Instead, we want each component instance to only manage its own data. Whenever a build system is available to concatenate files, each component should be in its own file. # Multiple Values. Also note that if you've already invested heavily in kebab-case, consistency with HTML conventions and being able to use the same casing across all your projects may be more important than the advantages listed above. By default, Vue styleguidist will look for styleguide.config.js file in your project’s root folder. It lists component and shows live, editable usage examples based on Markdown files. If you use Vue in a project, it's a great reference to avoid errors, bikeshedding, and anti-patterns. Whenever a build system is available to concatenate files, each component should be in its own file. For example, you may want to use to animate list sorting, or maintain focus if the rendered element is an . This means you can refer to assets using relative paths based on the local file structure. Side Effects (triggers effects outside the component), Global Awareness (requires knowledge beyond the component), Component Type (changes the type of the component), Template Modifiers (changes the way templates are compiled), Template Dependencies (assets used in the template), Composition (merges properties into the options), Interface (the interface to the component), Events (callbacks triggered by reactive events), Non-Reactive Properties (instance properties independent of the reactivity system), Rendering (the declarative description of the component output). # Dynamically Generated Content DOM content created with v-html are not affected by scoped styles, but you can still style them using deep selectors. Many nested sub-directories, which increases the time it takes to browse components in an editor's sidebar. 链接地址. This is the default order we recommend for component options. That means you can feel free to make a different choice in your own codebase, as long as you're consistent and have a good reason. You may want to add one empty line between multi-line properties, particularly if the options can no longer fit on your screen without scrolling. Vue testing. Uncommon abbreviations, in particular, should always be avoided. We might also decide to calculate sales tax, but perhaps display it separately, rather than as part of the final price. For example: You can definitely include these connector words in component names if you’d like, but the order is still important. This is only relevant for single-file components. When organized alphabetically in editors, your app’s base components are all listed together, making them easier to identify. `, ` Component templates should only include simple expressions, with more complex expressions refactored into computed properties or methods. Simpler, well-named computed properties are: When each computed property contains only a very simple expression, with very few dependencies, it's much easier to write tests confirming that it works correctly. Component names in JS/JSX should always be PascalCase, though they may be kebab-case inside strings for simpler applications that only use global component registration through Vue.component. In these cases, move the v-if to a container element (e.g. This makes overriding internal styles easier, with human-readable class names that don't have too high specificity, but are still very unlikely to result in a conflict. If that’s not possible, always use the $_ prefix for custom private properties in a plugin, mixin, etc that should not be considered public API. In development, Vue will warn you if a component is ever provided incorrectly formatted props, helping you catch potential sources of error. #Working with CSS. For example, imagine an app with a search form. Simplifying computed properties forces you to give each value a descriptive name, even if it’s not reused. Imagine, for example, a TodoList component with this data: We might want to reuse this component, allowing users to maintain multiple lists (e.g. If you use any non-Vue custom elements in your templates, such as a web component, PascalCase ensures that your Vue components remain distinctly visible. Refactoring becomes more difficult, because find-and-replace often isn’t sufficient to update relative references to a moved component. for shopping, wishlists, daily chores, etc). Vue.js - The Progressive JavaScript Framework. We don't mind whether your HTML uses single-quotes or double-quotes for attribute values. Documentation Style Guide. 链接地址. Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks. Since component names should always be multi-word, this convention prevents you from having to choose an arbitrary prefix for simple component wrappers (e.g. You can change the location of the config file using --config CLI option. You can use it to generate a static HTML page to share and publish or as a workbench for developing new components using hot reloaded dev server. The array syntax for v-bind:style allows you to apply multiple style objects to the same element: < div v-bind:style = "[baseStyles, overridingStyles]" > Auto-prefixing. You’re browsing the documentation for v2.x and earlier. However, we don't believe that any style guide is ideal for all teams or projects, so mindful deviations are encouraged based on past experience, the surrounding tech stack, and personal values. As an added benefit, using PascalCase within JSX (and templates) allows readers of the code to more easily distinguish between components and HTML elements. Any value that can be named might be useful to the view. We don’t mind whether you use semicolons or trailing commas. These applications always include many in-DOM templates, where, Lifecycle Events (in the order they are called). In these cases, adding a unique key for each item (e.g. The problem is that large numbers of element-attribute selectors (e.g. Last updated: 11/4/2020, 6:01:53 AM, , , // The complex expression has been moved to a computed property, (Minimizing Arbitrary Choices and Cognitive Overhead), // No spaces are also fine, as long as the component, Empty lines in component/instance options, Single-file component top-level element order, train your brain to more easily parse most of the community code you encounter, be able to copy and paste most community code examples without modification, often find new hires are already accustomed to your preferred coding style, at least in regards to Vue. It lists component and shows live, editable usage examples based on Markdown files. There are two common cases where this can be tempting: To filter items in a list (e.g. While attribute values without any spaces are not required to have quotes in HTML, this practice often leads to avoiding spaces, making attribute values less readable. Component names should always be multi-word, except for root App components, and built-in components provided by Vue, such as or . In those cases you can use the /deep/ or ::v-deep combinator instead - both are aliases for >>> and work exactly the same. The autocompletion in editors make the cost of writing longer names very low, while the clarity they provide is invaluable. We should strive to describe what should appear, not how we're computing that value. This guide will provide an overview of different design elements that are available for your use in creating documentation. If you build similar components for a more specific context, they will almost always consume these components (e.g. The style guide is an excellent resource for avoiding errors, improving readability, consistency, and avoiding risky edge-case features when you don’t need them. Our templates and JSX deserve the same consideration. We only recommend considering this approach in very large apps (e.g. ButtonClose-icon) can provide some protection. Prefer class selectors over element selectors in scoped styles, because large numbers of element selectors are slow. Vuex (opens new window) should be preferred for global state management, instead of this.$root or a global event bus. BaseIcon). You can provide an array of multiple (prefixed) values to a style property, for example: In our experience, it's better to always add a unique key, so that you and your team simply never have to worry about these edge cases. Where multiple, equally good options exist, an arbitrary choice can be made to ensure consistency. It's rare that global components are ever referenced in JavaScript, so following a convention for JavaScript makes less sense. Many files with similar names, making rapid file switching in code editors more difficult. You might be tempted to solve this problem differently, nesting all the search components under a "search" directory, then all the settings components under a "settings" directory. .btn-close[data-v-f3f3eg9]), so class selectors should be preferred whenever possible. `, train your brain to more easily parse most of the community code you encounter, be able to copy and paste most community code examples without modification, often find new hires are already accustomed to your preferred coding style, at least in regards to Vue. Share components with your team, including designers and developers. Detailed prop definitions have two advantages: key with v-for is always required on components, in order to maintain internal component state down the subtree. Child components that are tightly coupled with their parent should include the parent component name as a prefix. If you use Vue in a project, it’s a great reference to avoid errors, bikeshedding, and anti-patterns. Vuex is the official flux-like implementation for Vue, and offers not only a central place to manage state, but also tools for organizing, tracking, and debugging state changes. v-for="user in users" v-if="shouldShowUsers"). In these rules, we describe each acceptable option and suggest a default choice. activeUsers). Vuex is the official flux-like implementation for Vue, and offers not only a central place to manage state, but also tools for organizing, tracking, and debugging state changes. ul, ol). To avoid rendering a list if it should be hidden (e.g. Cookbook: Recipes in the cookbook are written with some assumption of familiarity with Vue and its ecosystem. PascalCase works best with autocompletion in code editors, as it's consistent with how we reference components in JS(X) and templates, wherever possible. The autocompletion in editors make the cost of writing longer names very low, while the clarity they provide is invaluable. PascalCase has a few advantages over kebab-case: Unfortunately, due to HTML's case insensitivity, DOM templates must still use kebab-case. Prop definitions should be as detailed as possible. It’s the difference between a blank page in a book and one labeled “This page intentionally left blank.” Your code is also cleaner without the unnecessary closing tag. Editors can autocomplete component names in templates, because PascalCase is also used in JavaScript. Vue components also have instances, so it makes sense to also use PascalCase. This helps you to more quickly find a component when you need to edit it or review how to use it. $_yourPluginName_). Deployed on These rules shine a light on potentially risky features, describing when and why they should be avoided. Single-file components should always order

drum drawing images

drum drawing images

These rules shine a light on potentially risky features, describing when and why they should be avoided. Complex computed properties should be split into as many simpler properties as possible. When updating the DOM, Vue will optimize rendering to perform the cheapest DOM mutations possible. They’re split into categories, so you’ll know where to add new properties from plugins. For example, many projects use the button, btn, or icon class names, so even if not using a strategy such as BEM, adding an app-specific and/or component-specific prefix (e.g. It’s rare that global components are ever referenced in JavaScript, so following a convention for JavaScript makes less sense. Inspired by React Styleguidist, Vue Styleguidist is a tool that generates documentation for components with hot reloading, lists information based on the comments in your source code and Readme files, providing also a playground. They shouldn't be followed blindly, but can help teams save time by being aligned on smaller details. Prop names should always use camelCase during declaration, but kebab-case in templates and JSX. You might be tempted to solve this problem differently, nesting all the search components under a “search” directory, then all the settings components under a “settings” directory. It’s usually best to use key with v-if + v-else, if they are the same element type (e.g. :value="todo.text" If you use any non-Vue custom elements in your templates, such as a web component, PascalCase ensures that your Vue components remain distinctly visible. Computed properties and methods also allow the code to be reused. In these cases, replace users with a new computed property that returns your filtered list (e.g. They're split into categories, so you'll know where to add custom attributes and directives. Since these components are so frequently used, you may want to simply make them global instead of importing them everywhere. The problem is that large numbers of element-attribute selectors (opens new window) (e.g. Please do have a good reason though! You can use locallyRegisterComponents to avoid global registration. Now only basic proof of concept is available which can load folder with.vue files, parse it and extract basic props of it. As for the $ prefix, its purpose within the Vue ecosystem is special instance properties that are exposed to the user, so using it for private properties would not be appropriate. Don’t Use v-if With v-for Elements. Child components that are tightly coupled with their parent should include the parent component name as a prefix. Logic is now decoupled from the presentation layer, making maintenance (change/extension of logic) much easier. These components never accept any props, since they are specific to your app, not their context within your app. 3. 100+ components), for these reasons: Components with no content should be self-closing in single-file components, string templates, and JSX - but never in DOM templates. Testing Vue Components. This guide is inspired by the RiotJS... Table of Contents. Refactoring becomes more difficult, because find-and-replace often isn't sufficient to update relative references to a moved component. Then you sort them alphabetically. 2. When components begin to feel cramped or difficult to read, adding spaces between multi-line properties can make them easier to skim again. Please do have a good reason though! Beware: do not be seduced into trading simplicity (being able to understand the flow of your state) for short-term convenience (writing less code). Component names should always be multi-word, except for root App components, and built-in components provided by Vue, such as or . The problem is, there are cases where it’s important not to delete elements that will remain in the DOM. Use module scoping to keep private functions inaccessible from the outside. When using the data property on a component (i.e. easier for IDEs to interpret the code and provide assistance. Documentation Style Guide. Getting Started # For example, we might decide to display a message telling the user how much money they saved. {{ todo.text }} By adapting to the community standard, you will: Some features of Vue exist to accommodate rare edge cases or smoother migrations from a legacy code base. Non-empty HTML attribute values should always be inside quotes (single or double, whichever is not used in JS). Never use v-if on the same element as v-for. Within HTML, kebab-case is. vue-docgen-api parses vue components and load their documentation in a JavaScript object. ButtonClose-icon) can provide some protection. Elements with multiple attributes should span multiple lines, with one attribute per line. Vue.js is a popular front-end framework for building single-page apps. The reasons are: Component names should prefer full words over abbreviations. The problem is, there are cases where it's important not to delete elements that will remain in the DOM. Unfortunately, HTML doesn’t allow custom elements to be self-closing - only official “void” elements. Within JavaScript, camelCase is more natural. Vue uses the _ prefix to define its own private properties, so using the same prefix (e.g. In development, Vue will warn you if a component is ever provided incorrectly formatted props, helping you catch potential sources of error. The style guide for this project is mainly based on the official style guide.It is recommended to read the guide before you start using the project, which will help you write more standardized and unified code. Base components (a.k.a. Instead, we recommend combining the two prefixes into $_, as a convention for user-defined private properties that guarantee no conflicts with Vue. For example: You can definitely include these connector words in component names if you'd like, but the order is still important. When Vue processes directives, v-for has a higher priority than v-if, so that this template: So even if we only render elements for a small fraction of users, we have to iterate over the entire list every time we re-render, whether or not the set of active users has changed. Uncommon abbreviations, in particular, should always be avoided. Not to be confused with a pattern or component library, which happens. Module based development. from a Vuex store). Beware: do not be seduced into trading simplicity (being able to understand the flow of your state) for short-term convenience (writing less code). When you use a CSS property that requires vendor prefixes in v-bind:style, for example transform, Vue will automatically detect and add appropriate prefixes to the applied styles. Directive shorthands (: for v-bind:, @ for v-on: and # for v-slot) should be used always or never. 4. Component/instance options should be ordered consistently. v-for="user in users" v-if="user.isActive"). Style guide. If that's not possible, always use the $_ prefix for custom private properties in a plugin, mixin, etc that should not be considered public API. Then in the rare, performance-critical scenarios where object constancy isn't necessary, you can make a conscious exception. Over time, a number of programming patterns and style preferences have emerged in our efforts to effectively test Vue components. Instead, we want each component instance to only manage its own data. Whenever a build system is available to concatenate files, each component should be in its own file. # Multiple Values. Also note that if you've already invested heavily in kebab-case, consistency with HTML conventions and being able to use the same casing across all your projects may be more important than the advantages listed above. By default, Vue styleguidist will look for styleguide.config.js file in your project’s root folder. It lists component and shows live, editable usage examples based on Markdown files. If you use Vue in a project, it's a great reference to avoid errors, bikeshedding, and anti-patterns. Whenever a build system is available to concatenate files, each component should be in its own file. For example, you may want to use to animate list sorting, or maintain focus if the rendered element is an . This means you can refer to assets using relative paths based on the local file structure. Side Effects (triggers effects outside the component), Global Awareness (requires knowledge beyond the component), Component Type (changes the type of the component), Template Modifiers (changes the way templates are compiled), Template Dependencies (assets used in the template), Composition (merges properties into the options), Interface (the interface to the component), Events (callbacks triggered by reactive events), Non-Reactive Properties (instance properties independent of the reactivity system), Rendering (the declarative description of the component output). # Dynamically Generated Content DOM content created with v-html are not affected by scoped styles, but you can still style them using deep selectors. Many nested sub-directories, which increases the time it takes to browse components in an editor's sidebar. 链接地址. This is the default order we recommend for component options. That means you can feel free to make a different choice in your own codebase, as long as you're consistent and have a good reason. You may want to add one empty line between multi-line properties, particularly if the options can no longer fit on your screen without scrolling. Vue testing. Uncommon abbreviations, in particular, should always be avoided. We might also decide to calculate sales tax, but perhaps display it separately, rather than as part of the final price. For example: You can definitely include these connector words in component names if you’d like, but the order is still important. This is only relevant for single-file components. When organized alphabetically in editors, your app’s base components are all listed together, making them easier to identify. `, ` Component templates should only include simple expressions, with more complex expressions refactored into computed properties or methods. Simpler, well-named computed properties are: When each computed property contains only a very simple expression, with very few dependencies, it's much easier to write tests confirming that it works correctly. Component names in JS/JSX should always be PascalCase, though they may be kebab-case inside strings for simpler applications that only use global component registration through Vue.component. In these cases, move the v-if to a container element (e.g. This makes overriding internal styles easier, with human-readable class names that don't have too high specificity, but are still very unlikely to result in a conflict. If that’s not possible, always use the $_ prefix for custom private properties in a plugin, mixin, etc that should not be considered public API. In development, Vue will warn you if a component is ever provided incorrectly formatted props, helping you catch potential sources of error. #Working with CSS. For example, imagine an app with a search form. Simplifying computed properties forces you to give each value a descriptive name, even if it’s not reused. Imagine, for example, a TodoList component with this data: We might want to reuse this component, allowing users to maintain multiple lists (e.g. If you use any non-Vue custom elements in your templates, such as a web component, PascalCase ensures that your Vue components remain distinctly visible. Refactoring becomes more difficult, because find-and-replace often isn’t sufficient to update relative references to a moved component. for shopping, wishlists, daily chores, etc). Vue.js - The Progressive JavaScript Framework. We don't mind whether your HTML uses single-quotes or double-quotes for attribute values. Documentation Style Guide. 链接地址. Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks. Since component names should always be multi-word, this convention prevents you from having to choose an arbitrary prefix for simple component wrappers (e.g. You can change the location of the config file using --config CLI option. You can use it to generate a static HTML page to share and publish or as a workbench for developing new components using hot reloaded dev server. The array syntax for v-bind:style allows you to apply multiple style objects to the same element: < div v-bind:style = "[baseStyles, overridingStyles]" > Auto-prefixing. You’re browsing the documentation for v2.x and earlier. However, we don't believe that any style guide is ideal for all teams or projects, so mindful deviations are encouraged based on past experience, the surrounding tech stack, and personal values. As an added benefit, using PascalCase within JSX (and templates) allows readers of the code to more easily distinguish between components and HTML elements. Any value that can be named might be useful to the view. We don’t mind whether you use semicolons or trailing commas. These applications always include many in-DOM templates, where, Lifecycle Events (in the order they are called). In these cases, adding a unique key for each item (e.g. The problem is that large numbers of element-attribute selectors (e.g. Last updated: 11/4/2020, 6:01:53 AM, , , // The complex expression has been moved to a computed property, (Minimizing Arbitrary Choices and Cognitive Overhead), // No spaces are also fine, as long as the component, Empty lines in component/instance options, Single-file component top-level element order, train your brain to more easily parse most of the community code you encounter, be able to copy and paste most community code examples without modification, often find new hires are already accustomed to your preferred coding style, at least in regards to Vue. It lists component and shows live, editable usage examples based on Markdown files. There are two common cases where this can be tempting: To filter items in a list (e.g. While attribute values without any spaces are not required to have quotes in HTML, this practice often leads to avoiding spaces, making attribute values less readable. Component names should always be multi-word, except for root App components, and built-in components provided by Vue, such as or . In those cases you can use the /deep/ or ::v-deep combinator instead - both are aliases for >>> and work exactly the same. The autocompletion in editors make the cost of writing longer names very low, while the clarity they provide is invaluable. We should strive to describe what should appear, not how we're computing that value. This guide will provide an overview of different design elements that are available for your use in creating documentation. If you build similar components for a more specific context, they will almost always consume these components (e.g. The style guide is an excellent resource for avoiding errors, improving readability, consistency, and avoiding risky edge-case features when you don’t need them. Our templates and JSX deserve the same consideration. We only recommend considering this approach in very large apps (e.g. ButtonClose-icon) can provide some protection. Prefer class selectors over element selectors in scoped styles, because large numbers of element selectors are slow. Vuex (opens new window) should be preferred for global state management, instead of this.$root or a global event bus. BaseIcon). You can provide an array of multiple (prefixed) values to a style property, for example: In our experience, it's better to always add a unique key, so that you and your team simply never have to worry about these edge cases. Where multiple, equally good options exist, an arbitrary choice can be made to ensure consistency. It's rare that global components are ever referenced in JavaScript, so following a convention for JavaScript makes less sense. Many files with similar names, making rapid file switching in code editors more difficult. You might be tempted to solve this problem differently, nesting all the search components under a "search" directory, then all the settings components under a "settings" directory. .btn-close[data-v-f3f3eg9]), so class selectors should be preferred whenever possible. `, train your brain to more easily parse most of the community code you encounter, be able to copy and paste most community code examples without modification, often find new hires are already accustomed to your preferred coding style, at least in regards to Vue. Share components with your team, including designers and developers. Detailed prop definitions have two advantages: key with v-for is always required on components, in order to maintain internal component state down the subtree. Child components that are tightly coupled with their parent should include the parent component name as a prefix. If you use Vue in a project, it’s a great reference to avoid errors, bikeshedding, and anti-patterns. Vuex is the official flux-like implementation for Vue, and offers not only a central place to manage state, but also tools for organizing, tracking, and debugging state changes. v-for="user in users" v-if="shouldShowUsers"). In these rules, we describe each acceptable option and suggest a default choice. activeUsers). Vuex is the official flux-like implementation for Vue, and offers not only a central place to manage state, but also tools for organizing, tracking, and debugging state changes. ul, ol). To avoid rendering a list if it should be hidden (e.g. Cookbook: Recipes in the cookbook are written with some assumption of familiarity with Vue and its ecosystem. PascalCase works best with autocompletion in code editors, as it's consistent with how we reference components in JS(X) and templates, wherever possible. The autocompletion in editors make the cost of writing longer names very low, while the clarity they provide is invaluable. PascalCase has a few advantages over kebab-case: Unfortunately, due to HTML's case insensitivity, DOM templates must still use kebab-case. Prop definitions should be as detailed as possible. It’s the difference between a blank page in a book and one labeled “This page intentionally left blank.” Your code is also cleaner without the unnecessary closing tag. Editors can autocomplete component names in templates, because PascalCase is also used in JavaScript. Vue components also have instances, so it makes sense to also use PascalCase. This helps you to more quickly find a component when you need to edit it or review how to use it. $_yourPluginName_). Deployed on These rules shine a light on potentially risky features, describing when and why they should be avoided. Single-file components should always order

web analytics