Vant Weapp的Slider组件自定义button

2023-10-20 16:04

本文主要是介绍Vant Weapp的Slider组件自定义button,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

js部分:

  <van-slider v-model="value" range @drag="priceChange"  @drag-end="sliderDragEnd"  use-button-slot  max="1000" min="0" step="10"><view class="custom-button" slot="left-button"><view :class="dragActiveL?'custom-popover dragActive':'custom-popover'">{{ priceMin }}<view class="arrow-down"></view></view></view><view class="custom-button" slot="right-button"><view :class="dragActiveR?'custom-popover dragActive':'custom-popover'">{{ priceMax }}<view class="arrow-down"></view></view></view></van-slider>

 css部分:


.custom-button {width: 26px;color: #fff;font-size: 10px;line-height: 18px;text-align: center;background-color: blue;border-radius: 100px;
}.custom-popover {display: none;position: absolute;background: rgba(0, 0, 0,0.9);border: 1px solid rgba(0, 0, 0, 0.9);padding: 5px;border-radius: 5px;box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9);text-align: center;z-index: 9999;top: -40px;left: 50%; transform: translateX(-50%); min-width: 40px; font-size: 14px; color: #fff; }.dragActive{display: block !important;}.arrow-down {width: 0;height: 0;border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 6px solid black; position: absolute;bottom: -6px; left: 50%;transform: translateX(-50%); }.custom-button{position: relative;width: 26px !important;height: 26px !important;border-radius: 50% !important;background-color: #fff !important;box-shadow: 0 4px 8px 0 #dddddd, 0 6px 20px 0 #dddddd;
}

这篇关于Vant Weapp的Slider组件自定义button的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/248176

相关文章

HTML5 中的<button>标签用法和特征

《HTML5中的<button>标签用法和特征》在HTML5中,button标签用于定义一个可点击的按钮,它是创建交互式网页的重要元素之一,本文将深入解析HTML5中的button标签,详细介绍其属... 目录引言<button> 标签的基本用法<button> 标签的属性typevaluedisabled

如何自定义一个log适配器starter

《如何自定义一个log适配器starter》:本文主要介绍如何自定义一个log适配器starter的问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录需求Starter 项目目录结构pom.XML 配置LogInitializer实现MDCInterceptor

Spring组件实例化扩展点之InstantiationAwareBeanPostProcessor使用场景解析

《Spring组件实例化扩展点之InstantiationAwareBeanPostProcessor使用场景解析》InstantiationAwareBeanPostProcessor是Spring... 目录一、什么是InstantiationAwareBeanPostProcessor?二、核心方法解

Druid连接池实现自定义数据库密码加解密功能

《Druid连接池实现自定义数据库密码加解密功能》在现代应用开发中,数据安全是至关重要的,本文将介绍如何在​​Druid​​连接池中实现自定义的数据库密码加解密功能,有需要的小伙伴可以参考一下... 目录1. 环境准备2. 密码加密算法的选择3. 自定义 ​​DruidDataSource​​ 的密码解密3

C++ RabbitMq消息队列组件详解

《C++RabbitMq消息队列组件详解》:本文主要介绍C++RabbitMq消息队列组件的相关知识,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录1. RabbitMq介绍2. 安装RabbitMQ3. 安装 RabbitMQ 的 C++客户端库4. A

spring-gateway filters添加自定义过滤器实现流程分析(可插拔)

《spring-gatewayfilters添加自定义过滤器实现流程分析(可插拔)》:本文主要介绍spring-gatewayfilters添加自定义过滤器实现流程分析(可插拔),本文通过实例图... 目录需求背景需求拆解设计流程及作用域逻辑处理代码逻辑需求背景公司要求,通过公司网络代理访问的请求需要做请

Kotlin Compose Button 实现长按监听并实现动画效果(完整代码)

《KotlinComposeButton实现长按监听并实现动画效果(完整代码)》想要实现长按按钮开始录音,松开发送的功能,因此为了实现这些功能就需要自己写一个Button来解决问题,下面小编给大... 目录Button 实现原理1. Surface 的作用(关键)2. InteractionSource3.

PyQt6中QMainWindow组件的使用详解

《PyQt6中QMainWindow组件的使用详解》QMainWindow是PyQt6中用于构建桌面应用程序的基础组件,本文主要介绍了PyQt6中QMainWindow组件的使用,具有一定的参考价值,... 目录1. QMainWindow 组php件概述2. 使用 QMainWindow3. QMainW

Spring Security自定义身份认证的实现方法

《SpringSecurity自定义身份认证的实现方法》:本文主要介绍SpringSecurity自定义身份认证的实现方法,下面对SpringSecurity的这三种自定义身份认证进行详细讲解,... 目录1.内存身份认证(1)创建配置类(2)验证内存身份认证2.JDBC身份认证(1)数据准备 (2)配置依

Vue3组件中getCurrentInstance()获取App实例,但是返回null的解决方案

《Vue3组件中getCurrentInstance()获取App实例,但是返回null的解决方案》:本文主要介绍Vue3组件中getCurrentInstance()获取App实例,但是返回nu... 目录vue3组件中getCurrentInstajavascriptnce()获取App实例,但是返回n