0

我想展示 3 张卡片。我收到以下错误:

./src/views/Notifications.jsx 第 28:8 行:“容器”未定义 react/jsx-no-undef

搜索关键字以了解有关每个错误的更多信息。

import React, { Component } from "react";
import { Row, Col, Alert, Container} from "react-bootstrap";
import Button from "components/CustomButton/CustomButton.jsx";
import Typography from "views/Typography.jsx";
import { BrowserRouter as Router, Route, Redirect, Switch, Link, NavLink } from 'react-router-dom';


class Notifications extends Component {
  render() {
    return (
      <Container>
  <Row>
    <Col>1 of 2</Col>
    <Col>2 of 2</Col>
  </Row>
  <Row>
    <Col>1 of 3</Col>
    <Col>2 of 3</Col>
    <Col>3 of 3</Col>
  </Row>
</Container>

    )}
}
4

1 回答 1

1

尝试

import Container from 'react-bootstrap/Container'

https://react-bootstrap.github.io/layout/grid/#container-props

于 2020-02-10T18:56:46.207 回答