zoukankan      html  css  js  c++  java
  • backbone 更新1.1.2

    backbone已经更新到1.1.2,在这里总结一下

    我还一直用的1.0的版本,更新确实出现了一些问题

    1.1.0  Backbone Views no longer automatically attach options passed to the constructor as this.options (backbone不再将options传给构造器函数作为this.options)

      var View = Backbone.View = function(options) {
            this.cid = _.uniqueId('view');
            options || (options = {});
            _.extend(this, _.pick(options, viewOptions));
            this._ensureElement();
            this.initialize.apply(this, arguments);
            this.delegateEvents();
        };
    

    不知道为什么要这么做   this.options = options 恢复原来功能

    1.1.1  Backbone now registers itself for AMD (Require.js)   支持AMD封装了,

    (function (root, factory) {
    
        // Set up Backbone appropriately for the environment. Start with AMD.
        if (typeof define === 'function' && define.amd) {
            define(['underscore', 'jquery', 'exports'], function (_, $, exports) {
                // Export global even in AMD case in case this script is loaded with
                // others that may still expect a global Backbone.
                root.Backbone = factory(root, exports, _, $);
            });
    
            // Next for Node.js or CommonJS. jQuery may not be needed as a module.
        } else if (typeof exports !== 'undefined') {
            var _ = require('underscore');
            factory(root, exports, _);
            // Finally, as a browser global.
        } else {
            root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
        }
    
    }(this, function (root, Backbone, _, $) {
        /*backbone 原来*/
       })
    
        )
    
  • 相关阅读:
    hadoop无法启动常见原因
    mahout版本兼容问题
    递归打印字符串
    斐波那契数列
    int('x', base)中的base参数
    打印的特殊符号
    位置参数,默认参数,非关键字可变长参数,关键字可变长参数
    try...except包含try...finally方法
    7.9 未解答
    对集合应用符号 | & ^
  • 原文地址:https://www.cnblogs.com/breakdown/p/3665829.html
Copyright © 2011-2022 走看看