master
fanfan 1 month ago
parent 81d0fbb065
commit f023e6f447
  1. 46
      src/views/goods/lineReport/index.vue

@ -137,33 +137,26 @@ export default {
obj.jd_short_url +
';\n'
})
// text = that.goodsList.map((obj) => {
// return (
//
// )
// })
console.log(text)
let content = '今天' + that.today + ','+this.fromData.header_content+'\n' + text
// that.copyText(content)
// textarea
if (content) {
const el = document.createElement('textarea')
// textarea
el.value = content
// textarea
document.body.appendChild(el)
// textarea
el.select()
//
document.execCommand('copy')
// textarea
document.body.removeChild(el)
this.$message.success('复制成功', 1.5)
} else {
this.$message.fail('复制失败', 1.5)
}
let content = '今天' + that.today + ',' + that.fromData.header_content + '\n' + text
that.copyText(content)
// if (content) {
// let el = document.createElement('textarea')
// // textarea
// el.value = content
// // textarea
// document.body.appendChild(el)
// // textarea
// el.select()
// //
// document.execCommand('copy')
// // textarea
// document.body.removeChild(el)
// that.$message.success('', 1.5)
// } else {
// that.$message.fail('', 1.5)
// }
} else {
this.$message.fail('无可复制内容', 1.5)
that.$message.fail('无可复制内容', 1.5)
}
}
})
@ -180,6 +173,7 @@ export default {
},
handleCopy(item) {
let that = this
this.fromData = item
this.getCurrentDate()
that.getPreviewList(item.id, 2)
},

Loading…
Cancel
Save