diff --git a/eslint.config.js b/eslint.config.js
index c78ff6c..3a14f5b 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -8,6 +8,10 @@ export default antfu(
'vue/block-order': ['error', {
order: [['script', 'template'], 'style'],
}], // 强制组件顶级元素的顺序
+ 'vue/define-macros-order': ['error', {
+ order: ['defineOptions', 'defineModel', 'defineProps', 'defineEmits', 'defineSlots'],
+ defineExposeLast: true,
+ }], // 强制执行定义限制和定义弹出编译器宏的顺序
'vue/singleline-html-element-content-newline': 'off', // 要求在单行元素的内容前后换行
'vue/html-self-closing': ['off', {
html: {
diff --git a/src/components/GenCron/CronModel/index.vue b/src/components/GenCron/CronModel/index.vue
index ecb9780..9e3a090 100644
--- a/src/components/GenCron/CronModel/index.vue
+++ b/src/components/GenCron/CronModel/index.vue
@@ -49,8 +49,6 @@ const open = (cron: string = '') => {
visible.value = true
}
-defineExpose({ open })
-
// 确定
const handlerOk = () => {
if (cronInputRef.value?.checkCron()) {
@@ -65,6 +63,8 @@ const handlerOk = () => {
const handlerClose = () => {
visible.value = false
}
+
+defineExpose({ open })
diff --git a/src/components/GiForm/src/GiForm.vue b/src/components/GiForm/src/GiForm.vue
index 85f6ef8..1208b7d 100644
--- a/src/components/GiForm/src/GiForm.vue
+++ b/src/components/GiForm/src/GiForm.vue
@@ -167,8 +167,6 @@ const isDisabled = (disabled?: ColumnsItemDisabled) => {
}
}
-defineExpose({ formRef })
-
props.columns.forEach((item) => {
if (item.request && typeof item.request === 'function' && item?.init) {
item.request(props.modelValue).then((res) => {
@@ -213,6 +211,8 @@ watch(cloneForm as any, (newVal, oldVal) => {
}
})
})
+
+defineExpose({ formRef })