|
@@ -23,7 +23,7 @@ export default class HcPdfSign {
|
|
|
* @param img 签章图片url
|
|
|
* @param func 回调函数
|
|
|
*/
|
|
|
- static createPdf({ ele, url, img, change, load }) {
|
|
|
+ static createPdf({ ele, url, img, change, load, isShowYinzhang }) {
|
|
|
this.initVarNull()
|
|
|
//判断参数是否合法
|
|
|
if (isNullES(ele)) {
|
|
@@ -73,7 +73,7 @@ export default class HcPdfSign {
|
|
|
iframe.style.border = '1px solid #ccc'
|
|
|
iframe.name = 'HcPdfSign'
|
|
|
iframe.addEventListener('load', () => {
|
|
|
- this.iframeLoad()
|
|
|
+ this.iframeLoad(isShowYinzhang)
|
|
|
})
|
|
|
dom.appendChild(iframe)
|
|
|
this.iframeDom = iframe
|
|
@@ -203,8 +203,12 @@ export default class HcPdfSign {
|
|
|
}
|
|
|
|
|
|
//PDF加载完成
|
|
|
- static iframeLoad() {
|
|
|
+ static iframeLoad(isShowYinzhang) {
|
|
|
const viewer = this.iframeDom?.contentDocument?.getElementById('viewer')
|
|
|
+ if (isShowYinzhang) {
|
|
|
+ viewer.classList.add('stamp-cursor')
|
|
|
+ }
|
|
|
+
|
|
|
//页面被点击
|
|
|
viewer.addEventListener('click', (event) => {
|
|
|
this.viewerClick(event).then()
|