使Angular UI手风琴完全可点击,而不仅仅是标题标签

时间:2017-07-06 21:06:15

标签: javascript angularjs angular-ui-bootstrap bootstrap-accordion

我使用的是Angular ui-bootstrap手风琴。使用我当前的代码,我无法单击并打开整个标题面板,只能点击标题标题(标题)并打开手风琴。任何帮助表示赞赏。提前致谢 !这是我的HTML:

public enum Packets {
    PACKET_NONE(0),
    PACKET_SYNC(1),
    PACKET_EXPECT_TO_RECEIVE(2),
    PACKET_AVAIL_1(3),
    PACKET_FILL(13),
    PACKET_GLASS(),
    PACKET_FILLI(),
    PACKET_GLASSI();

    static {
        for (Packets p : Packets.values()) {
            if (p.getId() == -1) {
                if (p.ordinal() == 0) {
                    p.setId(0);
                } else {
                    p.setId(Packets.values()[p.ordinal() - 1].getId() + 1);
                }
            }
        }
    }

    private int id;

    private Packets(int id) {
        this.id = id;
    }

    private Packets() {
        this.id = -1;
    }

    public final int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}

1 个答案:

答案 0 :(得分:2)

而不是......

<uib-accordion-heading>
    Click me
</uib-accordion-heading>

设置您uib-accordion-heading以包含全宽度元素,例如pp也会提供一些默认保证金,因此请务必将其删除(或进行足够的调整),以便赢得& #39;弄乱你的风格。

<uib-accordion-heading>
    <p style="margin-bottom: 0;"> Click me </p>
</uib-accordion-heading>