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

Loading…
Cancel
Save