FVS通过js打开的弹窗关闭按钮如何去掉

image.pngimage.png

使用的全局接口,不知道怎么去掉

JS如下

"use document"

const iframe = document.createElement("iframe");

iframe.width = "100%";

iframe.height = "100%";

iframe.scrolling = "no";

iframe.style.border = "0";

iframe.src = "xxx";

duchamp.showDialog({

  //title: "销量弹窗",

  width: 1920,

  height: 800,

  innerContent: iframe,

  //padding: "15px",

  //titleStyle: { fontSize: "24px",color:"white", fontWeight: "bold" },

  //backgroundStyle: { background:"green" },

  dialogType:"dynamic",

  //line: { type: "color", value: { color: "red" } },

  //coordinate: [300, 240],

});

FineReport eblanc 发布于 5 天前 (编辑于 5 天前
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共4回答
最佳回答
0
shirokoLv6资深互助
发布于5 天前

image.png

加载事件里添加代码:

"use document";

const style = document.createElement('style'); 

 style.innerText = `.fvs-icon .icon{display: none !important;}`;   

document.head.appendChild(style);

最佳回答
0
用户k6280494Lv6专家互助
发布于5 天前

要去掉FVS通过JavaScript打开的弹窗的关闭按钮,可以在设置弹窗时将hideCloseButton参数设置为true。以下是示例代码:

FR.mobilePopup({target: "template", // 设置跟随弹窗  parameters: {},setting: {templatePath: "/doc/phone/JS/JS通过按钮控件开关对话框子模板.frm", // 设置子模板地址  hideCloseButton: true, // 设置是否隐藏关闭按钮,true 为隐藏  border: {type: 0,color: "rgb(0,0,0)",borderRadius: 4.0  },background: {color: "rgb(255,255,255)"  }}});

  • eblanc eblanc(提问者) 没有用,或者有办法修改原有关闭按钮的样式不
    2025-07-08 14:19 
最佳回答
0
ScyalcireLv7高级互助
发布于5 天前
  • eblanc eblanc(提问者) 之前是用他那种办法是可以的,但是升级最新FVS后这个JS就会报错,不考虑再把FVS版本回退了
    2025-07-08 14:20 
  • Scyalcire Scyalcire 回复 eblanc(提问者) 你是iframe嵌入的弹窗么
    2025-07-08 14:28 
  • Scyalcire Scyalcire 回复 eblanc(提问者) 部分浏览器会阻止对跨域iframe的DOM操作,需确保iframe与主页面同源‌
    2025-07-08 14:33 
最佳回答
0
snrtuemcLv8专家互助
发布于5 天前

改成这个方式

FVS弹窗

"use document";

const iframe = document.createElement("iframe");

iframe.width = "100%";

iframe.height = "100%";

iframe.scrolling = "no";

iframe.style="border: none";

iframe.src = "/webroot/decision/view/report?viewlet=GettingStarted.cpt";

duchamp.showDialog(

        {

                title:"销量弹窗",

                width: 700,

                height: 500,

                innerContent:iframe,

                dialogType:"center",

        }

);

setTimeout(function() {

$('.preview-dialog-close').css("display","none");//隐藏关闭按钮

}, 800);

  • 5关注人数
  • 35浏览人数
  • 最后回答于:5 天前
    请选择关闭问题的原因
    确定 取消
    返回顶部