|
|
|
@ -21,6 +21,10 @@ Component({
|
|
|
|
|
type: Array,
|
|
|
|
|
value: [],
|
|
|
|
|
},
|
|
|
|
|
lvl: {
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
value: 18
|
|
|
|
|
},
|
|
|
|
|
color: {
|
|
|
|
|
type: String,
|
|
|
|
|
value: 'random-dark'
|
|
|
|
@ -37,7 +41,10 @@ Component({
|
|
|
|
|
query.select('#' + this.data.canvasId)
|
|
|
|
|
.fields({ node: true, size: true })
|
|
|
|
|
.exec((res) => {
|
|
|
|
|
this.data.canvas = res[0].node
|
|
|
|
|
this.setData({
|
|
|
|
|
canvas: res[0].node
|
|
|
|
|
})
|
|
|
|
|
// this.data.canvas = res[0].node
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -113,7 +120,7 @@ Component({
|
|
|
|
|
return []
|
|
|
|
|
}
|
|
|
|
|
let arr = [];
|
|
|
|
|
let max = 18;
|
|
|
|
|
let max = this.data.lvl;
|
|
|
|
|
let maxVal = list[0][1];
|
|
|
|
|
list.forEach(ele => {
|
|
|
|
|
let a = [ele[0], ele[1] / maxVal * max];
|
|
|
|
|