From c55d9376565a78ce31a5b8d78dad89df16c2628e Mon Sep 17 00:00:00 2001 From: gaosp <gaosp> Date: 星期四, 18 一月 2024 23:34:54 +0800 Subject: [PATCH] 删除完 更新 --- src/container/home/Welcome.vue | 60 +++++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 39 insertions(+), 21 deletions(-) diff --git a/src/container/home/Welcome.vue b/src/container/home/Welcome.vue index b6eb5b8..f070208 100644 --- a/src/container/home/Welcome.vue +++ b/src/container/home/Welcome.vue @@ -1,39 +1,57 @@ <!-- * @Date: 2024-01-04 23:08:48 * @LastEditors: Sneed - * @LastEditTime: 2024-01-05 23:52:01 - * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/views/home/Welcome.vue + * @LastEditTime: 2024-01-17 22:35:41 + * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/home/Welcome.vue --> <template> - <div class="container"> + <div class="container"> + <img class="bg" src="./earth.png" alt=""> <div class="welcome"> - admin鎮ㄥソ锛屾杩庝娇鐢ㄥ崈鏂囩鎶�MDC灞曠ず绯荤粺 + {{userInfo.name}}鎮ㄥソ锛屾杩庝娇鐢ㄥ崈鏂囩鎶�MDC灞曠ず绯荤粺 </div> </div> </template> +<script> + import { mapGetters } from 'vuex'; + export default { + computed: { + ...mapGetters(['userInfo']) + } + } +</script> <style lang="scss" scoped> - .container { - position: absolute; +.container { top: 0; left: 50%; width: 60%; transform: translateX(-50%); height: 100%; - background-image: url('./earth.png'); + // background-image: url('./earth.png'); background-repeat: no-repeat; background-size: cover; -} - .welcome { - width: 100%; - height: 102px; - position: absolute; - top: 30%; - font-size: 40px; - color: #68D9FF; - line-height: 102px; - background: url('./welcome.png') 0 0 no-repeat; - background-size: contain; - text-align: center; - user-select:none; + position: relative; + + .bg { + position: relative; + left: 50%; + transform: translateX(-50%); + max-width: 100%; + ; + max-height: 100%; } -</style> \ No newline at end of file +} + +.welcome { + width: 100%; + height: 102px; + position: absolute; + top: 30%; + font-size: 40px; + color: #68D9FF; + line-height: 102px; + background: url('./welcome.png') 0 0 no-repeat; + background-size: contain; + text-align: center; + user-select: none; +}</style> \ No newline at end of file -- Gitblit v1.9.3