Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vue [2020/09/24 03:32]
paul created
vue [2020/09/24 04:16]
paul [Directives]
Line 9: Line 9:
 [[https://012.vuejs.org/api/directives.html#Empty_Directives|Directives]] bind a vue object to an HTML element and allow you to do stuff like update text or show an element. [[https://012.vuejs.org/api/directives.html#Empty_Directives|Directives]] bind a vue object to an HTML element and allow you to do stuff like update text or show an element.
  
 +===== Vue Object =====
 +
 +In the new Vue object, there seems to be a list of parameters you can pass in.
 +
 +<code javascript>
 +new Vue({
 +    el: '#app',
 +    data:{
 +        price: 100,
 +        taxRate: 0.10,
 +    },
 +
 +    computed: {
 +        tax: function() {
 +            return this.price * this.taxRate;
 +        }
 +    }
 +});
 +</code>
  • vue.txt
  • Last modified: 2020/11/14 19:34
  • (external edit)