@cloudbase/weda-ui 3.4.9-alpha.1024 → 3.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -30
- package/dist/configs/components/chart/bar.json +1 -1
- package/dist/configs/components/chart/line.js +1 -1
- package/dist/configs/components/chart/pie.json +1 -1
- package/dist/configs/components/customer-service.js +0 -2
- package/dist/configs/components/flowgraph.json +22 -0
- package/dist/configs/components/form-checkbox.js +1 -0
- package/dist/configs/components/form-date.js +1 -0
- package/dist/configs/components/form-depart-tree-select.js +2 -4
- package/dist/configs/components/form-email.js +1 -0
- package/dist/configs/components/form-image-uploader.js +1 -0
- package/dist/configs/components/form-input.js +1 -2
- package/dist/configs/components/form-location.js +2 -2
- package/dist/configs/components/form-multi-region.js +1 -0
- package/dist/configs/components/form-phone.js +1 -0
- package/dist/configs/components/form-radio.js +1 -0
- package/dist/configs/components/form-region.js +1 -0
- package/dist/configs/components/form-rich-text.js +1 -0
- package/dist/configs/components/form-select.js +1 -0
- package/dist/configs/components/form-switch.js +1 -0
- package/dist/configs/components/form-text-area.js +1 -0
- package/dist/configs/components/form-time.js +1 -0
- package/dist/configs/components/form-upload-file.js +1 -0
- package/dist/configs/components/form-url.js +1 -0
- package/dist/configs/components/form-user-tree-select.js +3 -4
- package/dist/configs/components/modal.js +0 -2
- package/dist/configs/components/navigationBar.json +1 -3
- package/dist/configs/components/wd-button.js +2 -2
- package/dist/configs/components/wd-icon.js +2 -2
- package/dist/configs/components/wd-link.js +2 -2
- package/dist/configs/components/wd-table.js +1 -1
- package/dist/configs/index.js +2 -0
- package/dist/docs/common/components/properties-view.js +3 -6
- package/dist/docs/common/tableView.js +7 -10
- package/dist/style/index.scss +1 -1
- package/dist/web/components/chart/common/core/eChartLine.js +12 -1
- package/dist/web/components/chart/common/data-transform.js +13 -9
- package/dist/web/components/chart/line/index.old.js +2 -1
- package/dist/web/components/flow/common/request.js +3 -3
- package/dist/web/components/flow/modules/chart/index.js +42 -3
- package/dist/web/components/flow/modules/chart/preview-data.js +88 -0
- package/dist/web/components/flow-graph/constants.js +28 -0
- package/dist/web/components/flow-graph/graph.js +267 -0
- package/dist/web/components/flow-graph/index.js +2 -0
- package/dist/web/components/flow-graph/style.css +109 -0
- package/dist/web/components/flow-graph/types.js +1 -0
- package/dist/web/components/form/select/dropdown-select/index.css +4 -0
- package/dist/web/components/form/select/dropdown-select/index.js +4 -1
- package/dist/web/components/form/select/request.js +9 -9
- package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +44 -490
- package/dist/web/components/form/userOrgSelect/common/utils.js +14 -58
- package/dist/web/components/form/userOrgSelect/component/OrgPaths.js +12 -0
- package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +1 -3
- package/dist/web/components/form/userOrgSelect/component/depart-select/departTreeSelect.h5.js +35 -56
- package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +46 -24
- package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +11 -20
- package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +57 -120
- package/dist/web/components/form/userOrgSelect/component/org-tree.js +8 -24
- package/dist/web/components/form/userOrgSelect/component/user-org-list.js +4 -4
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +42 -33
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +2 -2
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/model-user-list.js +20 -51
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/org-tree.js +2 -2
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +4 -17
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +4 -6
- package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +7 -3
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +68 -158
- package/dist/web/components/form/userOrgSelect/hooks/use-depart-data.js +3 -109
- package/dist/web/components/form-input-hooks/index.js +5 -2
- package/dist/web/components/index.js +1 -0
- package/dist/web/components/swiper/index.js +1 -2
- package/dist/web/components/table/BaseTable.js +1 -1
- package/dist/web/components/tabs/tabs.pc.js +10 -9
- package/dist/web/components/wd-form/index.js +28 -14
- package/dist/web/components/wd-table/components/ExportFileModalByApi/index.js +1 -1
- package/dist/web/components/wd-table/components/FieldRender/index.js +13 -2
- package/dist/web/components/wd-table/hooks/useChooseList.js +3 -5
- package/dist/web/components/wd-table/hooks/useTableData.js +1 -7
- package/dist/web/components/wd-table/utils/index.js +22 -3
- package/dist/web/components/wd-table/wd-table.js +9 -3
- package/dist/web/utils/datasource.js +3 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
├── configs # 组件类型声明目录
|
|
21
21
|
│ ├── actions # 组件库方法类型声明
|
|
22
22
|
│ ├── components # 组件类型声明
|
|
23
|
-
│ └── index.
|
|
23
|
+
│ └── index.ts # 组件类型声明入口
|
|
24
24
|
├── mp # 小程序组件
|
|
25
25
|
│ ├── actions # 小程序组件方法实现
|
|
26
26
|
│ ├── components # 小程序组件实现
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
### 编写组件
|
|
48
48
|
|
|
49
|
+
首先请阅读 [组件标准化开发原则](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002427443)
|
|
50
|
+
|
|
49
51
|
编写能在低码平台运行的组件需要各自平台的**标准组件源码**和**组件描述**。具体可参考 [实现自定义 button 组件 | 云开发 CloudBase - 一站式后端云服务](https://docs.cloudbase.net/lowcode/custom-components/quick-start/comp)
|
|
50
52
|
|
|
51
53
|
#### 处理组件通用属性
|
|
@@ -111,10 +113,6 @@ export default function Container({ children, events, ...args }) {
|
|
|
111
113
|
}
|
|
112
114
|
```
|
|
113
115
|
|
|
114
|
-
#### 调用运行时框架接口
|
|
115
|
-
|
|
116
|
-
如果在组件中使用低码应用运行时框架提供的工具方法或者数据源相关能力的时候,可以参考 [应用客户端 SDK](https://docs.cloudbase.net/lowcode/framework/app/app) 以及 [在应用中使用数据源及其他后端服务](https://docs.cloudbase.net/lowcode/datasource/usage)
|
|
117
|
-
|
|
118
116
|
#### 编写组件描述文件
|
|
119
117
|
|
|
120
118
|
当前编写的组件都是各个平台的标准组件,他们和微搭低码平台需要一个配置来互相连接起来。
|
|
@@ -127,14 +125,27 @@ export default function Container({ children, events, ...args }) {
|
|
|
127
125
|
|
|
128
126
|
### 调试组件库
|
|
129
127
|
|
|
130
|
-
|
|
128
|
+
#### 本地预览
|
|
131
129
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
对于 web 组件,我们在模板中集成了 [storybook] 的使用环境。编写 [story] 即可简单的在本地预览组件效果。具体步骤:
|
|
131
|
+
|
|
132
|
+
1. 编写 [story],story 是 storybook 的组件状态单元,描述了组件在一组特定状态下的行为。
|
|
133
|
+
2. 当你为组件编写了足够多的用例后,你可以运行 `npm run storybook` 命令来互动预览本地组件。
|
|
134
|
+
|
|
135
|
+
#### 应用编辑器中调试 web 组件
|
|
136
|
+
|
|
137
|
+
如果 web 端的组件依赖运行态环境才能预览实际效果,可以在应用编辑器中预览
|
|
138
|
+
|
|
139
|
+
[如何在应用编辑器中直接调试本地官方组件](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002491961)
|
|
140
|
+
|
|
141
|
+
#### 调试小程序组件
|
|
142
|
+
|
|
143
|
+
如果要测试组件小程序端的效果, 可执行`tcb lowcode publish` 发布到自己账号下,然后新建一个应用来测试
|
|
135
144
|
|
|
136
145
|
### 组件自动化测试
|
|
137
146
|
|
|
147
|
+
#### 单元测试
|
|
148
|
+
|
|
138
149
|
微搭官方组件库需要单元测试覆盖率达到 80% 以上才能发布,我们集成进了 jest 和 小程序模拟器来协助组件的多端测试。
|
|
139
150
|
|
|
140
151
|
编写完测试用例后运行 `npm test` 执行测试命令。
|
|
@@ -146,44 +157,68 @@ tcb lowcode debug
|
|
|
146
157
|
- <https://jestjs.io/docs/snapshot-testing>
|
|
147
158
|
- <https://storybook.js.org/tutorials/intro-to-storybook/react/en/test/>
|
|
148
159
|
|
|
160
|
+
#### E2E 测试
|
|
161
|
+
|
|
162
|
+
组件最终使用过程中因为有构建代码生成和运行、编辑态代码等外部因素,容易出现开发没问题,发布之后才发现问题。而且现网用户用法千奇百怪,一些非预期用法也可能会新版本发布后出现问题。所以用配合 render 使用 E2E 自动化测试,以用户通过编辑器生成的 CALS 和组件 dependencies 作为输入,渲染输出可以执行的应用,以覆盖最终用户态的状态。
|
|
163
|
+
|
|
164
|
+
E2E 测试采用 Cypress 来进行,相比 Jest 模拟 dom,更适合对实际的样式和运行效果进行测试,推荐复杂一点的组件都要写 E2E 测试。
|
|
165
|
+
|
|
166
|
+
请参考 [组件库 E2E 测试](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002369725) 和 [测试用例创建指北](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002370781)
|
|
167
|
+
|
|
168
|
+
### 编写组件文档
|
|
169
|
+
|
|
170
|
+
组件库对外的文档统一发布技术文档站:https://docs.cloudbase.net/lowcode/components/
|
|
171
|
+
|
|
172
|
+
组件上线前需要提前准备好文档,具体可以参考 https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002472151
|
|
173
|
+
|
|
174
|
+
研发同学可以在代码仓库中编写代码的同时进行文档的编写,文档放置在 `src/docs/compsdocs/` 目录中
|
|
175
|
+
|
|
176
|
+
完整的文档示例可参考 [按钮组件文档](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/WdButton) ,文档源码存放在 `/src/docs/compsdocs/show/WdButton.mdx`
|
|
177
|
+
|
|
149
178
|
### 发布组件库
|
|
150
179
|
|
|
180
|
+
#### 个人账号
|
|
181
|
+
|
|
151
182
|
组件开发完成后,提交组件到微搭低代码平台,该操作会将组件发布在自己的个人账号下,可以在应用中预览
|
|
152
183
|
|
|
153
184
|
```
|
|
154
185
|
tcb lowcode publish
|
|
155
186
|
```
|
|
156
187
|
|
|
157
|
-
|
|
188
|
+
然后进入到编辑器的组件库列表中,再次点击发布,即可在自己的账号下的应用中使用
|
|
158
189
|
|
|
159
|
-
|
|
190
|
+
#### 正式发布
|
|
160
191
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
## 其他
|
|
192
|
+
如果需要发布官方组件库,需要在提交 MR 通过后,通过流水线发布 <http://tencent.coding.woa.com/p/CloudBase/ci/job/292970/build/current>
|
|
164
193
|
|
|
165
|
-
|
|
194
|
+
## 常见问题
|
|
166
195
|
|
|
167
|
-
|
|
196
|
+
- 办公网络下执行 `tcb lowcode publish` 出现网络异常报错:建议切换 iOA 到 PAC 模式
|
|
168
197
|
|
|
169
|
-
|
|
198
|
+
## 参考信息
|
|
170
199
|
|
|
171
|
-
|
|
172
|
-
2. 当你为组件编写了足够多的用例后,你可以运行 `npm run storybook` 命令来互动预览本地组件。
|
|
200
|
+
组件开发更多信息请[参考文档](https://docs.cloudbase.net/lowcode/custom-components/quick-start/comps.html)。
|
|
173
201
|
|
|
174
|
-
###
|
|
202
|
+
### 编辑器协议机制
|
|
175
203
|
|
|
176
|
-
|
|
204
|
+
- [组件内模板机制](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002353133) :组件可自带默认结构、属性、事件
|
|
205
|
+
- [单组件升级机制](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002411487) : 针对不再兼容的组件可以引导进行迁移
|
|
206
|
+
- [编辑器检查机制](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002459983) : 可在发布应用前进行检查
|
|
207
|
+
- [样式配置属性屏蔽 (inlineStyleForm)](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002470249) :组件可以屏蔽无关样式配置
|
|
208
|
+
- [右侧面板提示 (panelTips)](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002460139) : 可在右侧编辑区提示相关信息
|
|
209
|
+
- [组件相对位置限制 (positionConstraint)](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002466153):组件可以针对可以放入的组件进行限制
|
|
210
|
+
- [自定义组件 id 名 (componentName)](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002474643)
|
|
211
|
+
- [搜索关键词 (keyWords)](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002460167)
|
|
212
|
+
- [微搭编辑器组件显示隐藏](https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002271581)
|
|
177
213
|
|
|
178
|
-
|
|
214
|
+
### 运行时框架接口
|
|
179
215
|
|
|
180
|
-
[
|
|
181
|
-
[小程序组件]: (https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)
|
|
182
|
-
[react]: (https://reactjs.org/)
|
|
183
|
-
[storybook]: (https://storybook.js.org/)
|
|
184
|
-
[http 调用]: (https://developers.weixin.qq.com/miniprogram/dev/devtools/http.html)
|
|
185
|
-
[story]: (https://storybook.js.org/docs/react/get-started/whats-a-story)
|
|
216
|
+
如果在组件中使用低码应用运行时框架提供的工具方法或者数据源相关能力的时候,可参考 [API 列表](https://docs.cloudbase.net/lowcode/api/api-referrence)
|
|
186
217
|
|
|
187
|
-
|
|
218
|
+
### 其他
|
|
188
219
|
|
|
189
|
-
|
|
220
|
+
- [腾讯云微搭低代码](https://cloud.tencent.com/product/weda)
|
|
221
|
+
- [小程序组件](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)
|
|
222
|
+
- [react](https://reactjs.org/)
|
|
223
|
+
- [storybook](https://storybook.js.org/)
|
|
224
|
+
- [story](https://storybook.js.org/docs/react/get-started/whats-a-story)
|
|
@@ -526,7 +526,7 @@ const data = Type.Object({
|
|
|
526
526
|
}),
|
|
527
527
|
setColor: Type.Array(Type.String({ title: '颜色色号' }), {
|
|
528
528
|
title: '配色',
|
|
529
|
-
'x-index':
|
|
529
|
+
'x-index': 59,
|
|
530
530
|
default: ['#2A70E2', '#46B690', '#EDB539', '#E46961', '#4FB3D2', '#805FDC'],
|
|
531
531
|
'x-component': 'color-plate',
|
|
532
532
|
remarks: '当有多个数值字段或维度字段分组时,不同类别将按照不同配色展示,支持自定义色卡',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
|
|
3
|
+
"data": {
|
|
4
|
+
"properties": {
|
|
5
|
+
"processCanvasInfo": {
|
|
6
|
+
"title": "流程图数据",
|
|
7
|
+
"x-category": "基础属性",
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"platforms": ["web"],
|
|
13
|
+
"meta": {
|
|
14
|
+
"title": "流程图",
|
|
15
|
+
"description": "流程图组件",
|
|
16
|
+
"icon": "../icons/FlowGraph.svg",
|
|
17
|
+
"category": "模型组件",
|
|
18
|
+
"categoryOrder": 2000,
|
|
19
|
+
"componentOrder": 10,
|
|
20
|
+
"visible": []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -201,17 +201,15 @@ const config = defineConfig({
|
|
|
201
201
|
},
|
|
202
202
|
meta: {
|
|
203
203
|
name: 'FormDepartTreeSelect',
|
|
204
|
+
componentName: 'DepartmentSelect',
|
|
204
205
|
title: '部门选择',
|
|
205
206
|
category: '表单',
|
|
206
207
|
description: '用于模型应用中部门选择',
|
|
207
208
|
categoryOrder: 500,
|
|
208
209
|
componentOrder: 460,
|
|
209
|
-
visible: '(APP & MODEL_APP)',
|
|
210
210
|
icon: '../icons/FormDepartTreeSelect.svg',
|
|
211
|
-
},
|
|
212
|
-
configMeta: {
|
|
213
211
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormDepartTreeSelect',
|
|
214
|
-
visible: '
|
|
212
|
+
visible: ['APP', 'COMPONENT'],
|
|
215
213
|
shortcut: {
|
|
216
214
|
props: ['name', 'label'],
|
|
217
215
|
formauto: true,
|
|
@@ -454,14 +454,13 @@ export default defineConfig({
|
|
|
454
454
|
meta: {
|
|
455
455
|
title: '单行输入',
|
|
456
456
|
name: 'FormInput',
|
|
457
|
+
componentName: 'Input',
|
|
457
458
|
description: '用于输入/查看较短文本内容。',
|
|
458
459
|
category: '表单',
|
|
459
460
|
categoryOrder: 500,
|
|
460
461
|
componentOrder: 350,
|
|
461
462
|
icon: '../icons/FormInput.svg',
|
|
462
463
|
visible: ['APP', 'COMPONENT'],
|
|
463
|
-
},
|
|
464
|
-
configMeta: {
|
|
465
464
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormInput',
|
|
466
465
|
shortcut: {
|
|
467
466
|
props: ['name', 'label'],
|
|
@@ -125,6 +125,7 @@ const data = Type.Object({
|
|
|
125
125
|
title: '默认位置',
|
|
126
126
|
default: 1,
|
|
127
127
|
remarks: '地理位置的默认值',
|
|
128
|
+
'x-component': 'string',
|
|
128
129
|
'x-index': 25,
|
|
129
130
|
}),
|
|
130
131
|
defauleShowLocation: Type.Boolean({
|
|
@@ -301,6 +302,7 @@ const config = defineConfig({
|
|
|
301
302
|
events,
|
|
302
303
|
meta: {
|
|
303
304
|
name: 'FormLocation',
|
|
305
|
+
componentName: 'LocationInput',
|
|
304
306
|
title: '地图定位',
|
|
305
307
|
description: '提供表单提交场景下的选点定位功能。',
|
|
306
308
|
category: '表单',
|
|
@@ -308,8 +310,6 @@ const config = defineConfig({
|
|
|
308
310
|
categoryOrder: 500,
|
|
309
311
|
componentOrder: 470,
|
|
310
312
|
visible: ['APP'],
|
|
311
|
-
},
|
|
312
|
-
configMeta: {
|
|
313
313
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormLocation',
|
|
314
314
|
shortcut: {
|
|
315
315
|
props: ['name', 'label', 'dataSource'],
|
|
@@ -184,6 +184,7 @@ const config = defineConfig({
|
|
|
184
184
|
meta: {
|
|
185
185
|
title: '地区选择',
|
|
186
186
|
name: 'FormMultiRegion',
|
|
187
|
+
componentName: 'RegionInput',
|
|
187
188
|
description: '适用于选择省市区。',
|
|
188
189
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormRegion',
|
|
189
190
|
category: '表单',
|
|
@@ -249,6 +249,7 @@ const config = defineConfig({
|
|
|
249
249
|
},
|
|
250
250
|
meta: {
|
|
251
251
|
name: 'FormRadio',
|
|
252
|
+
componentName: 'Radio',
|
|
252
253
|
title: '单选',
|
|
253
254
|
description: '用于在页面中平铺展示多个可选项,由用户选择其一的场景。',
|
|
254
255
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormRegion',
|
|
@@ -227,6 +227,7 @@ const config = defineConfig({
|
|
|
227
227
|
},
|
|
228
228
|
meta: {
|
|
229
229
|
name: 'FormTextArea',
|
|
230
|
+
componentName: 'TextArea',
|
|
230
231
|
description: '用于输入/查看较长文本内容。',
|
|
231
232
|
icon: '//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/TextArea.svg',
|
|
232
233
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormTextarea',
|
|
@@ -278,21 +278,20 @@ const config = defineConfig({
|
|
|
278
278
|
events,
|
|
279
279
|
meta: {
|
|
280
280
|
name: 'FormUserTreeSelect',
|
|
281
|
+
componentName: 'UserSelect',
|
|
281
282
|
title: '成员选择',
|
|
282
283
|
description: '用于模型应用中成员选择',
|
|
283
284
|
category: '表单',
|
|
284
285
|
categoryOrder: 500,
|
|
285
286
|
componentOrder: 450,
|
|
286
|
-
visible: '
|
|
287
|
+
visible: ['APP', 'COMPONENT'],
|
|
287
288
|
icon: '../icons/FormUserTreeSelect.svg',
|
|
288
|
-
},
|
|
289
|
-
configMeta: {
|
|
290
289
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormUserTreeSelect',
|
|
291
|
-
visible: '(APP & MODEL_APP)',
|
|
292
290
|
shortcut: {
|
|
293
291
|
props: ['name', 'label'],
|
|
294
292
|
formauto: true,
|
|
295
293
|
},
|
|
294
|
+
platform: ['WEB'],
|
|
296
295
|
recommendTypes: {
|
|
297
296
|
name: [
|
|
298
297
|
{
|
|
@@ -64,8 +64,6 @@ const config = defineConfig({
|
|
|
64
64
|
icon: '../icons/Modal.svg',
|
|
65
65
|
categoryOrder: 200,
|
|
66
66
|
componentOrder: 140,
|
|
67
|
-
},
|
|
68
|
-
configMeta: {
|
|
69
67
|
visible: ['APP', 'COMPONENT'],
|
|
70
68
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/senior/Modal',
|
|
71
69
|
},
|
|
@@ -63,9 +63,7 @@
|
|
|
63
63
|
"categoryOrder": 300,
|
|
64
64
|
"componentOrder": 160,
|
|
65
65
|
"icon": "../icons/NavigationBar.svg",
|
|
66
|
-
"visible": "
|
|
67
|
-
},
|
|
68
|
-
"configMeta": {
|
|
66
|
+
"visible": ["APP"],
|
|
69
67
|
"docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/navmenu/NavigationBar"
|
|
70
68
|
}
|
|
71
69
|
}
|
|
@@ -150,8 +150,8 @@ const data = Type.Object({
|
|
|
150
150
|
'x-category': '高级属性',
|
|
151
151
|
})),
|
|
152
152
|
// 规范化新增,图标样式 支持自定义图片
|
|
153
|
-
iconSrc: Type.Optional(Type.
|
|
154
|
-
|
|
153
|
+
iconSrc: Type.Optional(Type.String({
|
|
154
|
+
'x-component': 'image',
|
|
155
155
|
'x-rules': [
|
|
156
156
|
{
|
|
157
157
|
message: '请输入合法的图片地址',
|
|
@@ -29,10 +29,10 @@ const data = Type.Object({
|
|
|
29
29
|
'x-component': 'icon2',
|
|
30
30
|
description: '选择预置图标',
|
|
31
31
|
}),
|
|
32
|
-
src: Type.Optional(Type.
|
|
32
|
+
src: Type.Optional(Type.String({
|
|
33
33
|
title: '自定义图标',
|
|
34
34
|
default: '',
|
|
35
|
-
|
|
35
|
+
'x-component': 'image',
|
|
36
36
|
'x-index': 30,
|
|
37
37
|
'x-rules': [
|
|
38
38
|
{
|
|
@@ -110,8 +110,8 @@ const data = Type.Object({
|
|
|
110
110
|
'x-category': '高级属性',
|
|
111
111
|
})),
|
|
112
112
|
// 规范化新增,图标样式 支持自定义图片
|
|
113
|
-
iconSrc: Type.Optional(Type.
|
|
114
|
-
|
|
113
|
+
iconSrc: Type.Optional(Type.String({
|
|
114
|
+
'x-component': 'image',
|
|
115
115
|
'x-rules': [
|
|
116
116
|
{
|
|
117
117
|
message: '请输入合法的图片地址',
|
|
@@ -516,7 +516,7 @@ const data = Type.Object({
|
|
|
516
516
|
'x-group': '数据',
|
|
517
517
|
description: '条件筛选',
|
|
518
518
|
})),
|
|
519
|
-
filterFields: Type.Optional(Type.
|
|
519
|
+
filterFields: Type.Optional(Type.Any({
|
|
520
520
|
type: 'object',
|
|
521
521
|
title: '筛选器',
|
|
522
522
|
'x-component': 'mutilp-data-source-field-select',
|
package/dist/configs/index.js
CHANGED
|
@@ -59,6 +59,7 @@ import ModelFlowChart from './components/flow/flowchart.json';
|
|
|
59
59
|
import ModelFlowControl from './components/flow/flowcontrol.json';
|
|
60
60
|
import ModelFlowLayout from './components/flow/flowlayout.json';
|
|
61
61
|
import ModelFlowProcess from './components/flow/flowprocess.json';
|
|
62
|
+
import FlowGraph from './components/flowgraph.json';
|
|
62
63
|
// 新版规范化组件
|
|
63
64
|
import WdBubble from './components/wd-bubble';
|
|
64
65
|
import WdButton from './components/wd-button';
|
|
@@ -178,6 +179,7 @@ export const components = {
|
|
|
178
179
|
ModelFlowControl,
|
|
179
180
|
ModelFlowLayout,
|
|
180
181
|
ModelFlowProcess,
|
|
182
|
+
FlowGraph,
|
|
181
183
|
// 新版组件
|
|
182
184
|
WdButton,
|
|
183
185
|
WdDivider,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
export default function PropertiesView({ rows }) {
|
|
3
|
-
return ((rows === null || rows === void 0 ? void 0 : rows.length) > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { children: "\u901A\u8FC7\u5C5E\u6027 API\uFF0C\u53EF\u4EE5\u83B7\u53D6\u7EC4\u4EF6\u5185\u90E8\u7684\u72B6\u6001\u548C\u5C5E\u6027\u503C" }), _jsx("div", { className: "tea-table__header", children: _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '25%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u53EA\u8BFB\u5C5E\u6027\u540D", children: "\u53EA\u8BFB\u5C5E\u6027\u540D" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u53EA\u8BFB\u5C5E\u6027\u540D", children: "\u5C5E\u6027\u6807\u8BC6" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u7C7B\u578B", children: "\u7C7B\u578B" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u8BF4\u660E", children: "\u8BF4\u660E" }) }) })] }) })] }) }), _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '25%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("tbody", { children: rows.map((row, index) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
? [...row.enum.map((item) => JSON.stringify(item))].join('|')
|
|
7
|
-
: row.type }) }), _jsx("td", { children: row.description })] }, index));
|
|
8
|
-
}) })] })] })));
|
|
3
|
+
return ((rows === null || rows === void 0 ? void 0 : rows.length) > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { children: "\u901A\u8FC7\u5C5E\u6027 API\uFF0C\u53EF\u4EE5\u83B7\u53D6\u7EC4\u4EF6\u5185\u90E8\u7684\u72B6\u6001\u548C\u5C5E\u6027\u503C" }), _jsx("div", { className: "tea-table__header", children: _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '25%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u53EA\u8BFB\u5C5E\u6027\u540D", children: "\u53EA\u8BFB\u5C5E\u6027\u540D" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u53EA\u8BFB\u5C5E\u6027\u540D", children: "\u5C5E\u6027\u6807\u8BC6" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u7C7B\u578B", children: "\u7C7B\u578B" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u8BF4\u660E", children: "\u8BF4\u660E" }) }) })] }) })] }) }), _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '25%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("tbody", { children: rows.map((row, index) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("b", { children: row.title }) }), _jsx("td", { children: _jsx("code", { children: row.name }) }), _jsx("td", { children: _jsx("code", { children: Array.isArray(row.enum) && row.enum.length
|
|
4
|
+
? [...row.enum.map((item) => JSON.stringify(item))].join('|')
|
|
5
|
+
: row.type }) }), _jsx("td", { children: row.description })] }, index))) })] })] })));
|
|
9
6
|
}
|
|
@@ -76,16 +76,13 @@ export default function TableLayoutView({ componentKey, type, origin }) {
|
|
|
76
76
|
case 'event':
|
|
77
77
|
return _jsx(EventView, { rows: tableView });
|
|
78
78
|
}
|
|
79
|
-
return (_jsxs(_Fragment, { children: [type == 'attribute' && tableView.length > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { children: "\u7EC4\u4EF6\u63A5\u6536\u7684\u5916\u90E8\u4F20\u5165\u7684\u5C5E\u6027" }), _jsx("div", { className: "tea-table__header", children: _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '10%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D", children: "\u5C5E\u6027\u540D" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u6807\u8BC6", children: "\u5C5E\u6027\u6807\u8BC6" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u7C7B\u578B", children: "\u7C7B\u578B" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u5206\u7EC4", children: "\u5C5E\u6027\u5206\u7EC4" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u9ED8\u8BA4\u503C", children: "\u9ED8\u8BA4\u503C" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u8BF4\u660E", children: "\u8BF4\u660E" }) }) })] }) })] }) }), _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '10%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("tbody", { children: tableView.map((row, index) => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
].join('|')
|
|
87
|
-
: row.type }) }), _jsx("td", { children: row['x-category'] }), _jsx("td", { children: row.default }), _jsx("td", { children: row.description })] }, index));
|
|
88
|
-
}) })] })] })), type == 'slot' && tableView.length > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { children: "\u7EC4\u4EF6\u5185\u90E8\u5F00\u653E\u7684\u63D2\u69FD\uFF0C\u53EF\u4EE5\u653E\u5165\u5176\u4ED6\u7EC4\u4EF6" }), _jsx("div", { className: "tea-table__header", children: _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D", children: "\u540D\u79F0" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u7C7B\u578B", children: "\u8BF4\u660E" }) }) })] }) })] }) }), _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("tbody", { children: tableView.map((row, index) => (_jsxs("tr", { children: [_jsx("td", { children: row.code }), _jsx("td", { children: row.description })] }, index))) })] })] })), type == 'description' && tableView.length > 0 && (_jsxs(_Fragment, { children: [_jsxs("h2", { className: "sbdocs-h2", children: [_jsx("a", { "aria-hidden": "true", className: "anchor enhancedAnchor_node_modules-@docusaurus-theme-classic-lib-next-theme-Heading-styles-module", id: "\u9002\u7528\u573A\u666F" }), "\u9002\u7528\u573A\u666F", _jsx("a", { className: "hash-link", href: "#\u9002\u7528\u573A\u666F", title: "\u6807\u9898\u7684\u76F4\u63A5\u94FE\u63A5", children: "#" })] }), _jsx("p", { children: ((_a = tableView[0]) === null || _a === void 0 ? void 0 : _a.description)
|
|
79
|
+
return (_jsxs(_Fragment, { children: [type == 'attribute' && tableView.length > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { children: "\u7EC4\u4EF6\u63A5\u6536\u7684\u5916\u90E8\u4F20\u5165\u7684\u5C5E\u6027" }), _jsx("div", { className: "tea-table__header", children: _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '10%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D", children: "\u5C5E\u6027\u540D" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u6807\u8BC6", children: "\u5C5E\u6027\u6807\u8BC6" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u7C7B\u578B", children: "\u7C7B\u578B" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u5206\u7EC4", children: "\u5C5E\u6027\u5206\u7EC4" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u9ED8\u8BA4\u503C", children: "\u9ED8\u8BA4\u503C" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u8BF4\u660E", children: "\u8BF4\u660E" }) }) })] }) })] }) }), _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: '10%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '15%' } }), _jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("tbody", { children: tableView.map((row, index) => (_jsxs("tr", { children: [_jsx("td", { children: _jsx("b", { children: row.title }) }), _jsx("td", { children: _jsx("code", { children: row.code }) }), _jsx("td", { children: _jsx("code", { children: Array.isArray(row.enum) && row.enum.length
|
|
80
|
+
? [
|
|
81
|
+
...row.enum
|
|
82
|
+
.map((item) => typeof item === 'string' ? item : item.value)
|
|
83
|
+
.map((item) => JSON.stringify(item)),
|
|
84
|
+
].join('|')
|
|
85
|
+
: row.type }) }), _jsx("td", { children: row['x-category'] }), _jsx("td", { children: row.default }), _jsx("td", { children: row.description })] }, index))) })] })] })), type == 'slot' && tableView.length > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { children: "\u7EC4\u4EF6\u5185\u90E8\u5F00\u653E\u7684\u63D2\u69FD\uFF0C\u53EF\u4EE5\u653E\u5165\u5176\u4ED6\u7EC4\u4EF6" }), _jsx("div", { className: "tea-table__header", children: _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u5C5E\u6027\u540D", children: "\u540D\u79F0" }) }) }), _jsx("th", { className: "", children: _jsx("div", { children: _jsx("span", { className: "tea-text-overflow", title: "\u7C7B\u578B", children: "\u8BF4\u660E" }) }) })] }) })] }) }), _jsxs("table", { className: "tea-table__box", children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: '18%' } }), _jsx("col", { style: { width: 'auto' } })] }), _jsx("tbody", { children: tableView.map((row, index) => (_jsxs("tr", { children: [_jsx("td", { children: row.code }), _jsx("td", { children: row.description })] }, index))) })] })] })), type == 'description' && tableView.length > 0 && (_jsxs(_Fragment, { children: [_jsxs("h2", { className: "sbdocs-h2", children: [_jsx("a", { "aria-hidden": "true", className: "anchor enhancedAnchor_node_modules-@docusaurus-theme-classic-lib-next-theme-Heading-styles-module", id: "\u9002\u7528\u573A\u666F" }), "\u9002\u7528\u573A\u666F", _jsx("a", { className: "hash-link", href: "#\u9002\u7528\u573A\u666F", title: "\u6807\u9898\u7684\u76F4\u63A5\u94FE\u63A5", children: "#" })] }), _jsx("p", { children: ((_a = tableView[0]) === null || _a === void 0 ? void 0 : _a.description)
|
|
89
86
|
? (_b = tableView[0]) === null || _b === void 0 ? void 0 : _b.description
|
|
90
87
|
: (_c = tableView[0]) === null || _c === void 0 ? void 0 : _c.desc })] })), tableView.length == 0 && _jsx("p", { children: "\u65E0" })] }));
|
|
91
88
|
}
|