Commit 94f7d7ff authored by hangjun83's avatar hangjun83

1、登陆页面调整2、增加支持markdown文档的读取功能

parent fd811cb7
......@@ -42,8 +42,13 @@
"@vue/cli-plugin-vuex": "^4.5.13",
"@vue/cli-service": "^4.5.13",
"compression-webpack-plugin": "^6.1.1",
"github-markdown-css": "^5.1.0",
"highlight.js": "^11.5.1",
"iview-editor": "^1.1.1",
"less": "^4.1.1",
"less-loader": "^7.3.0",
"vue-loader": "^15.0.0",
"vue-markdown-loader": "^2.5.0",
"vue-template-compiler": "^2.6.14"
}
}
This diff is collapsed.
......@@ -61,13 +61,15 @@ new Vue({
},
mounted() {
// 加载默认主题主题
this.$store.commit('setMainTheme', 'parimary');
/*this.$store.commit('setMainTheme', 'parimary');
this.$store.commit("setMenuTheme", "black");
this.$store.commit("setNavTheme", "primary");
this.$store.commit("setFixNav", true);
this.$store.commit("setShowTags", true);
this.$store.commit("setMenuWidth", 250);
this.$store.commit('setTheme', localStorage.theme);
this.$store.commit('setTheme', localStorage.theme);*/
this.$store.commit("setMenuTheme", "black");
// 初始化菜单
util.initRouter(this);
// 设置用户信息
......
......@@ -19,19 +19,6 @@
:before-push="beforePush"
:menu-list="menuList"
>
<div slot="top" class="logo-content" v-if="showLogo || fixNav">
<img
v-show="
!shrink && (menuTheme != 'light' || mainTheme == 'darkMode')
"
src="@/assets/logo-white.png"
/>
<img
v-show="!shrink && menuTheme == 'light' && mainTheme != 'darkMode'"
src="@/assets/logo-black.png"
/>
<img v-show="shrink" src="@/assets/logo-min.png" key="min-logo" />
</div>
</shrinkable-menu>
</div>
<!-- 右上顶部导航条 -->
......
<template>
<div>
<Tabs type="card">
<TabPane label="服务器端">
<div class="markdown-body">
<md />
</div>
</TabPane>
</Tabs>
</div>
</template>
<script>
// 组件内使用
import md from '@/assets/doc/server.md'
import 'highlight.js/styles/github.css'
import 'github-markdown-css'
export default {
name: "framework",
components: {
md
},
data() {
return {
content: md
};
},
methods: {
},
mounted() {
this.maxHeight = Number(document.documentElement.clientHeight - 160) + "px";
},
};
</script>
<style lang="less" scoped>
.library-content {
overflow: auto;
}
// .library-content::-webkit-scrollbar {
// display: none;
// }
.href-text {
font-size: 12px;
}
.example-btn {
margin: 10px 0;
display: block;
}
.flip-list-move {
transition: transform 0.5s;
}
.draggable-container {
margin: 10px 0;
width: 50%;
}
.list-group-item {
cursor: move;
position: relative;
display: block;
padding: 10px 20px;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.125);
}
.ghost {
opacity: 0.5;
background: #c8ebfb;
}
</style>
.login {
height: 100%;
background: url('../assets/background.svg');
background-color: #f0f2f5;
.login-container {
height: 100vh;
background: url('~@/assets/background.svg') center center fixed
no-repeat;
background-size: cover;
.ivu-tabs-nav-container {
line-height: 2;
font-size: 17px;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
position: relative;
zoom: 1;
.title {
font-size: 54px;
font-weight: 500;
color: rgba(14, 18, 26, 1);
}
.form {
padding-top: 1vh;
.title-tips {
margin-top: 29px;
font-size: 26px;
font-weight: 400;
color: rgba(14, 18, 26, 1);
text-overflow: ellipsis;
white-space: nowrap;
}
.input-verify {
width: 67%;
}
.login-btn {
display: inline-block;
width: 450px;
height: 60px;
margin-top: 5px;
border: 0;
font-size: 14px;
}
.code-image {
.ivu-spin-fix .ivu-spin-main {
height: 20px;
.login-form {
position: relative;
max-width: 100%;
margin: calc((100vh - 425px) / 2) 10% 10%;
overflow: hidden;
.forget-password {
width: 100%;
margin-top: 40px;
text-align: left;
.forget-pass {
width: 129px;
height: 19px;
font-size: 20px;
font-weight: 400;
color: rgba(92, 102, 240, 1);
}
}
}
.forget-pass,
.other-way {
font-size: 14px;
}
.title-container {
position: relative;
.login-btn,
.other-login {
margin-top: 3vh;
.title {
margin: 0 auto 40px auto;
font-size: 34px;
font-weight: bold;
color: #5470c6;
text-align: center;
}
}
.icons {
display: flex;
align-items: center;
.svg-container {
position: absolute;
top: 14px;
left: 15px;
z-index: 999;
font-size: 16px;
color: #d7dee3;
cursor: pointer;
user-select: none;
}
.el-form-item {
padding-right: 0;
margin: 20px 0;
color: #454545;
background: transparent;
border: 1px solid transparent;
border-radius: 2px;
.other-icon {
cursor: pointer;
margin-left: 8px;
display: flex;
align-items: center;
color: rgba(0, 0, 0, .2);
&__content {
min-height: 32px;
line-height: 32px;
}
:hover {
color: #2d8cf0;
&__error {
position: absolute;
top: 100%;
left: 18px;
font-size: 12px;
line-height: 18px;
color: #f34d37;
}
}
}
.layout {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 368px;
height: 100%;
}
}
\ No newline at end of file
.el-input {
box-sizing: border-box;
input {
height: 58px;
padding-left: 45px;
font-size: 14px;
line-height: 58px;
color: #606266;
background: #f6f4fc;
border: 0;
caret-color: #606266;
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -42,5 +42,17 @@ module.exports = {
threshold: 10240 // 对超过10k文件压缩
})
]
},
chainWebpack: config => {
config.module.rule('md')
.test(/\.md/)
.use('vue-loader')
.loader('vue-loader')
.end()
.use('vue-markdown-loader')
.loader('vue-markdown-loader/lib/markdown-compiler')
.options({
raw: true
})
}
}
\ No newline at end of file
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