mirror of
				https://github.com/continew-org/continew-admin-ui.git
				synced 2025-10-31 22:57:15 +08:00 
			
		
		
		
	style: 优化部分样式
This commit is contained in:
		| @@ -311,10 +311,10 @@ export interface SecurityConfig { | ||||
|   PASSWORD_ERROR_LOCK_MINUTES: OptionResp | ||||
|   PASSWORD_EXPIRATION_DAYS: OptionResp | ||||
|   PASSWORD_EXPIRATION_WARNING_DAYS: OptionResp | ||||
|   PASSWORD_REUSE_POLICY: OptionResp | ||||
|   PASSWORD_REPETITION_TIMES: OptionResp | ||||
|   PASSWORD_MIN_LENGTH: OptionResp | ||||
|   PASSWORD_ALLOW_CONTAIN_USERNAME: OptionResp | ||||
|   PASSWORD_CONTAIN_SPECIAL_CHARACTERS: OptionResp | ||||
|   PASSWORD_REQUIRE_SYMBOLS: OptionResp | ||||
| } | ||||
|  | ||||
| /** 绑定三方账号信息 */ | ||||
|   | ||||
| @@ -16,7 +16,7 @@ const appStore = useAppStore() | ||||
|   font-size: 13px; | ||||
|   color: var(--color-text-3); | ||||
|   background-color: var(--color-bg-1); | ||||
|   border-top: 1px dashed var(--color-neutral-3); | ||||
|   border-top: 1px solid var(--color-neutral-3); | ||||
|   box-sizing: border-box; | ||||
|   display: flex; | ||||
|   justify-content: center; | ||||
|   | ||||
| @@ -8,6 +8,6 @@ | ||||
|   "menuCollapse": true, | ||||
|   "menuAccordion": true, | ||||
|   "menuDark": false, | ||||
|   "copyrightDisplay": false, | ||||
|   "copyrightDisplay": true, | ||||
|   "layout": "left" | ||||
| } | ||||
|   | ||||
| @@ -48,7 +48,7 @@ const getMessageData = async () => { | ||||
|  | ||||
| // 打开消息中心 | ||||
| const open = () => { | ||||
|   window.open('/#/setting/message') | ||||
|   window.open('/setting/message') | ||||
| } | ||||
|  | ||||
| // 全部已读 | ||||
|   | ||||
| @@ -99,8 +99,7 @@ const initWebSocket = (token: string) => { | ||||
|   } | ||||
|  | ||||
|   socket.onmessage = (event) => { | ||||
|     const data = JSON.parse(event.data) | ||||
|     unreadMessageCount.value = Number.parseInt(data?.content) | ||||
|     unreadMessageCount.value = Number.parseInt(event.data) | ||||
|   } | ||||
|  | ||||
|   socket.onerror = () => { | ||||
|   | ||||
| @@ -5,6 +5,7 @@ | ||||
|     </template> | ||||
|     <a-row :gutter="8"> | ||||
|       <a-carousel | ||||
|         v-if="imageList.length" | ||||
|         indicator-type="slider" | ||||
|         show-arrow="always" | ||||
|         auto-play | ||||
| @@ -16,6 +17,7 @@ | ||||
|           </a> | ||||
|         </a-carousel-item> | ||||
|       </a-carousel> | ||||
|       <a-empty v-else /> | ||||
|     </a-row> | ||||
|   </a-card> | ||||
| </template> | ||||
| @@ -28,10 +30,5 @@ interface ImageType { | ||||
| } | ||||
|  | ||||
| const imageList: ImageType[] = [ | ||||
|   { | ||||
|     src: `https://continew.top/img/sponsor/ad/roovps.jpg?${new Date().getTime()}`, | ||||
|     title: 'ROOVPS', | ||||
|     link: 'https://roovps.com/cart' | ||||
|   } | ||||
| ] | ||||
| </script> | ||||
|   | ||||
| @@ -1,6 +1,32 @@ | ||||
| <template> | ||||
|   <a-form ref="formRef" :model="form" :rules="rules" size="large" layout="vertical" :disabled="!isUpdate" class="form"> | ||||
|     <a-list class="list-layout" :bordered="false" :loading="loading"> | ||||
|       <a-form-item class="image-item" field="SITE_LOGO" hide-label> | ||||
|         {{ siteConfig.SITE_LOGO.name }} | ||||
|         <template #extra> | ||||
|           {{ siteConfig.SITE_LOGO.description }} | ||||
|           <br /> | ||||
|           <a-upload :file-list="logoFile ? [logoFile] : []" accept="image/*" :show-file-list="false" | ||||
|                     :custom-request="handleUploadLogo" @change="handleChangeLogo"> | ||||
|             <template #upload-button> | ||||
|               <div :class="`arco-upload-list-item${logoFile && logoFile.status === 'error' ? ' arco-upload-list-item-error' : '' | ||||
|                 }`"> | ||||
|                 <div v-if="logoFile && logoFile.url" class="arco-upload-list-picture custom-upload-avatar logo"> | ||||
|                   <img :src="logoFile.url" alt="Logo" /> | ||||
|                   <div v-if="isUpdate" class="arco-upload-list-picture-mask logo"> | ||||
|                     <IconEdit /> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <div v-else class="arco-upload-picture-card logo"> | ||||
|                   <div class="arco-upload-picture-card-text"> | ||||
|                     <icon-upload /> | ||||
|                   </div> | ||||
|                 </div> | ||||
|               </div> | ||||
|             </template> | ||||
|           </a-upload> | ||||
|         </template> | ||||
|       </a-form-item> | ||||
|       <a-form-item class="image-item" field="SITE_FAVICON" hide-label> | ||||
|         {{ siteConfig.SITE_FAVICON.name }} | ||||
|         <template #extra> | ||||
| @@ -28,32 +54,6 @@ | ||||
|           </a-upload> | ||||
|         </template> | ||||
|       </a-form-item> | ||||
|       <a-form-item class="image-item" field="SITE_LOGO" hide-label> | ||||
|         {{ siteConfig.SITE_LOGO.name }} | ||||
|         <template #extra> | ||||
|           {{ siteConfig.SITE_LOGO.description }} | ||||
|           <br /> | ||||
|           <a-upload :file-list="logoFile ? [logoFile] : []" accept="image/*" :show-file-list="false" | ||||
|             :custom-request="handleUploadLogo" @change="handleChangeLogo"> | ||||
|             <template #upload-button> | ||||
|               <div :class="`arco-upload-list-item${logoFile && logoFile.status === 'error' ? ' arco-upload-list-item-error' : '' | ||||
|                 }`"> | ||||
|                 <div v-if="logoFile && logoFile.url" class="arco-upload-list-picture custom-upload-avatar logo"> | ||||
|                   <img :src="logoFile.url" alt="Logo" /> | ||||
|                   <div v-if="isUpdate" class="arco-upload-list-picture-mask logo"> | ||||
|                     <IconEdit /> | ||||
|                   </div> | ||||
|                 </div> | ||||
|                 <div v-else class="arco-upload-picture-card logo"> | ||||
|                   <div class="arco-upload-picture-card-text"> | ||||
|                     <icon-upload /> | ||||
|                   </div> | ||||
|                 </div> | ||||
|               </div> | ||||
|             </template> | ||||
|           </a-upload> | ||||
|         </template> | ||||
|       </a-form-item> | ||||
|       <a-form-item class="input-item" field="SITE_TITLE" :label="siteConfig.SITE_TITLE.name"> | ||||
|         <a-input v-model.trim="form.SITE_TITLE" placeholder="请输入网站标题" :max-length="18" /> | ||||
|       </a-form-item> | ||||
| @@ -275,10 +275,6 @@ onMounted(() => { | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .form { | ||||
|   // margin: 20px 0 0 20px; | ||||
| } | ||||
|  | ||||
| .logo { | ||||
|   width: 50px; | ||||
|   height: 50px; | ||||
|   | ||||
| @@ -32,9 +32,9 @@ | ||||
|             <template #append>天</template> | ||||
|           </a-input-number> | ||||
|         </a-form-item> | ||||
|         <a-form-item field="PASSWORD_REUSE_POLICY" :label="securityConfig.PASSWORD_REUSE_POLICY.name" | ||||
|           :help="securityConfig.PASSWORD_REUSE_POLICY.description" hide-asterisk> | ||||
|           <a-input-number v-model="form.PASSWORD_REUSE_POLICY" class="input-width" :precision="0" :min="3" :max="32"> | ||||
|         <a-form-item field="PASSWORD_REPETITION_TIMES" :label="securityConfig.PASSWORD_REPETITION_TIMES.name" | ||||
|           :help="securityConfig.PASSWORD_REPETITION_TIMES.description" hide-asterisk> | ||||
|           <a-input-number v-model="form.PASSWORD_REPETITION_TIMES" class="input-width" :precision="0" :min="3" :max="32"> | ||||
|             <template #append>次</template> | ||||
|           </a-input-number> | ||||
|         </a-form-item> | ||||
| @@ -49,9 +49,9 @@ | ||||
|             <template #unchecked>否</template> | ||||
|           </a-switch> | ||||
|         </a-form-item> | ||||
|         <a-form-item field="PASSWORD_CONTAIN_SPECIAL_CHARACTERS" | ||||
|           :label="securityConfig.PASSWORD_CONTAIN_SPECIAL_CHARACTERS.name"> | ||||
|           <a-switch v-model="form.PASSWORD_CONTAIN_SPECIAL_CHARACTERS" type="round" :checked-value="1" | ||||
|         <a-form-item field="PASSWORD_REQUIRE_SYMBOLS" | ||||
|           :label="securityConfig.PASSWORD_REQUIRE_SYMBOLS.name"> | ||||
|           <a-switch v-model="form.PASSWORD_REQUIRE_SYMBOLS" type="round" :checked-value="1" | ||||
|             :unchecked-value="0"> | ||||
|             <template #checked>是</template> | ||||
|             <template #unchecked>否</template> | ||||
| @@ -95,10 +95,10 @@ const { form } = useForm({ | ||||
|   PASSWORD_ERROR_LOCK_MINUTES: 0, | ||||
|   PASSWORD_EXPIRATION_DAYS: 0, | ||||
|   PASSWORD_EXPIRATION_WARNING_DAYS: 0, | ||||
|   PASSWORD_REUSE_POLICY: 0, | ||||
|   PASSWORD_REPETITION_TIMES: 0, | ||||
|   PASSWORD_MIN_LENGTH: 0, | ||||
|   PASSWORD_ALLOW_CONTAIN_USERNAME: 0, | ||||
|   PASSWORD_CONTAIN_SPECIAL_CHARACTERS: 0 | ||||
|   PASSWORD_REQUIRE_SYMBOLS: 0 | ||||
| }) | ||||
| const rules: FormInstance['rules'] = { | ||||
|   PASSWORD_ERROR_LOCK_COUNT: [{ required: true, message: '请输入值' }], | ||||
| @@ -116,7 +116,7 @@ const rules: FormInstance['rules'] = { | ||||
|       } | ||||
|     } | ||||
|   ], | ||||
|   PASSWORD_REUSE_POLICY: [{ required: true, message: '请输入值' }], | ||||
|   PASSWORD_REPETITION_TIMES: [{ required: true, message: '请输入值' }], | ||||
|   PASSWORD_MIN_LENGTH: [{ required: true, message: '请输入值' }] | ||||
| } | ||||
|  | ||||
| @@ -125,10 +125,10 @@ const securityConfig = ref<SecurityConfig>({ | ||||
|   PASSWORD_ERROR_LOCK_MINUTES: {}, | ||||
|   PASSWORD_EXPIRATION_DAYS: {}, | ||||
|   PASSWORD_EXPIRATION_WARNING_DAYS: {}, | ||||
|   PASSWORD_REUSE_POLICY: {}, | ||||
|   PASSWORD_REPETITION_TIMES: {}, | ||||
|   PASSWORD_MIN_LENGTH: {}, | ||||
|   PASSWORD_ALLOW_CONTAIN_USERNAME: {}, | ||||
|   PASSWORD_CONTAIN_SPECIAL_CHARACTERS: {} | ||||
|   PASSWORD_REQUIRE_SYMBOLS: {} | ||||
| }) | ||||
| // 重置 | ||||
| const reset = () => { | ||||
| @@ -137,10 +137,10 @@ const reset = () => { | ||||
|   form.PASSWORD_ERROR_LOCK_MINUTES = securityConfig.value.PASSWORD_ERROR_LOCK_MINUTES.value || 0 | ||||
|   form.PASSWORD_EXPIRATION_DAYS = securityConfig.value.PASSWORD_EXPIRATION_DAYS.value || 0 | ||||
|   form.PASSWORD_EXPIRATION_WARNING_DAYS = securityConfig.value.PASSWORD_EXPIRATION_WARNING_DAYS.value || 0 | ||||
|   form.PASSWORD_REUSE_POLICY = securityConfig.value.PASSWORD_REUSE_POLICY.value || 0 | ||||
|   form.PASSWORD_REPETITION_TIMES = securityConfig.value.PASSWORD_REPETITION_TIMES.value || 0 | ||||
|   form.PASSWORD_MIN_LENGTH = securityConfig.value.PASSWORD_MIN_LENGTH.value || 0 | ||||
|   form.PASSWORD_ALLOW_CONTAIN_USERNAME = securityConfig.value.PASSWORD_ALLOW_CONTAIN_USERNAME.value || 0 | ||||
|   form.PASSWORD_CONTAIN_SPECIAL_CHARACTERS = securityConfig.value.PASSWORD_CONTAIN_SPECIAL_CHARACTERS.value || 0 | ||||
|   form.PASSWORD_REQUIRE_SYMBOLS = securityConfig.value.PASSWORD_REQUIRE_SYMBOLS.value || 0 | ||||
| } | ||||
|  | ||||
| const isUpdate = ref(false) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user