Skip to content

Commit 2b605bd

Browse files
committed
chore: prettier
1 parent 5516733 commit 2b605bd

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
/docs/*
66
/vite.config.ts
77
/src/types/env.d.ts
8+
/src/types/auto-components.d.ts
9+
/src/types/auto-imports.d.ts
810
/docs/**/*
911
CHANGELOG

src/types/auto-components.d.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ declare module '@vue/runtime-core' {
2121
DictTag: typeof import('./../components/DictTag/src/DictTag.vue')['default']
2222
Echart: typeof import('./../components/Echart/src/Echart.vue')['default']
2323
Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
24-
ElAvatar: typeof import('element-plus/es')['ElAvatar']
2524
ElBadge: typeof import('element-plus/es')['ElBadge']
2625
ElButton: typeof import('element-plus/es')['ElButton']
2726
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
@@ -52,29 +51,22 @@ declare module '@vue/runtime-core' {
5251
ElIcon: typeof import('element-plus/es')['ElIcon']
5352
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
5453
ElInput: typeof import('element-plus/es')['ElInput']
55-
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
5654
ElLink: typeof import('element-plus/es')['ElLink']
5755
ElOption: typeof import('element-plus/es')['ElOption']
5856
ElPagination: typeof import('element-plus/es')['ElPagination']
5957
ElPopover: typeof import('element-plus/es')['ElPopover']
60-
ElRadio: typeof import('element-plus/es')['ElRadio']
61-
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
62-
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
6358
ElRow: typeof import('element-plus/es')['ElRow']
6459
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
6560
ElSelect: typeof import('element-plus/es')['ElSelect']
6661
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
67-
ElSpace: typeof import('element-plus/es')['ElSpace']
6862
ElSwitch: typeof import('element-plus/es')['ElSwitch']
6963
ElTable: typeof import('element-plus/es')['ElTable']
7064
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
7165
ElTabPane: typeof import('element-plus/es')['ElTabPane']
7266
ElTabs: typeof import('element-plus/es')['ElTabs']
7367
ElTag: typeof import('element-plus/es')['ElTag']
7468
ElTooltip: typeof import('element-plus/es')['ElTooltip']
75-
ElTransfer: typeof import('element-plus/es')['ElTransfer']
7669
ElTree: typeof import('element-plus/es')['ElTree']
77-
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
7870
ElUpload: typeof import('element-plus/es')['ElUpload']
7971
Error: typeof import('./../components/Error/src/Error.vue')['default']
8072
FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']

src/types/auto-imports.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ declare global {
4040
const ref: typeof import('vue')['ref']
4141
const required: typeof import('@/utils/formRules')['required']
4242
const resolveComponent: typeof import('vue')['resolveComponent']
43-
const resolveDirective: typeof import('vue')['resolveDirective']
4443
const shallowReactive: typeof import('vue')['shallowReactive']
4544
const shallowReadonly: typeof import('vue')['shallowReadonly']
4645
const shallowRef: typeof import('vue')['shallowRef']
@@ -65,3 +64,8 @@ declare global {
6564
const watchPostEffect: typeof import('vue')['watchPostEffect']
6665
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
6766
}
67+
// for type re-export
68+
declare global {
69+
// @ts-ignore
70+
export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue'
71+
}

src/views/system/post/form.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const openModal = async (type: string, id?: number) => {
6161
}
6262
modelLoading.value = false
6363
}
64-
defineExpose({ openModal: openModal }) // 提供 openModal 方法,用于打开弹窗
64+
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
6565
6666
// 提交新增/修改的表单
6767
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
@@ -70,9 +70,7 @@ const submitForm = async () => {
7070
const elForm = unref(formRef)?.getElFormRef()
7171
if (!elForm) return
7272
const valid = await elForm.validate()
73-
if (!valid) {
74-
return
75-
}
73+
if (!valid) return
7674
// 提交请求
7775
actionLoading.value = true
7876
try {

0 commit comments

Comments
 (0)