UNPKG

yuang-framework-ui-pc

Version:

yuang-framework-ui-pc Library

65 lines (64 loc) 2.12 kB
"use strict"; const vue = require("vue"); const SliderCaptcha = require("./SliderCaptcha"); const _hoisted_1 = { key: 0, class: "yu-slider-captcha-dialog" }; const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "yu-slider-captcha-dialog-modal" }, null, -1); const _hoisted_3 = { class: "yu-slider-captcha-dialog-wrapper" }; const _hoisted_4 = { class: "yu-slider-captcha-dialog yu-slider-captcha-slide-up" }; const _hoisted_5 = { class: "yu-slider-captcha" }; const _sfc_main = /* @__PURE__ */ vue.defineComponent({ ...{ name: "YuSliderCaptchaDialog" }, __name: "index", emits: ["success", "fail", "close"], setup(__props, { expose: __expose, emit: __emit }) { const emit = __emit; const isShowSliderCaptcha = vue.ref(false); const validateResult = vue.ref(false); const showSliderCaptcha = () => { validateResult.value = false; isShowSliderCaptcha.value = true; }; const hideSliderCaptcha = () => { validateResult.value = false; isShowSliderCaptcha.value = false; }; const handleSuccess = (data) => { validateResult.value = true; emit("success", data); }; const handleFail = (data) => { validateResult.value = false; emit("fail", data); }; const handleClose = () => { hideSliderCaptcha(); emit("close"); }; __expose({ showSliderCaptcha, hideSliderCaptcha, validateResult }); return (_ctx, _cache) => { return isShowSliderCaptcha.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [ _hoisted_2, vue.createElementVNode("div", _hoisted_3, [ vue.createElementVNode("div", _hoisted_4, [ vue.createElementVNode("div", _hoisted_5, [ vue.createVNode(SliderCaptcha, { ref: "sliderCaptcha", onSuccess: handleSuccess, onFail: handleFail, onClose: handleClose }, null, 512) ]) ]) ]) ])) : vue.createCommentVNode("", true); }; } }); module.exports = _sfc_main;