作者在 2022-10-22 22:55:40 发布以下内容
def layer_open(h)
type = h[:type] || 1
title = h[:title]
skin = h[:skin] || 'layui-layer-rim'
area = h[:are] || ['420px', '240px']
content = h[:content]
success = h[:success] || proc {}
layer_index = `
layer.open({
type: #{type},
title: #{title},
skin: #{skin},
area: #{area},
content: #{content},
success: #{success},
})
`
return layer_index
end
def layer_close(index)
`layer.close(#{index})`
end