Initial project
This commit is contained in:
17
src/components/comment/form/emits.ts
Normal file
17
src/components/comment/form/emits.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { Comment } from "timi-web";
|
||||
|
||||
/**
|
||||
* emits
|
||||
*/
|
||||
export interface Emits {
|
||||
(event: "submit"): Promise<void>;
|
||||
}
|
||||
|
||||
export const useHandler = (emit: Emits) => {
|
||||
|
||||
const onSubmit = async (comment: Comment) => await emit("submit");
|
||||
|
||||
return {
|
||||
onSubmit,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user