提交 07158133 编写于 作者: H hdx

ball: 调整样式和-+幅度

上级 f09e4031
...@@ -4,23 +4,20 @@ ...@@ -4,23 +4,20 @@
<text class="fps">FPS: {{fpsString}}</text> <text class="fps">FPS: {{fpsString}}</text>
<view class="item"> <view class="item">
<text class="item-label">Speed</text> <text class="item-label">Speed</text>
<text class="item-value">{{ballSpeed}}</text>
<view class="item-fill"></view>
<button size="mini" @click="lessClick('speed')">-</button> <button size="mini" @click="lessClick('speed')">-</button>
<text class="item-value">{{ballSpeed}}</text>
<button size="mini" @click="plusClick('speed')">+</button> <button size="mini" @click="plusClick('speed')">+</button>
</view> </view>
<view class="item"> <view class="item">
<text class="item-label">Layer</text> <text class="item-label">Layer</text>
<text class="item-value">{{ballLayer}}</text>
<view class="item-fill"></view>
<button size="mini" @click="lessClick('layer')">-</button> <button size="mini" @click="lessClick('layer')">-</button>
<text class="item-value">{{ballLayer}}</text>
<button size="mini" @click="plusClick('layer')">+</button> <button size="mini" @click="plusClick('layer')">+</button>
</view> </view>
<view class="item"> <view class="item">
<text class="item-label">Inlayer</text> <text class="item-label">Inlayer</text>
<text class="item-value">{{ballInlayer}}</text>
<view class="item-fill"></view>
<button size="mini" @click="lessClick('inLayer')">-</button> <button size="mini" @click="lessClick('inLayer')">-</button>
<text class="item-value">{{ballInlayer}}</text>
<button size="mini" @click="plusClick('inLayer')">+</button> <button size="mini" @click="plusClick('inLayer')">+</button>
</view> </view>
</view> </view>
...@@ -204,10 +201,10 @@ ...@@ -204,10 +201,10 @@
animation!.speed--; animation!.speed--;
ballSpeed.value = animation!.speed ballSpeed.value = animation!.speed
} else if (type == 'layer') { } else if (type == 'layer') {
animation!.layer--; animation!.layer -= 5;
ballLayer.value = animation!.layer ballLayer.value = animation!.layer
} else if (type == 'inLayer') { } else if (type == 'inLayer') {
animation!.inLayer--; animation!.inLayer -= 5;
ballInlayer.value = animation!.inLayer ballInlayer.value = animation!.inLayer
} }
} }
...@@ -217,10 +214,10 @@ ...@@ -217,10 +214,10 @@
animation!.speed++; animation!.speed++;
ballSpeed.value = animation!.speed ballSpeed.value = animation!.speed
} else if (type == 'layer') { } else if (type == 'layer') {
animation!.layer++; animation!.layer += 5;
ballLayer.value = animation!.layer ballLayer.value = animation!.layer
} else if (type == 'inLayer') { } else if (type == 'inLayer') {
animation!.inLayer++; animation!.inLayer += 5;
ballInlayer.value = animation!.inLayer ballInlayer.value = animation!.inLayer
} }
} }
...@@ -242,10 +239,10 @@ ...@@ -242,10 +239,10 @@
<style> <style>
.page-body-wrapper { .page-body-wrapper {
text-align: center; text-align: center;
} }
.page-body { .page-body {
padding: 15px; padding: 15px;
} }
.canvas { .canvas {
...@@ -256,27 +253,23 @@ ...@@ -256,27 +253,23 @@
} }
.fps { .fps {
margin-top: 30px; margin-top: 30px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.item { .item {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-top: 10px; margin-top: 10px;
}
.item-label {
width: 120px;
} }
.item-value { .item-label {
margin-left: 5px; margin-right: auto;
color: cornflowerblue; }
width: 50px;
} .item-value {
color: cornflowerblue;
.item-fill { width: 50px;
flex: 1; text-align: center;
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册