yjryu / UI_Layout star
류윤주 류윤주 01-15
240115 류윤주 alert 모달 추가
@869d5908ac8c5c6d4aa2cf1077db3a06f8f68a42
client/resources/css/style.css
--- client/resources/css/style.css
+++ client/resources/css/style.css
@@ -168,9 +168,10 @@
 }
 
 /* 상세 서치바 */
-.search-bottom{
+.search-bottom {
     padding: 10px 0;
 }
+
 .option-searchbar {
     width: 50%;
     margin: 0 auto;
@@ -196,7 +197,7 @@
     font-size: 1.4rem;
 }
 
-.count-zone span{
+.count-zone span {
     font-weight: 900;
     color: #213f99;
 }
@@ -214,9 +215,9 @@
     justify-content: center;
     align-items: center;
     z-index: 200;
-  }
-  
-  .modal-container {
+}
+
+.modal-container {
     background: #fff;
     min-width: 500px;
     width: 35%;
@@ -227,86 +228,103 @@
     box-sizing: border-box;
     max-height: 90%;
     min-height: 500px;
-  }
-  
-  .modal-title {
+}
+
+.modal-title {
     width: 100%;
     border-bottom: 1px solid #d4cccc;
     padding: 10px 0;
-  }
-  
-  .modal-subtitle {
+}
+
+.modal-subtitle {
     font-size: 1.4rem;
     font-weight: 600;
     margin-bottom: 15px;
-  }
-  
-  .modal-content-monthly {
+}
+
+.modal-content-monthly {
     width: 100%;
     padding: 30px 0;
     overflow-y: auto;
-  }
+}
+
+.alert-modal {
+    min-width: 200px;
+    width: 20%;
+    min-height: 200px;
+}
+
+.alert-write {
+    font-size: 1.6rem;
+    line-height: 180%;
+}
 
 
-
-  .modal-content-monthly::-webkit-scrollbar {
+.modal-content-monthly::-webkit-scrollbar {
     width: 10px;
-  }
-  .modal-content-monthly::-webkit-scrollbar-thumb {
+}
+
+.modal-content-monthly::-webkit-scrollbar-thumb {
     background-color: #6b6b6b;
     border-radius: 10px;
     background-clip: padding-box;
     border: 2px solid transparent;
-  }
-  .modal-content-monthly::-webkit-scrollbar-track {
+}
+
+.modal-content-monthly::-webkit-scrollbar-track {
     background-color: #eee;
     border-radius: 10px;
     box-shadow: inset 0px 0px 5px white;
-  }
-  
-  .modal-end {
+}
+
+.modal-end {
     width: 100%;
     padding: 15px 0;
     border-top: 1px solid #eee;
-  }
+}
+
+.modal-end button {
+    margin-left: 0;
+}
 
 
-  /* 탭 */
-  .tab-nav {
+/* 탭 */
+.tab-nav {
     border-top: 1px solid #eee;
     border-bottom: 1px solid #eee;
     padding: 10px 0;
-  }
-  .tab-nav li a{
+}
+
+.tab-nav li a {
     display: block;
     font-size: 1.3rem;
     text-align: center;
     border-right: 1px solid #eee;
-  }
+}
 
-  .tab-nav li a.activeTab{
+.tab-nav li a.activeTab {
     color: #213f99;
     font-weight: 600;
-  }
+}
 
-  .tab-nav li:last-child a{
+.tab-nav li:last-child a {
     border-right: 0;
-  }
+}
 
 
 /* 라벨 css(상세 조회랑 다름) */
-.chekck-type{
+.chekck-type {
     display: none;
 }
 
-.chekcktype-label{
+.chekcktype-label {
     border-radius: 5px;
     padding: 5px 10px;
     background-color: #d6def6;
     color: #213f99;
 }
 
-.chekck-type:checked + label{
+.chekck-type:checked+label {
     background-color: #213f99;
     color: #fff;
 }
(파일 끝에 줄바꿈 문자 없음)
client/views/layout/TopMenu.vue
--- client/views/layout/TopMenu.vue
+++ client/views/layout/TopMenu.vue
@@ -85,6 +85,7 @@
                         { path: "/table.page", pathName: "테이블" },
                         { path: "/btnPosition.page", pathName: "버튼별 위치" },
                         { path: "/formModal.page", pathName: "form modal" },
+                        { path: "/alertModal.page", pathName: "alert modal" },
                     ],
                 },
                 {
client/views/pages/AppRouter.js
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
@@ -14,6 +14,7 @@
 import Horizontal from "../template/layoutTemplate/Horizontal.vue";
 import Vertical from "../template/layoutTemplate/Vertical.vue";
 import FormModal from "../template/templateElement/FormModal.vue"
+import AlertModal from "../template/templateElement/AlertModal.vue"
 import Guide from "../template/guide/TemplateGuide.vue";
 
 const routes = [
@@ -33,6 +34,7 @@
   {path: "/horizontal.page",name: "Horizontal",component: Horizontal,},
   {path: "/vertical.page",name: "Vertical",component: Vertical,},
   {path: "/formModal.page",name: "FormModal",component: FormModal,},
+  {path: "/alertModal.page",name: "AlertModal",component: AlertModal,},
   {path: "/guide.page",name: "Guide",component: Guide,},
 ];
 
 
client/views/template/templateElement/AlertModal.vue (added)
+++ client/views/template/templateElement/AlertModal.vue
@@ -0,0 +1,52 @@
+<template>
+    <div v-show="isModalOpen" class="modal-wrapper">
+        <div class="modal-container alert-modal">
+            <div class="modal-title text-ct">
+                <h2>모달 제목</h2>
+            </div>
+            <div class="modal-content-monthly">
+                <p class="alert-write text-ct">경고 메세지를 입력해주세요. <br />
+                    삭제,수정,추가 등등
+                </p>
+            </div>
+            <div class="modal-end flex justify-between">
+                <button class="gray-btn large-btn flex50" @click="closeModal">취소</button>
+                <button class="blue-btn large-btn flex50" @click="closeModal">확인</button>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+
+export default {
+    data() {
+        return {
+            isModalOpen: true,
+            activeTab: 'tab1',
+            modalType: 'tab-modal'
+        }
+    },
+    methods: {
+        // 탭 변경
+        showTab: function (tabName) {
+            this.activeTab = tabName;
+        },
+
+        closeModal:function(){
+            this.isModalOpen=false;
+        }
+    },
+    watch: {
+
+    },
+    computed: {
+
+    },
+    components: {
+    },
+    mounted() {
+        console.log('main mounted');
+    }
+}
+</script>(파일 끝에 줄바꿈 문자 없음)
client/views/template/templateElement/FormModal.vue
--- client/views/template/templateElement/FormModal.vue
+++ client/views/template/templateElement/FormModal.vue
@@ -4,7 +4,7 @@
             <div class="modal-title">
                 <div class="flex justify-between align-center">
                     <h2>모달 제목</h2>
-                    <button class="close-btn">X</button>
+                    <button class="close-btn" @click="closeModal">X</button>
                 </div>
             </div>
             <div class="modal-content-monthly" v-show="modalType == 'tab-modal'">
@@ -151,6 +151,9 @@
         showTab: function (tabName) {
             this.activeTab = tabName;
         },
+        closeModal:function(){
+            this.isModalOpen=false;
+        }
     },
     watch: {
 
Add a comment
List