vue 打开浮在窗口上的小窗口

因为用的是Vue框架,一直想用模态框或者element-ui的弹出框,但是他们都不够灵活,绕了一大圈,还得是window的弹出框。

const {href} = _this.$router.resolve({
              name: "pop2",
              params: {
                id: 0,
              }
            });
            window.open(href,"name", "height=754, width=1277, top=0, left=2, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no");

 定义href,href里的name是我定义好的控件,parames是传入的参数,

window.oopen打开窗口,href:目标页,

height:窗口高度,

width:窗口宽度

top:距离上方距离,

left:距离左方距离,

toolbar:工具栏

menubar:菜单栏

scrollbars:滚动栏

resize:是否允许该变窗口大小

扫描二维码关注公众号,回复: 2528379 查看本文章

location:显示地址栏

status:显示状态栏内的信息

如果您想了解更多,可进一步参考https://blog.csdn.net/dodott/article/details/42113579

猜你喜欢

转载自blog.csdn.net/xuerwang/article/details/81392193
今日推荐