Commit fe51c2c3 authored by 郑磊's avatar 郑磊

默认为无圆角,无阴影

parent 10f5571f
...@@ -6,12 +6,17 @@ const requestCaptchaDataUrl = import.meta.env.VITE_REQUEST_CAPTCHA_URL ...@@ -6,12 +6,17 @@ const requestCaptchaDataUrl = import.meta.env.VITE_REQUEST_CAPTCHA_URL
const validCaptchaUrl = import.meta.env.VITE_VALID_CAPTCHA_URL const validCaptchaUrl = import.meta.env.VITE_VALID_CAPTCHA_URL
//通过URL上的参数解析验证码组件的参数 //通过URL上的参数解析验证码组件的参数
const { radius, shadow, locale, callback, extra } = (() => { const { radius, shadow, locale, callback, extra, style } = (() => {
const url = new URL(location.href) const url = new URL(location.href)
const radius = url.searchParams.get('radius') !== '0' const radius = url.searchParams.get('radius') === '1'
const shadow = url.searchParams.get('shadow') !== '0' const shadow = url.searchParams.get('shadow') === '1'
const locale = url.searchParams.get('lang') ?? undefined const locale = url.searchParams.get('lang') ?? undefined
const callback = url.searchParams.get('callback') const callback = url.searchParams.get('callback')
const bg = url.searchParams.get('bg')
const style: Record<string, any> = {}
if (bg) {
style.background = bg
}
const extra = (() => { const extra = (() => {
const json = url.searchParams.get('extra') const json = url.searchParams.get('extra')
...@@ -36,6 +41,7 @@ const { radius, shadow, locale, callback, extra } = (() => { ...@@ -36,6 +41,7 @@ const { radius, shadow, locale, callback, extra } = (() => {
locale, locale,
callback, callback,
extra, extra,
style,
} }
})() })()
...@@ -61,6 +67,7 @@ const onSuccess = (id: string) => { ...@@ -61,6 +67,7 @@ const onSuccess = (id: string) => {
:shadow="shadow" :shadow="shadow"
:locale="locale" :locale="locale"
:extra="extra" :extra="extra"
:style="style"
@success="onSuccess" @success="onSuccess"
/> />
</template> </template>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment