蚂蚁设计选择没有正确的风格

时间:2018-03-15 09:39:19

标签: javascript reactjs drop-down-menu antd

使用ant-design select呈现可搜索的选择下拉列表

从文档中,我编写了以下组件

@Component
@ManagedResource
public class JobRunner
{
    private static boolean stopped = false;

    @ManagedOperation
    public void start()
    {
        stopped = false;
        while (!stopped)
        {
             // Some actions..
        }
    }

    @ManagedOperation
    public void stop()
    {
        stopped = true;
    }

}

但是选择下拉列表没有正确风格化

如下所示 enter image description here

1 个答案:

答案 0 :(得分:1)

你为ant.design导入了css吗?

protected void switchTabsUsingPartOfUrl(String platform) {
    String currentHandle = null;
    try {
        final Set<String> handles = driver.getWindowHandles();
        if (handles.size() > 1) {
            currentHandle = driver.getWindowHandle();
        }
        if (currentHandle != null) {
            for (final String handle : handles) {
                driver.switchTo().window(handle);
                if (currentUrl().contains(platform) && !currentHandle.equals(handle)) {
                    break;
                }
            }
        } else {
            for (final String handle : handles) {
                driver.switchTo().window(handle);
                if (currentUrl().contains(platform)) {
                    break;
                }
            }
        }
    } catch (Exception e) {
        System.out.println("Switching tabs failed");
    }
}

我在codesandbox

上的演示