fix: lint code in type check
This commit is contained in:
parent
f867721fb8
commit
58c01069f9
|
@ -7,9 +7,9 @@ withDefaults(
|
|||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
positiveClick?: []
|
||||
negativeClick?: []
|
||||
"update:show"?: [value: boolean]
|
||||
(e: "positiveClick"): void
|
||||
(e: "negativeClick"): void
|
||||
(e: "update:show", value: boolean): void
|
||||
}>()
|
||||
|
||||
const onNegativeClick = () => {
|
||||
|
|
|
@ -3,7 +3,7 @@ export function unmarshalDate(date: string | Date) {
|
|||
return date
|
||||
}
|
||||
|
||||
const parts = date.split(/[-T:.+]/)
|
||||
const parts: number[] = date.split(/[-T:.+]/).map((part) => parseInt(part, 10))
|
||||
// 注意:JavaScript中的月份从0开始,所以需要将月份减1
|
||||
return new Date(
|
||||
parts[0],
|
||||
|
|
|
@ -342,7 +342,6 @@ const rules = {
|
|||
<NSpace justify="end" style="width: 100%">
|
||||
<NButton
|
||||
:type="true ? 'success' : 'warning'"
|
||||
@click="true ? addData() : updateData()"
|
||||
>
|
||||
{{ true ? "确定" : "修改" }}
|
||||
</NButton>
|
||||
|
@ -382,7 +381,6 @@ const rules = {
|
|||
tertiary
|
||||
type="primary"
|
||||
:disabled="true"
|
||||
@click="ppp = true"
|
||||
>
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
|
|
|
@ -62,7 +62,7 @@ const tableColumns = [
|
|||
title: "配额",
|
||||
key: "capacity",
|
||||
minWidth: "200px",
|
||||
render(row: User) {
|
||||
render() {
|
||||
return h(
|
||||
NTooltip,
|
||||
{
|
||||
|
@ -287,10 +287,7 @@ const rules = {
|
|||
</NSpace>
|
||||
<template #action>
|
||||
<NSpace justify="end" style="width: 100%">
|
||||
<NButton
|
||||
:type="true ? 'success' : 'warning'"
|
||||
@click="true ? addData() : updateData()"
|
||||
>
|
||||
<NButton :type="true ? 'success' : 'warning'">
|
||||
{{ true ? "确定" : "修改" }}
|
||||
</NButton>
|
||||
</NSpace>
|
||||
|
@ -325,7 +322,7 @@ const rules = {
|
|||
</template>
|
||||
刷新
|
||||
</n-button>
|
||||
<n-button tertiary type="primary" @click="ppp = true">
|
||||
<n-button tertiary type="primary">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<AddOutline />
|
||||
|
|
|
@ -81,7 +81,7 @@ const tableColumns = [
|
|||
title: "配额",
|
||||
key: "capacity",
|
||||
minWidth: "200px",
|
||||
render(row: User) {
|
||||
render() {
|
||||
return h(
|
||||
NTooltip,
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ const afterResetPasswordModalLeave = () => {
|
|||
<NModal
|
||||
:show="showResetPasswordModal"
|
||||
preset="card"
|
||||
closable="true"
|
||||
closable:="true"
|
||||
:title="`重置密码 (${selectRow?.username})`"
|
||||
bordered
|
||||
:mask-closable="false"
|
||||
|
|
|
@ -15,15 +15,6 @@ const personalInfo = ref({
|
|||
nickname: "",
|
||||
email: "",
|
||||
})
|
||||
const rules = {
|
||||
nickname: {
|
||||
required: false,
|
||||
message: "请输入昵称",
|
||||
min: 3,
|
||||
trigger: ["input", "blur"],
|
||||
type: "email",
|
||||
},
|
||||
}
|
||||
|
||||
onBeforeMount(() => {
|
||||
personalInfo.value.nickname = nickname.value
|
||||
|
@ -44,7 +35,7 @@ const uploadAvatar = (fileList: UploadFileInfo[]) => {
|
|||
return
|
||||
}
|
||||
uploadUserAvatar(file)
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
window.$message.success("头像上传成功")
|
||||
renewAvatar()
|
||||
})
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||
"include": [
|
||||
"env.d.ts",
|
||||
"src/**/*",
|
||||
"src/**/*.vue",
|
||||
"auto-imports.d.ts",
|
||||
"components.d.ts"
|
||||
],
|
||||
"exclude": ["src/**/__tests__/*"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
|
||||
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
|
|
Loading…
Reference in New Issue