app.js 521 B

1234567891011121314151617181920212223242526272829
  1. Vue.component('todo-item', {
  2. props: ['todo'],
  3. template: '<li>{{ todo.text }}</li>'
  4. })
  5. var app = new Vue({
  6. el: '#app',
  7. data: {
  8. now: null,
  9. sample_data: ["yellow", "blue", "green"],
  10. plants: plants
  11. },
  12. mounted: function () {
  13. var now = moment();
  14. this.now = moment();
  15. },
  16. computed: {
  17. foo: function () {
  18. return "bar";
  19. },
  20. },
  21. methods: {
  22. current_time: function () {
  23. return moment();
  24. },
  25. }
  26. })