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

layedit build 第一个参数支持html对象 #146

Merged
merged 2 commits into from Apr 2, 2018

Conversation

@fonqing
Copy link
Contributor

commented Jan 24, 2018

更新layedit的build方法,使其第一个参数支持传入原生html textarea对象。
layui已经非常好用了,但是每个页面底部的layui.use 以及其内部逻辑仍然让开发着觉得麻烦和厌倦,本人在快速开发中尝试将layui的use以及其逻辑尽量自动化。在自动化过程中,发现这里有必要做一下支持。

<textarea class="layedit"></textarea>
...
<textarea class="layedit"></textarea>
<script>
layui.use(['jquery','layedit'],function(){
    var $ = layui.$,layedit=layui.layedit;
    $('.layedit').each(function(i,o){
        $(o).hide();
        layedit.build(o,{});
    });
});
</script>
fonqing added 2 commits Jan 24, 2018
更新layedit的build方法,使其第一个参数支持传入原生html textarea对象。
layedit build 第一个参数支持html对象
@sentsin sentsin merged commit 84e1a08 into sentsin:master Apr 2, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 29.823%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.