国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

uniapp-vue2-微信小程序-滑塊驗(yàn)證組件wo-slider

這篇具有很好參考價(jià)值的文章主要介紹了uniapp-vue2-微信小程序-滑塊驗(yàn)證組件wo-slider。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

wo-slider是一款支持高度自定義的滑塊驗(yàn)證組件,采用uniapp-vue2編寫

采用touchstart、touchmove、touchend事件實(shí)現(xiàn)的滑塊組件,支持H5、微信小程序(其他小程序未試過,可自行嘗試)

可到插件市場(chǎng)下載嘗試: https://ext.dcloud.net.cn/search?q=wo-slider

  • 使用示例

uniapp滑塊,uni-app,vue.js文章來源地址http://www.zghlxwxcb.cn/news/detail-722938.html

<template>
	<view style="height: 100vh;font-size: 12rpx;margin-top: 20px;">
		<view v-for="(item, index) in compOptions" :key="index" style="display: flex; justify-content: center; align-items: center;padding: 10px;">
			<view style="width: 400rpx;">
				<view style="margin-bottom: 10px; text-align: center;">{{ item.title }}</view>
				<wo-slider
				 :height="item.height"
				 :round="item.round"
				 :border="item.border"
				 :slider-size="item.sliderSize"
				 @slideFinish="onFinish">
				</wo-slider>
			</view>
		</view>
		<view style="display: flex; justify-content: center; align-items: center; padding: 10px;">
			<view>
				<view style="margin-bottom: 10px; text-align: center;">
					外邊框有間隙滑塊
				</view>
				<view style="border: 1rpx solid #DEE1E6; padding: 16rpx; border-radius: 80rpx;width: 400rpx;">
					<wo-slider @slideFinish="onFinish" :round="{show: true, style: '80rpx'}">
						<template v-slot:begin>
							<view style="background-color: #E5673B; height: 100%; display: flex; justify-content: center; align-items: center">
								<image style="height: 50rpx;width: 50rpx;" src="/static/right.png" alt="logo"></image>
							</view>
						</template>
						<template v-slot:end>
							<view style="background-color: #1BA035; height: 100%; display: flex; justify-content: center; align-items: center">
								<image style="height: 50rpx;width: 50rpx;" src="../../static/select-bold.png"></image>
							</view>
						</template>
					</wo-slider>
				</view>
			</view>
		</view>
		<view style="display: flex; justify-content: center; align-items: center; padding: 10px;">
			<view style="width: 400rpx;">
				<view style="margin-bottom: 10px; text-align: center;">
					插槽:自定義滑塊
				</view>
				<wo-slider @slideFinish="onFinish" :round="{show: true, style: '10rpx'}">
					<template v-slot:begin>
						<view style="background-color: #E5673B; height: 100%; display: flex; justify-content: center; align-items: center">
							<image style="height: 50rpx;width: 50rpx;" src="/static/wow.png"></image>
						</view>
					</template>
					<template v-slot:end>
						<view style="background-color: #1BA035; height: 100%; display: flex; justify-content: center; align-items: center">
							<image style="height: 50rpx;width: 50rpx;" src="/static/smile.png"></image>
						</view>
					</template>
				</wo-slider>
			</view>
		</view>
		<view style="display: flex; justify-content: center; align-items: center; padding: 10px;">
			<view style="width: 400rpx;">
				<view style="margin-bottom: 10px; text-align: center;">
					插槽:滑道-成功態(tài)內(nèi)容
				</view>
				<wo-slider
				 @slideFinish="onFinishSuccess" :round="{show: true, style: '10rpx'}">
					<template v-slot:isFinished>
						<view style="height: 100%;background-color: #65B58A; color: #fff; display: flex; justify-content: center;align-items: center;">
							<view>
								{{content}}
							</view>
						</view>
					</template>
				</wo-slider>
			</view>
		</view>
		<view style="display: flex; justify-content: center; align-items: center; padding: 10px;">
			<view style="width: 400rpx;">
				<view style="margin-bottom: 10px; text-align: center;">
					插槽:滑道-初始態(tài)內(nèi)容
				</view>
				<wo-slider @slideFinish="onFinish" :round="{show: true, style: '10rpx'}">
					<template v-slot:init>
						<view style="background-color: #107BBA; color: #fff; height: 100%; display: flex; justify-content: center;align-items: center;">??滑動(dòng)解鎖大禮包</view>
					</template>
				</wo-slider>
			</view>
		</view>
		<view style="display: flex; justify-content: center; align-items: center; padding: 10px;">
			<view style="width: 400rpx;">
				<view style="margin-bottom: 10px; text-align: center;">
					根據(jù)接口判斷驗(yàn)證通過
				</view>
				<wo-slider
				 @slideFinish="onFinishOne" :round="{show: true, style: '10rpx'}">
					<template v-slot:isFinished>
						<view :style="{backgroundColor: loadingOne ? '#709bff' : signOne ? '#65B58A' : '#ed9576'}" style="height: 100%; color: #fff; display: flex; justify-content: center;align-items: center;">
							<view>
								{{resOne}}
							</view>
						</view>
					</template>
					<template v-slot:begin>
						<view style="background-color: #E5673B; height: 100%; display: flex; justify-content: center; align-items: center">
							<image style="height: 30rpx;width: 30rpx;" src="@/static/arrow-double-right.png"></image>
						</view>
					</template>
					<template v-slot:end>
						<view :style="{backgroundColor: loadingOne ? '#3370FF' : signOne ? '#1BA035' : '#E23E31'}" style=" height: 100%; display: flex; justify-content: center; align-items: center">
							<view class="spinner" v-if="loadingOne">
							  <view class="double-bounce1"></view>
							  <view class="double-bounce2"></view>
							</view>
							<image v-else style="height: 30rpx;width: 30rpx;" :src="signOne ? successImg : closeImg"></image>
						</view>
					</template>
				</wo-slider>
			</view>
		</view>
		<view style="display: flex; justify-content: center; align-items: center; padding: 10px;">
			<view style="width: 400rpx;">
				<view style="margin-bottom: 10px; text-align: center;">
					根據(jù)接口判斷驗(yàn)證失敗
				</view>
				<wo-slider
				 @slideFinish="onFinishTwo" :round="{show: true, style: '10rpx'}">
					<template v-slot:isFinished>
						<view :style="{backgroundColor: loading ? '#709bff' : sign ? '#65B58A' : '#ed9576'}" style="height: 100%; color: #fff; display: flex; justify-content: center;align-items: center;">
							<view>
								{{res}}
							</view>
						</view>
					</template>
					<template v-slot:begin>
						<view style="background-color: #E5673B; height: 100%; display: flex; justify-content: center; align-items: center">
							<image style="height: 50rpx;width: 50rpx;" src="@/static/right.png"></image>
						</view>
					</template>
					<template v-slot:end>
						<view :style="{backgroundColor: loading ? '#3370FF' : sign ? '#1BA035' : '#E23E31'}" style=" height: 100%; display: flex; justify-content: center; align-items: center">
							<view class="spinner" v-if="loading">
							  <view class="double-bounce1"></view>
							  <view class="double-bounce2"></view>
							</view>
							<image v-else style="height: 50rpx;width: 50rpx;" :src="sign ? successImg : closeImg"></image>
						</view>
					</template>
				</wo-slider>
			</view>
		</view>
		<view style="padding-top: 100rpx;">
			<button @click="clickEvent">重置</button>
		</view>
	</view>
