@aurouscia/au-table-editor
Version:
vue表格编辑器组件
1 lines • 64.8 kB
JavaScript
(function(p,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@aurouscia/au-undo-redo"),require("@aurouscia/keyboard-shortcut")):typeof define=="function"&&define.amd?define(["exports","vue","@aurouscia/au-undo-redo","@aurouscia/keyboard-shortcut"],e):(p=typeof globalThis<"u"?globalThis:p||self,e(p.AuTableEditor={},p.Vue,p.AuUndoRedo,p.KeyboardShortcut))})(this,function(p,e,z,de){"use strict";var I0=Object.defineProperty;var b0=(p,e,z)=>e in p?I0(p,e,{enumerable:!0,configurable:!0,writable:!0,value:z}):p[e]=z;var B=(p,e,z)=>b0(p,typeof e!="symbol"?e+"":e,z);const J="#eeeeee",K="#000000";class Z{constructor(l){B(this,"id");B(this,"name");B(this,"cells");B(this,"cellsShown");B(this,"merges");B(this,"merged");B(this,"colors");B(this,"sticky");B(this,"rowCount");B(this,"colCount");this.id=l.id,this.name=l.name,this.cells=l.cells||[],this.merges=l.merges||[],this.merged=[],this.colors=l.colors||[],this.sticky=l.sticky||{},this.rowCount=this.cells.length,this.colCount=Math.max(...this.cells.map(r=>r.length)),this.cellsShown=[],this.totalRefresh()}output(){const l=[];var r=[];return this.enumerateCells((t,n)=>{var o=!1,f=1,d=1;if(this.isMergedCell(t,n)){const i=this.isMergeInfoHead(t,n);i?(f=i.right+1,d=i.down+1):o=!0}if(!o){const i=this.colors.find(s=>s.pos[0]==t&&s.pos[1]==n);r.push({content:this.cells[t][n],colspan:f>1?f:void 0,rowspan:d>1?d:void 0,position:{row:t,col:n},bgColor:i==null?void 0:i.bg,textColor:i==null?void 0:i.text})}return n==this.colCount-1&&(l.push(r),r=[]),!0}),l}getData(){return{id:this.id,name:this.name,cells:this.cells,merges:this.merges,colors:this.colors,sticky:this.sticky}}replaceData(l){this.id=l.id,this.name=l.name,this.cells=l.cells,this.merges=l.merges||[],this.colors=l.colors||[],this.sticky=l.sticky||{},this.totalRefresh()}refreshCellShown(){this.cellsShown=this.output()}refreshSize(){this.rowCount=this.cells.length,this.colCount=Math.max(...this.cells.map(l=>l.length))}totalRefresh(){this.merges=this.merges.filter(l=>l.down>0||l.right>0),this.rmColorRedundant(),this.refreshSize(),this.cells.forEach(l=>{const r=this.colCount-l.length;r!=0&&l.push(...this.newStringArr(r))}),this.refreshMergedPositions(),this.refreshCellShown()}rmColorRedundant(){this.colors=this.colors.filter(l=>(l.bg||l.text)&&(l.bg!==J||l.text!==K))}isMergeDangerous(r){var r=this.rectanglifySelection(r,[]),t=r[0];r.forEach(o=>{(o.row<t.row||o.col<t.col)&&(t=o)});var n=!1;return r.forEach(o=>{t!=o&&this.cells[o.row][o.col]&&(n=!0)}),n}addMerge(l){if(l.length<=1)return l;const r=[];l=this.rectanglifySelection(l,r),this.rmColorRedundant(),l.sort(this.posCmp);var t=l[0],n=this.cells[t.row][t.col],o=this.colors.find(i=>i.pos[0]===t.row&&i.pos[1]===t.col);const f=!!o;l.forEach(i=>{if(t!=i){if(!n){const u=this.cells[i.row][i.col];u&&(n=u)}this.cells[i.row][i.col]="";const s=this.colors.findIndex(u=>u.pos[0]===i.row&&u.pos[1]===i.col);s>=0&&(o||(o=this.colors[s]),this.colors.splice(s,1))}}),this.cells[t.row][t.col]=n,!f&&o&&(o.pos=[t.row,t.col],this.colors.push(o)),this.merges=this.merges.filter(i=>r.indexOf(i)==-1);const d=this.selectionToMergeInfo(l);return this.merges.push(d),this.refreshMergedPositions(),this.refreshCellShown(),[{row:d.row,col:d.col}]}removeMerge(l){var t;const r=(t=this.merged.find(n=>n.row==l.row&&n.col==l.col))==null?void 0:t.fromMerge;r&&(this.merges=this.merges.filter(n=>n.row!=r.row||n.col!=r.col),this.refreshMergedPositions(),this.refreshCellShown())}isMergedCell(l,r){return this.merged.find(t=>t.row==l&&t.col==r)}isMergeInfoHead(l,r){return this.merges.find(t=>t.row==l&&t.col==r)}isValidMergeInfo(l){return l.col>0&&l.right>0&&l.col+l.right<this.colCount&&l.row>0&&l.down>0&&l.row+l.down<this.rowCount}rectanglifySelection(l,r){const t=[];l.forEach(({row:f,col:d})=>{t.push({row:f,col:d});const i=this.isMergedCell(f,d);i&&r.indexOf(i.fromMerge)==-1&&r.push(i.fromMerge)}),r.forEach(f=>{this.enumerateMergeInfo(f,(d,i)=>(t.push({row:d,col:i}),!0))});const n=this.selectionToMergeInfo(t),o=[];return this.enumerateMergeInfo(n,(f,d)=>(o.push({row:f,col:d}),!0)),this.isSameSelection(l,o)?l:this.rectanglifySelection(o,r)}selectionToMergeInfo(l){const r=l.map(i=>i.col),t=l.map(i=>i.row),n=Math.min(...r),o=Math.max(...r),f=Math.min(...t),d=Math.max(...t);return{row:f,down:d-f,col:n,right:o-n}}isSameSelection(l,r){if(l.length!=r.length)return!1;l.sort(this.posCmp),r.sort(this.posCmp);for(var t=0;t<l.length;t++)if(l[t].row!=r[t].row||l[t].col!=r[t].col)return!1;return!0}posCmp(l,r){return l.row==r.row?l.col-r.col:l.row-r.row}rangeIncludeWholeMerge(l,r){if(l.type=="horizontal"){if(l.min<=r.col&&l.max>=r.col+r.right)return!0}else if(l.type=="vertical"&&l.min<=r.row&&l.max>=r.row+r.down)return!0;return!1}rangeIncludeCell(l,r,t){if(l.type=="horizontal"){if(l.min<=t&&l.max>=t)return!0}else if(l.type=="vertical"&&l.min<=r&&l.max>=r)return!0;return!1}refreshMergedPositions(){this.merged=[],this.merges.forEach(l=>{this.enumerateMergeInfo(l,(r,t)=>(this.merged.push({row:r,col:t,fromMerge:l}),!0))}),this.merged.sort(this.posCmp)}enumerateCells(l){for(var r=0;r<this.rowCount;r++)for(var t=0;t<this.colCount;t++)if(!l(r,t))return}enumerateMergeInfo(l,r){for(var t=l.row;t<=l.row+l.down;t++)for(var n=l.col;n<=l.col+l.right;n++)if(!r(t,n))return}enumerateRange(l,r){if(l.type=="vertical"){for(var t=l.min;t<=l.max;t++)for(var n=0;n<this.colCount;n++)if(!r(t,n))return}else if(l.type=="horizontal"){for(var t=0;t<this.rowCount;t++)for(var n=l.min;n<=l.max;n++)if(!r(t,n))return}}enumerateRow(l,r){const t=this.cells.at(l);if(t){for(let n=0;n<t.length;n++)if(!r(l,n))return}}enumerateCol(l,r){for(let t=0;t<this.cells.length;t++)if(!r(t,l))return}getSelectionRange(l,r){var t=0,n=0;if(l.length==1){const o=this.isMergeInfoHead(l[0].row,l[0].col);o&&l.push({row:o.row+o.down,col:o.col+o.right})}return r=="horizontal"?(t=Math.min(...l.map(o=>o.col)),n=Math.max(...l.map(o=>o.col))):r=="vertical"&&(t=Math.min(...l.map(o=>o.row)),n=Math.max(...l.map(o=>o.row))),{min:t,max:n,type:r}}isRectSelection(l){const r=[...l],t=[];l.forEach(f=>{var i;const d=(i=this.isMergedCell(f.row,f.col))==null?void 0:i.fromMerge;if(d){if(t.includes(d))return;t.push(d),this.enumerateMergeInfo(d,(s,u)=>(r.push({row:s,col:u}),!0))}});const n=this.selectionToMergeInfo(r);var o=!0;return this.enumerateMergeInfo(n,(f,d)=>r.find(i=>i.row==f&&i.col==d)?!0:(o=!1,!1)),o}isInsideSingleMergeSelection(l){var n;for(var r,t=0;t<l.length;t++){const o=(n=this.isMergedCell(l[t].row,l[t].col))==null?void 0:n.fromMerge;if(o){if(!r)r=o;else if(r!=o)return!1}else return!1}return!0}expandSelection(l,r,t){if(t=="strict"){if(r=="horizontal"){const i=this.getSelectionRange(l,"vertical"),s={row:i.min,col:0},u={row:i.max,col:this.colCount-1};return this.rectanglifySelection([...l,s,u],[])}else if(r=="vertical"){const i=this.getSelectionRange(l,"horizontal"),s={row:0,col:i.min},u={row:this.rowCount-1,col:i.max};return this.rectanglifySelection([...l,s,u],[])}}else if(t=="loose"){var n=[],o=[],f=r=="horizontal"?"vertical":"horizontal";const i=[];i.push(...l),l.forEach(s=>{const u=this.isMergeInfoHead(s.row,s.col);u&&this.enumerateMergeInfo(u,(v,C)=>(i.push({row:v,col:C}),!0))});var d=this.getSelectionRange(i,f);return this.enumerateRange(d,(s,u)=>{const v=this.isMergedCell(s,u);return v?n.push(v.fromMerge):o.push({row:s,col:u}),!0}),n=n.filter(s=>this.rangeIncludeWholeMerge(d,s)),n.forEach(s=>{o.find(u=>u.col==s.col&&u.row==s.row)||o.push({row:s.row,col:s.col})}),o||l}return l}selectSpecificIdx(l,r){const t=[];if(l=="horizontal"){const o=r;for(var n=0;n<this.colCount;n++){const f=this.isMergedCell(o,n);f?f.fromMerge.down==0&&t.push({row:f.row,col:f.col}):t.push({row:o,col:n})}}else if(l=="vertical"){const o=r;for(var n=0;n<this.rowCount;n++){const d=this.isMergedCell(n,o);d?d.fromMerge.right==0&&t.push({row:d.row,col:d.col}):t.push({row:n,col:o})}}return t}cellPosMapToShownPos(l,r=0){var d,i;if(r>1)return{row:0,col:0};const t=(d=this.isMergedCell(l.row,l.col))==null?void 0:d.fromMerge;if(t&&(t.row!=l.row||t.col!=l.col))return this.cellPosMapToShownPos({row:t.row,col:t.col},r+1);if(l.col==0)return{row:l.row,col:0};const n=[];for(var o=0;o<l.col;o++){const s=(i=this.isMergedCell(l.row,o))==null?void 0:i.fromMerge;s&&!n.includes(s)&&n.push(s)}var f=0;return n.forEach(s=>{f+=s.right+1,l.row==s.row&&(f-=1)}),{row:l.row,col:l.col-f}}shownPosMapToCellPos(l){var d,i;const r=this.cells[l.row],t=[],n=[];let o=0;for(let s=0;s<r.length;s++){const u=(d=this.isMergedCell(l.row,s))==null?void 0:d.fromMerge;u&&n.indexOf(u)==-1&&(u.row==l.row?(t.push([s,s-o]),o+=u.right):o+=u.right+1,n.push(u)),u||t.push([s,s-o])}let f=(i=t.find(s=>s[1]==l.col))==null?void 0:i.at(0);return f===void 0&&(f=-1),{row:l.row,col:f}}nextCellShown(l){const r=this.cellsShown[0][0].position;for(let t=0;t<this.cellsShown.length;t++){const n=this.cellsShown[t];for(let o=0;o<n.length;o++){const f=n[o];if(l.row==f.position.row&&l.col==f.position.col){if(o!=n.length-1)return n[o+1].position;{let d=t+1;for(;d<this.cellsShown.length;){const i=this.cellsShown[d];if(i.length>0)return i[0].position;d++}return r}}}}}insert(l,r){const t=this.locateGap(l,r);var n=l||[];if(!t)return l||[];if(r=="top"){this.cells.splice(t.idx,0,this.newStringArr(this.colCount));const o=this.merges.filter(i=>i.row==t.idx&&i.down>=1),f=this.merges.filter(i=>i.row<t.idx&&i.row+i.down>=t.idx),d=this.merges.filter(i=>i.row>t.idx||i.down==0&&i.row==t.idx);o.forEach(i=>{this.cells[i.row][i.col]=this.cells[i.row+1][i.col],this.cells[i.row+1][i.col]="",i.down+=1}),f.forEach(i=>{i.down+=1}),d.forEach(i=>{i.row+=1}),n=this.selectSpecificIdx("horizontal",t.idx)}else if(r=="bottom")t.idx<this.rowCount?this.cells.splice(t.idx,0,this.newStringArr(this.colCount)):this.cells.push(this.newStringArr(this.colCount)),this.merges.filter(d=>d.row+d.down+1==t.idx&&d.down>=1||d.row<t.idx&&d.row+d.down>=t.idx).forEach(d=>{d.down+=1}),this.merges.filter(d=>d.row>=t.idx).forEach(d=>{d.row+=1}),n=this.selectSpecificIdx("horizontal",t.idx);else if(r=="left"){this.cells.forEach(i=>i.splice(t.idx,0,""));const o=this.merges.filter(i=>i.col==t.idx&&i.right>=1),f=this.merges.filter(i=>i.col<t.idx&&i.col+i.right>=t.idx),d=this.merges.filter(i=>i.col>t.idx||i.col==t.idx&&i.right==0);o.forEach(i=>{this.cells[i.row][i.col]=this.cells[i.row][i.col+1],this.cells[i.row][i.col+1]="",i.right+=1}),f.forEach(i=>{i.right+=1}),d.forEach(i=>{i.col+=1}),n=this.selectSpecificIdx("vertical",t.idx)}else r=="right"&&(t.idx<this.colCount?this.cells.forEach(d=>d.splice(t.idx,0,"")):this.cells.forEach(d=>d.push("")),this.merges.filter(d=>d.col+d.right+1==t.idx&&d.right>=1||d.col<t.idx&&d.col+d.right>=t.idx).forEach(d=>{d.right+=1}),this.merges.filter(d=>d.col>=t.idx).forEach(d=>{d.col+=1}),n=this.selectSpecificIdx("vertical",t.idx));return r=="top"||r=="bottom"?this.colors.filter(f=>f.pos[0]>=t.idx).forEach(f=>f.pos[0]+=1):(r=="left"||r=="right")&&this.colors.filter(f=>f.pos[1]>=t.idx).forEach(f=>f.pos[1]+=1),this.totalRefresh(),n}locateGap(l,r){if(!l)return r=="top"?{idx:0,dir:"horizontal"}:r=="bottom"?{idx:this.rowCount,dir:"horizontal"}:r=="left"?{idx:0,dir:"vertical"}:r=="right"?{idx:this.colCount,dir:"vertical"}:void 0;if(r=="top"){const t=l.map(o=>o.row);return{idx:Math.min(...t),dir:"horizontal"}}if(r=="bottom"){const t=l.map(o=>{const f=this.isMergeInfoHead(o.row,o.col);return f?f.row+f.down:o.row});return{idx:Math.max(...t)+1,dir:"horizontal"}}if(r=="left"){const t=l.map(o=>o.col);return{idx:Math.min(...t),dir:"vertical"}}if(r=="right"){const t=l.map(o=>{const f=this.isMergeInfoHead(o.row,o.col);return f?f.col+f.right:o.col});return{idx:Math.max(...t)+1,dir:"vertical"}}}newStringArr(l){return new Array(l).fill("")}exchange(l){if(l.idx==0)return!1;if(l.dir=="horizontal"){const r=l.idx-1,t=l.idx;if(t>=this.cells.length)return!1;let n=!0;if(this.enumerateRow(r,(o,f)=>{const d=this.isMergedCell(o,f),i=this.isMergedCell(o+1,f);return d&&i&&d.fromMerge!=i.fromMerge&&(d.fromMerge.down>0||i.fromMerge.down>0)?(n=!1,!1):!0}),n)this.enumerateRow(r,(o,f)=>{const d=this.isMergedCell(o,f),i=this.isMergedCell(o+1,f);if((!d||d.fromMerge.down==0)&&(!i||i.fromMerge.down==0)){const s=this.cells[o][f];this.cells[o][f]=this.cells[o+1][f],this.cells[o+1][f]=s}return!0}),this.merges.forEach(o=>{o.down==0&&(o.row==r?o.row=t:o.row==t&&(o.row=r))}),this.colors.forEach(o=>{o.pos[0]==r?o.pos[0]=t:o.pos[0]==t&&(o.pos[0]=r)});else return!1}else if(l.dir=="vertical"){const r=l.idx-1,t=l.idx;if(t>=this.colCount)return!1;let n=!0;if(this.enumerateCol(r,(o,f)=>{const d=this.isMergedCell(o,f),i=this.isMergedCell(o,f+1);return d&&i&&d.fromMerge!=i.fromMerge&&(d.fromMerge.right>0||i.fromMerge.right>0)?(n=!1,!1):!0}),n)this.enumerateCol(r,(o,f)=>{const d=this.isMergedCell(o,f),i=this.isMergedCell(o,f+1);if((!d||d.fromMerge.right==0)&&(!i||i.fromMerge.right==0)){const s=this.cells[o][f];this.cells[o][f]=this.cells[o][f+1],this.cells[o][f+1]=s}return!0}),this.merges.forEach(o=>{o.right==0&&(o.col==r?o.col=t:o.col==t&&(o.col=r))}),this.colors.forEach(o=>{o.pos[1]==r?o.pos[1]=t:o.pos[1]==t&&(o.pos[1]=r)});else return!1}return this.totalRefresh(),!0}delete(l,r){if(r=="horizontal"){const t=this.getSelectionRange(l,"vertical"),n=t.max-t.min+1;this.merges=this.merges.filter(s=>!this.rangeIncludeWholeMerge(t,s)),this.colors=this.colors.filter(s=>!this.rangeIncludeCell(t,s.pos[0],s.pos[1]));const o=this.merges.filter(s=>s.row>t.max),f=this.merges.filter(s=>s.row<t.min&&s.row+s.down>=t.min),d=this.merges.filter(s=>s.row>=t.min&&s.row<=t.max);o.forEach(s=>{s.row-=n}),f.forEach(s=>{const u=Math.min(n,s.row+s.down-t.min+1);s.down-=u}),d.forEach(s=>{const u=t.max-s.row+1;s.down-=u;const v=s.row-t.min;this.cells[s.row+u][s.col]=this.cells[s.row][s.col],s.row-=v}),this.colors.filter(s=>s.pos[0]>t.max).forEach(s=>{s.pos[0]-=n}),this.cells.splice(t.min,n)}else if(r=="vertical"){const t=this.getSelectionRange(l,"horizontal"),n=t.max-t.min+1;this.merges=this.merges.filter(s=>!this.rangeIncludeWholeMerge(t,s)),this.colors=this.colors.filter(s=>!this.rangeIncludeCell(t,s.pos[0],s.pos[1]));const o=this.merges.filter(s=>s.col>t.max),f=this.merges.filter(s=>s.col<t.min&&s.col+s.right>=t.min),d=this.merges.filter(s=>s.col>=t.min&&s.col<=t.max);o.forEach(s=>{s.col-=n}),f.forEach(s=>{const u=Math.min(n,s.col+s.right-t.min+1);s.right-=u}),d.forEach(s=>{const u=t.max-s.col+1;s.right-=u;const v=s.col-t.min;this.cells[s.row][s.col+u]=this.cells[s.row][s.col],s.col-=v}),this.colors.filter(s=>s.pos[1]>t.max).forEach(s=>{s.pos[1]-=n}),this.cells.forEach(s=>{s.splice(t.min,n)})}return this.totalRefresh(),[]}rotateTableClockwise(l=1,r){if(l==0)return r||[];for(var t=1;t<=l;t++){const f=[];for(var n=0;n<this.colCount;n++)f.push([]);this.cells.forEach((i,s)=>{i.forEach((u,v)=>{f[v][this.rowCount-1-s]=u})}),this.cells=f;const d=[];if(this.merges.forEach(i=>{const s={row:i.row+i.down,col:i.col};d.push({row:s.col,col:this.rowCount-1-s.row,down:i.right,right:i.down})}),this.merges=d,r){var o=[];r.forEach(i=>{o.push({row:i.col,col:this.rowCount-1-i.row})}),r=o}this.refreshSize()}return this.refreshMergedPositions(),this.refreshCellShown(),r||[]}}const Je={id:0,name:"testTable",cells:[["数据加载异常,请检查网络连接或联系管理员","","","",""],["1A","1B","1C","1D","1E"],["2A","2B","2C","2D","2E"],["3A","3B","3C","3D","3E"]],merges:[{row:0,col:0,right:4,down:0}]},ve="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%238787E4;}%20.st1{fill:%238CC63F;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st3{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='17.67'%20y='17.67'%20class='st0'%20width='14.66'%20height='14.66'/%3e%3crect%20x='3'%20y='3'%20class='st1'%20width='14.67'%20height='44'/%3e%3cpolygon%20class='st2'%20points='32.33,17.67%2032.33,32.33%2017.67,32.33%2017.67,47%2047,47%2047,3%2017.67,3%2017.67,17.67%20'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='32.33'%20x2='47'%20y2='32.33'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='17.67'%20x2='47'%20y2='17.67'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='47'%20x2='32.33'%20y2='32.33'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='17.67'%20x2='32.33'%20y2='3'/%3e%3cg%3e%3cline%20class='st3'%20x1='13.69'%20y1='25.24'%20x2='6.69'%20y2='25.24'/%3e%3cline%20class='st3'%20x1='10.19'%20y1='28.74'%20x2='10.19'%20y2='21.74'/%3e%3c/g%3e%3c/svg%3e",ye="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%238787E4;}%20.st1{fill:%238CC63F;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st3{fill:%238CC63F;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='17.67'%20y='17.67'%20class='st0'%20width='14.66'%20height='14.66'/%3e%3crect%20x='32.33'%20y='3'%20class='st1'%20width='14.67'%20height='44'/%3e%3cpolygon%20class='st2'%20points='17.67,17.67%2017.67,32.33%2032.33,32.33%2032.33,47%203,47%203,3%2032.33,3%2032.33,17.67%20'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='32.33'%20x2='3'%20y2='32.33'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='17.67'%20x2='3'%20y2='17.67'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='47'%20x2='17.67'%20y2='32.33'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='17.67'%20x2='17.67'%20y2='3'/%3e%3cg%3e%3cline%20class='st3'%20x1='36.31'%20y1='25.24'%20x2='43.31'%20y2='25.24'/%3e%3cline%20class='st3'%20x1='39.81'%20y1='28.74'%20x2='39.81'%20y2='21.74'/%3e%3c/g%3e%3c/svg%3e",ke="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%238787E4;}%20.st1{fill:%238CC63F;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st3{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='17.67'%20y='17.67'%20class='st0'%20width='14.66'%20height='14.66'/%3e%3crect%20x='3'%20y='3'%20class='st1'%20width='44'%20height='14.67'/%3e%3cpolygon%20class='st2'%20points='17.67,32.33%2032.33,32.33%2032.33,17.67%2047,17.67%2047,47%203,47%203,17.67%2017.67,17.67%20'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='32.33'%20x2='32.33'%20y2='47'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='32.33'%20x2='17.67'%20y2='47'/%3e%3cline%20class='st2'%20x1='47'%20y1='32.33'%20x2='32.33'%20y2='32.33'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='32.33'%20x2='3'%20y2='32.33'/%3e%3cg%3e%3cline%20class='st3'%20x1='25.24'%20y1='13.69'%20x2='25.24'%20y2='6.69'/%3e%3cline%20class='st3'%20x1='28.74'%20y1='10.19'%20x2='21.74'%20y2='10.19'/%3e%3c/g%3e%3c/svg%3e",Ce="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%238787E4;}%20.st1{fill:%238CC63F;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st3{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='17.67'%20y='17.67'%20class='st0'%20width='14.66'%20height='14.66'/%3e%3crect%20x='3'%20y='32.33'%20class='st1'%20width='44'%20height='14.67'/%3e%3cpolygon%20class='st2'%20points='32.33,17.67%2017.67,17.67%2017.67,32.33%203,32.33%203,3%2047,3%2047,32.33%2032.33,32.33%20'/%3e%3cline%20class='st2'%20x1='17.67'%20y1='17.67'%20x2='17.67'%20y2='3'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='17.67'%20x2='32.33'%20y2='3'/%3e%3cline%20class='st2'%20x1='3'%20y1='17.67'%20x2='17.67'%20y2='17.67'/%3e%3cline%20class='st2'%20x1='32.33'%20y1='17.67'%20x2='47'%20y2='17.67'/%3e%3cg%3e%3cline%20class='st3'%20x1='24.76'%20y1='36.31'%20x2='24.76'%20y2='43.31'/%3e%3cline%20class='st3'%20x1='21.26'%20y1='39.81'%20x2='28.26'%20y2='39.81'/%3e%3c/g%3e%3c/svg%3e",Me="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23DDA0DD;stroke:%23000000;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='3'%20y='17.67'%20class='st0'%20width='44'%20height='14.66'/%3e%3crect%20x='3'%20y='32.33'%20class='st1'%20width='44'%20height='14.67'/%3e%3crect%20x='3'%20y='3'%20class='st1'%20width='44'%20height='14.67'/%3e%3cline%20class='st1'%20x1='32.33'%20y1='47'%20x2='32.33'%20y2='32.33'/%3e%3cline%20class='st1'%20x1='32.33'%20y1='17.67'%20x2='32.33'%20y2='3'/%3e%3cline%20class='st1'%20x1='17.67'%20y1='47'%20x2='17.67'%20y2='32.33'/%3e%3cline%20class='st1'%20x1='17.67'%20y1='17.67'%20x2='17.67'%20y2='3'/%3e%3cg%3e%3cline%20class='st2'%20x1='22.53'%20y1='22.53'%20x2='27.47'%20y2='27.47'/%3e%3cline%20class='st2'%20x1='22.53'%20y1='27.47'%20x2='27.47'%20y2='22.53'/%3e%3c/g%3e%3c/svg%3e",Ee="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23DDA0DD;stroke:%23000000;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='17.67'%20y='3'%20class='st0'%20width='14.66'%20height='44'/%3e%3crect%20x='32.33'%20y='3'%20class='st1'%20width='14.67'%20height='44'/%3e%3crect%20x='3'%20y='3'%20class='st1'%20width='14.67'%20height='44'/%3e%3cline%20class='st1'%20x1='47'%20y1='17.67'%20x2='32.33'%20y2='17.67'/%3e%3cline%20class='st1'%20x1='17.67'%20y1='17.67'%20x2='3'%20y2='17.67'/%3e%3cline%20class='st1'%20x1='47'%20y1='32.33'%20x2='32.33'%20y2='32.33'/%3e%3cline%20class='st1'%20x1='17.67'%20y1='32.33'%20x2='3'%20y2='32.33'/%3e%3cg%3e%3cline%20class='st2'%20x1='22.53'%20y1='27.47'%20x2='27.47'%20y2='22.53'/%3e%3cline%20class='st2'%20x1='27.47'%20y1='27.47'%20x2='22.53'%20y2='22.53'/%3e%3c/g%3e%3c/svg%3e",Ke="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st1{fill:%238CC63F;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:%238CC63F;}%20.st3{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='5'%20y='5'%20class='st0'%20width='40'%20height='40'/%3e%3crect%20x='10.3'%20y='10.3'%20class='st1'%20width='29.3'%20height='29.3'/%3e%3cline%20class='st0'%20x1='10.3'%20y1='25'%20x2='39.6'%20y2='25'/%3e%3cline%20class='st0'%20x1='25'%20y1='10.3'%20x2='25'%20y2='39.7'/%3e%3crect%20x='13.9'%20y='13.9'%20class='st2'%20width='22.1'%20height='22.1'/%3e%3cpolyline%20class='st3'%20points='20,31.5%2020,18.5%2025,31.5%2030,18.5%2030,31.5%20'/%3e%3c/svg%3e",Ze="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.2.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2050%2050'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st1{fill:%23DDA0DD;stroke:%23000000;stroke-miterlimit:10;}%20.st2{fill:%23DDA0DD;}%20.st3{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st4{fill:none;stroke:%23DDA0DD;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='5'%20y='5'%20class='st0'%20width='40'%20height='40'/%3e%3crect%20x='10.3'%20y='10.3'%20class='st1'%20width='29.3'%20height='29.3'/%3e%3cline%20class='st0'%20x1='10.3'%20y1='25'%20x2='39.6'%20y2='25'/%3e%3cline%20class='st0'%20x1='25'%20y1='10.3'%20x2='25'%20y2='39.7'/%3e%3crect%20x='13.9'%20y='13.9'%20class='st2'%20width='22.1'%20height='22.1'/%3e%3cpolyline%20class='st3'%20points='20,31.5%2020,18.5%2025,31.5%2030,18.5%2030,31.5%20'/%3e%3cg%3e%3cline%20class='st4'%20x1='15.1'%20y1='15.1'%20x2='34.9'%20y2='34.9'/%3e%3cline%20class='st5'%20x1='15.1'%20y1='15.1'%20x2='34.9'%20y2='34.9'/%3e%3c/g%3e%3c/svg%3e",Xe={class:"floatToolsVue"},Ye=["src"],Qe=["src"],e2=["src"],t2=["src"],l2=["src"],o2={key:2,class:"empty"},s2=["src"],r2=["src"],i2=["src"],n2=e.defineComponent({__name:"FloatTools",props:{mergeBtn:{}},emits:["clickBtn"],setup(b,{emit:l}){const r=b,t=l;return(n,o)=>(e.openBlock(),e.createElementBlock("div",Xe,[e.createElementVNode("div",null,[o[8]||(o[8]=e.createElementVNode("div",{class:"empty"}," ",-1)),e.createElementVNode("img",{onClick:o[0]||(o[0]=f=>t("clickBtn","insert_top")),src:e.unref(ke),title:"顶部插入一行"},null,8,Ye),e.createElementVNode("img",{onClick:o[1]||(o[1]=f=>t("clickBtn","delete_horizontal")),src:e.unref(Me),title:"删除整行"},null,8,Qe)]),e.createElementVNode("div",null,[e.createElementVNode("img",{onClick:o[2]||(o[2]=f=>t("clickBtn","insert_left")),src:e.unref(ve),title:"左侧插入一列"},null,8,e2),r.mergeBtn=="merge"?(e.openBlock(),e.createElementBlock("img",{key:0,onClick:o[3]||(o[3]=f=>t("clickBtn","merge")),src:e.unref(Ke),title:"合并单元格"},null,8,t2)):r.mergeBtn=="del"?(e.openBlock(),e.createElementBlock("img",{key:1,onClick:o[4]||(o[4]=f=>t("clickBtn","mergeDel")),src:e.unref(Ze),title:"取消合并"},null,8,l2)):(e.openBlock(),e.createElementBlock("div",o2," ")),e.createElementVNode("img",{onClick:o[5]||(o[5]=f=>t("clickBtn","insert_right")),src:e.unref(ye),title:"右侧插入一列"},null,8,s2)]),e.createElementVNode("div",null,[e.createElementVNode("img",{onClick:o[6]||(o[6]=f=>t("clickBtn","delete_vertical")),src:e.unref(Ee),title:"删除整列"},null,8,r2),e.createElementVNode("img",{onClick:o[7]||(o[7]=f=>t("clickBtn","insert_bottom")),src:e.unref(Ce),title:"底部插入一行"},null,8,i2),o[9]||(o[9]=e.createElementVNode("div",{class:"empty"}," ",-1))])]))}}),he=(b,l)=>{const r=b.__vccOpts||b;for(const[t,n]of l)r[t]=n;return r},c2=he(n2,[["__scopeId","data-v-0d2c598e"]]),a2="data:image/svg+xml,%3csvg%20t='1704811329079'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3505'%20width='200'%20height='200'%3e%3cpath%20d='M864.223176%20468.850802%20325.662779%20468.850802%20572.896379%20221.682693%20511.071351%20159.795243%20157.8438%20513.008467%20511.071351%20866.16541%20572.896379%20804.345497%20325.662779%20557.11906%20864.223176%20557.11906Z'%20fill='%23ffffff'%20p-id='3506'%3e%3c/path%3e%3c/svg%3e",f2="data:image/svg+xml,%3csvg%20t='1704811350503'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3699'%20width='200'%20height='200'%3e%3cpath%20d='M510.564814%20161.618773%20449.347629%20222.835958%20694.342238%20467.902198%20160.5003%20467.902198%20160.5003%20555.463352%20694.342238%20555.463352%20449.347629%20800.453868%20510.564814%20861.731428%20860.618072%20511.616772Z'%20fill='%23ffffff'%20p-id='3700'%3e%3c/path%3e%3c/svg%3e",d2="data:image/svg+xml,%3csvg%20t='1705039432939'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7202'%20width='200'%20height='200'%3e%3cpath%20d='M257.024%2079.2576c-28.16%200-53.76%205.12-79.4624%2017.92-15.36%207.68-20.48%2028.0576-7.68%2040.8576l87.1424%2086.8352-30.72%2030.6176-87.1424-86.8352c-4.608-5.0176-11.1616-7.8848-17.92-7.68-10.24%200-17.92%205.12-23.04%2015.36-33.28%2066.3552-23.04%20150.6304%2033.28%20206.848C167.3216%20418.816%20210.944%20434.176%20257.024%20434.176c20.48%200%2040.96-2.56%2058.9824-10.24l284.4672%20283.4432c-23.04%2063.7952-7.68%20135.3728%2040.96%20186.368%2035.84%2035.7376%2079.4624%2051.0976%20125.5424%2051.0976%2028.16%200%2053.76-5.12%2079.4624-17.92%2015.36-7.68%2020.48-28.0576%207.68-40.8576L766.976%20799.232l30.72-30.6176%2087.1424%2086.8352c4.608%205.0176%2011.1616%207.8848%2017.92%207.68%2010.24%200%2017.92-5.12%2023.04-15.36%2033.28-66.3552%2023.04-150.6304-33.28-206.848C856.6784%20605.184%20813.056%20589.824%20766.976%20589.824c-20.48%200-40.96%202.56-61.44%2010.24L420.9664%20316.7232c23.04-63.7952%207.68-135.3728-40.96-186.368-32.5632-32.8704-76.8-51.2-122.9824-51.0976z%20m-33.28%20229.7856c12.8%200%2025.6-5.12%2035.9424-15.36l30.72-30.6176c19.7632-18.7392%2020.5824-49.8688%201.8432-69.632l-1.8432-1.8432-58.9824-58.7776c7.68%200%2015.36-2.56%2023.04-2.56%2033.28%200%2066.6624%2012.8%2089.7024%2038.2976%2035.84%2035.7376%2046.1824%2086.8352%2030.72%20132.8128-7.68%2017.92-2.56%2038.2976%2012.8%2053.6576l284.4672%20283.4432c10.24%2010.24%2023.04%2015.36%2035.9424%2015.36%205.12%200%2012.8%200%2017.92-2.56%2013.9264-5.2224%2028.672-7.7824%2043.52-7.68%2033.28%200%2066.6624%2012.8%2089.7024%2038.2976%2030.72%2030.6176%2043.6224%2071.4752%2035.9424%20112.3328l-58.9824-58.7776c-9.4208-9.728-22.4256-15.2576-35.9424-15.36-12.8%200-25.6%205.12-35.84%2015.36l-30.72%2030.6176c-9.728%209.3184-15.2576%2022.2208-15.36%2035.7376%200%2012.8%205.12%2025.4976%2015.36%2035.7376l58.9824%2058.7776c-7.68%200-15.36%202.56-23.04%202.56-33.28%200-66.6624-12.8-89.7024-38.2976-35.84-35.7376-46.1824-86.8352-30.72-132.8128%207.68-17.92%202.56-38.2976-12.8-53.6576L351.8464%20390.7584c-9.4208-9.728-22.4256-15.2576-35.9424-15.36-5.12%200-10.24%200-17.92%202.56-13.9264%205.2224-28.672%207.7824-43.52%207.68-33.28%200-66.6624-12.8-89.7024-38.2976-30.72-30.6176-43.6224-71.4752-35.9424-112.3328l58.9824%2058.7776c10.3424%2010.1376%2023.1424%2015.2576%2035.9424%2015.2576zM320.512%20577.536c15.6672%200%2028.7744%205.2224%2036.6592%2015.7696l73.4208%2073.4208c20.2752%2019.3536%2021.0944%2051.4048%201.7408%2071.68l-1.7408%201.7408-188.7232%20188.928c-9.6256%209.9328-22.8352%2015.6672-36.7616%2015.7696-13.1072%200-26.2144-5.2224-36.6592-15.7696l-73.4208-73.4208c-20.2752-19.3536-21.0944-51.4048-1.7408-71.68l1.7408-1.7408%20188.8256-188.8256c10.4448-10.5472%2023.552-15.7696%2036.6592-15.872zM207.7696%20892.3136L396.5952%20703.488l-73.4208-73.4208-188.8256%20188.8256%2073.4208%2073.4208z%20m637.3376-813.056c7.8848%200%2015.7696%202.56%2018.3296%207.8848l73.4208%2073.4208c10.1376%209.6256%2010.5472%2025.7024%200.8192%2035.84-0.3072%200.3072-0.512%200.6144-0.8192%200.8192L808.3456%20325.7344c-4.9152%204.8128-11.4688%207.5776-18.3296%207.8848-6.8608-0.3072-13.4144-3.072-18.3296-7.8848l-18.3296-18.3296-128.6144%20128.512c-4.9152%204.7104-11.4688%207.5776-18.3296%207.7824-6.8608-0.3072-13.4144-3.072-18.3296-7.8848-10.1376-9.6256-10.5472-25.7024-0.8192-35.84%200.3072-0.3072%200.512-0.6144%200.8192-0.8192l128.512-128.512-18.432-18.3296c-10.1376-9.6256-10.5472-25.7024-0.8192-35.84%200.3072-0.3072%200.512-0.6144%200.8192-0.8192L826.7776%2087.04c4.608-5.12%2011.3664-7.9872%2018.3296-7.7824z%20m0%2062.8736l-91.7504%2091.7504%2018.3296%2018.432%2018.3296%2018.3296%2091.7504-91.7504-36.6592-36.7616z'%20fill='%23ffffff'%20p-id='7203'%3e%3c/path%3e%3c/svg%3e",h2="data:image/svg+xml,%3csvg%20t='1710241509904'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2631'%20width='200'%20height='200'%3e%3cpath%20d='M430.8992%20492.1344a32.2048%2032.2048%200%200%201-23.8592-10.5472L261.12%20321.5872a32.256%2032.256%200%200%201%2047.6672-43.4688l125.4912%20137.5744%20341.504-275.1488a32.256%2032.256%200%200%201%2040.448%2050.2272L451.1232%20484.9664a32.1536%2032.1536%200%200%201-20.224%207.168zM802.5088%20912.7424H378.0096a33.536%2033.536%200%201%201%200-67.072h424.4992a43.9296%2043.9296%200%200%200%2043.8784-43.8784V475.3408a33.536%2033.536%200%201%201%2067.072%200v326.4512a111.104%20111.104%200%200%201-110.9504%20110.9504z'%20p-id='2632'%20fill='%232c2c2c'%3e%3c/path%3e%3cpath%20d='M615.424%20725.6576H232.192a111.104%20111.104%200%200%201-110.9504-110.9504V231.4752a111.104%20111.104%200%200%201%20110.9504-110.9504H501.76a33.536%2033.536%200%200%201%200%2067.1232H232.192a43.9296%2043.9296%200%200%200-43.8784%2043.8784v383.232a43.9296%2043.9296%200%200%200%2043.8784%2043.8784h383.232a43.9296%2043.9296%200%200%200%2043.8784-43.8784V475.3408a33.536%2033.536%200%200%201%2067.1232%200v139.3664a111.104%20111.104%200%200%201-111.0016%20110.9504z'%20p-id='2633'%20fill='%232c2c2c'%3e%3c/path%3e%3c/svg%3e",g2="data:image/svg+xml,%3csvg%20t='1710241965160'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3790'%20width='200'%20height='200'%3e%3cpath%20d='M338.1%20341.4h229.1c20.7%200%2037.7-17%2037.7-37.7V129.5c0-20.7-17-37.7-37.7-37.7H338.1c-20.7%200-37.7%2017-37.7%2037.7v174.1c0%2020.8%2017%2037.8%2037.7%2037.8z'%20fill='%23ffffff'%20p-id='3791'%3e%3c/path%3e%3cpath%20d='M772%2068.2h-82.5v292.1c0%2012.3-10%2022.3-22.3%2022.3H232.4c-12.3%200-22.3-10-22.3-22.4l1.8-292h-69.2c-33.4%200-60.5%2027.1-60.5%2060.5V892c0%2033.4%2027.1%2060.5%2060.5%2060.5h737.7c33.4%200%2060.5-27.1%2060.5-60.5V258.8L772%2068.2z%20m57%20765.5c0%2017.7-14.5%2032.3-32.3%2032.3H240.3c-17.7%200-32.3-14.5-32.3-32.3V501.4c0-17.7%2014.5-32.3%2032.3-32.3h556.4c17.7%200%2032.3%2014.5%2032.3%2032.3v332.3z'%20fill='%23ffffff'%20p-id='3792'%3e%3c/path%3e%3cpath%20d='M723.7%20585.7H302.5c-16%200-29.1%2013.1-29.1%2029.1s13.1%2029.1%2029.1%2029.1h421.2c16%200%2029.1-13.1%2029.1-29.1s-13.1-29.1-29.1-29.1zM723.7%20737H302.5c-16%200-29.1%2013.1-29.1%2029.1s13.1%2029.1%2029.1%2029.1h421.2c16%200%2029.1-13.1%2029.1-29.1S739.7%20737%20723.7%20737z'%20fill='%23ffffff'%20p-id='3793'%3e%3c/path%3e%3c/svg%3e",u2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20255%20255'%20style='enable-background:new%200%200%20255%20255;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%238CC63F;}%20.st1{fill:%23999999;}%20.st2{fill:%23FFFFFF;}%20%3c/style%3e%3cg%3e%3cg%3e%3crect%20x='13.86'%20y='21.93'%20class='st0'%20width='77.91'%20height='168.72'/%3e%3c/g%3e%3cg%3e%3crect%20x='105.15'%20y='113.88'%20class='st1'%20width='77.91'%20height='76.69'/%3e%3c/g%3e%3cg%3e%3crect%20x='105.15'%20y='21.93'%20class='st1'%20width='77.91'%20height='76.69'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cpath%20d='M117.19,243.95c-2.9,0-5.8-0.35-8.61-1.04c-1.05-0.26-1.88-1.06-2.17-2.11c-0.29-1.04,0-2.16,0.77-2.93l20.32-20.33%20l-4.19-15.66l-15.66-4.19l-20.33,20.33c-0.57,0.57-1.34,0.88-2.12,0.88c-0.27,0-0.54-0.04-0.81-0.11%20c-1.04-0.29-1.85-1.12-2.11-2.17c-3.04-12.36,0.5-25.1,9.48-34.09c6.79-6.79,15.82-10.53,25.42-10.53c3.85,0,7.62,0.6,11.24,1.8%20l48.83-48.82c-4.12-12.78-0.77-26.9,8.8-36.46c6.79-6.79,15.83-10.53,25.44-10.53c2.9,0,5.8,0.35,8.61,1.04%20c1.05,0.26,1.88,1.06,2.17,2.11c0.29,1.04,0,2.16-0.77,2.93l-21.26,21.26l4.19,15.66l15.66,4.19l21.27-21.27%20c0.57-0.57,1.34-0.88,2.12-0.88c0.27,0,0.54,0.04,0.81,0.11c1.04,0.29,1.85,1.12,2.11,2.17c3.04,12.36-0.5,25.1-9.48,34.09%20c-6.79,6.79-15.82,10.53-25.43,10.53c-3.77,0-7.47-0.58-11.03-1.73l-48.97,48.97c4.01,12.71,0.63,26.75-8.86,36.25%20C135.84,240.21,126.8,243.95,117.19,243.95z'/%3e%3cpath%20class='st2'%20d='M211.49,80.99c2.65,0,5.31,0.32,7.9,0.95l-22.49,22.49l5.08,19.01l19.01,5.08l22.5-22.5%20c2.67,10.85-0.23,22.78-8.69,31.25c-6.43,6.43-14.87,9.66-23.31,9.66c-4.01,0-8.02-0.73-11.81-2.18l-51.63,51.63%20c4.42,11.73,1.91,25.48-7.54,34.92c-6.44,6.44-14.88,9.66-23.32,9.66c-2.65,0-5.31-0.32-7.9-0.95l21.55-21.55l-5.08-19.01%20l-19.01-5.08l-21.56,21.56c-2.67-10.85,0.23-22.78,8.69-31.25c6.43-6.43,14.87-9.65,23.3-9.65c4.08,0,8.16,0.76,12.02,2.27%20l51.51-51.51c-4.52-11.78-2.04-25.63,7.46-35.13C194.6,84.21,203.04,80.99,211.49,80.99%20M211.49,74.99%20c-10.42,0-20.21,4.05-27.57,11.41c-9.92,9.92-13.67,24.36-10.06,37.73l-46.29,46.29c-3.37-0.93-6.85-1.41-10.39-1.41%20c-10.4,0-20.18,4.05-27.54,11.41c-9.73,9.73-13.57,23.53-10.28,36.92c0.52,2.1,2.13,3.76,4.21,4.35c0.53,0.15,1.07,0.22,1.61,0.22%20c1.57,0,3.1-0.62,4.24-1.76l19.11-19.11l12.32,3.29l3.29,12.32l-19.1,19.1c-1.53,1.53-2.12,3.77-1.54,5.86%20c0.58,2.09,2.24,3.7,4.35,4.21c3.05,0.75,6.18,1.13,9.33,1.13c10.42,0,20.21-4.05,27.57-11.41c9.85-9.85,13.62-24.21,10.12-37.5%20l46.45-46.45c3.3,0.89,6.71,1.34,10.17,1.34c10.41,0,20.19-4.05,27.55-11.41c9.73-9.73,13.57-23.53,10.28-36.92%20c-0.52-2.1-2.13-3.76-4.21-4.35c-0.53-0.15-1.07-0.22-1.61-0.22c-1.57,0-3.1,0.62-4.24,1.76l-20.05,20.05l-12.32-3.29l-3.29-12.32%20l20.04-20.04c1.53-1.53,2.12-3.77,1.54-5.86c-0.58-2.09-2.24-3.7-4.35-4.21C217.77,75.37,214.63,74.99,211.49,74.99L211.49,74.99z'%20/%3e%3c/g%3e%3c/svg%3e",m2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20255%20255'%20style='enable-background:new%200%200%20255%20255;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23F2F2F2;}%20.st1{fill:%23999999;}%20.st2{fill:%23FFFFFF;}%20%3c/style%3e%3cg%3e%3cg%3e%3crect%20x='16.55'%20y='25.41'%20class='st0'%20width='71.91'%20height='162.72'/%3e%3cpath%20class='st1'%20d='M85.46,28.41v156.72H19.55V28.41H85.46%20M91.46,22.41H13.55v168.72h77.91V22.41L91.46,22.41z'/%3e%3c/g%3e%3cg%3e%3crect%20x='107.85'%20y='117.36'%20class='st0'%20width='71.91'%20height='70.69'/%3e%3cpath%20class='st1'%20d='M176.76,120.36v64.69h-65.91v-64.69H176.76%20M182.76,114.36h-77.91v76.69h77.91V114.36L182.76,114.36z'/%3e%3c/g%3e%3cg%3e%3crect%20x='107.85'%20y='25.41'%20class='st0'%20width='71.91'%20height='70.69'/%3e%3cpath%20class='st1'%20d='M176.76,28.41V93.1h-65.91V28.41H176.76%20M182.76,22.41h-77.91V99.1h77.91V22.41L182.76,22.41z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpolygon%20points='113.92,194.6%20218.65,89.87%20250.41,121.63%20145.68,226.37%20102.35,237.93%20'/%3e%3cpath%20class='st2'%20d='M218.65,93.41l28.23,28.23L144.38,224.12l-38.5,10.28l10.28-38.5L218.65,93.41%20M218.65,86.34l-3.54,3.54%20L112.62,192.36l-0.95,0.95l-0.35,1.3l-10.28,38.5l-2.23,8.35l8.35-2.23l38.5-10.28l1.3-0.35l0.95-0.95l102.49-102.49l3.54-3.54%20l-3.54-3.54l-28.23-28.23L218.65,86.34L218.65,86.34z'/%3e%3c/g%3e%3crect%20x='114.87'%20y='207.76'%20transform='matrix(0.7071%20-0.7071%200.7071%200.7071%20-122.2861%20148.7723)'%20class='st2'%20width='7.14'%20height='28.48'/%3e%3crect%20x='213.99'%20y='101.59'%20transform='matrix(0.7071%20-0.7071%200.7071%200.7071%20-23.0711%20189.8685)'%20class='st2'%20width='7.34'%20height='42.38'/%3e%3c/g%3e%3c/svg%3e",w2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20255%20255'%20style='enable-background:new%200%200%20255%20255;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23F2F2F2;}%20.st1{fill:%23999999;}%20.st2{fill:none;stroke:%23333333;stroke-width:18.8283;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st3{fill:%23FF8D7F;}%20.st4{fill:%2398FF7F;}%20.st5{fill:%234A91FF;}%20%3c/style%3e%3cg%3e%3crect%20x='43.9'%20y='48'%20class='st0'%20width='71.9'%20height='162.7'/%3e%3cpath%20class='st1'%20d='M112.8,51v156.7H46.9V51H112.8%20M118.8,45H40.9v168.7h77.9L118.8,45L118.8,45z'/%3e%3c/g%3e%3cg%3e%3cpolyline%20class='st2'%20points='124.9,99.6%2097.1,127.5%20124.9,155.4%20'/%3e%3cline%20class='st2'%20x1='97.1'%20y1='127.5'%20x2='147.3'%20y2='127.5'/%3e%3c/g%3e%3ccircle%20class='st3'%20cx='187.7'%20cy='86.7'%20r='26'/%3e%3ccircle%20class='st4'%20cx='187.7'%20cy='127.5'%20r='26'/%3e%3ccircle%20class='st5'%20cx='187.7'%20cy='168.4'%20r='26'/%3e%3c/svg%3e",x2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20255%20255'%20style='enable-background:new%200%200%20255%20255;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23F2F2F2;}%20.st1{fill:%23999999;}%20.st2{fill:none;stroke:%23333333;stroke-width:18.8283;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st3{fill:%23FF8D7F;}%20.st4{fill:%2398FF7F;}%20.st5{fill:%234A91FF;}%20%3c/style%3e%3cg%3e%3crect%20x='43.9'%20y='48'%20class='st0'%20width='71.9'%20height='162.7'/%3e%3cpath%20class='st1'%20d='M112.8,51v156.7H46.9V51H112.8%20M118.8,45H40.9v168.7h77.9V45L118.8,45z'/%3e%3c/g%3e%3cg%3e%3cpolyline%20class='st2'%20points='107.6,99.6%20135.4,127.5%20107.6,155.4%20'/%3e%3cline%20class='st2'%20x1='135.4'%20y1='127.5'%20x2='85.2'%20y2='127.5'/%3e%3c/g%3e%3ccircle%20class='st3'%20cx='187.7'%20cy='86.7'%20r='26'/%3e%3ccircle%20class='st4'%20cx='187.7'%20cy='127.5'%20r='26'/%3e%3ccircle%20class='st5'%20cx='187.7'%20cy='168.4'%20r='26'/%3e%3c/svg%3e",p2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20255%20255'%20style='enable-background:new%200%200%20255%20255;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FF8D7F;}%20.st1{fill:%2398FF7F;}%20.st2{fill:%234A91FF;}%20.st3{fill:none;stroke:%23000000;stroke-width:12.8979;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3ccircle%20class='st0'%20cx='127.9'%20cy='124.2'%20r='27.9'/%3e%3ccircle%20class='st1'%20cx='105.3'%20cy='162.7'%20r='27.9'/%3e%3ccircle%20class='st2'%20cx='149.7'%20cy='162.7'%20r='27.9'/%3e%3cpath%20class='st3'%20d='M48.1,126.9C64.4,98.5,94.8,81,127.5,81s63.1,17.5,79.4,45.9'/%3e%3cline%20class='st3'%20x1='127.9'%20y1='80'%20x2='127.9'%20y2='50.8'/%3e%3cline%20class='st3'%20x1='77.3'%20y1='96.2'%20x2='59.7'%20y2='72'/%3e%3cline%20class='st3'%20x1='177.7'%20y1='92.1'%20x2='195.3'%20y2='67.9'/%3e%3c/svg%3e",v2="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2028.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20255%20255'%20style='enable-background:new%200%200%20255%20255;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23999999;}%20.st1{fill:%234D4D4D;}%20.st2{fill:none;stroke:%23999999;stroke-width:16;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='34.2937'%20y='34.2937'%20class='st0'%20width='50.7857'%20height='186.4127'/%3e%3crect%20x='102.1071'%20y='-33.5198'%20transform='matrix(6.123234e-17%20-1%201%206.123234e-17%2067.8135%20187.1865)'%20class='st0'%20width='50.7857'%20height='186.4127'/%3e%3cpath%20class='st0'%20d='M120.8541,141.4643h69.1569c5.3064,0,9.6081,4.3017,9.6081,9.6081v46.3156%20c0,5.3064-4.3017,9.6081-9.6081,9.6081h-69.1569c-5.3064,0-9.6081-4.3017-9.6081-9.6081v-46.3156%20C111.246,145.766,115.5477,141.4643,120.8541,141.4643z'/%3e%3crect%20x='34.2937'%20y='34.2937'%20class='st1'%20width='50.7857'%20height='50.7857'/%3e%3cpath%20class='st2'%20d='M133.2048,144.7227v-14.3596c0-12.276,9.9517-22.2277,22.2277-22.2277h0%20c12.276,0,22.2278,9.9517,22.2278,22.2277v14.3596'/%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3cg%3e%3c/g%3e%3c/svg%3e",y2={class:"floatToolsForLineVue"},k2={key:0,class:"floatToolsForLineHori"},C2=["src"],M2=["src"],E2=["src"],S2={key:1,class:"floatToolsForLineVert"},V2=["src"],B2=["src"],I2=["src"],b2=he(e.defineComponent({__name:"FloatToolsForLine",props:{dir:{}},emits:["clickBtn"],setup(b,{emit:l}){const r=l;return(t,n)=>(e.openBlock(),e.createElementBlock("div",y2,[t.dir=="horizontal"?(e.openBlock(),e.createElementBlock("div",k2,[e.createElementVNode("div",null,[e.createElementVNode("img",{onClick:n[0]||(n[0]=o=>r("clickBtn","insert_top")),src:e.unref(ke),title:"顶部插入一行"},null,8,C2),e.createElementVNode("img",{onClick:n[1]||(n[1]=o=>r("clickBtn","insert_bottom")),src:e.unref(Ce),title:"底部插入一行"},null,8,M2)]),e.createElementVNode("div",null,[e.createElementVNode("img",{onClick:n[2]||(n[2]=o=>r("clickBtn","delete_horizontal")),src:e.unref(Me),title:"删除本行"},null,8,E2)])])):(e.openBlock(),e.createElementBlock("div",S2,[e.createElementVNode("div",null,[e.createElementVNode("img",{onClick:n[3]||(n[3]=o=>r("clickBtn","insert_left")),src:e.unref(ve),title:"左侧插入一行"},null,8,V2),e.createElementVNode("img",{onClick:n[4]||(n[4]=o=>r("clickBtn","insert_right")),src:e.unref(ye),title:"右侧插入一行"},null,8,B2)]),e.createElementVNode("div",null,[e.createElementVNode("img",{onClick:n[5]||(n[5]=o=>r("clickBtn","delete_vertical")),src:e.unref(Ee),title:"删除本列"},null,8,I2)])]))]))}}),[["__scopeId","data-v-783c0897"]]),N2={class:"ateUndoRedo"},F2=["src"],T2=["src"],z2={class:"ateSelectMode"},D2=["src"],_2=["src"],L2=["src"],A2={class:"ateSelectMode"},P2=["src"],G2=["src"],H2=["src"],$2={class:"ateSelectMode"},R2=["src"],O2={key:0,class:"ateStickyOptionPanel"},U2=["src"],W2={key:1,class:"ateTableContainer"},j2={class:"topIndex"},q2=["onClick"],J2=["onClick"],K2=["colspan","rowspan","onMousedown","onMouseup","onMouseenter","onClick"],Z2=["onUpdate:modelValue","onBlur"],X2=["src"],Y2={key:2,class:"ateLoading"},Q2={key:3,class:"ateAuthor"},e0=5e3,t0=5e3,X=70,Se=22,Ve=he(e.defineComponent({__name:"Editor",props:{tableData:{},externalSaveCallbackProvide:{type:Function},sizeChangeCallback:{type:Function},noAds:{type:Boolean},noShortcut:{type:Boolean}},emits:["save","changed"],setup(b,{expose:l,emit:r}){const t=b,n=r;l({loadData:o,save:Q});function o(a){if(a){if(f.value){console.error("加载已完成,拒绝写入更新");return}s.value=new Z(a),w.value=[],f.value=!0,Y.value=!1,C(!0),ue()}}const f=e.ref(!1);var d=t.tableData||Je;const i=new Z(d),s=e.ref(i),u=e.ref({u:!1,r:!1}),v=new z.AurStateStore(20,(a,c)=>{u.value={u:a,r:c}});function C(a){v.push(s.value.getData()),a||ge()}const Be=a=>{s.value.replaceData(a),w.value=[]};t.tableData?(f.value=!0,C(!0),ue()):window.setTimeout(()=>{f.value||(N.value="数据加载失败,请检查网络连接",F.value=!0,P(!1))},e0),t.externalSaveCallbackProvide&&t.externalSaveCallbackProvide(Q);const Ie=e.ref();function be(){var a;return((a=Ie.value)==null?void 0:a.clientHeight)||40}function ge(){n("changed"),ue()}function ue(){t.sizeChangeCallback&&e.nextTick(()=>{let a=55;if(a+=be(),!E.value)return;const c=E.value.getElementsByTagName("tr");if(c)for(const h of c)a+=h.clientHeight+2;t.sizeChangeCallback&&t.sizeChangeCallback({height:a})})}const N=e.ref(""),Y=e.ref(!1),F=e.ref(!1);var Ne=0,Fe=0;function Te(){const a=v.undo();a&&(Be(a),ge()),V()}function ze(){const a=v.redo();a&&(Be(a),ge()),V()}function Q(){return new Promise((a,c)=>{if(!f.value){N.value="还未完成加载,不能保存",F.value=!0,P(!1),a(!1);return}F.value=!1,N.value="... ...",P(!1);const h=window.setTimeout(()=>{F.value=!0,N.value="保存异常(超时)",P(),a(!1)},t0);n("save",s.value.getData(),(g,m)=>{window.clearTimeout(h),g?(F.value=!1,N.value=m||"保存