<!--/**-->
|
<!--* Created By hui on 2019/7/19-->
|
<!--*/-->
|
<!--<template>-->
|
<!--<div class="Drawer">-->
|
<!--<div class="drawerContent"-->
|
<!--:style="drawerStyle">-->
|
<!--<header>-->
|
<!--<span>{{title}}</span>-->
|
<!--<span @click="cancle"><i class="el-icon-close"></i></span>-->
|
<!--</header>-->
|
<!--<section>-->
|
<!--<slot></slot>-->
|
<!--</section>-->
|
<!--<footer>-->
|
<!--<el-button type="primary" @click="onSubmit">新建</el-button>-->
|
<!--<el-button @click="cancle">取消</el-button>-->
|
<!--</footer>-->
|
<!--</div>-->
|
<!--<div v-show="show" class="dir" @click="cancle"></div>-->
|
<!--</div>-->
|
<!--</template>-->
|
|
<!--<script>-->
|
<!--export default {-->
|
<!--name: `Drawer`,-->
|
<!--props: {-->
|
<!--width: {-->
|
<!--type: String,-->
|
<!--default: `300px`-->
|
<!--},-->
|
<!--left: {-->
|
<!--type: String,-->
|
<!--default: `auto`-->
|
<!--},-->
|
<!--right: {-->
|
<!--type: String,-->
|
<!--default: `auto`-->
|
<!--},-->
|
<!--title: {-->
|
<!--type: String,-->
|
<!--default: `提示`-->
|
<!--},-->
|
<!--show: {-->
|
<!--type: Boolean,-->
|
<!--default: false-->
|
<!--}-->
|
<!--},-->
|
<!--data() {-->
|
<!--return {-->
|
<!--drawerStyle: null-->
|
<!--}-->
|
<!--},-->
|
<!--created() {-->
|
<!--if (this.show) {-->
|
<!--this.drawerStyle = {-->
|
<!--width: this.width,-->
|
<!--left: this.left,-->
|
<!--right: this.right-->
|
<!--}-->
|
<!--} else {-->
|
<!--this.drawerStyle = {-->
|
<!--width: this.width,-->
|
<!--left: this.left === `auto` ? `auto` : `${-parseInt(this.width)}px`,-->
|
<!--right: this.right === `auto` ? `auto` : `${-parseInt(this.width)}px`-->
|
<!--}-->
|
<!--}-->
|
<!--},-->
|
<!--methods: {-->
|
<!--onSubmit() {-->
|
<!--this.$emit(`onSubmit`)-->
|
<!--},-->
|
<!--cancle() {-->
|
<!--this.$parent.drawerInfo.show = false-->
|
<!--}-->
|
<!--},-->
|
<!--watch: {-->
|
<!--show() {-->
|
<!--console.log(this.show)-->
|
<!--if (this.show) {-->
|
<!--this.drawerStyle = {-->
|
<!--width: this.width,-->
|
<!--left: this.left,-->
|
<!--right: this.right-->
|
<!--}-->
|
<!--} else {-->
|
<!--this.drawerStyle = {-->
|
<!--width: this.width,-->
|
<!--left: this.left === `auto` ? `auto` : `${-parseInt(this.width)}px`,-->
|
<!--right: this.right === `auto` ? `auto` : `${-parseInt(this.width)}px`-->
|
<!--}-->
|
<!--}-->
|
<!--}-->
|
<!--}-->
|
<!--}-->
|
<!--</script>-->
|
|
<!--<style lang="less" scoped>-->
|
<!--.Drawer {-->
|
<!--.drawerContent {-->
|
<!--position: fixed;-->
|
<!--top: 0;-->
|
<!--bottom: 0;-->
|
<!--z-index: @z2;-->
|
<!--background: @white;-->
|
<!--transition: all 0.3s;-->
|
<!--> header {-->
|
<!--height: 40px;-->
|
<!--line-height: 40px;-->
|
<!--padding: 0 20px;-->
|
<!--border-bottom: 1px solid @borderColor;-->
|
<!--display: flex;-->
|
<!--justify-content: space-between;-->
|
<!--align-items: center;-->
|
<!--color: @title;-->
|
<!--> span {-->
|
<!--&:last-child {-->
|
<!--font-size: 20px;-->
|
<!--cursor: pointer;-->
|
<!--}-->
|
<!--}-->
|
<!--}-->
|
<!--> section {-->
|
<!--min-height: 400px;-->
|
<!--padding: 20px;-->
|
<!--}-->
|
<!--> footer {-->
|
<!--display: flex;-->
|
<!--justify-content: center;-->
|
<!--align-items: center;-->
|
<!--> .el-button {-->
|
<!--margin: 0 20px;-->
|
<!--}-->
|
|
<!--}-->
|
<!--}-->
|
<!--> .dir {-->
|
<!--cursor: pointer;-->
|
<!--position: fixed;-->
|
<!--top: 5px;-->
|
<!--bottom: 5px;-->
|
<!--left: 5px;-->
|
<!--right: 5px;-->
|
<!--background: rgba(0, 0, 0, 0.1);-->
|
<!--z-index: @z1;-->
|
<!--}-->
|
<!--}-->
|
<!--</style>-->
|