refactor pages struct
This commit is contained in:
@ -20,7 +20,7 @@ Component({
|
||||
createSnowflake() {
|
||||
const snowflake = {
|
||||
x: Toolkit.random(0, this.data.docWidth),
|
||||
s: Toolkit.random(16, 64),
|
||||
s: Toolkit.random(16, 90),
|
||||
speed: Toolkit.random(14, 26)
|
||||
};
|
||||
this.setData({
|
||||
|
||||
@ -5,6 +5,6 @@
|
||||
wx:for="{{snowflakes}}"
|
||||
wx:key="index"
|
||||
style="left: {{item.x}}px; font-size: {{item.s}}rpx; animation-duration: {{item.speed}}s;"
|
||||
name="snowflake"
|
||||
name="plus"
|
||||
/>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user