Commit 50981b75 by chenjinjing

no message

parent 96311a99
async function lanuch() { async function lanuch() {
testArr(4, 8, "文本", "标题"); testArr(4, 8, "文本", "标题", 10, 100);
} }
function rand(min,max) { function rand(min,max) {
return Math.floor(Math.random()*(max-min))+min; return Math.floor(Math.random()*(max-min))+min;
} }
export function testArr(x, y, xName, yName) { export function testArr(x, y, xName, yName, min, max) {
var arr = []; var arr = [];
for(var i = 1;i < x; i++){ for(var i = 1;i < x; i++){
arr[0] = ["数据名称"]; arr[0] = ["数据名称"];
...@@ -15,7 +15,7 @@ export function testArr(x, y, xName, yName) { ...@@ -15,7 +15,7 @@ export function testArr(x, y, xName, yName) {
arr[i][0] = xName+i; arr[i][0] = xName+i;
for(var j = 1;j < y; j++){ for(var j = 1;j < y; j++){
arr[0][j] = yName+j; arr[0][j] = yName+j;
arr[i][j] = rand(10 ,100); arr[i][j] = rand(min, max);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment