Vue.Draggable拖拽功能的配置使用方法
本文實(shí)例為大家分享了Vue.Draggable拖拽功能的具體代碼,供大家參考,具體內(nèi)容如下
使用cmd命令在項(xiàng)目根目錄下下載安裝Vue.Draggable
npm install vuedraggable
在組件中需要使用的引入
import draggable from 'vuedraggable'
注冊組件
components:{ draggable }
vue的template代碼如
<draggable v-model="itemlis" //開始移動(dòng)方法 :move="getdata" @update="datadragEnd" //參數(shù)配置 :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)">移動(dòng)</el-dropdown-item> <el-dropdown-item :data-url="item.opUrl.copyUrl" @click.native="copyTo(item,$event)">復(fù)制</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">導(dǎo)出</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>
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- vue拖拽組件vuedraggable使用說明詳解
- vue3使用vuedraggable實(shí)現(xiàn)拖拽功能
- Vue?基于?vuedraggable?實(shí)現(xiàn)選中、拖拽、排序效果
- vue draggable resizable 實(shí)現(xiàn)可拖拽縮放的組件功能
- 利用Vue-draggable組件實(shí)現(xiàn)Vue項(xiàng)目中表格內(nèi)容的拖拽排序
- vue.draggable實(shí)現(xiàn)表格拖拽排序效果
- vuedraggable+element ui實(shí)現(xiàn)頁面控件拖拽排序效果
- vue?draggable組件實(shí)現(xiàn)拖拽及點(diǎn)擊無效問題的解決
相關(guān)文章
Vue3使用vant檢索組件van-search遇到的問題小結(jié)
當(dāng)清空按鈕與檢索按鈕同時(shí)居右時(shí),點(diǎn)擊clear清空按鈕事件時(shí)會(huì)同時(shí)觸發(fā)click-right-icon事件,這個(gè)時(shí)候容易觸發(fā)一系列問題,小編小編給大家分享Vue3使用vant檢索組件van-search遇到的問題小結(jié),感興趣的朋友一起看看吧2024-02-02vue.js學(xué)習(xí)之UI組件開發(fā)教程
前端開發(fā)中,隨著業(yè)務(wù)的增多,出于效率的考慮,我們對(duì)于組件化開發(fā)的需求也越來越迫切。下面這篇文章主要給大家介紹了關(guān)于vue.js之UI組件開發(fā)的相關(guān)資料,文中介紹的非常詳細(xì),需要的朋友們下面來一起看看吧。2017-07-07vue-resource請求實(shí)現(xiàn)http登錄攔截或者路由攔截的方法
這篇文章主要介紹了vue-resource請求實(shí)現(xiàn)http登錄攔截或者路由攔截的方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-07-07如何利用vue+vue-router+elementUI實(shí)現(xiàn)簡易通訊錄
這篇文章主要介紹了如何利用vue+vue-router+elementUI實(shí)現(xiàn)簡易通訊錄,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2019-05-05vue中的v-model原理,與組件自定義v-model詳解
這篇文章主要介紹了vue中的v-model原理,與組件自定義v-model詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2020-08-08Vue3+vite路由配置優(yōu)化(自動(dòng)化導(dǎo)入)
這篇文章主要介紹了Vue3+vite路由配置優(yōu)化(自動(dòng)化導(dǎo)入),需要的朋友可以參考下2023-09-09Vue+Element的后臺(tái)管理框架的整合實(shí)踐
本文主要介紹了Vue+Element的后臺(tái)管理框架,在框架上,領(lǐng)導(dǎo)要用AdminLTE這套模板,文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-09-09vuejs2.0實(shí)現(xiàn)一個(gè)簡單的分頁示例
本篇文章主要介紹了vuejs2.0實(shí)現(xiàn)一個(gè)簡單的分頁示例,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-02-02