diff --git a/web/src/assets/css/main.less b/web/src/assets/css/main.less index ee47b3d4..ebc806a5 100644 --- a/web/src/assets/css/main.less +++ b/web/src/assets/css/main.less @@ -49,6 +49,15 @@ } } +.beian-link { + color: #333; + text-decoration: none; + + &:hover { + opacity: 0.75; + } +} + .username-link { color: #000; color: none; @@ -70,6 +79,10 @@ .username-link { color: #eee; } + + .beian-link { + color: #ddd; + } } @media screen and (max-width: 821px) { diff --git a/web/src/components/auth.vue b/web/src/components/auth.vue index 44c5bf16..f8205dcf 100644 --- a/web/src/components/auth.vue +++ b/web/src/components/auth.vue @@ -64,36 +64,7 @@ { + return ( + !!registerForm.password && + registerForm.password.startsWith(value) && + registerForm.password.length >= value.length + ); + }, + message: '两次密码输入不一致', + trigger: 'input', + }, + ], +}; const handleLogin = (e: Event) => { e.preventDefault(); e.stopPropagation(); - loginRef.value?.validate(errors => { + loginRef.value?.validate((errors) => { if (!errors) { loading.value = true; diff --git a/web/src/components/main-nav.vue b/web/src/components/main-nav.vue index 1f78b0da..87546bde 100644 --- a/web/src/components/main-nav.vue +++ b/web/src/components/main-nav.vue @@ -42,13 +42,16 @@ import { DarkModeOutlined, ChevronLeftRound } from '@vicons/material'; const store = useStore(); const router = useRouter(); -const props = withDefaults(defineProps<{ - title: string, - back: boolean, -}>(), { - title: "", - back: false -}); +const props = withDefaults( + defineProps<{ + title: string; + back?: boolean; + }>(), + { + title: '', + back: false, + } +); const switchTheme = (theme: boolean) => { if (theme) { localStorage.setItem('PAOPAO_THEME', 'dark'); diff --git a/web/src/components/post-attachment.vue b/web/src/components/post-attachment.vue index b41ebd0c..c806ac9f 100644 --- a/web/src/components/post-attachment.vue +++ b/web/src/components/post-attachment.vue @@ -40,13 +40,16 @@ import { h, ref } from 'vue'; import { CloudDownloadOutline } from '@vicons/ionicons5'; import { precheckAttachment, getAttachment } from '@/api/user'; -const props = withDefaults(defineProps<{ - attachments: Item.AttachmentProps[], - price: number, -}>(), { - attachments: () => [], - price: 0 -}); +const props = withDefaults( + defineProps<{ + attachments: Item.AttachmentProps[]; + price?: number; + }>(), + { + attachments: () => [], + price: 0, + } +); const showDownloadModal = ref(false); const downloadTip = ref(''); const attachmentID = ref(0); diff --git a/web/src/components/post-video.vue b/web/src/components/post-video.vue index df22c13c..2dd72919 100644 --- a/web/src/components/post-video.vue +++ b/web/src/components/post-video.vue @@ -20,11 +20,14 @@ import { reactive } from 'vue'; import NVideo from 'nonesir-video'; -const props = withDefaults(defineProps<{ - videos: Item.PostProps[], - full: boolean, -}>(), { - videos: () => [], - full: false -}); +const props = withDefaults( + defineProps<{ + videos: Item.PostProps[]; + full?: boolean; + }>(), + { + videos: () => [], + full: false, + } +); \ No newline at end of file diff --git a/web/src/components/rightbar.vue b/web/src/components/rightbar.vue index f1a37402..c4d363b9 100644 --- a/web/src/components/rightbar.vue +++ b/web/src/components/rightbar.vue @@ -155,14 +155,6 @@ onMounted(() => { opacity: 0.75; } - .beian-link { - color: #333; - text-decoration: none; - &:hover { - opacity: 0.75; - } - } - .hash-link { font-size: 12px; } diff --git a/web/src/shims-vue.d.ts b/web/src/shims-vue.d.ts index 7b99ac34..4f60e765 100644 --- a/web/src/shims-vue.d.ts +++ b/web/src/shims-vue.d.ts @@ -1,5 +1,5 @@ declare module '*.vue' { - import { DefineComponent } from 'vue' + import type { DefineComponent } from 'vue' const component: DefineComponent<{}, {}, any> export default component } @@ -12,6 +12,7 @@ declare module '*.gif' declare module '*.bmp' declare module '*.tiff' declare module '*.json' +declare module 'nonesir-video' interface AnyObject { [key: string]: any