Browse Source

feature/1001804

lizi 2 years ago
parent
commit
c0c627f7a7
1 changed files with 13 additions and 1 deletions
  1. 13 1
      src/views/report/components/ChapterEditor.vue

+ 13 - 1
src/views/report/components/ChapterEditor.vue

@@ -48,6 +48,13 @@ const emits = defineEmits<{
   (e: "sectionRecordUse", sectionId: number): void;
 }>();
 
+const visible = ref<boolean>(false);
+ 	 
+ 	const handleOk = () => {
+ 	  emits("remove")
+ 	  visible.value = false;
+ 	};
+
 watch(
   () => titleEditor.value,
   (el: HTMLInputElement | null) => {
@@ -98,7 +105,7 @@ function onMenuClick(e: { key: string }) {
       emits("moveDown");
       break;
     case "REMOVE":
-      emits("remove")
+      visible.value = true;
       break;
   }
 }
@@ -196,6 +203,11 @@ function onSectionRecordUse(sectionId: number) {
     @close="onReferenceDrawClose"
     @recordUse="onSectionRecordUse"
   />
+  <!--删除章节 start -->
+  <a-modal v-model:visible="visible" title="删除章节" @ok="handleOk">
+ 	  <p>确认删除章节</p>
+ 	</a-modal>
+ 	<!-- end -->
 </template>
 
 <style scoped lang="scss">