提交 48237832 编写于 作者: X xiayifan

package json update and image logic improve

上级 af74f87d
......@@ -15,10 +15,10 @@
"d3-graphviz": "3.0.4",
"element-ui": "2.11.1",
"vue": "2.6.11",
"vue-i18n": "8.9.0",
"vue-router": "3.0.6",
"vue-i18n": "8.15.0",
"vue-router": "3.1.3",
"vuex": "3.1.1",
"echarts": "4.4.0"
"echarts": "4.7.0"
},
"devDependencies": {
"@intlify/vue-i18n-loader": "0.6.1",
......
......@@ -340,10 +340,22 @@ export default {
const tempData = res.data.metadatas;
sampleItem.sampleData = tempData;
const oldTotalStepNum = sampleItem.totalStepNum;
sampleItem.totalStepNum = tempData.length - 1;
if (tempData.length) {
sampleItem.totalStepNum = tempData.length - 1;
} else {
sampleItem.totalStepNum = 0;
sampleItem.sliderValue = 0;
sampleItem.curStep = '';
sampleItem.curImgUrl = '';
sampleItem.curTime = '';
return;
}
if (sampleItem.sliderValue === oldTotalStepNum) {
sampleItem.sliderValue = sampleItem.totalStepNum;
}
if (sampleItem.sliderValue > sampleItem.totalStepNum) {
sampleItem.sliderValue = sampleItem.totalStepNum;
}
const curSampleData =
sampleItem.sampleData[sampleItem.sliderValue];
// Initialize the current step information
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册