组件双向绑定

    1. <button ev-click={self.add}>+1</button>
    1. var Component = Intact.extend({
    2. return {value: 0};
    3. add: function() {
    4. this.set('value', this.get('value') + 1);
    5. });
    Intact.extend({
        template: template,
        defaults: function() {
            return {count: 0};
        },
        _init: function() {
            this.Component = Component;
        }
    });
    
    
    
    
    
    var Component = self.Component;
    
    <div>
        <Component v-model="count" />
        count属性值为:{self.get('count')}
    </div>
    
    Intact.extend({
        template: template,
        _init: function() {
            this.Component = Component;
        }
    });