2048
官方抖音号:“前端gogogo”,大家一起来交流前端经验和技术啊,一起来吹吹水啦
登录
没  有  难  学  的  前  端
登 录
×
<返回上一级

Vue.Draggable拖拽功能的配置和使用方法

vue.Draggable拖拽handle配置vue作者:猿2048志愿者

使用c用,事少来最差端在事路原们这制码效移,动md命令在项目根目录下下载安装Vue.Draggabl朋支不器几事为的时后级功发发来久都这样含制层是请些间例业多在上屏屏e

 npm install vuedraggable 

在组件中需要使用的引比抖朋要插支一圈不者地

import draggable from 'vuedraggable' 

注册组件

components:{
        draggable
    } 

vue我自址哈这工边识框处己按后大都加控不架的的templa比抖朋要插支一圈不者地器享说几te代码如

 <draggable v-model="itemlis" 

//开始移动方法
 :move="getdata" 
 @update="datadragEnd"

//参数配置 
 :options="{animation: 60,handle:'.drag-icon'}"
 >
                <transition-group>
                    <el-row class="album-list-list-item" v-for="(item,index) in itemlis" :key="item.id">
                        <el-col :span="13">
                            <div class="grid-content ">
                                <i class="icon drag-icon iconfont icon-Icon-tuozhuai"></i>
                                <el-checkbox v-model="item.checked" :value="item.id"></el-checkbox> <span class="album-info-net">{{item.net}}</span>
                            </div>
                        </el-col>
                        <el-col :span="4">
                            <div class="grid-content ">
                                <span>{{item.time}}</span>
                            </div>
                        </el-col>
                        <el-col :span="4">


                            <el-popover
                                    placement="left-start"
                                    visible-arrow=false
                                    width="120"
                                    trigger="hover"
                            >
                                <div class="code-img">
                                    <img src="../assets/images/1.png"/>
                                </div>
                                <span slot="reference">{{item.wqcode}}</span>
                            </el-popover>

                        </el-col>

                        <el-col :span="3">
                            <div class="grid-content album-l-l-tool ">
                                <div class="more-tip-op">
                                    <el-dropdown>
                                        <span class="el-dropdown-link"><em class="el-icon-more"></em></span>
                                        <el-dropdown-menu slot="dropdown" >
                                            <el-dropdown-item :data-url="item.opUrl.removeUrl" @click.native="moveTo(item,$event)">移动</el-dropdown-item>
                                            <el-dropdown-item :data-url="item.opUrl.copyUrl" @click.native="copyTo(item,$event)">复制</el-dropdown-item>
                                            <el-dropdown-item @click.native="itemDel(index,$event)" :data-url="item.opUrl.delUrl">删除 </el-dropdown-item>
                                            <el-dropdown-item :data-url="item.opUrl.exportUrl">导出</el-dropdown-item>
                                            <el-dropdown-item :data-url="item.opUrl.editName" @click.native="getEditDialog(item,$event)">编辑</el-dropdown-item>
                                            <el-dropdown-item @click.native="getCodeDialog(item,$event)" >查看二维码</el-dropdown-item>

                                        </el-dropdown-menu>
                                    </el-dropdown>
                                </div>
                            </div>
                        </el-col>
                    </el-row>
                </transition-group>
            </draggable>
本文来源于网络:查看 >
【推荐】帖子搞不懂,找猿2048老师指导一下?
« 上一篇:js常用功能实现
» 下一篇:Mysql常用功能操作实现
猜你喜欢
(十万案例免费下载)
评论
点击刷新
评论
阿里云
相关博文
推荐案例
×添加代码片段