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

feature: 添加验证码背景色schame

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