dev
xiaowen 3 years ago
parent c8623f628b
commit df0137a69c

@ -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];

@ -12,6 +12,8 @@
}
.wc-main {
position: relative;
width: 100%;
height: 100%;
margin-left: -40%;
margin-top: -46px;
}

@ -119,7 +119,7 @@
<view class="cloud_content" wx:for="{{positive}}" wx:for-index="index" wx:key="index">
<view style="margin-left: 32rpx;">{{item.name}}</view>
<view style="margin-top: -140rpx;margin-left: 40rpx;">
<word-cloud canvasId="{{'w'+index}}" list="{{item.value}}" width="100%" height="230" color="#0284FF"></word-cloud>
<word-cloud canvasId="{{'wcw'+index}}" list="{{item.value}}" width="100%" height="230" color="#0284FF"></word-cloud>
</view>
</view>
</view>

Loading…
Cancel
Save