提交 c663f49b 编写于 作者: H hdx

scroll-view-props: 重构样式

上级 db272afc
...@@ -13,49 +13,44 @@ ...@@ -13,49 +13,44 @@
</scroll-view> </scroll-view>
</view> </view>
<scroll-view class="uni-list" showScrollbar="true"> <scroll-view class="uni-list" :showScrollbar="true">
<view class="uni-common-pb"></view> <view class="uni-list-cell-padding">
<text style="font-size: 12px;text-align: center;color: red; ">**下拉刷新的属性设置需要先打开下拉刷新开关**</text> <text class="refresher-tips">**下拉刷新的属性设置需要先打开下拉刷新开关**</text>
<view class="uni-common-pb"></view> </view>
<view class="uni-option"> <view class="uni-list-cell uni-list-cell-padding">
<text>是否开启下拉刷新</text> <text>是否开启下拉刷新</text>
<switch :checked="refresherEnabled" @change="handleTrunOnRefresher"></switch> <switch :checked="refresherEnabled" @change="handleTrunOnRefresher"></switch>
</view> </view>
<view class="uni-option"> <view class="uni-list-cell uni-list-cell-padding">
<text>设置下拉刷新状态</text> <text>设置下拉刷新状态</text>
<switch :disabled="!refresherEnabled" :checked="refresherTriggered" <switch :disabled="!refresherEnabled" :checked="refresherTriggered"
@change="refresherTriggered=!refresherTriggered"></switch> @change="refresherTriggered=!refresherTriggered"></switch>
</view> </view>
<view class="uni-option"> <view class="uni-list-cell uni-list-cell-padding">
<text>设置下拉刷新阈值</text> <text>设置下拉刷新阈值</text>
<input style="width: 50px;border-width: 1px;text-align: center; border-style: solid;" <input class="uni-list-cell-input" :disabled="!refresherEnabled" :value="refresherThreshold" type="number"
:disabled="!refresherEnabled" :value="refresherThreshold" type="number"
@input="handleRefresherThresholdInput" /> @input="handleRefresherThresholdInput" />
</view> </view>
<view class="uni-option"> <view class="uni-list-cell uni-list-cell-padding">
<text>设置下拉刷新区域背景颜色</text> <text>设置下拉刷新区域背景颜色</text>
<input style="width: 100px;border-width: 1px;text-align: center; border-style: solid;" <input class="uni-list-cell-input" :disabled="!refresherEnabled" :value="refresherBackground"
:disabled="!refresherEnabled" :value="refresherBackground" @input="handleRefresherBackground" /> @input="handleRefresherBackground" />
</view> </view>
<view style="height: 100px;padding: 10px; "> <view class="uni-list-cell-padding">
<text>设置下拉刷新默认样式</text> <text>设置下拉刷新默认样式</text>
<view class="uni-common-pb"></view> <view class="switch-refresher-group">
<view style="flex-direction: row;"> <button class="switch-refresher-style" type="primary" size="mini"
<button style="padding: 5rpx; margin-right: 5px;" type="primary" size="mini"
@click="refresherDefaultStyle = `none`">none</button> @click="refresherDefaultStyle = `none`">none</button>
<button style="padding: 5rpx; margin-right: 10rpx; " type="primary" size="mini" <button class="switch-refresher-style" type="primary" size="mini"
@click="refresherDefaultStyle = `black`">black</button> @click="refresherDefaultStyle = `black`">black</button>
<button style="padding: 5rpx;" type="primary" size="mini" <button class="switch-refresher-style" type="primary" size="mini"
@click="refresherDefaultStyle = `white`">white</button> @click="refresherDefaultStyle = `white`">white</button>
</view> </view>
</view> </view>
<view class="uni-common-pb"></view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
...@@ -130,8 +125,7 @@ ...@@ -130,8 +125,7 @@
<style> <style>
.uni-margin-wrap { .uni-margin-wrap {
height: 200px; height: 200px;
margin-left: 25px; margin: 0 25px 25px 25px;
margin-right: 25px;
} }
.item { .item {
...@@ -145,6 +139,12 @@ ...@@ -145,6 +139,12 @@
border-color: chocolate; border-color: chocolate;
} }
.refresher-tips {
font-size: 12px;
text-align: center;
color: red;
}
.uni-text { .uni-text {
color: black; color: black;
font-size: 50px; font-size: 50px;
...@@ -152,15 +152,12 @@ ...@@ -152,15 +152,12 @@
.uni-list { .uni-list {
flex: 1; flex: 1;
margin: 25px 25px 0 25px;
} }
.uni-option { .uni-list-cell-input {
height: 50px; max-width: 100px;
flex-direction: row; border: 1px solid #ccc;
justify-content: space-between; text-align: center;
align-items: center;
padding: 10px;
} }
.picker-view { .picker-view {
...@@ -168,4 +165,14 @@ ...@@ -168,4 +165,14 @@
height: 320px; height: 320px;
margin-top: 10px; margin-top: 10px;
} }
.switch-refresher-group {
flex-direction: row;
margin-top: 5px;
}
.switch-refresher-style {
padding: 2px 10px;
margin-right: 5px;
}
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册