Commit c69b9dac authored by 郝聪敏's avatar 郝聪敏

feature: 添加验证码背景色schame

parent 700872b0
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<template slot="button"> <template slot="button">
<a <a
href="javascript:;" href="javascript:;"
:style="vcStyles"
:class="['login-form-send', { 'not-allow': noAllowSend || showCount }]" :class="['login-form-send', { 'not-allow': noAllowSend || showCount }]"
ref="sendVcode" ref="sendVcode"
> >
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
</a> </a>
</template> </template>
</cr-field> </cr-field>
<cr-button :color="btnColor" :style="styles" shape='circle' block native-type="submit" class="login-form-submit"> <cr-button :color="btnColor" :style="btnStyles" shape='circle' block native-type="submit" class="login-form-submit">
{{ btnTxt }} {{ btnTxt }}
</cr-button> </cr-button>
</cr-form> </cr-form>
...@@ -81,6 +82,7 @@ export default { ...@@ -81,6 +82,7 @@ export default {
default: '#000' default: '#000'
}, },
btnImage: String, btnImage: String,
vcBgColor: String,
registerFrom: String, registerFrom: String,
}, },
data() { data() {
...@@ -115,10 +117,13 @@ export default { ...@@ -115,10 +117,13 @@ export default {
captchaBtnText() { captchaBtnText() {
return this.showCount ? `剩余${this.count}秒` : '获取验证码'; return this.showCount ? `剩余${this.count}秒` : '获取验证码';
}, },
styles() { btnStyles() {
return this.btnImage ? { return this.btnImage ? {
background: `url(${this.btnImage}) no-repeat 0 0 / 100%`, background: `url(${this.btnImage}) no-repeat 0 0 / 100%`,
} : {}; } : {};
},
vcStyles() {
return { backgroundColor: this.vcBgColor };
} }
}, },
mounted() { mounted() {
...@@ -313,16 +318,12 @@ export default { ...@@ -313,16 +318,12 @@ export default {
position: relative; position: relative;
} }
&-send { &-send {
border-radius: 8px;
background-color: #eaeaea;
color: #999;
padding: 5px 10px 4px; padding: 5px 10px 4px;
} border-radius: 8px;
&-send { background-color: #97d5ff;
background-color: #f00;
color: #fff; color: #fff;
&.not-allow { &.not-allow {
background-color: #eaeaea; background-color: #eaeaea !important;
color: #999; color: #999;
} }
} }
......
...@@ -111,6 +111,11 @@ export const businessComponents = [ ...@@ -111,6 +111,11 @@ export const businessComponents = [
name: '按钮图片', name: '按钮图片',
type: 'Upload' type: 'Upload'
}, },
{
key: 'vcBgColor',
name: '验证码背景色',
type: 'ColorSelector'
},
{ {
key: 'registerFrom', key: 'registerFrom',
name: '渠道号', name: '渠道号',
...@@ -121,7 +126,8 @@ export const businessComponents = [ ...@@ -121,7 +126,8 @@ export const businessComponents = [
btnTxt: '', btnTxt: '',
btnColor: '#ee0a24', btnColor: '#ee0a24',
btnImage: 'https://static.q-gp.com/new-xyqb-user-ui/public/static/img/landing-submit.d875947.png', btnImage: 'https://static.q-gp.com/new-xyqb-user-ui/public/static/img/landing-submit.d875947.png',
registerFrom: '' registerFrom: '',
vcBgColor: '#97d5ff'
}, },
commonStyle: {} commonStyle: {}
}, },
......
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