基于北京SDK的方案预演功能
surprise
2024-05-07 087510aa88b0a6b6b5c648907e9dd52394621d47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<template>
  <transition name="el-fade-in-linear">
    <div class="popupBox"
         v-show="showBox"
         v-if="closeHidePage || showBox"
         :style="`top:${hideTools ? '40px' : '128px'};${
        shadow ? 'pointer-events: all;background-color: rgba(0, 0, 0, 0.5)' : ''
      };`">
      <div class="popupContainer"
           :style="`left:${left};top:${top};min-width:${width || ''}`"
           v-drag>
        <div class="popupTitle">
          <span>{{ title }}</span>
          <el-button-group>
            <el-button type="text"
                       :icon="showContainer ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
                       :title="showContainer ? '收缩' : '展开'"
                       @click="showBody"></el-button>
            <el-button type="text"
                       icon="el-icon-close"
                       title="关闭"
                       @click="close"></el-button>
          </el-button-group>
        </div>
        <el-collapse-transition>
          <div v-show="showContainer">
            <div class="popupBody scrollbar"
                 :style="`max-height:${maxHeight || defaultMaxHeight}`">
              <slot></slot>
            </div>
            <div class="popupBtn"
                 v-if="showBtn">
              <div v-if="btnArr && btnArr.length">
                <el-button v-for="item in btnArr"
                           :key="item.name"
                           size="mini"
                           :type="item.type"
                           @click="item.fun">{{ item.name }}</el-button>
              </div>
              <div v-else>
                <el-button size="mini"
                           @click="cancel">取消</el-button>
                <el-button type="primary"
                           size="mini"
                           @click="yes">确定</el-button>
              </div>
            </div>
          </div>
        </el-collapse-transition>
      </div>
    </div>
  </transition>
</template>
 
<script></script>
 
<style></style>