-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
babel-plugin-import lead page error: Antd is not defined #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
@tangjinzhou And other question, if i use what you said's way, i will not declare antd in main.js ,right? so, i import component in .vue file,like this:<template>
<Menu
theme="dark"
mode="horizontal"
:defaultSelectedKeys="['2']"
:style="{ lineHeight: '64px' }"
>
<MenuItem key="1">nav 1</MenuItem>
</Menu>
</template>
import {
Menu
} from 'ant-design-vue'
const { MenuItem } = Menu
<script>
...
components: { Menu}
</script> and other more ways to use Menu's compoenets like submenu and so on, |
you should use it like this in
More components in here |
@tangjinzhou I just fixed this problem with import my component in .vue file and use |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
1.1.1
Environment
ant-design-vue: 1.1.1; babel-plugin-import: 1.9.1; vue: 2.5.2
Reproduction link
https://git.coding.net/wangye84/vue-antd-admin-template.git
Steps to reproduce
when i import ant-design-vue and babel-plugin-import follow API guide's to :
What is expected?
my web will be display
What is actually happening?
in browser's console, i saw the : Antd is not defined
branch : importAntd
The text was updated successfully, but these errors were encountered: