fix: some warnings

pull/11/head
ROC 3 years ago
parent 3e9384fc6c
commit 5cd43cc156

@ -49,6 +49,15 @@
} }
} }
.beian-link {
color: #333;
text-decoration: none;
&:hover {
opacity: 0.75;
}
}
.username-link { .username-link {
color: #000; color: #000;
color: none; color: none;
@ -70,6 +79,10 @@
.username-link { .username-link {
color: #eee; color: #eee;
} }
.beian-link {
color: #ddd;
}
} }
@media screen and (max-width: 821px) { @media screen and (max-width: 821px) {

@ -64,36 +64,7 @@
<n-form <n-form
ref="registerRef" ref="registerRef"
:model="registerForm" :model="registerForm"
:rules="{ :rules="registerRule"
username: {
required: true,
message: '',
},
password: {
required: true,
message: '',
},
repassword: [
{
required: true,
message: '',
},
{
validator: (rule: FormItemRule, value: any) => {
return (
!!registerForm.password &&
registerForm.password.startsWith(
value
) &&
registerForm.password.length >=
value.length
);
},
message: '',
trigger: 'input',
},
],
}"
> >
<n-form-item-row label="用户名" path="username"> <n-form-item-row label="用户名" path="username">
<n-input <n-input
@ -157,11 +128,38 @@ const registerForm = reactive({
password: '', password: '',
repassword: '', repassword: '',
}); });
const registerRule = {
username: {
required: true,
message: '',
},
password: {
required: true,
message: '',
},
repassword: [
{
required: true,
message: '',
},
{
validator: (rule: FormItemRule, value: any) => {
return (
!!registerForm.password &&
registerForm.password.startsWith(value) &&
registerForm.password.length >= value.length
);
},
message: '',
trigger: 'input',
},
],
};
const handleLogin = (e: Event) => { const handleLogin = (e: Event) => {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
loginRef.value?.validate(errors => { loginRef.value?.validate((errors) => {
if (!errors) { if (!errors) {
loading.value = true; loading.value = true;

@ -42,13 +42,16 @@ import { DarkModeOutlined, ChevronLeftRound } from '@vicons/material';
const store = useStore(); const store = useStore();
const router = useRouter(); const router = useRouter();
const props = withDefaults(defineProps<{ const props = withDefaults(
title: string, defineProps<{
back: boolean, title: string;
}>(), { back?: boolean;
title: "", }>(),
back: false {
}); title: '',
back: false,
}
);
const switchTheme = (theme: boolean) => { const switchTheme = (theme: boolean) => {
if (theme) { if (theme) {
localStorage.setItem('PAOPAO_THEME', 'dark'); localStorage.setItem('PAOPAO_THEME', 'dark');

@ -40,13 +40,16 @@ import { h, ref } from 'vue';
import { CloudDownloadOutline } from '@vicons/ionicons5'; import { CloudDownloadOutline } from '@vicons/ionicons5';
import { precheckAttachment, getAttachment } from '@/api/user'; import { precheckAttachment, getAttachment } from '@/api/user';
const props = withDefaults(defineProps<{ const props = withDefaults(
attachments: Item.AttachmentProps[], defineProps<{
price: number, attachments: Item.AttachmentProps[];
}>(), { price?: number;
}>(),
{
attachments: () => [], attachments: () => [],
price: 0 price: 0,
}); }
);
const showDownloadModal = ref(false); const showDownloadModal = ref(false);
const downloadTip = ref<any>(''); const downloadTip = ref<any>('');
const attachmentID = ref(0); const attachmentID = ref(0);

@ -20,11 +20,14 @@
import { reactive } from 'vue'; import { reactive } from 'vue';
import NVideo from 'nonesir-video'; import NVideo from 'nonesir-video';
const props = withDefaults(defineProps<{ const props = withDefaults(
videos: Item.PostProps[], defineProps<{
full: boolean, videos: Item.PostProps[];
}>(), { full?: boolean;
}>(),
{
videos: () => [], videos: () => [],
full: false full: false,
}); }
);
</script> </script>

@ -155,14 +155,6 @@ onMounted(() => {
opacity: 0.75; opacity: 0.75;
} }
.beian-link {
color: #333;
text-decoration: none;
&:hover {
opacity: 0.75;
}
}
.hash-link { .hash-link {
font-size: 12px; font-size: 12px;
} }

@ -1,5 +1,5 @@
declare module '*.vue' { declare module '*.vue' {
import { DefineComponent } from 'vue' import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any> const component: DefineComponent<{}, {}, any>
export default component export default component
} }
@ -12,6 +12,7 @@ declare module '*.gif'
declare module '*.bmp' declare module '*.bmp'
declare module '*.tiff' declare module '*.tiff'
declare module '*.json' declare module '*.json'
declare module 'nonesir-video'
interface AnyObject { interface AnyObject {
[key: string]: any [key: string]: any

Loading…
Cancel
Save