Переглянути джерело

proTable暴露reset事件

tongshangming 2 роки тому
батько
коміт
8b0aff2716
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      src/components/core/ProTable.vue

+ 2 - 1
src/components/core/ProTable.vue

@@ -37,7 +37,7 @@ const props = withDefaults(defineProps<Props>(), {
   showToolbar: true
 })
 
-const emits = defineEmits(['click-create', 'click-edit', 'click-view', 'checkbox-change'])
+const emits = defineEmits(['click-create', 'click-edit', 'click-view', 'click-reset', 'checkbox-change'])
 
 const slots = useSlots()
 
@@ -73,6 +73,7 @@ const handleQuery = () => {
 }
 const handleReset = () => {
   query.value = { ...defaultQuery.value }
+  emits('click-reset', query.value)
   handleQuery()
 }
 // ============== 查询部分结束 ===============