Sha256: f2001cb215eda2a3dab46837d26c3b0548a02276076c2fd136154b805deec6fe
Contents?: true
Size: 997 Bytes
Versions: 5
Compression:
Stored size: 997 Bytes
Contents
<!-- Generated by Vue on Rails https://github.com/vueonrails/vueonrails --> <!-- The corresponding pack is app/javascript/packs/<%= name %>.js --> <!-- Generate another component part like this by running command `rails generate vue something` --> <template> <div id="<%= name %>"> <form-for model="<%= name %>"> <%# something %> </form-for> </div> </template> <script> // import store from '@/store' export default { data: function() { return { message: "Hello <%= name %>!" }; }, watch: { onCreated: function(response) { this.items = response.data; } }, methods: { //Add the button to your .vue template: <button @click="onClick">click this</button> onClick: function() { console.log("clicked"); } }, computed: {} // props: {}, // components: {}, // mixins: [], // directives: {}, // filters: {}, // asyncComputed: {}, }; </script> <style scoped> p { font-size: 2em; text-align: center; } </style>
Version data entries
5 entries across 5 versions & 1 rubygems