Giter Club home page Giter Club logo

vuejs-snippets's Introduction

Installs! Version! License

Vuejs-snippets

Collection of Vue.js snippets for version 2.0+. Also supports Vuex, vue-router still missing.

Feel free to contribute to this package by submitting a PR!

Usage

Just press TAB or ENTER to unfold a snippet

Single file template

template          <!--Single file component template-->

HTML snippets

router-view       <!--Vuejs router-view component-->
router-link       <!--Vuejs router-link component with named route-->
component         <!--Include component in HTML-->
sccomponent       <!--Include self closed component in HTML-->
i18n              <!--Include internationalization component-->

HTML tags

v-for             <!--Vuejs binding for list rendering-->
v-if              <!--Vuejs binding for if conditional rendering-->
v-else-if         <!--Vuejs binding for else if rendering-->
v-else            <!--Vuejs binding for else conditional rendering-->
v-show            <!--Vuejs binding for show conditional rendering-->
v-model           <!--Vuejs binding for model binding-->
vClassObj         <!--Vuejs binding for class as an object-->
vClassArr         <!--Vuejs binding for class as an array-->

Javascript

beforeCreate; // Vuejs instance lifecycle hook for beforeCreate
created; // Vuejs instance lifecycle hook for created
beforeMount; // Vuejs instance lifecycle hook for beforeMount
mounted; // Vuejs instance lifecycle hook for mounted
beforeUpdate; // Vuejs instance lifecycle hook for beforeUpdate
updated; // Vuejs instance lifecycle hook for updated
beforeUpdate; // Vuejs instance lifecycle hook for beforeUpdate
updated; // Vuejs instance lifecycle hook for updated
beforeDestroy; // Vuejs instance lifecycle hook for beforeDestroy
destroyed; // Vuejs instance lifecycle hook for destroyed
beforeRouteEnter; // Vue-router instance lifecycle hook for beforeRouteEnter
beforeRouteUpdate; // Vue-router instance lifecycle hook for beforeRouteUpdate
beforeRouteLeave; // Vue-router instance lifecycle hook for beforeRouteLeave
vwatch; // Vuejs way to watch instance properties
methods; // Vuejs methods event handlers
components; // Use it when you want to add child components to parent component.
props; // Vuejs way to pass data to child components
vprops; // Vuejs way to pass data to child components with validation
vcomputed; // Vuejs computed property

Vuex

vstore; // Vuex template for a complete store with state,getters,actions and mutations
vmut; // Vuex mutation snippet
vact; // Vuex action snippet
vget; // Vuex getter snippet
vtype; // Vuex constant type snipppet

vuejs-snippets's People

Contributors

corentinandre avatar darwinsalinas avatar lucasbastianik avatar vilaboim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vuejs-snippets's Issues

template

Should we not use data function in template now?

<template>
  <div id="">

  </div>
</template>
<script>
  export default {
    name: "",
    data: function () {
      return {
        // variable : value
      }
    }
  }
</script>
<style lang="scss" scoped>
</style>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.