提交 914b6497 编写于 作者: H hdx

feat: add slider x 100

上级 a64e10aa
......@@ -67,6 +67,12 @@
"navigationBarTitleText": "slider"
}
},
{
"path": "pages/component/slider-100/slider-100",
"style": {
"navigationBarTitleText": "slider x 100"
}
},
{
"path": "pages/component/switch/switch",
"style": {
......
<template>
<view class="uni-padding-wrap">
<page-head :title="title"></page-head>
<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>
</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>
</view>
<view class="flex-fill">
<view v-for="(_, index3) in 33" :key="index3">
<slider @changing="sliderChanging" :value="sliderValue" :block-size="15" :show-value="true" />
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
export default {
data() {
return {
title: 'slider 滑块 x 100',
sliderValue: 0
}
},
methods: {
sliderChanging(e : SliderChangeEvent) {
this.sliderValue = e.detail.value
console.log('value 发生变化:' + e.detail.value)
}
}
}
</script>
<style>
.flex-row {
flex-direction: row;
}
.flex-fill {
flex: 1;
}
</style>
......@@ -128,6 +128,9 @@
name: 'slider',
enable: true
}, {
name: 'slider-100',
enable: true
},{
name: 'switch',
enable: true
}, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册