Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layer.open弹窗title设置成false时,closeBtn设置1时的样式无效,关闭按钮是一直是close2样式 #1840

Closed
4 tasks done
ChZhg123 opened this issue Apr 26, 2024 · 1 comment
Labels
usage 用法问题

Comments

@ChZhg123
Copy link

议题条件

  • 我确认已查看官方使用文档:https://layui.dev ,但没有找到相关解决方案。
  • 我确认已在 Issues 中搜索过类似的问题,但没有找到相关解决方案。
  • 我已仔细阅读: 🍀 Layui Issue 贡献指南

议题类型

疑是 BUG

使用版本

v2.9.8

问题描述

image

业务代码

layer.open({
                type: 1,
                title: false, // 禁用标题栏
                area: ['710px','540px'],
                offset: 'auto',
                hideOnClose:true,
                id: 'layui-chat',
                closeBtn:1,
                move:true,
                shade: 0.2,
                resize:false,
                maxmin:true,
                shadeClose: true,
                content: getHtml('/static/js/lay-module/chat/html/chat.html'),
                success: function(layero, index, that){
                    $('.chat-nav-list').on("click",".chat-nav-li",function(event){
                        if(event.target.tagName === 'IMG'){
                            let nodes = $('.chat-nav-li img');
                            for(let i=0; i<nodes.length; i++){
                                nodes[i].src = nodes[i].src.replace(/.png|-fill.png/,'.png');//把所有的路径全部变成未选中的图标
                            }
                            event.target.src = event.target.src.replace(/.png|-fill.png/,'-fill.png');
                        }}
                    )
                    $('.message-list').on('click','.message-li',function (){
                        $(this).addClass('active').siblings().removeClass('active')
                    })
                },
                full: function(layero, index, that){
                    $('.chat-box').addClass('full')
                },
                min: function(layero, index, that){
                    $('.chat-box').removeClass('full')
                },
                restore: function(layero, index, that){
                    $('.chat-box').removeClass('full')
                }
            })

截图补充

No response

浏览器

Chrome

演示地址

No response

友好承诺

  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
@Sight-wcg Sight-wcg added the usage 用法问题 label Apr 26, 2024
@Sight-wcg
Copy link
Collaborator

设计如此,不是 BUG

@Sight-wcg Sight-wcg closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage 用法问题
Projects
None yet
Development

No branches or pull requests

2 participants