mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
chore: FormDialog
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import * as api from "./api";
|
||||
import { useFormDialog } from "/@/use/use-dialog";
|
||||
|
||||
export function useDomainImport() {
|
||||
const { openFormDialog } = useFormDialog();
|
||||
|
||||
const columns = {
|
||||
dnsProviderType: {
|
||||
title: "域名提供商",
|
||||
type: "select",
|
||||
},
|
||||
dnsProviderAccessId: {
|
||||
title: "域名提供商访问ID",
|
||||
type: "input",
|
||||
},
|
||||
};
|
||||
|
||||
return function openDomainImportDialog() {
|
||||
openFormDialog({
|
||||
title: "从域名提供商导入域名",
|
||||
columns: columns,
|
||||
onSubmit: async (form: any) => {
|
||||
await api.Save({
|
||||
title: form.title,
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user