Skip to content

Commit

Permalink
perf: meTable和meVxeTable事件声明优化
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Dec 3, 2022
1 parent 12eb54f commit d9968e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
19 changes: 5 additions & 14 deletions src/components/meTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,11 @@ const props = {
} & ComponentProps<typeof ElPagination>
>,
};
const emits = {
quickSearch(searchText: string) {
//快捷搜索
return true;
},
refresh() {
return true;
},
add() {
return true;
},
['update:quickSearch'](searchText: string) {
return true;
},
const emits = ['quickSearch', 'refresh', 'add', 'update:quickSearch'] as unknown as {
quickSearch: (searchText: string) => void;
refresh: () => void;
add: () => void;
['update:quickSearch']: (searchText: string) => void;
};
export default defineComponent<
ComponentProps<typeof ElTable> & Partial<ExtractPropTypes<typeof props>>,
Expand Down
19 changes: 5 additions & 14 deletions src/components/meVxeTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,11 @@ const props = {
} & ComponentProps<typeof ElPagination>
>,
};
const emits = {
quickSearch(searchText: string) {
//快捷搜索
return true;
},
refresh() {
return true;
},
add() {
return true;
},
['update:quickSearch'](searchText: string) {
return true;
},
const emits = ['quickSearch', 'refresh', 'add', 'update:quickSearch'] as unknown as {
quickSearch: (searchText: string) => void;
refresh: () => void;
add: () => void;
['update:quickSearch']: (searchText: string) => void;
};
export default defineComponent<
ComponentProps<VXEComponent<VxeTableProps, VxeTableEventProps>> & Partial<ExtractPropTypes<typeof props>>,
Expand Down

0 comments on commit d9968e9

Please sign in to comment.