瀏覽代碼

😎增加版权和备案信息变量配置及显示调整

zuohuaijun 2 年之前
父節點
當前提交
86043404be
共有 4 個文件被更改,包括 32 次插入2 次删除
  1. 1 1
      Web/src/layout/footer/index.vue
  2. 2 0
      Web/src/stores/themeConfig.ts
  3. 1 0
      Web/src/types/pinia.d.ts
  4. 28 1
      Web/src/views/login/index.vue

+ 1 - 1
Web/src/layout/footer/index.vue

@@ -2,7 +2,7 @@
 	<div class="layout-footer pb15">
 		<div class="layout-footer-warp">
 			<div>{{ themeConfig.globalTitle }}</div>
-			<div class="mt5">Copyright © 2021-2014 Admin.NET All rights reserved.</div>
+			<div class="mt5">{{ themeConfig.copyright }}</div>
 		</div>
 	</div>
 </template>

+ 2 - 0
Web/src/stores/themeConfig.ts

@@ -142,6 +142,8 @@ export const useThemeConfig = defineStore('themeConfig', {
 			globalViceTitle: 'Admin.NET',
 			// 网站副标题(登录页顶部文字)
 			globalViceTitleMsg: '站在巨人肩膀上的 .NET 通用权限开发框架',
+			// 版权和备案文字
+			copyright: 'Copyright © 2021-2014 Admin.NET All rights reserved.',
 			// 默认初始语言,可选值"<zh-cn|en|zh-tw>",默认 zh-cn
 			globalI18n: 'zh-cn',
 			// 默认全局组件大小,可选值"<large|'default'|small>",默认 'large'

+ 1 - 0
Web/src/types/pinia.d.ts

@@ -88,6 +88,7 @@ declare interface ThemeConfigState {
 		globalTitle: string;
 		globalViceTitle: string;
 		globalViceTitleMsg: string;
+		copyright: string;
 		globalI18n: string;
 		globalComponentSize: string;
 	};

+ 28 - 1
Web/src/views/login/index.vue

@@ -46,6 +46,7 @@
 				</div>
 			</div>
 		</div>
+		<div class="copyright mt5">{{ getThemeConfig.copyright }}</div>
 	</div>
 </template>
 
@@ -138,7 +139,6 @@ onMounted(() => {
 		.login-right-warp {
 			border: 1px solid var(--el-color-primary-light-3);
 			border-radius: 3px;
-			width: 500px;
 			height: 550px;
 			position: relative;
 			overflow: hidden;
@@ -257,4 +257,31 @@ onMounted(() => {
 		}
 	}
 }
+.copyright {
+	position: absolute;
+	bottom: 2%;
+	transform: translateX(-50%);
+	white-space: nowrap;
+}
+@media screen and (min-width: 1200px) {
+	.login-right-warp {
+		width: 500px;
+	}
+	.copyright {
+		left: 75%;
+		color: var(--el-text-color-secondary);
+	}
+}
+@media screen and (max-width: 1200px) {
+	.copyright {
+		left: 50%;
+		color: var(--el-color-white);
+	}
+}
+@media screen and (max-width: 580px) {
+	.copyright {
+		left: 50%;
+		color: var(--el-text-color-secondary);
+	}
+}
 </style>