react 的Antd Design 报错

使用antd design的Table就报这个错误,其他组件没问题的说~~

import React from "react";
import { Table } from "antd";

const columns = [{
    title: 'Name',
    dataIndex: 'name',
    width: 150,
}, {
    title: 'Age',
    dataIndex: 'age',
    width: 150,
}, {
    title: 'Address',
    dataIndex: 'address',
}];

const data = [];
for (let i = 0; i < 100; i++) {
    data.push({
        key: i,
        name: `Edward King ${i}`,
        age: 32,
        address: `London, Park Lane no. ${i}`,
    });
}
const TableByBuyi = () => (
    <div>
        <Table columns={columns} dataSource={data} pagination={{ pageSize: 50 }} scroll={{ y: 240 }} />
    </div>
    )
export default TableByBuyi;

报错:

@media \0screen {
     ^
Media definitions require block statements after any features
      in D:\antd-demo\node_modules\antd\lib\checkbox\style\index.css (line 180, column 7)
阅读 4.6k
4 个回答

我也碰到这个问题了,求答案。。。。。

在你的index.css 中 媒体查询后面 0 是什么?

可以看看官方这个issue

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题