mirror of
https://gitee.com/layui/layui.git
synced 2025-08-23 22:11:38 +08:00
修复 lay.options()
方法中若传入 document
的报错问题
This commit is contained in:
parent
d5f8b52ce1
commit
7754061ee2
@ -206,6 +206,8 @@
|
||||
lay.options = function(elem, opts){
|
||||
opts = typeof opts === 'object' ? opts : {attr: opts};
|
||||
|
||||
if(elem === document) return {};
|
||||
|
||||
var othis = lay(elem);
|
||||
var attrName = opts.attr || 'lay-options';
|
||||
var attrValue = othis.attr(attrName);
|
||||
|
Loading…
Reference in New Issue
Block a user