mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
deps: 更新依赖 echarts@5.3.0、hls@1.1.3、monaco-editor@0.31.1、qa@6.9.7、vide… (#3510)
* deps: 更新依赖 echarts@5.3.0、hls@1.1.3、monaco-editor@0.31.1、qa@6.9.7、video-react@0.15.0,去掉 faker 改成 Chance * 更新 snapshot
This commit is contained in:
parent
eea1847fa6
commit
d14f4563e0
@ -30,7 +30,7 @@ exports[`Renderer:alert 1`] = `
|
||||
/>
|
||||
<button
|
||||
aria-live="polite"
|
||||
class="video-react-big-play-button video-react-big-play-button-center big-play-button-hide"
|
||||
class="video-react-button video-react-big-play-button video-react-big-play-button-center big-play-button-hide"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
|
7495
mock/cfc/mock/chance.js
Normal file
7495
mock/cfc/mock/chance.js
Normal file
File diff suppressed because one or more lines are too long
@ -1,4 +1,6 @@
|
||||
const faker = require("faker");
|
||||
var Chance = require('../chance');
|
||||
|
||||
var chance = new Chance();
|
||||
|
||||
function repeat(fn, times = 10) {
|
||||
let arr = [];
|
||||
@ -9,60 +11,44 @@ function repeat(fn, times = 10) {
|
||||
return arr;
|
||||
}
|
||||
|
||||
module.exports = function(req, res) {
|
||||
module.exports = function (req, res) {
|
||||
res.json({
|
||||
status: 0,
|
||||
msg: "",
|
||||
msg: '',
|
||||
data: repeat(
|
||||
() => ({
|
||||
id: "{{random.number}}",
|
||||
text: "{{address.city}}",
|
||||
id: chance.integer({min: 1, max: 99999999}),
|
||||
text: chance.city(),
|
||||
progress: Math.round(Math.random() * 100),
|
||||
type: Math.round(Math.random() * 5),
|
||||
boolean: Math.random() > 0.5 ? true : false,
|
||||
// boolean: ['pending', 'success', 'fail', 'queue', 'schedule'][Math.floor(Math.random()*5)],
|
||||
list: repeat(
|
||||
() => ({
|
||||
title: "{{name.title}}",
|
||||
description: "{{lorem.words}}"
|
||||
title: chance.word(),
|
||||
description: chance.paragraph()
|
||||
}),
|
||||
Math.round(Math.random() * 10)
|
||||
),
|
||||
audio:
|
||||
"https://news-bos.cdn.bcebos.com/mvideo/%E7%9A%87%E5%90%8E%E5%A4%A7%E9%81%93%E4%B8%9C.aac",
|
||||
'https://news-bos.cdn.bcebos.com/mvideo/%E7%9A%87%E5%90%8E%E5%A4%A7%E9%81%93%E4%B8%9C.aac',
|
||||
carousel: [
|
||||
{
|
||||
image:
|
||||
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg"
|
||||
'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg'
|
||||
},
|
||||
{
|
||||
html:
|
||||
'<div style="width: 100%; height: 200px; background: #e3e3e3; text-align: center; line-height: 200px;">carousel data in crud</div>'
|
||||
html: '<div style="width: 100%; height: 200px; background: #e3e3e3; text-align: center; line-height: 200px;">carousel data in crud</div>'
|
||||
},
|
||||
{
|
||||
image:
|
||||
"https://internal-amis-res.cdn.bcebos.com/images/2019-12/1577157239810/da6376bf988c.png"
|
||||
'https://internal-amis-res.cdn.bcebos.com/images/2019-12/1577157239810/da6376bf988c.png'
|
||||
}
|
||||
],
|
||||
date: Math.round(Date.now() / 1000),
|
||||
// image: '{{image.imageUrl}}',
|
||||
image:
|
||||
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg"
|
||||
'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg'
|
||||
}),
|
||||
parseInt(req.query.perPage, 10) || 10
|
||||
).map(item => {
|
||||
try {
|
||||
const str = JSON.stringify(item);
|
||||
item = JSON.parse(faker.fake(str));
|
||||
} catch (e) {
|
||||
// continue regardless of error
|
||||
}
|
||||
|
||||
item.json = {
|
||||
id: 1,
|
||||
text: "text"
|
||||
};
|
||||
return item;
|
||||
})
|
||||
)
|
||||
});
|
||||
};
|
||||
|
@ -1,66 +1,58 @@
|
||||
const faker = require('faker');
|
||||
var Chance = require('../chance');
|
||||
|
||||
var chance = new Chance();
|
||||
|
||||
function repeat(fn, times = 10) {
|
||||
let arr = [];
|
||||
while (times--) {
|
||||
arr.push(fn());
|
||||
}
|
||||
let arr = [];
|
||||
while (times--) {
|
||||
arr.push(fn());
|
||||
}
|
||||
|
||||
return arr;
|
||||
return arr;
|
||||
}
|
||||
|
||||
module.exports = function(req, res) {
|
||||
res.json({
|
||||
status: 0,
|
||||
msg: 'ok',
|
||||
data: {
|
||||
keywords: req.query.keywords,
|
||||
date: Math.round(Date.now() / 1000),
|
||||
table1: repeat(() => ({
|
||||
id: '{{random.number}}',
|
||||
text: '{{address.city}}',
|
||||
progress: Math.round(Math.random() * 100),
|
||||
type: Math.round(Math.random() * 5),
|
||||
boolean: Math.random() > 0.5 ? true : false,
|
||||
list: repeat(() => ({
|
||||
title: '{{name.title}}',
|
||||
description: '{{lorem.words}}'
|
||||
}), Math.round(Math.random() * 10)),
|
||||
date: Math.round(Date.now() / 1000),
|
||||
// image: '{{image.imageUrl}}',
|
||||
image: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg'
|
||||
}))
|
||||
.map(item => {
|
||||
try {
|
||||
const str = JSON.stringify(item);
|
||||
return JSON.parse(faker.fake(str));
|
||||
} catch (e) {
|
||||
}
|
||||
return item;
|
||||
}),
|
||||
module.exports = function (req, res) {
|
||||
res.json({
|
||||
status: 0,
|
||||
msg: 'ok',
|
||||
data: {
|
||||
keywords: req.query.keywords,
|
||||
date: Math.round(Date.now() / 1000),
|
||||
table1: repeat(() => ({
|
||||
id: chance.integer({min: 1, max: 99999999}),
|
||||
text: chance.city(),
|
||||
progress: Math.round(Math.random() * 100),
|
||||
type: Math.round(Math.random() * 5),
|
||||
boolean: Math.random() > 0.5 ? true : false,
|
||||
list: repeat(
|
||||
() => ({
|
||||
title: chance.word(),
|
||||
description: chance.paragraph()
|
||||
}),
|
||||
Math.round(Math.random() * 10)
|
||||
),
|
||||
date: Math.round(Date.now() / 1000),
|
||||
image:
|
||||
'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg'
|
||||
})),
|
||||
|
||||
table2: repeat(() => ({
|
||||
id: '{{random.number}}',
|
||||
text: '{{address.city}}',
|
||||
progress: Math.round(Math.random() * 100),
|
||||
type: Math.round(Math.random() * 5),
|
||||
boolean: Math.random() > 0.5 ? true : false,
|
||||
list: repeat(() => ({
|
||||
title: '{{name.title}}',
|
||||
description: '{{lorem.words}}'
|
||||
}), Math.round(Math.random() * 10)),
|
||||
date: Math.round(Date.now() / 1000),
|
||||
// image: '{{image.imageUrl}}',
|
||||
image: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg'
|
||||
}))
|
||||
.map(item => {
|
||||
try {
|
||||
const str = JSON.stringify(item);
|
||||
return JSON.parse(faker.fake(str));
|
||||
} catch (e) {
|
||||
}
|
||||
return item;
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
table2: repeat(() => ({
|
||||
id: chance.integer({min: 1, max: 99999999}),
|
||||
text: chance.city(),
|
||||
progress: Math.round(Math.random() * 100),
|
||||
type: Math.round(Math.random() * 5),
|
||||
boolean: Math.random() > 0.5 ? true : false,
|
||||
list: repeat(
|
||||
() => ({
|
||||
title: chance.word(),
|
||||
description: chance.paragraph()
|
||||
}),
|
||||
Math.round(Math.random() * 10)
|
||||
),
|
||||
date: Math.round(Date.now() / 1000),
|
||||
image:
|
||||
'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3893101144,2877209892&fm=23&gp=0.jpg'
|
||||
}))
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -7,8 +7,5 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"faker": "^5.4.0"
|
||||
}
|
||||
"license": "ISC"
|
||||
}
|
||||
|
21
package.json
21
package.json
@ -51,12 +51,12 @@
|
||||
"classnames": "2.3.1",
|
||||
"codemirror": "^5.63.0",
|
||||
"downshift": "6.1.7",
|
||||
"echarts": "5.2.2",
|
||||
"echarts": "5.3.0",
|
||||
"echarts-stat": "^1.2.0",
|
||||
"exceljs": "^4.3.0",
|
||||
"file-saver": "^2.0.2",
|
||||
"froala-editor": "3.1.1",
|
||||
"hls.js": "1.0.10",
|
||||
"hls.js": "1.1.3",
|
||||
"hoist-non-react-statics": "^3.3.2",
|
||||
"hotkeys-js": "^3.8.7",
|
||||
"immutability-helper": "^3.1.1",
|
||||
@ -69,13 +69,13 @@
|
||||
"mobx-react": "^6.1.4",
|
||||
"mobx-state-tree": "^3.17.3",
|
||||
"moment": "^2.19.3",
|
||||
"monaco-editor": "0.30.1",
|
||||
"monaco-editor": "0.31.1",
|
||||
"mpegts.js": "^1.6.10",
|
||||
"papaparse": "^5.3.0",
|
||||
"prop-types": "^15.6.1",
|
||||
"punycode": "^2.1.1",
|
||||
"qrcode.react": "^1.0.1",
|
||||
"qs": "6.5.1",
|
||||
"qs": "6.9.7",
|
||||
"rc-input-number": "^7.3.4",
|
||||
"rc-progress": "^3.1.4",
|
||||
"react": "^16.8.6",
|
||||
@ -94,7 +94,7 @@
|
||||
"tinymce": "^5.10.2",
|
||||
"tslib": "^2.3.1",
|
||||
"uncontrollable": "7.2.1",
|
||||
"video-react": "0.14.1"
|
||||
"video-react": "0.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||
@ -124,13 +124,12 @@
|
||||
"@types/react-transition-group": "4.4.3",
|
||||
"@types/sortablejs": "^1.3.32",
|
||||
"@types/tinymce": "^4.5.24",
|
||||
"axios": "0.21.1",
|
||||
"axios": "0.25.0",
|
||||
"bce-sdk-js": "^0.2.9",
|
||||
"concurrently": "^6.2.2",
|
||||
"concurrently": "^7.0.0",
|
||||
"copy-to-clipboard": "3.3.1",
|
||||
"core-js": "^3.19.2",
|
||||
"css": "3.0.0",
|
||||
"faker": "^5.5.3",
|
||||
"fis-optimizer-terser": "^1.0.1",
|
||||
"fis-parser-sass": "^1.1.1",
|
||||
"fis-parser-svgr": "^1.0.0",
|
||||
@ -153,8 +152,8 @@
|
||||
"jest-canvas-mock": "^2.3.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json5": "^2.2.0",
|
||||
"lint-staged": "^12.1.4",
|
||||
"marked": ">=4.0.10",
|
||||
"lint-staged": "^12.3.2",
|
||||
"marked": ">=4.0.11",
|
||||
"mkdirp": "^1.0.4",
|
||||
"moment-timezone": "^0.5.33",
|
||||
"path-to-regexp": "^6.2.0",
|
||||
@ -167,7 +166,7 @@
|
||||
"react-router": "3.2.0",
|
||||
"react-test-renderer": "^16.8.6",
|
||||
"ts-jest": "^27.0.5",
|
||||
"ts-json-schema-generator": "^0.95.0",
|
||||
"ts-json-schema-generator": "0.96.0",
|
||||
"ts-node": "^10.2.1",
|
||||
"typescript": "~4.5.5"
|
||||
},
|
||||
|
@ -245,7 +245,9 @@ export class Chart extends React.Component<ChartProps> {
|
||||
Promise.all([
|
||||
import('echarts'),
|
||||
import('echarts-stat'),
|
||||
// @ts-ignore 官方没提供 type
|
||||
import('echarts/extension/dataTool'),
|
||||
// @ts-ignore 官方没提供 type
|
||||
import('echarts/extension/bmap/bmap')
|
||||
]).then(async ([echarts, ecStat]) => {
|
||||
(window as any).echarts = echarts;
|
||||
|
Loading…
Reference in New Issue
Block a user