Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggest 'components' be placed before 'props' #62

Open
@fritx

Description

@fritx

https://github.com/pablohpsilva/vuejs-component-style-guide#why-6

Again, grouping makes the component easier to read (name; extends; props, data and computed; components; watch and methods; lifecycle methods, etc.);

exportdefault{// Do not forget this little guyname:'RangeSlider',// share common functionality with component mixinsmixins:[],// compose new componentsextends:{},// component properties/variablesprops:{bar:{},// Alphabetizedfoo:{},fooBar:{},},// variablesdata(){},computed:{},// when component uses other componentscomponents:{},// methodswatch:{},methods:{},// component Lifecycle hooksbeforeCreate(){},mounted(){},};

I suggestcomponents be placed afterextends and beforeprops,
because it is intensively related to the<template> on top, and nothing else.

like:https://github.com/vuejs/vue-hackernews-2.0/blob/master/src/views/ItemList.vue

I suffer from scrolling too much, and think it is notrelational(rational).
Any thoughts?
Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp