|
|
@@ -0,0 +1,122 @@
|
|
|
+<template>
|
|
|
+ <div class="drawer">
|
|
|
+ <a-drawer
|
|
|
+ :placement="placement"
|
|
|
+ :closable="false"
|
|
|
+ :visible="visible"
|
|
|
+ @close="onClose"
|
|
|
+ class="bottom"
|
|
|
+ >
|
|
|
+ <div class="collapse"></div>
|
|
|
+ <div class="collapseCont">
|
|
|
+ <div class="title">{{ title }}</div>
|
|
|
+ <div class="content">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-drawer>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import { defineComponent, ref, PropType } from 'vue';
|
|
|
+
|
|
|
+interface Key {
|
|
|
+ [propName: string]: string;
|
|
|
+}
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: 'drawer',
|
|
|
+ props: {
|
|
|
+ title: {
|
|
|
+ default: '',
|
|
|
+ type: String
|
|
|
+ },
|
|
|
+ visible: {
|
|
|
+ default: true,
|
|
|
+ type: Boolean,
|
|
|
+ },
|
|
|
+ placement: {
|
|
|
+ // 需要绑定的值得 key
|
|
|
+ default: 'right',
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ onClose: {
|
|
|
+ default: () => {},
|
|
|
+ type: Function
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {},
|
|
|
+ setup(props, context) {
|
|
|
+ // let vis = ref(1);
|
|
|
+ // function onClose(visib: boolean) {
|
|
|
+ // props.visible.value = visib;
|
|
|
+ // }
|
|
|
+ return {
|
|
|
+ // vis
|
|
|
+ };
|
|
|
+ },
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.bottom {
|
|
|
+ .position(fixed, auto, 0, 0, auto);
|
|
|
+ width: 586px;
|
|
|
+ height: 330px;
|
|
|
+ background: transparent;
|
|
|
+}
|
|
|
+.ant-drawer.ant-drawer-open {
|
|
|
+ .ant-drawer-mask {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+ .ant-drawer-content-wrapper {
|
|
|
+ width: 586px !important;
|
|
|
+ box-shadow: none;
|
|
|
+ .ant-drawer-content {
|
|
|
+ background: transparent;
|
|
|
+ .ant-drawer-wrapper-body {
|
|
|
+ overflow: hidden;
|
|
|
+ .ant-drawer-body {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 0;
|
|
|
+ .inlineflex;
|
|
|
+ .collapse {
|
|
|
+ width: 26px;
|
|
|
+ height: 66px;
|
|
|
+ margin-top: 15px;
|
|
|
+ background: url(../../assets/images/dialogClose.png) center center no-repeat;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .collapseCont {
|
|
|
+ flex: 1;
|
|
|
+ height: 100%;
|
|
|
+ border-top: 2px solid @m-blue0;
|
|
|
+ border-left: 2px solid @m-blue0;
|
|
|
+ .flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .title {
|
|
|
+ width: 100%;
|
|
|
+ height: 36px;
|
|
|
+ line-height: 36px;
|
|
|
+ text-align: center;
|
|
|
+ background: linear-gradient(0deg, @m-blue4, @m-blue5);
|
|
|
+ font-size: 16px;
|
|
|
+ color: @m-white1;
|
|
|
+ border-bottom: 2px solid @m-blue0;
|
|
|
+ }
|
|
|
+ .content {
|
|
|
+ flex: 1;
|
|
|
+ width: 100%;
|
|
|
+ max-height: calc(100% - 40px);
|
|
|
+ overflow-y: auto;
|
|
|
+ background: @m-grey11;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>;
|