Skip to content

2.0.0-beta.9全局引入出错 #2859

@liminga

Description

@liminga
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.5

Environment

vue2.0

Reproduction link

https://github.com/liminga/antd2-test

Steps to reproduce

  1. 创建一个项目 #
    使用命令行进行初始化。

$ vue create antd-demo
并配置项目。

若安装缓慢报错,可尝试用 cnpm 或别的镜像源自行安装:rm -rf node_modules && cnpm install。

  1. 使用组件 #
    $ npm i --save ant-design-vue@next
    完整引入

import { createApp } from 'vue';
import Antd from 'ant-design-vue';
import App from './App';
import 'ant-design-vue/dist/antd.css';

const app = createApp();
app.config.productionTip = false;

app.use(Antd);

What is expected?

能正常使用

What is actually happening?

报错了main.js?56d7:12 Uncaught TypeError: Object(...) is not a function
at eval (main.js?56d7:12)
at Module../src/main.js (app.js:13966)
at webpack_require (app.js:833)
at fn (app.js:130)
at Object.1 (app.js:14040)
at webpack_require (app.js:833)
at app.js:971
at app.js:974


创建初始化项目

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions