vxe-table?實(shí)現(xiàn)?excel?選擇一個(gè)單元格拖拽自動(dòng)復(fù)制新的單元格(示例代碼)
vxe-table 實(shí)現(xiàn) excel 選擇一個(gè)單元格,拖拽自動(dòng)復(fù)制新的單元格
官網(wǎng):https://vxetable.cn
鼠標(biāo)按住右下角擴(kuò)展按鈕,當(dāng)選取一個(gè)單元格時(shí),自動(dòng)將當(dāng)前內(nèi)容填充到擴(kuò)展區(qū)域的所有單元格中
<template> <div> <vxe-grid v-bind="gridOptions"></vxe-grid> </div> </template> <script> export default { data () { const gridOptions = { border: true, height: 500, showOverflow: true, columnConfig: { resizable: true }, editConfig: { mode: 'cell', trigger: 'dblclick' // 雙擊單元格激活編輯狀態(tài) }, mouseConfig: { area: true, extension: true // 是否開啟區(qū)域擴(kuò)展選取功能,開啟后可以通過鼠標(biāo)左鍵按住區(qū)域內(nèi)右下角擴(kuò)展按鈕,將區(qū)域橫向或縱向擴(kuò)大 }, areaConfig: { extendByCopy: true // 是否啟用擴(kuò)展區(qū)域自動(dòng)填充,當(dāng)選取一個(gè)單元格時(shí),自動(dòng)將當(dāng)前內(nèi)容填充到擴(kuò)展區(qū)域的所有單元格中(同時(shí)按住 ctrl 鍵可取消值自動(dòng)識(shí)別數(shù)字功能) }, keyboardConfig: { arrowCursorLock: true, isClip: true, isArrow: true, isShift: true, isTab: true, isEnter: true, isEdit: true, isDel: true, isEsc: true, isFNR: true // 是否開啟查找與替換 }, columns: [ { type: 'seq', width: 60 }, { field: 'a', title: 'A', editRender: { name: 'input' } }, { field: 'b', title: 'B', editRender: { name: 'input' } }, { field: 'c', title: 'C', editRender: { name: 'input' } }, { field: 'd', title: 'D', editRender: { name: 'input' } }, { field: 'e', title: 'E', editRender: { name: 'input' } }, { field: 'f', title: 'F', editRender: { name: 'input' } }, { field: 'g', title: 'G', editRender: { name: 'input' } }, { field: 'h', title: 'H', editRender: { name: 'input' } } ], data: [ { id: 10001, a: 'Test1', b: 'Develop', c: 'Man', d: '23', e: '28', f: '', g: '', h: '' }, { id: 10002, a: 'Test2', b: 'Test', c: 'Women', d: '23', e: '22', f: '', g: '', h: '' }, { id: 10003, a: 'Test3', b: 'PM', c: 'Man', d: '23', e: '32', f: '', g: '', h: '' }, { id: 10004, a: 'Test4', b: 'Designer', c: 'Women', d: '456', e: '24', f: '', g: '', h: '' }, { id: 10005, a: 'Test5', b: 'Designer', c: 'Women', d: '23', e: '42', f: '', g: '', h: '' }, { id: 10006, a: 'Test6', b: 'Designer', c: 'Man', d: '23', e: '38', f: '', g: '', h: '' }, { id: 10007, a: 'Test7', b: 'Test', c: 'Women', d: '100', e: '24', f: '', g: '', h: '' }, { id: 10008, a: 'Test8', b: 'PM', c: 'Man', d: '345', e: '34', f: '', g: '', h: '' }, { id: 10009, a: 'Test9', b: 'Designer', c: 'Man', d: '67', e: '52', f: '', g: '', h: '' }, { id: 10010, a: 'Test10', b: 'Test', c: 'Women', d: '23', e: '44', f: '', g: '', h: '' } ] } return { gridOptions } } } </script>
https://gitee.com/x-extends/vxe-table
到此這篇關(guān)于vxe-table 實(shí)現(xiàn) excel 選擇一個(gè)單元格,拖拽自動(dòng)復(fù)制新的單元格的文章就介紹到這了,更多相關(guān)vxe-table 拖拽復(fù)制單元格內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
vue移動(dòng)端項(xiàng)目中如何實(shí)現(xiàn)頁面緩存的示例代碼
這篇文章主要介紹了vue移動(dòng)端項(xiàng)目中如何實(shí)現(xiàn)頁面緩存的示例代碼,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-03-03Element-ui table中過濾條件變更表格內(nèi)容的方法
下面小編就為大家分享一篇Element-ui table中過濾條件變更表格內(nèi)容的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2018-03-03Vue實(shí)現(xiàn)一個(gè)帶有緩存功能的Tab頁簽功能
在現(xiàn)代?Web?應(yīng)用中,Tab?頁簽功能是非常常見的一種交互模式,它可以幫助用戶在不同的視圖間快速切換,而不會(huì)丟失當(dāng)前視圖的狀態(tài),本文將介紹如何在?Vue?項(xiàng)目中實(shí)現(xiàn)一個(gè)帶有緩存功能的?Tab?頁簽功能,需要的朋友可以參考下2024-08-08vue element 多圖片組合預(yù)覽的實(shí)現(xiàn)
本文主要介紹了vue element多圖片預(yù)覽實(shí)現(xiàn)的相關(guān)資料,最近的項(xiàng)目中有圖片預(yù)覽的場(chǎng)景,本文就來介紹一下如何使用,感興趣的可以了解一下2023-08-08解決Vue 給mapState中定義的屬性賦值報(bào)錯(cuò)的問題
這篇文章主要介紹了解決Vue 給mapState中定義的屬性賦值報(bào)錯(cuò)的問題,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-06-06微信小程序如何像vue一樣在動(dòng)態(tài)綁定類名
這篇文章主要介紹了微信小程序如何像vue一樣在動(dòng)態(tài)綁定類名,文中給大家提到了vue與微信小程序的區(qū)別,需要的朋友可以參考下2018-04-04vue3組合式api實(shí)現(xiàn)v-lazy圖片懶加載的方法實(shí)例
vue作為前端主流的3大框架之一,目前在國內(nèi)有著非常廣泛的應(yīng)用,下面這篇文章主要給大家介紹了關(guān)于vue3組合式api實(shí)現(xiàn)v-lazy圖片懶加載的相關(guān)資料,需要的朋友可以參考下2022-09-09