提示文字可自定义

This commit is contained in:
15906671117 2022-04-14 11:00:44 +08:00
parent 83dd1c84e9
commit 7d87a4f543

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
});