mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-31 16:43:40 +08:00
fix modal dup id
This commit is contained in:
@@ -154,20 +154,8 @@ onMounted(async () => {
|
||||
const $deleteModalElement: HTMLElement | null = document.querySelector(
|
||||
"#department-delete-modal",
|
||||
);
|
||||
departmentUpsertModal.value = new Modal(
|
||||
$upsertModalElement,
|
||||
{},
|
||||
{
|
||||
id: "department-upsert-modal",
|
||||
},
|
||||
);
|
||||
departmentDeleteModal.value = new Modal(
|
||||
$deleteModalElement,
|
||||
{},
|
||||
{
|
||||
id: "department-delete-modal",
|
||||
},
|
||||
);
|
||||
departmentUpsertModal.value = new Modal($upsertModalElement, {});
|
||||
departmentDeleteModal.value = new Modal($deleteModalElement, {});
|
||||
});
|
||||
|
||||
const handleUpsertDepartmentSubmit = async (
|
||||
|
||||
@@ -168,13 +168,7 @@ onMounted(async () => {
|
||||
const $llmUpdateModalElement: HTMLElement | null =
|
||||
document.querySelector("#llm-update-modal");
|
||||
|
||||
llmUpdateModal.value = new Modal(
|
||||
$llmUpdateModalElement,
|
||||
{},
|
||||
{
|
||||
id: "llm-update-modal",
|
||||
},
|
||||
);
|
||||
llmUpdateModal.value = new Modal($llmUpdateModalElement, {});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -148,16 +148,8 @@ onMounted(async () => {
|
||||
const $deleteModalElement: HTMLElement | null = document.querySelector(
|
||||
"#permission-delete-modal",
|
||||
);
|
||||
permissionUpsertModal.value = new Modal(
|
||||
$upsertModalElement,
|
||||
{},
|
||||
{ id: "permission-upsert-modal" },
|
||||
);
|
||||
permissionDeleteModal.value = new Modal(
|
||||
$deleteModalElement,
|
||||
{},
|
||||
{ id: "permission-delete-modal" },
|
||||
);
|
||||
permissionUpsertModal.value = new Modal($upsertModalElement, {});
|
||||
permissionDeleteModal.value = new Modal($deleteModalElement, {});
|
||||
});
|
||||
|
||||
const handleUpsertModalSubmit = async (data: PermissionUpsertModel) => {
|
||||
|
||||
@@ -147,20 +147,8 @@ onMounted(async () => {
|
||||
const $deleteModalElement: HTMLElement | null = document.querySelector(
|
||||
"#position-delete-modal",
|
||||
);
|
||||
positionUpsertModal.value = new Modal(
|
||||
$upsertModalElement,
|
||||
{},
|
||||
{
|
||||
id: "position-upsert-modal",
|
||||
},
|
||||
);
|
||||
positionDeleteModal.value = new Modal(
|
||||
$deleteModalElement,
|
||||
{},
|
||||
{
|
||||
id: "position-delete-modal",
|
||||
},
|
||||
);
|
||||
positionUpsertModal.value = new Modal($upsertModalElement, {});
|
||||
positionDeleteModal.value = new Modal($deleteModalElement, {});
|
||||
});
|
||||
|
||||
const handleUpsertPositionSubmit = async (
|
||||
|
||||
@@ -155,16 +155,8 @@ onMounted(async () => {
|
||||
document.querySelector("#role-upsert-modal");
|
||||
const $deleteModalElement: HTMLElement | null =
|
||||
document.querySelector("#role-delete-modal");
|
||||
roleUpsertModal.value = new Modal(
|
||||
$upsertModalElement,
|
||||
{},
|
||||
{ id: "role-upsert-modal" },
|
||||
);
|
||||
roleDeleteModal.value = new Modal(
|
||||
$deleteModalElement,
|
||||
{},
|
||||
{ id: "role-delete-modal" },
|
||||
);
|
||||
roleUpsertModal.value = new Modal($upsertModalElement, {});
|
||||
roleDeleteModal.value = new Modal($deleteModalElement, {});
|
||||
});
|
||||
|
||||
const handleUpsertModalSubmit = async (data: RoleUpsertModel) => {
|
||||
|
||||
@@ -275,27 +275,9 @@ onMounted(async () => {
|
||||
const $jobUpdateModalElement: HTMLElement | null =
|
||||
document.querySelector("#job-update-modal");
|
||||
|
||||
jobResumeModal.value = new Modal(
|
||||
$jobResumeModalElement,
|
||||
{},
|
||||
{
|
||||
id: "job-resume-modal",
|
||||
},
|
||||
);
|
||||
jobPauseModal.value = new Modal(
|
||||
$jobPauseModalElement,
|
||||
{},
|
||||
{
|
||||
id: "job-pause-modal",
|
||||
},
|
||||
);
|
||||
jobUpdateModal.value = new Modal(
|
||||
$jobUpdateModalElement,
|
||||
{},
|
||||
{
|
||||
id: "job-update-modal",
|
||||
},
|
||||
);
|
||||
jobResumeModal.value = new Modal($jobResumeModalElement, {});
|
||||
jobPauseModal.value = new Modal($jobPauseModalElement, {});
|
||||
jobUpdateModal.value = new Modal($jobUpdateModalElement, {});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="col-span-full xl:col-auto">
|
||||
<!-- Placeholder for potential right content -->
|
||||
</div>
|
||||
<div class="col-span-full xl:col-span-1 xl:row-start-2">
|
||||
<div class="col-span-full xl:col-span-1 xl:row-start-2">
|
||||
<div class="p-4 sm:p-6 mb-4 bg-white border border-gray-200 rounded-lg shadow-sm">
|
||||
<h3 class="mb-4 text-xl font-semibold">个人信息</h3>
|
||||
<form action="#">
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="col-span-1 sm:col-span-6">
|
||||
<button
|
||||
class="text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center w-full sm:w-auto"
|
||||
class="text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center w-auto"
|
||||
@click.prevent="handleUpdateClick" type="submit">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,20 +192,8 @@ onMounted(async () => {
|
||||
document.querySelector("#user-upsert-modal");
|
||||
const $deleteModalElement: HTMLElement | null =
|
||||
document.querySelector("#user-delete-modal");
|
||||
userUpsertModal.value = new Modal(
|
||||
$upsertModalElement,
|
||||
{},
|
||||
{
|
||||
id: "user-upsert-modal",
|
||||
},
|
||||
);
|
||||
userDeleteModal.value = new Modal(
|
||||
$deleteModalElement,
|
||||
{},
|
||||
{
|
||||
id: "user-delete-modal",
|
||||
},
|
||||
);
|
||||
userUpsertModal.value = new Modal($upsertModalElement, {});
|
||||
userDeleteModal.value = new Modal($deleteModalElement, {});
|
||||
});
|
||||
|
||||
const handleUpsertUserSubmit = async (data: UserUpsertSubmitModel) => {
|
||||
|
||||
Reference in New Issue
Block a user