json: function(value) { if (!value || typeof value === 'string') { return value } try { return JSON.stringify(value, null, 4).replace(/\n/g, '\r') } catch(e) { debug.log(e) } return value },
initialize: function(config) { List.superclass.initialize.call(this, config) var proxy = this.get('proxy') if (!proxy) { debug.log(__('请设置数据源(proxy)')) } else { if (proxy.LIST) { this.LIST = proxy.LIST.bind(proxy) } else if (!proxy.LIST) { this.LIST = function() { debug.log(__('数据源(proxy)缺少`LIST`方法')) return Promise.resolve({}) } } } this.set('params', $.extend(this._getParams(0), this.get('params'))) // 取列表 this.getList() },
this.LIST = function() { debug.log(__('数据源(proxy)缺少`LIST`方法')) return Promise.resolve({}) }
it('log', function() { debug.log('www') })