|
|
@@ -0,0 +1,66 @@
|
|
|
+<template>
|
|
|
+ <transition name="translation">
|
|
|
+ <div class="right-bar-container" v-if="isFormShow">
|
|
|
+ <div class="form-util">
|
|
|
+ <div class="close" @click="isFormShow=false"></div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <slot></slot>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </transition>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: 'RightForm',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isFormShow: true,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showForm() {
|
|
|
+ this.isFormShow = true;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.right-bar-container{
|
|
|
+ position: fixed;
|
|
|
+ right: 0px;
|
|
|
+ top: 0px;
|
|
|
+ height: 100vh;
|
|
|
+ width: 800px;
|
|
|
+ box-shadow: 0 0 5px #BDC3C7;
|
|
|
+ background: #FFFFFF;
|
|
|
+}
|
|
|
+.translation-enter-active,.translation-leave-active {
|
|
|
+ transition: all 0.3s ease-out;
|
|
|
+}
|
|
|
+.translation-enter-from,
|
|
|
+.translation-leave-to {
|
|
|
+ transform: translateX(800px);
|
|
|
+}
|
|
|
+.form-util{
|
|
|
+ width: 80px;
|
|
|
+ margin-left: auto;
|
|
|
+ padding: 10px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.form-util .close{
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ cursor: pointer;
|
|
|
+ background-position: center;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-image: url("../assets/icon/close.svg");
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|