This commit is contained in:
linfso 2024-10-09 13:08:45 +08:00
parent 26127af2be
commit 905abef5eb
2 changed files with 9 additions and 9 deletions

View File

@ -785,7 +785,6 @@ export default {
tagId:this.saveStorageName tagId:this.saveStorageName
}; };
// console.log("===>initDefaultTplList=1111=>");
this.storeTplList=[]; this.storeTplList=[];
// 获取模版列表 // 获取模版列表
let res=await listSysCustomizeTpl(queryParams) let res=await listSysCustomizeTpl(queryParams)
@ -897,26 +896,23 @@ export default {
if(currentRow!=-1 && currentRow!=item.row){ if(currentRow!=-1 && currentRow!=item.row){
// 去除末尾的\t // 去除末尾的\t
selStr=this.trimTabChar(selStr,'\t',''); selStr=this.trimTabChar(selStr,'\t','');
selStr=selStr.trim();
selStr=selStr+"\n"; selStr=selStr+"\n";
} }
let str=item.text; let str=item.text;
if(!str || str==''){ if(!str || str==''){
str=''; str=' ';
} }
selStr = selStr+str+"\t"; selStr = selStr+str+"\t";
currentRow=item.row; currentRow=item.row;
}); });
selStr=this.trimTabChar(selStr,'\t',''); selStr=this.trimTabChar(selStr,'\t','');
// // console.log("=selStr==>",selStr);
// 去除两端空格 // 去除两端空格
selStr=selStr.trim();
this.currentSelectStr=selStr; this.currentSelectStr=selStr;
} }
// this.$emit('handleSelect',this.multipleSelection) // this.$emit('handleSelect',this.multipleSelection)
@ -943,11 +939,14 @@ export default {
if (navigator.clipboard && window.isSecureContext) { if (navigator.clipboard && window.isSecureContext) {
// navigator clipboard 向剪贴板写文本 // navigator clipboard 向剪贴板写文本
this.$modal.msgSuccess('复制成功') this.$modal.msgSuccess('复制成功')
console.log("==...123=9=>",this.currentSelectStr)
return navigator.clipboard.writeText(this.currentSelectStr) return navigator.clipboard.writeText(this.currentSelectStr)
} else { } else {
// 创建text area // 创建text area
const textArea = document.createElement('textarea') const textArea = document.createElement('textarea')
textArea.value = this.currentSelectStr textArea.value = this.currentSelectStr
console.log("==...123=9000=>",textArea.value)
// 使text area不在viewport,同时设置不可见 // 使text area不在viewport,同时设置不可见
document.body.appendChild(textArea) document.body.appendChild(textArea)
textArea.focus() textArea.focus()

View File

@ -905,7 +905,7 @@ export default {
let str=item.text; let str=item.text;
if(!str || str==''){ if(!str || str==''){
str=''; str=' ';
} }
selStr = selStr+str+"\t"; selStr = selStr+str+"\t";
currentRow=item.row; currentRow=item.row;
@ -916,7 +916,8 @@ export default {
// // console.log("=selStr==>",selStr); // // console.log("=selStr==>",selStr);
// 去除两端空格 // 去除两端空格
selStr=selStr.trim(); // selStr=selStr.trim();
this.currentSelectStr=selStr; this.currentSelectStr=selStr;
} }