Skip to content

Commit ecd142c

Browse files
committed
Update README.md
Update Readme.md file.
1 parent 66c5c54 commit ecd142c

File tree

1 file changed

+62
-11
lines changed

1 file changed

+62
-11
lines changed

README.md

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,67 @@
1-
## AntdPopConfirm
2-
[A Mendix widget provide simple and compact confirmation dialog of an action, which based on Ant Design Component.]
1+
## 介绍
2+
基于 Ant Design PopConfirm 组件封装的 Mendix Pluggable Widget,提供功能完备的弹出式浮动确认对话框。和弹出式的全屏居中模态对话框相比,交互形式更轻量。
3+
A Mendix widget provide simple and compact confirmation dialog of an action, which based on Ant Design Component.
34

4-
## Features
5-
[feature highlights]
5+
## 功能特性
6+
1. 提供基于 Mendix textTemplate 的文本拼装能力渲染对话框标题。
7+
2. 可自定义确认/取消(Confirm/Cancel)按钮文本。
8+
3. 可自定义对话框相对位置(placement),默认包含12种。
9+
4. 可自定义对话框 CSS 样式,通过配置项中的 Class Name 引入。
10+
5. 除默认带双按钮的默认样式,可定义仅确认(Confirm)按钮的简化样式。
11+
6. 容器中可容纳多种类型的 Mendix Widget(支持 OnClick 事件即可)。
612

7-
## Usage
8-
[step by step instructions]
13+
## 快速安装和使用
914

10-
## Demo project
11-
[link to sandbox]
15+
### 将该组件添加到 Mendix Project 中
16+
1. 从右边 Releases 处下载 mpk 文件。
17+
2. 把 mpk 文件复制到您的 Project 目录下 `{YourMendixProjectFolder}/widgets/`
18+
3. 用 Mendix Studio Pro 打开你的 Mendix Project,然后点击菜单 `Menu > App > Synchronize App Directory`.
19+
20+
### 快速配置组件
21+
22+
1. 选择任意页面,向页面添加一个 `Antd PopConfirm`
23+
2. 向上述 `PopConfirm` 中添加子组件,可为 `Button`, `Antd Button`, `Badge`, `Text`, `Label` 等组件。
24+
3. 为该组件设置必要的属性。包括: `Title`, `Placement`, `Confirm Text`, `Confirm Event`, `Cancel Text` , `Cancel Event`.
25+
4. 运行。
26+
27+
## Demo 项目
28+
29+
1. 你可以在[这里](todo)访问在线 demo。
30+
2. 也可以下载 demo project,在自己的 Mendix Studio Pro 上启动运行。具体方法如下:
31+
1. clone demo project。
32+
2. 运行。
33+
34+
## 详细配置说明
35+
### General Section
36+
* Title:弹出框标题。
37+
* Disabled:是否禁用弹出框,默认为`No`.
38+
* Placement:弹出框相对子组件的位置,共12种选项。
39+
* Class Name:弹出框样式。
40+
### Confirm Setting Section
41+
* Confirm Text:确认按钮文本。
42+
* On Confirm Event:点击确认按钮事件。
43+
### Cancel Setting Section
44+
* Show Cancel:是否展示取消按钮,默认为`Yes`.
45+
* Cancel Text:取消按钮文本。
46+
* On Cancel Event:点击取消按钮事件。
47+
48+
## `antd` PopConfirm 的功能对比
49+
50+
这里列举了 `antd``PopConfirm` 的所有参数,并说明了该组件是否支持该属性,以及不支持的原因。如果想查看`antd`中原属性的含义,请[移步这里](https://ant.design/components/popconfirm)
51+
52+
| antd 组件参数 | 参数说明 | 是否支持 | 备注 |
53+
| --------------------- | ------------------------------------------ | ---- | -------------------- |
54+
| cancelText | 取消按钮文字 | Y | |
55+
| disabled | 阻止点击 Popconfirm 子元素时弹出确认框 | Y | |
56+
| icon | 自定义弹出气泡 Icon 图标 | N | 存在 CSS 覆盖问题待补全 |
57+
| okText | 确认按钮文字 | Y | |
58+
| okType | 确认按钮类型 | Y | |
59+
| showCancel | 是否显示取消按钮 | Y | |
60+
| title | 确认框的描述 | Y | |
61+
| onCancel | 点击取消的回调 | Y | |
62+
| onConfirm | 点击确认的回调 | Y | |
63+
此外,从共用部分参数的 `Tooltip` 中引入以下参数。
64+
| overlayClassName | 卡片类名 | Y | |
1265

1366
## Issues, suggestions and feature requests
1467
[link to GitHub issues]
@@ -19,6 +72,4 @@
1972
1. Run `npm start` to watch for code changes. On every change:
2073
- the widget will be bundled;
2174
- the bundle will be included in a `dist` folder in the root directory of the project;
22-
- the bundle will be included in the `deployment` and `widgets` folder of the Mendix test project.
23-
24-
[specify contribution]
75+
- the bundle will be included in the `deployment` and `widgets` folder of the Mendix test project.

0 commit comments

Comments
 (0)