1

我的代码目前不呈现向下的克拉。

这是代码:

import * as React from "react";
import { Dropdown } from "office-ui-fabric-react/lib/Dropdown";
import * as styles from "./dropdownMenu.scss";
import { ResponsiveMode } from "office-ui-fabric-react/lib/utilities/decorators/withResponsiveMode";

export class DropDownMenu extends React.Component<{}, {}> {
  public render() {
    return (
      <div className={styles.size}>
        <Dropdown
          placeHolder="Select an option"
          id="timeFilterMenu"
          ariaLabel="Select a time filter for the analytics"
          defaultSelectedKey="B"
          options={[
            { key: "A", text: "Last 7 days" },
            { key: "B", text: "Last 28 days" }
          ]}
        />
      </div>
    );
  }
}

这是它呈现的内容: 没有呈现雪佛龙

4

1 回答 1

1

确保使用初始化图标

import { initializeIcons } from '@uifabric/icons';
initializeIcons();

您只需要在您的应用程序中执行一次,因此可以将其放在您的入口点(例如 App.js)中

于 2018-04-17T06:35:36.970 回答