.uk-layui-form
    form.layui-form.uk-form(method='post', action='/setting/tag/save.html')
        input(type='hidden', name='tagtype', value=tagtype)
        .layui-form-item
            label.layui-form-label 标签：
            .layui-input-inline
                input.layui-input(type='text', name='tag', required, value=tag.tag, lay-verify='required', placeholder='请输入标签', autocomplete='off')
        .layui-form-item(style='margin-top:20px;')
            label.layui-form-label 背景颜色：
            .layui-input-inline.ukefu-im-theme(style='width: 350px;')
                .item-cnt.ukefu-im-ping-color(style='display: block;')
                    input#color(type='hidden', name='color')
                    .ukefu-im-item.theme1(data-class="theme1", data-value="1")
                        i.layui-icon.ukefu-im-check &#xe618;
                    .ukefu-im-item.theme2(data-class="theme2", data-value="2")
                        i.layui-icon.ukefu-im-check &#xe618;
                    .ukefu-im-item.theme3(data-class="theme3", data-value="3")
                        i.layui-icon.ukefu-im-check &#xe618;
                    .ukefu-im-item.theme4(data-class="theme4", data-value="4")
                        i.layui-icon.ukefu-im-check &#xe618;
                    .ukefu-im-item.theme5(data-class="theme5", data-value="5")
                        i.layui-icon.ukefu-im-check &#xe618;
                    .ukefu-im-item.theme6(data-class="theme6", data-value="6")
                        i.layui-icon.ukefu-im-check &#xe618;
        .layui-form-button
            .layui-button-block
                button.layui-btn(lay-submit, lay-filter='formDemo') 立即提交
                button.layui-btn.layui-btn-original(type='reset') 重置
script.
    layui.use('form', function () {
        var form = layui.form();
        form.render(); //更新全部
        form.verify({
            repass: function (value) {
                if (value != $('#password').val()) {
                    return '两次输入的密码不一致，请确认';
                }
            }
        });
    });
    $(document).ready(function () {
        $('.ukefu-im-ping-color .ukefu-im-item')
            .click(
                function () {
                    var theme = $(this).attr(
                        'data-class');
                    $('.ukefu-im-ping-color .ukefu-im-item')
                        .removeClass(
                            'ukefu-im-checked');
                    $(this).addClass('ukefu-im-checked');
                    $('#color').val($(this).attr('data-value'));
                });
    });
            
