alibaba / alibaba/lowcode-engine

【关于物料@alilc/element】

Open
#948 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

### 描述问题
通过脚手架生成的`React`组件库引入`ProComponents`组件导致的错误。

### 具体步骤

#### 一、通过组件项目初始化
```javascript
npm init @alilc/element pro-material
```

#### 二、引入 ProComponents 组件
```javascript
npm install @ant-design/pro-components --save
```

#### 三、在项目中使用并导出
1、新增一个组件 Table,并使用 ProTable
![image](https://user-images.githubusercontent.com/62598129/184788248-d88edf2a-1ab0-477f-a606-542bda35bdc0.png)
2、导出组件
![image](https://user-images.githubusercontent.com/62598129/184788346-d8c4dcf6-baa0-4cd1-bad4-8cd1a0bc3452.png)

#### 四、执行脚本
```javascript
npm run lowcode:dev
```
执行之后预览地址拖拽组件 ProTable 出现的问题:
初始化报错导致组件没有找到
![image](https://user-images.githubusercontent.com/62598129/184788685-22aa9db0-de3a-4882-9503-f541613e646a.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue by running `npm init @alilc/element pro-material`, installing `@ant-design/pro-components`, exporting a component using `ProTable`, and running `npm run lowcode:dev`. Start from the initialization error shown when dragging ProTable into the preview, and verify that the component can be found and initialized there.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.