code: function(tab) {
          var that = this;
          if(typeof tab === 'string') {
              that.url = tab;
          } else if($.isPlainObject(tab)) {
              $.extend(that, tab);
          }
          if(!that.id) {
              that.id = $.zui.uuid();
          }
          if(!that.type) {
              if(that.iframe) {
                  that.type = 'iframe';
                  that.url = that.url || that.iframe;
              } else if(that.ajax) {
                  that.type = 'ajax';
                  that.url = that.url || ($.isPlainObject(that.ajax) ? that.ajax.url : that.ajax);
              } else if(that.url) {
                  that.type = tab.ajax ? 'ajax' : 'iframe';
              } else {
                  that.type = 'custom';
              }
          }
          that.createTime = new Date().getTime();
          that.openTime = 0;
          that.onCreate && that.onCreate.call(that);
      }
docs: Tab object
  @param {Object | String} tab