浏览代码

【历史回顾】表示时代的那个圈的id改成-1

任一存 2 年之前
父节点
当前提交
f76ee0f93e
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      public/chart.html
  2. 1 1
      public/chart4app.html
  3. 3 3
      src/views/History.vue

+ 1 - 1
public/chart.html

@@ -78,7 +78,7 @@
       dataForRender.nodes = [
         {
           name: timeList[timeIdx],
-          id: 'time-node',
+          id: '-1',
           symbolSize: 100,
           itemStyle: {
             color: randomColor()

+ 1 - 1
public/chart4app.html

@@ -81,7 +81,7 @@
       dataForRender.nodes = [
         {
           name: timeList[timeIdx],
-          id: 'time-node',
+          id: '-1',
           symbolSize: 100,
           itemStyle: {
             color: randomColor()

+ 3 - 3
src/views/History.vue

@@ -130,7 +130,7 @@ export default {
     const articleTitle = computed(() => {
       if (activeCorpId.value === '') {
         return ''
-      } else if (activeCorpId.value === 'time-node') {
+      } else if (activeCorpId.value === '-1') {
         return timeNameList[activeTimeIdx.value]
       } else {
         const targetCorp = corpList.value.find((item) => {
@@ -142,7 +142,7 @@ export default {
     const articleDesc = computed(() => {
       if (activeCorpId.value === '') {
         return ''
-      } else if (activeCorpId.value === 'time-node') {
+      } else if (activeCorpId.value === '-1') {
         return dataRaw['阶段介绍'][activeTimeIdx.value]['介绍']
       } else {
         const targetCorp = corpList.value.find((item) => {
@@ -155,7 +155,7 @@ export default {
     watch(activeCorpId, async (newV) => {
       if (newV === '') {
         articleBannerUrl.value = ''
-      } else if (newV === 'time-node') {
+      } else if (newV === '-1') {
         articleBannerUrl.value = ''
       } else {
         const corpDetail = await api.getHistoryDetail(newV)