提交 41f128b7 编写于 作者: H hdx

wip(slider100): update style

上级 454c3971
<template>
<view class="uni-padding-wrap">
<page-head :title="title"></page-head>
<slider class="first-slider" @changing="sliderChanging" :value="sliderValue"
:backgroundColor="sliderBackgroundColor" :activeColor="sliderActiveColor" :blockColor="sliderBlockColor"
:show-value="true" />
<view class="flex-row">
<view class="flex-fill">
<view v-for="(_, index1) in 33" :key="index1">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
</view>
<slider v-for="(_, index1) in 25" :key="index1" class="slider" @changing="sliderChanging" :value="sliderValue"
:block-size="sliderBlockSize" :show-value="true" />
</view>
<view class="flex-fill">
<view v-for="(_, index2) in 33" :key="index2">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
</view>
<slider v-for="(_, index2) in 25" :key="index2" class="slider" @changing="sliderChanging" :value="sliderValue"
:block-size="sliderBlockSize" :show-value="true" />
</view>
<view class="flex-fill">
<view v-for="(_, index3) in 33" :key="index3">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
<slider v-for="(_, index3) in 25" :key="index3" class="slider" @changing="sliderChanging" :value="sliderValue"
:block-size="sliderBlockSize" :show-value="true" />
</view>
<view class="flex-fill">
<slider v-for="(_, index4) in 25" :key="index4" class="slider" @changing="sliderChanging" :value="sliderValue"
:block-size="sliderBlockSize" :show-value="true" />
</view>
</view>
</view>
......@@ -26,13 +29,16 @@
data() {
return {
title: 'slider 滑块 x 100',
sliderValue: 0
sliderValue: 50,
sliderBlockSize: 20,
sliderBackgroundColor: '#000000',
sliderActiveColor: '#FFCC33',
sliderBlockColor: '#8A6DE9'
}
},
methods: {
sliderChanging(e : SliderChangeEvent) {
this.sliderValue = e.detail.value
console.log('value 发生变化:' + e.detail.value)
}
}
}
......@@ -42,7 +48,17 @@
.flex-row {
flex-direction: row;
}
.flex-fill {
flex: 1;
}
.first-slider {
margin: 12px 0;
background-color: rgba(0, 0, 0, 0.1);
}
.slider {
margin: 2px 0.5px;
}
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册