zoukankan      html  css  js  c++  java
  • vue的拖拽vuedraggable组件使用方法

    <template>
      <div id="app">
        <vuedraggable class="wrapper"
                      v-model="list">
          <transition-group>
            <div v-for="item in list"
                 :key="item"
                 class="item">
              <p>{{item}}</p>
            </div>
          </transition-group>
        </vuedraggable>
      </div>
    </template>

    <script>
    import vuedraggable from 'vuedraggable';

    export default {
      name: 'HelloWorld',
      components: { vuedraggable },
      props: {
      },
      data () {
        return {
          list: [1, 2, 34, 4, 54, 5]
        }
      },
      updated () {
        console.log(this.list)
      },
      methods: {
      }
    }
    </script>
    <style scoped>
    .wrapper {
      display: flex;
      justify-content: center;
       100%;
    }
    .item {
       300px;
      height: 50px;
      background-color: #42b983;
      color: #ffffff;
    }
    </style>
  • 相关阅读:
    K8S-安全机制
    K8S-Service
    K8S-Pod资源管理
    K8S-kubelet启动过程
    每日进度
    每日进度
    每日进度
    每日进度
    每日进度
    归纳及计划
  • 原文地址:https://www.cnblogs.com/supermanYU/p/14075236.html
Copyright © 2011-2022 走看看