class

Posted xuyan1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了class相关的知识,希望对你有一定的参考价值。

      class Point {
           constructor(item) {
              this.value = item.value;
              this.name = item.name;
              this.icon = ‘circle‘;
              this.percent = item.percent;
              this.itemStyle = {
                normal: {
                  color: item.itemStyle.normal.color
                }
              };
              this.selected = item.selected
            }
          }
          let mm = []
          tt.forEach((item) => {
            mm.push(new Point({
              value: item.itemCount,
              name: item.diagnoseName,
              percent: item.percent,
              selected: item.isTrue,
              icon : ‘circle‘,
              itemStyle: {
                normal: {
                  color: item.color
                }
              },
            }))
          })

 

以上是关于class的主要内容,如果未能解决你的问题,请参考以下文章