Blame view

frontend/manage/src/components/portal/ColumnToolbar.vue 2.87 KB
8d73e917   陈威   初始化提交
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<template>
  <!-- <div>
    <el-menu  class="el-menu-toolbar" mode="horizontal" @select="handleSelect">
    <el-submenu  v-for="(value, key, pindex) in datavToolMap" :index="key" :key="pindex">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span slot="title">{{value.desc}}</span>
      </template>
        <draggable
          class="flex-container"
          tag="div"
          :list="value.items"
          v-bind="{group:{ name:'form', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}"
          @end="handleMoveEnd"
          @start="handleMoveStart"
          :move="handleMove"
        >
         <el-menu-item  v-for="(item, key, index) in value.items" :key="index" :index="item.alias">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span slot="title">{{item.name}}</span>
            </template>
          </el-menu-item>
        </draggable>
    </el-submenu>
  </el-menu>
  </div> -->
 <div>
    <div style="display: fix;height: 45px;line-height: 40px;overflow-x: auto;overflow-y: hidden;">
      <div v-for="(value, key, index) in datavToolMap" :key="index" style="padding-right:45px;">
        <draggable
          class="flex-container"
          tag="div"
          :list="value.items"
          v-bind="{group:{ name:'form', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}"
          @end="handleMoveEnd"
          @start="handleMoveStart"
          :move="handleMove"
        >
          
          <div class="block" style="float: left;padding-right:5px;" v-for="(item, key, index) in value.items" :key="index">
            <img :src="item.icon" :title="item.name" style="width: 40px; height: 40px;position: relative;display: inline-block;overflow: hidden;" class="image">
          </div>
        </draggable>
      </div>
    </div>
  </div> 
</template>
<script>
import Draggable from "vuedraggable";
export default {
  name: "column-toolbar",
  components: { Draggable },
  data() {
    return {
      currentDate: new Date()
    }
  },
  props: {
    datavToolMap: {
      type: Object
    }
  },
  methods: {
    handleSelect:function($event){
      this.handleMoveEnd();
    },
    handleMoveEnd: function() {},
    handleMoveStart: function() {},
    handleMove: function() {}
  }
};
</script>
<style>
.el-menu-toolbar{
  height: 48px;
}
.el-submenu{
  height: 48px;
}
.el-menu--horizontal>.el-submenu .el-submenu__title{
  height: 48px;
}
.time {
    font-size: 13px;
    color: #999;
  }
  
  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }

  .button {
    padding: 0;
    float: right;
  }

  .image {
    width: 100%;
    display: block;
  }

  .clearfix:before,
  .clearfix:after {
      display: table;
      content: "";
  }
  
  .clearfix:after {
      clear: both
  }

  .tools{
    height: 100%;
    line-height: 35px;
  }
  .item-direction{
    line-height: 40px;
    width: 45px;
  }
</style>