</template>

<script>
	import refreshImg from '../../static/refresh.png'
	import closeImg from '../../static/close.png'
	import successImg from '../../static/select-bold.png'
	export default {
		data() {
			return {
				content: '',
				res: '',
				loading: true,
				sign: false,
				resOne: '',
				loadingOne: true,
				signOne: false,
				resetFuncList: [],
				refreshImg: refreshImg,
				closeImg: closeImg,
				successImg: successImg,
				compOptions: [
					{
						title: '邊框方塊滑道',
						height: 60,
						sliderSize: 60,
						width: 400,
						round: {show: true, style: "0rpx"},
						border: {show: true, style: '1rpx solid blue'}
					},
					{
						title: '無(wú)邊框方塊滑道',
						height: 60,
						sliderSize: 80,
						width: 400,
						round: {show: true, style: "10rpx"},
						border: {show: false, style: ''},
					},
					{
						title: '邊框圓角滑道',
						height: 60,
						sliderSize: 60,
						width: 400,
						round: {show: true, style: "20rpx"},
						border: {show: true, style: '1rpx solid blue'}
					},
					{
						title: '無(wú)邊框圓角滑道',
						height: 60,
						sliderSize: 80,
						width: 400,
						round: {show: true, style: "30rpx"},
						border: {show: false, style: ''}
					},
					{
						title: '大圓角滑道',
						height: 80,
						sliderSize: 80,
						width: 500,
						round: {show: true, style: "40rpx"},
						border: {show: false, style: ''}
					}
				]
			}
		},
		methods: {
			onFinish(e) {
				console.log('滑動(dòng)完成', e);
				this.resetFuncList.push(e.resetFunc)
			},
			onFinishSuccess(e) {
				this.resetFuncList.push(e.resetFunc)
				this.content = '??驗(yàn)證成功'
			},
			clickEvent() {
				this.resetFuncList.forEach((item) => {
					item()
				})
				this.content = ''
			},
			onFinishOne(e) {
				this.resetFuncList.push(e.resetFunc)
				this.loadingOne = true
				this.resOne = '?驗(yàn)證中...'
				setTimeout(()=> {
					this.signOne = true
					this.loadingOne = false
					this.resOne = '?驗(yàn)證成功'
				}, 3000)
			},
			onFinishTwo(e) {
				this.resetFuncList.push(e.resetFunc)
				this.loading = true
				this.res = '?驗(yàn)證中...'
				setTimeout(()=> {
					this.sign = false
					this.loading = false
					this.res = '?驗(yàn)證失敗'
				}, 3000)
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	.spinner {
	  width: 20px;
	  height: 20px;
	
	  position: relative;
	  margin: 100px auto;
	}
	
	.double-bounce1, .double-bounce2 {
	  width: 100%;
	  height: 100%;
	  border-radius: 50%;
	  background-color: #fff;
	  opacity: 0.6;
	  position: absolute;
	  top: 0;
	  left: 0;
	  
	  -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
	  animation: sk-bounce 2.0s infinite ease-in-out;
	}
	
	.double-bounce2 {
	  -webkit-animation-delay: -1.0s;
	  animation-delay: -1.0s;
	}
	
	@-webkit-keyframes sk-bounce {
	  0%, 100% { -webkit-transform: scale(0.0) }
	  50% { -webkit-transform: scale(1.0) }
	}
	
	@keyframes sk-bounce {
	  0%, 100% { 
	    transform: scale(0.0);
	    -webkit-transform: scale(0.0);
	  } 50% { 
	    transform: scale(1.0);
	    -webkit-transform: scale(1.0);
	  }
	}
</style>

到了這里,關(guān)于uniapp-vue2-微信小程序-滑塊驗(yàn)證組件wo-slider的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 微信小程序自定義slider組件實(shí)現(xiàn)雙向滑塊

    微信小程序自定義slider組件實(shí)現(xiàn)雙向滑塊

    實(shí)現(xiàn)效果: zy-slider標(biāo)簽是封裝的自定義組件 我放到了資源這里地址:https://download.csdn.net/download/Axiaoheng_/86399342?spm=1001.2014.3001.5503 wxml引入 參數(shù) 說明 min Number/String slider 最小值 max Number/String slider 最大值 minValue Number/String slider 左邊滑塊初始位置 maxValue Number/String slider 右邊滑塊

    2024年02月10日
    瀏覽(16)
  • uniapp----微信小程序 日歷組件(周日歷&& 月日歷)【Vue3+ts+uView】

    uniapp----微信小程序 日歷組件(周日歷&& 月日歷)【Vue3+ts+uView】

    用Vue3+ts+uView來編寫日歷組件; 存在周日歷和月日歷兩種顯示方式; 高亮顯示當(dāng)天日期,紅點(diǎn)渲染有數(shù)據(jù)的日期,點(diǎn)擊顯示數(shù)據(jù) 1. calendar-week-mouth組件代碼 2. 在頁(yè)面引用組件

    2024年02月04日
    瀏覽(107)
  • vue uniapp 同意驗(yàn)證碼滑塊驗(yàn)證

    vue uniapp 同意驗(yàn)證碼滑塊驗(yàn)證

    發(fā)送驗(yàn)證碼以及登錄的時(shí)候會(huì)做驗(yàn)證,防止機(jī)刷等 效果圖 字段 類型 默認(rèn)值 說明 show Boolean false 是否顯示驗(yàn)證碼彈框 canvasWidth Number 310 主圖區(qū)域的寬度 canvasHeight Number 160 主圖區(qū)域的高度 imgs Array null 自定義圖片,見下方例子 successText String 驗(yàn)證通過 驗(yàn)證成功時(shí)的提示文字 f

    2024年02月11日
    瀏覽(18)
  • uniapp-vue3語(yǔ)法實(shí)現(xiàn)小程序全局分享(setup,mixin)

    隨著vue3的普及uniapp官方也支持了vue3語(yǔ)法的編寫 相信大家在開發(fā)過程中肯定碰到過小程序所有頁(yè)面都要開啟分享功能的需求;指定的頁(yè)面(如:文章詳情頁(yè))有單獨(dú)的配置,而非單獨(dú)配置的頁(yè)面(如:付費(fèi)的訂單詳情頁(yè))都是統(tǒng)一跳轉(zhuǎn)到首頁(yè) 我的做法如下: 此時(shí)小程序所有頁(yè)的分

    2024年01月21日
    瀏覽(52)
  • 基于Taro + React 實(shí)現(xiàn)微信小程序半圓滑塊組件、半圓進(jìn)度條、弧形進(jìn)度條、半圓滑行軌道(附源碼)

    基于Taro + React 實(shí)現(xiàn)微信小程序半圓滑塊組件、半圓進(jìn)度條、弧形進(jìn)度條、半圓滑行軌道(附源碼)

    1、四個(gè)檔位 2、可點(diǎn)擊加減切換檔位 3、可以點(diǎn)擊區(qū)域切換檔位 4、可以滑動(dòng)切換檔位 給大家提供一些實(shí)現(xiàn)思路,找了一圈,一些文章基本不能直接用,錯(cuò)漏百出,代碼還藏著掖著,希望可以幫到大家 ts的寫法風(fēng)格 index.tsx? ? ? index.module.less 防抖的工具函數(shù)debounce 的詳細(xì)代碼

    2024年02月06日
    瀏覽(58)
  • 微信小程序手機(jī)號(hào)快速驗(yàn)證組件調(diào)用方式

    微信小程序手機(jī)號(hào)快速驗(yàn)證組件調(diào)用方式

    目錄 一、測(cè)試環(huán)境 二、問題現(xiàn)象 三、總結(jié) 手機(jī)號(hào)驗(yàn)證組件(包括快速驗(yàn)證組件和實(shí)時(shí)驗(yàn)證組件)調(diào)用后無(wú)法對(duì)事件進(jìn)行回調(diào)這個(gè)問題,先說結(jié)論,以下是正確的使用方式: 一、測(cè)試環(huán)境 windows10 微信開發(fā)者工具(1.06.2307260win32-x64)?基礎(chǔ)庫(kù)(3.0.1[1028]) iPhone XR(IOS 15.2.1) 微信(

    2024年02月10日
    瀏覽(24)
  • 【b站咸蝦米】chapter4_vue組件_新課uniapp零基礎(chǔ)入門到項(xiàng)目打包(微信小程序/H5/vue/安卓apk)全掌握

    【b站咸蝦米】chapter4_vue組件_新課uniapp零基礎(chǔ)入門到項(xiàng)目打包(微信小程序/H5/vue/安卓apk)全掌握

    課程地址:【新課uniapp零基礎(chǔ)入門到項(xiàng)目打包(微信小程序/H5/vue/安卓apk)全掌握】 https://www.bilibili.com/video/BV1mT411K7nW/?p=12share_source=copy_webvd_source=b1cb921b73fe3808550eaf2224d1c155 uni-app官網(wǎng) 組件,無(wú)論是小程序還是vue,都是非常關(guān)鍵的。 現(xiàn)在單頁(yè)面程序,主要的依據(jù)就是組件。 組件

    2024年01月20日
    瀏覽(99)
  • uniapp微信小程序如何創(chuàng)建樹形組件

    uniapp微信小程序如何創(chuàng)建樹形組件

    目錄 ? 1:前言 2:最終效果: 2.1一級(jí)菜單 2.2二級(jí)菜單 2.3三級(jí)菜單 3:實(shí)現(xiàn)方法 3.1:創(chuàng)建一級(jí)菜單 ?3.2創(chuàng)建二級(jí)三級(jí)菜單 4:完整代碼如下 樹形組件應(yīng)用很廣,應(yīng)用于一些分層次的內(nèi)容。vue有樹形組件,但是uniapp沒有樹形組件,想要在uniapp使用樹形組件,必須要自己寫個(gè)樹形

    2024年02月16日
    瀏覽(31)
  • UniApp轉(zhuǎn)微信小程序之全局組件

    1.全局注冊(cè)組件 兩種方法推薦使用easycom 注冊(cè),easycom可以大規(guī)模注冊(cè)組件 2.全局插入組件 1.下載插件 2.配置vue.config.js文件 沒有這個(gè)文件的話,新建一個(gè)vue.config.js文件 3.注冊(cè)全局組件 和uniapp中注冊(cè)全局組件操作一樣 4.配置pages.json文件

    2024年02月03日
    瀏覽(28)
  • uniapp引入微信小程序直播組件

    在manifest.json配置即可,與直接在小程序代碼中引入相同。 在工程的manifest.json文件中引入直播插件 通過直播間列表接口查詢直播間列表,顯示在小程序中 點(diǎn)擊直播間,跳轉(zhuǎn)到小程序直播組件即可 未整理參考 未整理參考 未整理參考

    2024年02月22日
    瀏覽(91)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包