xiangpei
2025-04-18 7feee0463330ee014b0ac1a6f8e31118bb699f12
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
  <div :class="{topLevel1: topLevel === 1, topLevel2: topLevel === 2, topLevel3: topLevel === 3, topDefault: topLevel === -1}">
    <el-row>
      <el-button v-if="addShow" class="op" size="small" type="success" @click="add">添加</el-button>
      <el-button v-if="editShow" class="op" size="small" type="warning" @click="edit">修改</el-button>
      <el-button v-if="removeShow" class="op" size="small" type="danger" @click="remove">删除</el-button>
      <el-button v-if="importShow" class="op" size="small" type="primary" @click="importData">导入</el-button>
      <el-button v-if="exportShow" class="op" size="small" type="primary" @click="exportData">导出</el-button>
    </el-row>
  </div>
</template>
 
<script>
export default {
  name: "OperateC",
  data() {
    return {
    }
  },
  props: {
    topLevel: {
      required: false,
      default: -1,
      type: Number
    },
    add: {
      required: false,
      type: Function
    },
    edit: {
      required: false,
      type: Function
    },
    remove: {
      required: false,
      type: Function
    },
    importData: {
      required: false,
      type: Function
    },
    exportData: {
      required: false,
      type: Function
    },
    addShow: {
      required: false,
      default: false,
      type: Boolean
    },
    editShow: {
      required: false,
      default: false,
      type: Boolean
    },
    removeShow: {
      required: false,
      default: false,
      type: Boolean
    },
    importShow: {
      required: false,
      default: false,
      type: Boolean
    },
    exportShow: {
      required: false,
      default: false,
      type: Boolean
    },
  },
  methods: {
  }
}
</script>
 
<style scoped>
.el-row {
  text-align: left;
  padding-bottom: 5px;
}
</style>