akxcv / vuera

:eyes: Vue in React, React in Vue. Seamless integration of the two. :dancers:
MIT License
4.3k stars 242 forks source link

Using antd in Vue, antd has no style, ask the style how to take effect #32

Closed huoxiangdong closed 6 years ago

huoxiangdong commented 6 years ago

React frameworks like antd, in Vue, and how to style import

akxcv commented 6 years ago

Hi, can you please provide a code example? Or describe your issue in more detail? I'm having trouble comprehending what you mean.

akxcv commented 6 years ago

Closed because of inactivity.

TAUnionOtto commented 5 years ago

Simple resolution:

import { Table } from 'antd';
import 'antd/lib/table/style';

I think babel can do it automatically, but I can't find the way


I found the way

Install babel-plugin-import with npm or yarn

Add that in your babel config

plugins: [
  ["import", { "libraryName": "antd", "style": "css" }]
]

Then the style will be imported automatically.