问题描述
我有一个下载pdf文件的链接,该文件适用于台式机和移动版chrome;但不在移动浏览器浏览器上。
我怀疑悬停问题,并将其删除。但仍然无法正常工作。
我在React上有以下代码。
{
"Reports": [
{
"Fields": [],"ReportDate": "18 August 2020","ReportID": "TrialBalance","ReportName": "Trial Balance","ReportTitles": [
"Trial Balance","Demo Company (NZ)","As at 31 March 2020"
],"ReportType": "TrialBalance","Rows": [
{
"Cells": [
{
"Value": "Account"
},{
"Value": "Debit"
},{
"Value": "Credit"
},{
"Value": "YTD Debit"
},{
"Value": "YTD Credit"
}
],"RowType": "Header"
},{
"RowType": "Section","Rows": [
{
"Cells": [
{
"Attributes": [
{
"Id": "account","Value": "7d05a53d-613d-4eb2-a2fc-dcb6adb80b80"
}
],"Value": "Sales (200)"
},{
"Attributes": [
{
"Id": "account","Value": ""
},"Value": "1043.48"
},"Value": "5826.07"
}
],"RowType": "Row"
}
],"Title": "Revenue"
},"Value": "2e277847-022c-48f3-8467-0207230004d6"
}
],"Value": "Light,Power,Heating (445)"
},"Value": "184.57"
},"Value": "837.92"
},"Value": ""
}
],"Title": "Expenses"
},"Value": "ac993f75-035b-433c-82e0-7b7a2d40802c"
}
],"Value": "Business Bank Account (090)"
},"Value": "1094.25"
},"Value": "9973.88"
},"Title": "Assets"
},"Value": "568f2e9a-0870-46cc-8678-f83f132ed4e3"
}
],"Value": "Accounts Payable (800)"
},"Value": "106.50"
},"Value": "106.50"
}
],"RowType": "Row"
},{
"Cells": [
{
"Attributes": [
{
"Id": "account","Value": "81f39534-8a2d-4181-8e1a-d9bca54bf7d6"
}
],"Value": "GST (820)"
},"Value": "128.84"
},"Value": "748.25"
}
],"Value": "0f63cdaf-3f97-497e-8f28-405f0ea0c7a2"
}
],"Value": "Historical Adjustment (840)"
},"Value": "0.00"
},"Value": "4130.98"
}
],"Title": "Liabilities"
},"Rows": [
{
"Cells": [
{
"Value": "Total"
},{
"Value": "1278.82"
},{
"Value": "10811.80"
},{
"Value": "10811.80"
}
],"RowType": "SummaryRow"
}
],"Title": ""
}
],"UpdatedDateUTC": "/Date(1597713249656+0000)/"
}
]
css是
<div className={styles.link} onClick={downloadPDF}>
Download
</div>
此CSS无法正常工作,因此如下所示将鼠标悬停了,但仍然无法正常工作。
.link {
padding-top: 10px;
color: blue;
text-align: right;
cursor: pointer;
&:hover {
color: blue;
text-decoration: underline;
}
}
有人可以提供任何帮助吗?
解决方法
我有一个解决方案。 在Safari设置上禁用了弹出窗口阻止程序。有效。现在,它弹出,并在单击链接时询问是否允许它。