| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <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: false,
- };
- },
- 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>
|