Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Accustomed_
hello uni-app x
提交
e085f323
H
hello uni-app x
项目概览
Accustomed_
/
hello uni-app x
与 Fork 源项目一致
Fork自
DCloud / hello uni-app x
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e085f323
编写于
8月 14, 2023
作者:
H
hdx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip: slider-100
上级
9ff41b94
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
50 addition
and
87 deletion
+50
-87
pages/component/slider-100/slider-100.uvue
pages/component/slider-100/slider-100.uvue
+50
-87
未找到文件。
pages/component/slider-100/slider-100.uvue
浏览文件 @
e085f323
<template>
<!-- #ifdef APP -->
<scroll-view
style="flex: 1
">
<scroll-view
class="page
">
<!-- #endif -->
<view class="uni-padding-wrap">
<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">
<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">
<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">
<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>
<page-head :title="title"></page-head>
<view class="flex-row">
<view class="flex-fill">
<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">
<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">
<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>
<!-- #ifdef APP -->
...
...
@@ -64,41 +26,42 @@
<!-- #endif -->
</template>
<script lang="ts">
export default {
data() {
return {
title: 'slider 滑块 x 100',
sliderValue: 50,
sliderBlockSize: 20,
sliderBackgroundColor: '#000000',
sliderActiveColor: '#FFCC33',
sliderBlockColor: '#8A6DE9',
}
},
methods: {
sliderChanging(e: SliderChangeEvent) {
this.sliderValue = e.detail.value
<script>
export default {
data() {
return {
title: 'slider 滑块 x 100',
sliderValue: 50,
sliderBlockSize: 20
}
},
},
}
methods: {
sliderChanging(e: SliderChangeEvent) {
this.sliderValue = e.detail.value
},
},
}
</script>
<style>
.flex-row {
flex-direction: row;
}
.page {
flex: 1;
}
.flex-row {
flex-direction: row;
}
.flex-fill {
flex: 1;
}
.flex-fill {
flex: 1;
}
.first-slider {
margin: 12px 0;
background-color: rgba(0, 0, 0, 0.1);
}
.first-slider {
margin: 12px 0;
background-color: rgba(0, 0, 0, 0.1);
}
.slider {
margin: 2px 0.5px;
}
</style>
.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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录