|
|
@@ -1,4 +1,6 @@
|
|
|
-# Instantiation
|
|
|
+If you happen to see this - note that most of these are just planned but subject to change at any moment. Feedback is welcome though.
|
|
|
+
|
|
|
+## Instantiation
|
|
|
|
|
|
Instances are no longer compiled at instantiation. Data will be observed, but no DOM compilation will happen until the new instance method `$mount` has been called. Also, when a new instance is created without `el` option, it no longers auto creates one.
|
|
|
|
|
|
@@ -7,24 +9,24 @@ var vm = new Vue({ data: {a:1} }) // only observes the data
|
|
|
vm.$mount('#app') // actually compile the DOM
|
|
|
```
|
|
|
|
|
|
-# More flexible directive syntax
|
|
|
+## More flexible directive syntax
|
|
|
|
|
|
- v-on
|
|
|
|
|
|
``` html
|
|
|
- <a v-on=”{click: onClick, dragmove: onMove}”></a>
|
|
|
+ <a v-on="{click: onClick, dragmove: onMove}"></a>
|
|
|
```
|
|
|
|
|
|
- v-style
|
|
|
|
|
|
``` html
|
|
|
- <a v-style=”{top: list + ‘px’}”></a>
|
|
|
+ <a v-style="{top: list + ‘px’}"></a>
|
|
|
```
|
|
|
|
|
|
- custom directive
|
|
|
|
|
|
``` html
|
|
|
- <a v-my-table=”{ data:hello, rows:5, cols:10 }”>fsef</a>
|
|
|
+ <a v-my-table="{ data:hello, rows:5, cols:10 }">fsef</a>
|
|
|
```
|
|
|
|
|
|
- v-repeat
|
|
|
@@ -40,7 +42,7 @@ vm.$mount('#app') // actually compile the DOM
|
|
|
</ul>
|
|
|
```
|
|
|
|
|
|
-# Two Way filters
|
|
|
+## Two Way filters
|
|
|
|
|
|
``` html
|
|
|
<input v-model="abc | email">
|
|
|
@@ -57,7 +59,23 @@ Vue.filter('format', {
|
|
|
})
|
|
|
```
|
|
|
|
|
|
-# (Experimental) Validators
|
|
|
+## Block logic control
|
|
|
+
|
|
|
+``` html
|
|
|
+<!-- v-repeat="list" -->
|
|
|
+ <h2>{{title}}</h2>
|
|
|
+ <p>{{content}}</p>
|
|
|
+<!-- v-repeat-end -->
|
|
|
+```
|
|
|
+
|
|
|
+``` html
|
|
|
+<!-- v-if="showProfile" -->
|
|
|
+ <my-avatar></my-avatar>
|
|
|
+ <my-bio></my-bio>
|
|
|
+<!-- v-if-end -->
|
|
|
+```
|
|
|
+
|
|
|
+## (Experimental) Validators
|
|
|
|
|
|
``` html
|
|
|
<input v-model="abc @ email">
|
|
|
@@ -71,7 +89,7 @@ Vue.filter('format', {
|
|
|
// this.$valid // false
|
|
|
```
|
|
|
|
|
|
-# (Experimental) One time interpolations
|
|
|
+## (Experimental) One time interpolations
|
|
|
|
|
|
``` html
|
|
|
<span>{{* hello }}</span>
|