|
@@ -1,77 +0,0 @@
|
|
|
-<template>
|
|
|
- <div style="border: 1px solid #EBEEF5;border-radius: 5px;">
|
|
|
- <div style="padding: 10px;" v-if="isShowHeader">
|
|
|
- <slot name="header"></slot>
|
|
|
- </div>
|
|
|
- <div class="form-box" :class="!isShowMore? 'auto':''" :style="{height:isShowGd?'auto':'49px'}">
|
|
|
- <slot name="footer"></slot>
|
|
|
- <el-tooltip effect="dark" :content="isShowGd?'收起':'更多'" placement="top">
|
|
|
- <div v-if="isShowMore" class="gd" :class="isShowGd? 'gd2':''" @click="isShowGd=!isShowGd"><i class="el-icon-d-arrow-left fontColorC"></i></div>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- import Tooltip from '@/components/Tooltip';
|
|
|
- export default {
|
|
|
- name:'FormBox',
|
|
|
- components:{Tooltip},
|
|
|
- props:{
|
|
|
- isShowMore:{
|
|
|
- type:Boolean,
|
|
|
- default:false,
|
|
|
- },
|
|
|
- isShowHeader:{
|
|
|
- type:Boolean,
|
|
|
- default:true,
|
|
|
- },
|
|
|
- },
|
|
|
- data(){
|
|
|
- return{
|
|
|
- str:'更多',
|
|
|
- isShowGd:false,
|
|
|
- }
|
|
|
- },
|
|
|
- methods:{
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped="scoped">
|
|
|
-.form-box{
|
|
|
- padding: 10px;
|
|
|
- background-color: rgb(250, 251, 252);
|
|
|
- border-radius: 5px;
|
|
|
- padding-bottom: 0;
|
|
|
- position: relative;
|
|
|
- height: auto;
|
|
|
- padding-right: 30px;
|
|
|
- transition: all 1s;
|
|
|
- /* overflow: hidden; */
|
|
|
-}
|
|
|
-.form-box ::v-deep .el-form-item{
|
|
|
- margin-bottom: 10px;
|
|
|
-}
|
|
|
-.gd{
|
|
|
- position: absolute;
|
|
|
- width: 20px;
|
|
|
- right: 10px;
|
|
|
- top: 20px;
|
|
|
- z-index: 999;
|
|
|
- font-size: 20px;
|
|
|
- cursor: pointer;
|
|
|
- transform: rotate(-90deg);
|
|
|
- transition: all 0.1s;
|
|
|
-}
|
|
|
-.gd2{
|
|
|
- transform: rotate(90deg);
|
|
|
-}
|
|
|
-.gd :hover{
|
|
|
- background-color: #f1f1f1;
|
|
|
-}
|
|
|
-.auto{
|
|
|
- height: auto !important;
|
|
|
-}
|
|
|
-</style>
|