Created
September 21, 2016 05:04
-
-
Save goofmint/e36aaddaf97d9f62ddfa51ba84f75346 to your computer and use it in GitHub Desktop.
5.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dumyAjax(param) { | |
if (param.type === 'search') { | |
return datagrid.util.delay(500, function() { | |
return { | |
fetchLimit: 300, | |
fetchParam: param.param | |
}; | |
}); | |
} else if (param.type === 'fetch') { | |
var range = param.range; | |
var dataArray = []; | |
for (var i = 0, len = range.length; i < len; i++) { | |
dataArray.push({ | |
id: String(i + range.index), | |
name: "User #" + i, | |
position: "Position " + i | |
}); | |
} | |
return datagrid.util.delay(500, function() { | |
return { | |
dataArray: dataArray | |
}; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment