Commit 94f7d7ff authored by hangjun83's avatar hangjun83

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

parent fd811cb7
...@@ -42,8 +42,13 @@ ...@@ -42,8 +42,13 @@
"@vue/cli-plugin-vuex": "^4.5.13", "@vue/cli-plugin-vuex": "^4.5.13",
"@vue/cli-service": "^4.5.13", "@vue/cli-service": "^4.5.13",
"compression-webpack-plugin": "^6.1.1", "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": "^4.1.1",
"less-loader": "^7.3.0", "less-loader": "^7.3.0",
"vue-loader": "^15.0.0",
"vue-markdown-loader": "^2.5.0",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"
} }
} }
This diff is collapsed.
...@@ -61,13 +61,15 @@ new Vue({ ...@@ -61,13 +61,15 @@ new Vue({
}, },
mounted() { mounted() {
// 加载默认主题主题 // 加载默认主题主题
this.$store.commit('setMainTheme', 'parimary'); /*this.$store.commit('setMainTheme', 'parimary');
this.$store.commit("setMenuTheme", "black"); this.$store.commit("setMenuTheme", "black");
this.$store.commit("setNavTheme", "primary"); this.$store.commit("setNavTheme", "primary");
this.$store.commit("setFixNav", true); this.$store.commit("setFixNav", true);
this.$store.commit("setShowTags", true); this.$store.commit("setShowTags", true);
this.$store.commit("setMenuWidth", 250); 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); util.initRouter(this);
// 设置用户信息 // 设置用户信息
......
...@@ -19,19 +19,6 @@ ...@@ -19,19 +19,6 @@
:before-push="beforePush" :before-push="beforePush"
:menu-list="menuList" :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> </shrinkable-menu>
</div> </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 { .login-container {
height: 100%; height: 100vh;
background: url('../assets/background.svg'); background: url('~@/assets/background.svg') center center fixed
background-color: #f0f2f5; no-repeat;
background-size: cover;
.ivu-tabs-nav-container { .title {
line-height: 2; font-size: 54px;
font-size: 17px; font-weight: 500;
box-sizing: border-box; color: rgba(14, 18, 26, 1);
white-space: nowrap;
overflow: hidden;
position: relative;
zoom: 1;
} }
.form { .title-tips {
padding-top: 1vh; margin-top: 29px;
font-size: 26px;
font-weight: 400;
color: rgba(14, 18, 26, 1);
text-overflow: ellipsis;
white-space: nowrap;
}
.input-verify { .login-btn {
width: 67%; display: inline-block;
} width: 450px;
height: 60px;
margin-top: 5px;
border: 0;
font-size: 14px;
} }
.code-image { .login-form {
.ivu-spin-fix .ivu-spin-main { position: relative;
height: 20px; 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, .title-container {
.other-way { position: relative;
font-size: 14px;
}
.login-btn, .title {
.other-login { margin: 0 auto 40px auto;
margin-top: 3vh; font-size: 34px;
font-weight: bold;
color: #5470c6;
text-align: center;
}
} }
.icons { .svg-container {
display: flex; position: absolute;
align-items: center; 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 { &__content {
cursor: pointer; min-height: 32px;
margin-left: 8px; line-height: 32px;
display: flex; }
align-items: center;
color: rgba(0, 0, 0, .2);
:hover { &__error {
color: #2d8cf0; position: absolute;
top: 100%;
left: 18px;
font-size: 12px;
line-height: 18px;
color: #f34d37;
} }
} }
.layout { .el-input {
display: flex; box-sizing: border-box;
flex-direction: column;
justify-content: space-between; input {
width: 368px; height: 58px;
height: 100%; padding-left: 45px;
} font-size: 14px;
} line-height: 58px;
\ No newline at end of file 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 = { ...@@ -42,5 +42,17 @@ module.exports = {
threshold: 10240 // 对超过10k文件压缩 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