Sha256: 4e5b2599877d9678604937876ce273bf5c6aa62b62b03ca9f04360bac90988bc

Contents?: true

Size: 947 Bytes

Versions: 1

Compression:

Stored size: 947 Bytes

Contents

<!-- Generated by Vue on Rails gem ~> github.com/ytbryan/vueonrails -->
<!-- To find the corresponding pack, go to app/javascript/packs/<%= name %>.js -->
<!-- To generate component part like this, please run `rails generate vue something` -->

<template> 
  <div id="<%= name %>">
    <p>{{ message }}</p>
    <!-- <button @click="onClick">click this</button> -->
  </div>
</template>

<script>
export default {
  // props: {},
  data: function() {
    return {
      message: "Hello <%= name %>!"
    };
  },
  watch: {
    onCreated: function(response) {
      this.items = response.data;
    }
  },
  methods: {
    //uncomment the <button  @click="onClick"> at your template
    onClick: function() {
      console.log("clicked");
    }
  },
  computed: {}
  // components: {},
  // mixins: [],
  // directives: {},
  // filters: {},
  // asyncComputed: {},
};
</script>

<style scoped>
p {
  font-size: 2em;
  text-align: center;
}
</style>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vueonrails-0.1.0 lib/generators/generator_templates/sfc/single-file-component.vue