Commit 8476d565 by Sendya

fix #7

parent a59d4a43
......@@ -256,6 +256,25 @@
}
}
&.tablet {
// overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
.top-nav-header-index {
.header-index-wide {
.header-index-left {
.logo > a {
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
}
}
.top-nav-header-index {
box-shadow: 0 1px 4px rgba(0,21,41,.08);
position: relative;
......
<template>
<div class="logo">
<router-link :to="{name:'dashboard'}" style="overflow: hidden; text-overflow:ellipsis; white-space: nowrap;">
<router-link :to="{name:'dashboard'}">
<img src="~@/assets/logo.svg" alt="logo">
<h1 v-if="showTitle">{{ title }}</h1>
</router-link>
......
......@@ -9,7 +9,7 @@
<div slot="title" :style="{ textAlign: 'center' }">两步验证</div>
<template slot="footer">
<div :style="{ textAlign: 'center' }">
<a-button key="back" @click="visible = false">返回</a-button>
<a-button key="back" @click="handleCancel">返回</a-button>
<a-button key="submit" type="primary" :loading="stepLoading" @click="handleStepOk">
继续
</a-button>
......@@ -18,19 +18,21 @@
<a-spin :spinning="stepLoading">
<a-form layout="vertical" :auto-form-create="(form)=>{this.form = form}">
<p style="text-align: center" v-if="!stepLoading">请在手机中打开 Google Authenticator 或两步验证 APP<br />输入 6 位动态码</p>
<p style="text-align: center" v-else>正在验证..<br/>请稍后</p>
<a-form-item
:style="{ textAlign: 'center' }"
hasFeedback
fieldDecoratorId="stepCode"
:fieldDecoratorOptions="{rules: [{ required: true, message: '请输入 6 位动态码!', pattern: /^\d{6}$/, len: 6 }]}"
>
<a-input :style="{ textAlign: 'center' }" @keyup.enter.native="handleStepOk" placeholder="000000" />
</a-form-item>
<p style="text-align: center">
<a @click="onForgeStepCode">遗失手机?</a>
</p>
<div class="step-form-wrapper">
<p style="text-align: center" v-if="!stepLoading">请在手机中打开 Google Authenticator 或两步验证 APP<br />输入 6 位动态码</p>
<p style="text-align: center" v-else>正在验证..<br/>请稍后</p>
<a-form-item
:style="{ textAlign: 'center' }"
hasFeedback
fieldDecoratorId="stepCode"
:fieldDecoratorOptions="{rules: [{ required: true, message: '请输入 6 位动态码!', pattern: /^\d{6}$/, len: 6 }]}"
>
<a-input :style="{ textAlign: 'center' }" @keyup.enter.native="handleStepOk" placeholder="000000" />
</a-form-item>
<p style="text-align: center">
<a @click="onForgeStepCode">遗失手机?</a>
</p>
</div>
</a-form>
</a-spin>
</a-modal>
......@@ -69,11 +71,19 @@ export default {
})
},
handleCancel () {
this.visible = false
this.$emit('cancel')
},
onForgeStepCode() {
}
}
};
</script>
\ No newline at end of file
</script>
<style lang="scss" scoped>
.step-form-wrapper {
margin: 0 auto;
width: 80%;
max-width: 400px;
}
</style>
\ No newline at end of file
......@@ -7,7 +7,7 @@ export const asyncRouterMap = [
name: 'index',
component: BasicLayout,
meta: { title: '首页' },
redirect: '/dashboard/analysis',
redirect: '/dashboard/workplace',
children: [
// dashboard
{
......
......@@ -3,6 +3,7 @@
* primaryColor - 默认主题色
* navTheme - sidebar theme ['dark', 'light'] 两种主题
* colorWeak - 色盲模式
* layout - 整体布局方式 ['sidemenu', 'topmenu'] 两种布局
*
* storageOptions: {} - Vue-ls 插件配置项 (localStorage/sessionStorage)
*
......
......@@ -16,7 +16,7 @@ const enquireScreen = function (call) {
call && call(1)
}
}
enquireJs.register('screen and (max-width: 980.99px)', handler)
enquireJs.register('screen and (max-width: 1087.99px)', handler)
enquireJs.register('screen and (max-width: 767.99px)', handler2)
}
......
......@@ -84,7 +84,11 @@
</div>
</a-form>
<two-step-captcha v-if="requiredTwoStepCaptcha" :visible="stepCaptchaVisible" @success="stepCaptchaSuccess"></two-step-captcha>
<two-step-captcha
v-if="requiredTwoStepCaptcha"
:visible="stepCaptchaVisible"
@success="stepCaptchaSuccess"
@cancel="stepCaptchaCancel"></two-step-captcha>
</div>
</template>
......@@ -132,7 +136,7 @@
},
methods: {
...mapActions([ "Login" ]),
...mapActions([ "Login", "Logout" ]),
// handler
handleUsernameOrEmail (rule, value, callback) {
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
......@@ -230,6 +234,12 @@
stepCaptchaSuccess () {
this.loginSuccess()
},
stepCaptchaCancel () {
this.Logout().then(() => {
this.loginBtn = false
this.stepCaptchaVisible = false
})
},
loginSuccess () {
this.loginBtn = false
this.$router.push({ name: "dashboard" })
......
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