diff --git a/eslint.config.ts b/eslint.config.ts index 475ba2d..72d1d5c 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -61,6 +61,13 @@ export default defineConfigWithVueTs( order: ['script', 'template', 'style'], }, ], + 'vue/define-macros-order': [ + 'error', + { + order: ['defineOptions', 'defineProps', 'defineEmits', 'defineSlots'], + }, + ], + 'import/newline-after-import': 'error', }, }, diff --git a/src/components/UseIntersectionObserverInfiniteLoading.vue b/src/components/UseIntersectionObserverInfiniteLoading.vue index 5b2868c..890e1e7 100644 --- a/src/components/UseIntersectionObserverInfiniteLoading.vue +++ b/src/components/UseIntersectionObserverInfiniteLoading.vue @@ -38,6 +38,11 @@ const props = defineProps<{ errorText: string; }>(); +const emit = defineEmits<{ + load: []; + clickError: []; +}>(); + defineSlots<{ // 加载中 loading(): unknown; @@ -65,11 +70,6 @@ const check = (reason?: string) => { }); }; -const emit = defineEmits<{ - load: []; - clickError: []; -}>(); - const target = ref(null); const { pause, resume } = useIntersectionObserver( diff --git a/src/pages/AntdV/HAPopconfirmButton.vue b/src/pages/AntdV/HAPopconfirmButton.vue index eeb86b6..e606690 100644 --- a/src/pages/AntdV/HAPopconfirmButton.vue +++ b/src/pages/AntdV/HAPopconfirmButton.vue @@ -2,14 +2,13 @@ import type { PopconfirmProps } from 'ant-design-vue'; defineOptions({ inheritAttrs: true }); +const props = defineProps(); type NotUndefined = T extends undefined ? never : T; type PopconfirmOnConfirmParameters = Parameters>; type HPopconfirmProps = { onConfirm?: (...args: PopconfirmOnConfirmParameters) => Promise; }; -const props = defineProps(); - const _loading = shallowRef(false); const onConfirm: PopconfirmProps['onConfirm'] = async (e) => { if (props.onConfirm) {