!52 滑块提示文字自定义

Merge pull request !52 from cool314156/next
This commit is contained in:
就眠儀式 2022-04-14 03:47:33 +00:00 committed by Gitee
commit f60f762284
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
<template>
<div id="sliderVerify" class="slider-item">
<div class="slider-bg layui-bg-green"></div>
<div class="slider-text">{{ prototype.isOk == false ? '请拖动滑块验证' : '验证通过' }}</div>
<div class="slider-text">{{ prototype.isOk == false ? prototype.text : prototype.success}}</div>
<div :class="prototype.isOk == false ? 'slider-btn layui-icon layui-icon-next' : 'slider-btn layui-icon layui-icon-ok-circle slider-btn-success'"
@mousedown.stop="down"></div>
@ -27,8 +27,8 @@ const props = withDefaults(defineProps<Prop>(), {
const prototype = reactive({
isOk: false,
bg: props.bg, //
text: props.text,
success: props.end,
text: props.text ? props.text : '请拖动滑块验证',
success: props.end ? props.end : '验证通过',
ok: props.success
});