This commit is contained in:
2025-10-31 00:32:27 +08:00
parent 2c2c451c96
commit 5e44b8ccd8

View File

@@ -69,7 +69,22 @@
</el-table-column> </el-table-column>
<el-table-column label="标记" prop="distributionMark" width="80"/> <el-table-column label="标记" prop="distributionMark" width="80"/>
<el-table-column label="型号" prop="modelNumber" width="180"/> <el-table-column label="型号" prop="modelNumber" width="180"/>
<el-table-column label="地址" prop="address" min-width="280" show-overflow-tooltip/> <el-table-column label="地址" prop="address" min-width="320">
<template slot-scope="scope">
<div style="display: flex; align-items: center;">
<span class="ellipsis" style="flex:1; margin-right: 8px;" :title="scope.row.address">{{ scope.row.address }}</span>
<el-button
type="text"
size="mini"
icon="el-icon-copy-document"
@click="copyToClipboard(scope.row.address)"
title="复制地址"
>
复制
</el-button>
</div>
</template>
</el-table-column>
<el-table-column label="付款金额" prop="paymentAmount" width="120"> <el-table-column label="付款金额" prop="paymentAmount" width="120">
<template slot-scope="scope">{{ toYuan(scope.row.paymentAmount) }}</template> <template slot-scope="scope">{{ toYuan(scope.row.paymentAmount) }}</template>
</el-table-column> </el-table-column>
@@ -295,7 +310,7 @@ export default {
if (navigator.clipboard && window.isSecureContext) { if (navigator.clipboard && window.isSecureContext) {
// 使用现代 Clipboard API // 使用现代 Clipboard API
navigator.clipboard.writeText(text).then(() => { navigator.clipboard.writeText(text).then(() => {
this.$message.success('物流链接已复制到剪贴板') this.$message.success('已复制到剪贴板')
}).catch(() => { }).catch(() => {
this.fallbackCopyTextToClipboard(text) this.fallbackCopyTextToClipboard(text)
}) })
@@ -318,7 +333,7 @@ export default {
try { try {
const successful = document.execCommand('copy') const successful = document.execCommand('copy')
if (successful) { if (successful) {
this.$message.success('物流链接已复制到剪贴板') this.$message.success('已复制到剪贴板')
} else { } else {
this.$message.error('复制失败,请手动复制') this.$message.error('复制失败,请手动复制')
} }