From 02e12f6e3d99e7b85485f4c6d0752939ab6c756e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=8C=E7=B3=96=E5=8C=85=E5=AD=90?= Date: Sat, 16 May 2026 12:42:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vendor/tianai-captcha/captcha/captcha.js | 4 +-- .../tianai-captcha/captcha/captcha.less | 27 ++++++++++++------- .../tianai-captcha/captcha/common/common.less | 14 +--------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/vendor/tianai-captcha/captcha/captcha.js b/src/vendor/tianai-captcha/captcha/captcha.js index acbf28a..48c87ac 100644 --- a/src/vendor/tianai-captcha/captcha/captcha.js +++ b/src/vendor/tianai-captcha/captcha/captcha.js @@ -8,7 +8,7 @@ import WordImageClick from "./word_image_click/word_image_click"; import { CaptchaConfig, wrapConfig, wrapStyle } from "./config/config"; import { clearAllPreventDefault } from "./common/common"; const template = ` -
+
@@ -55,7 +55,7 @@ class TianAiCaptcha { init() { this.destroyWindow(); this.config.domBindEl.append(template); - this.domTemplate = this.config.domBindEl.find(".captcha-parent"); + this.domTemplate = this.config.domBindEl.find(".__captcha-parent"); clearAllPreventDefault(this.domTemplate); this.loadStyle(); // 绑定按钮事件 diff --git a/src/vendor/tianai-captcha/captcha/captcha.less b/src/vendor/tianai-captcha/captcha/captcha.less index f54cd5b..fccc0d7 100644 --- a/src/vendor/tianai-captcha/captcha/captcha.less +++ b/src/vendor/tianai-captcha/captcha/captcha.less @@ -1,6 +1,6 @@ -.captcha-parent { +.__captcha-parent { box-shadow: 0 0 11px 0 #999999; - width: 318px; + width: 316px; overflow: hidden; position: relative; z-index: 997; @@ -29,7 +29,7 @@ transform-style: preserve-3d; will-change: transform; transition-duration: 0.45s; - transform: translateX(-300px); + transform: translateX(-100%); } } .captcha-bg-img { @@ -46,8 +46,12 @@ } .slider-bottom { + text-align: right; + margin-top: 8px; + display: flex; + justify-content: flex-end; + gap: 10px; .close-btn, .refresh-btn { - display: inline-block; width: 20px; height: 20px; background-repeat: no-repeat; @@ -56,18 +60,15 @@ .close-btn { background-image: url("../images/icon.png"); background-position: 0 -14px; - margin-right: 2px; } .refresh-btn { background-image: url("../images/icon.png"); background-position: 0 -167px; - margin-right: 10px; } - text-align: right; - margin-top: 8px; + } .slider-move-shadow { - animation: myanimation 2s infinite; + animation: move-shadow 2s infinite; height: 100%; width: 5px; background-color: #fff; @@ -92,6 +93,14 @@ left: -1px; border-radius: 5px; } + @keyframes move-shadow { + from { + left: 0; + } + to { + left: 289px; + } + } @import "./common/common.less"; @import "./slider/slider.less"; @import "./rotate/rotate.less"; diff --git a/src/vendor/tianai-captcha/captcha/common/common.less b/src/vendor/tianai-captcha/captcha/common/common.less index 81d1095..13b36b2 100644 --- a/src/vendor/tianai-captcha/captcha/common/common.less +++ b/src/vendor/tianai-captcha/captcha/common/common.less @@ -1,7 +1,7 @@ .captcha { text-align: left; box-sizing: content-box; - width: 300px; + width: 100%; height: 260px; z-index: 999; .slider-bottom .logo { @@ -21,12 +21,8 @@ z-index: 999; font-size: 15px; line-height: 25px; - /*background-color: #FF5D39;*/ color: #fff; text-align: center; - /* transform: translateY(0px); */ - /* display: none; */ - /* transition: max-height 0.5s; */ transition: bottom 0.3s ease-in-out; } .captcha-tips.captcha-tips-error { @@ -75,11 +71,3 @@ } } } -@keyframes myanimation { - from { - left: 0; - } - to { - left: 289px; - } -}