From 8165d6000ebbc7b9ff85ce6eaa76b5cb05e041ad Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Sun, 28 Nov 2021 11:18:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20popover=20=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=BD=8D=E7=BD=AE=E4=B8=8D=E5=AF=B9=20(#3074)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh-CN/components/action.md | 2 +- docs/zh-CN/components/crud.md | 126 +++++++++++++-------------- docs/zh-CN/components/dialog.md | 8 +- docs/zh-CN/components/form/picker.md | 18 ++-- docs/zh-CN/components/list.md | 4 +- docs/zh-CN/components/search-box.md | 2 +- docs/zh-CN/components/table.md | 48 +++++----- docs/zh-CN/concepts/linkage.md | 4 +- docs/zh-CN/concepts/schema.md | 2 +- docs/zh-CN/extend/tracker.md | 2 +- docs/zh-CN/index.md | 14 +-- docs/zh-CN/types/api.md | 4 +- src/components/Overlay.tsx | 6 ++ 13 files changed, 123 insertions(+), 117 deletions(-) diff --git a/docs/zh-CN/components/action.md b/docs/zh-CN/components/action.md index 0e6448512..0c6555f14 100755 --- a/docs/zh-CN/components/action.md +++ b/docs/zh-CN/components/action.md @@ -264,7 +264,7 @@ icon 也可以是 url 地址,比如 { "type": "crud", "name": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", diff --git a/docs/zh-CN/components/crud.md b/docs/zh-CN/components/crud.md index da92ba6d6..865cc6f35 100755 --- a/docs/zh-CN/components/crud.md +++ b/docs/zh-CN/components/crud.md @@ -19,7 +19,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "columns": [ { @@ -116,7 +116,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 "title": "新增表单", "body": { "type": "form", - "api": "post:/api/sample", + "api": "post:/api/mock2/sample", "body": [ { "type": "input-text", @@ -134,7 +134,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 }, { "type": "crud", - "api": "/api/sample?orderBy=id&orderDir=desc", + "api": "/api/mock2/sample?orderBy=id&orderDir=desc", "syncLocation": false, "columns": [ { @@ -175,7 +175,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?orderBy=id&orderDir=desc", + "api": "/api/mock2/sample?orderBy=id&orderDir=desc", "syncLocation": false, "columns": [ { @@ -200,7 +200,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 "actionType": "ajax", "level": "danger", "confirmText": "确认要删除?", - "api": "delete:/api/sample/${id}" + "api": "delete:/api/mock2/sample/${id}" } ] } @@ -215,7 +215,7 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?orderBy=id&orderDir=desc", + "api": "/api/mock2/sample?orderBy=id&orderDir=desc", "syncLocation": false, "columns": [ { @@ -242,8 +242,8 @@ CRUD,即增删改查组件,主要用来展现数据列表,并支持各类 "title": "新增表单", "body": { "type": "form", - "initApi": "/api/sample/${id}", - "api": "post:/api/sample/${id}", + "initApi": "/api/mock2/sample/${id}", + "api": "post:/api/mock2/sample/${id}", "body": [ { "type": "input-text", @@ -282,7 +282,7 @@ Table 模式支持 [Table](./table) 中的所有功能。 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "columns": [ { @@ -475,7 +475,7 @@ Cards 模式支持 [Cards](./cards) 中的所有功能。 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "filter": { "title": "条件搜索", "body": [ @@ -526,7 +526,7 @@ Cards 模式支持 [Cards](./cards) 中的所有功能。 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "autoGenerateFilter": true, "columns": [ @@ -599,7 +599,7 @@ Cards 模式支持 [Cards](./cards) 中的所有功能。 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "defaultParams": { "perPage": 50 }, @@ -642,7 +642,7 @@ Cards 模式支持 [Cards](./cards) 中的所有功能。 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "interval": 3000, "columns": [ { @@ -687,7 +687,7 @@ Cards 模式支持 [Cards](./cards) 中的所有功能。 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [ { "name": "id", @@ -721,7 +721,7 @@ amis 只负责生成排序组件,并将排序参数传递给接口,而不会 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [ { "name": "id", @@ -754,7 +754,7 @@ amis 只负责生成搜索组件,并将搜索参数传递给接口,而不会 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [ { "name": "id", @@ -797,8 +797,8 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", - "quickSaveApi": "/api/sample/bulkUpdate", + "api": "/api/mock2/sample", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", "columns": [ { "name": "id", @@ -821,8 +821,8 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", - "quickSaveApi": "/api/sample/bulkUpdate", + "api": "/api/mock2/sample", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", "columns": [ { "name": "id", @@ -852,8 +852,8 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", - "quickSaveApi": "/api/sample/bulkUpdate", + "api": "/api/mock2/sample", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", "columns": [ { "name": "id", @@ -896,8 +896,8 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", - "quickSaveApi": "/api/sample/bulkUpdate", + "api": "/api/mock2/sample", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", "columns": [ { "name": "id", @@ -941,8 +941,8 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", - "quickSaveItemApi": "/api/sample/$id", + "api": "/api/mock2/sample", + "quickSaveItemApi": "/api/mock2/sample/$id", "columns": [ { "name": "id", @@ -986,7 +986,7 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [ { "name": "id", @@ -1007,7 +1007,7 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, "X" ], "saveImmediately": { - "api": "/api/sample/$id" + "api": "/api/mock2/sample/$id" } } }, @@ -1034,8 +1034,8 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口, { "type": "crud", "syncLocation": false, - "api": "/api/sample", - "quickSaveApi": "/api/sample/bulkUpdate", + "api": "/api/mock2/sample", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", "columns": [ { "name": "id", @@ -1059,7 +1059,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [ { "type": "tpl", @@ -1147,7 +1147,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "type": "crud", "name": "myCRUD", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [ { "label": "点击弹框", @@ -1191,7 +1191,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [], "footerToolbar": ["switch-per-page", "pagination"], "columns": [ @@ -1214,7 +1214,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "X" ], "saveImmediately": { - "api": "/api/sample/$id" + "api": "/api/mock2/sample/$id" } } } @@ -1330,7 +1330,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [ "bulkActions" ], @@ -1338,7 +1338,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "label": "批量删除", "actionType": "ajax", - "api": "delete:/api/sample/${ids|raw}", + "api": "delete:/api/mock2/sample/${ids|raw}", "confirmText": "确定要批量删除?" }, { @@ -1348,7 +1348,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "title": "批量编辑", "body": { "type": "form", - "api": "/api/sample/bulkUpdate2", + "api": "/api/mock2/sample/bulkUpdate2", "body": [ { "type": "hidden", @@ -1422,7 +1422,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [ "bulkActions" ], @@ -1432,7 +1432,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "label": "批量删除", "actionType": "ajax", - "api": "delete:/api/sample/${ids|raw}", + "api": "delete:/api/mock2/sample/${ids|raw}", "confirmText": "确定要批量删除?" }, { @@ -1442,7 +1442,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "title": "批量编辑", "body": { "type": "form", - "api": "/api/sample/bulkUpdate2", + "api": "/api/mock2/sample/bulkUpdate2", "body": [ { "type": "hidden", @@ -1493,7 +1493,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "checkOnItemClick": true, "headerToolbar": [ "bulkActions" @@ -1502,7 +1502,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "label": "批量删除", "actionType": "ajax", - "api": "delete:/api/sample/${ids|raw}", + "api": "delete:/api/mock2/sample/${ids|raw}", "confirmText": "确定要批量删除?" }, { @@ -1512,7 +1512,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "title": "批量编辑", "body": { "type": "form", - "api": "/api/sample/bulkUpdate2", + "api": "/api/mock2/sample/bulkUpdate2", "body": [ { "type": "hidden", @@ -1565,7 +1565,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": ["statistics"], "columns": [ { @@ -1604,7 +1604,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": ["load-more"], "columns": [ { @@ -1643,7 +1643,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": ["export-csv"], "columns": [ { @@ -1684,11 +1684,11 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [{ "type": "export-csv", "label": "全量导出 CSV", - "api": "/api/sample" + "api": "/api/mock2/sample" }], "columns": [ { @@ -1731,7 +1731,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": ["export-excel"], "columns": [ { @@ -1772,7 +1772,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [{ "type": "export-excel", "label": "只导出 engine 和 browser 列", @@ -1820,7 +1820,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "headerToolbar": [{ "type": "export-excel", "label": "全量导出 Excel", - "api": "/api/sample" + "api": "/api/mock2/sample" }], "columns": [ { @@ -1865,7 +1865,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 "type": "export-excel", "label": "自定义导出 Excel", "filename": "自定义文件名${test}", - "api": "/api/sample" + "api": "/api/mock2/sample" }], "columns": [ { @@ -1904,7 +1904,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "filter": { "title": "条件搜索", "body": [ @@ -1958,7 +1958,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [ "reload" ], @@ -1997,7 +1997,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "headerToolbar": [ { "type": "reload", @@ -2053,7 +2053,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "draggable": true, "columns": [ { @@ -2096,7 +2096,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 }, { "type": "form", - "api": "/api/sample/$id", + "api": "/api/mock2/sample/$id", "body": [ { "type": "input-text", @@ -2124,7 +2124,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "draggable": true, "columns": [ { @@ -2198,7 +2198,7 @@ crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "headerToolbar": [ { @@ -2300,7 +2300,7 @@ CRUD 中不限制有多少个单条操作、添加一个操作对应的添加一 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "loadDataOnce": true, "columns": [ { @@ -2338,7 +2338,7 @@ CRUD 中不限制有多少个单条操作、添加一个操作对应的添加一 { "type": "crud", "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "loadDataOnce": true, "source": "${rows | filter:engine:match:keywords}", "filter":{ @@ -2433,7 +2433,7 @@ CRUD 中不限制有多少个单条操作、添加一个操作对应的添加一 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "itemAction": { "type": "button", @@ -2481,7 +2481,7 @@ itemAction 里的 onClick 还能通过 `data` 参数拿到当前行的数据, ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "itemAction": { "type": "button", diff --git a/docs/zh-CN/components/dialog.md b/docs/zh-CN/components/dialog.md index 4af932971..ad054882f 100755 --- a/docs/zh-CN/components/dialog.md +++ b/docs/zh-CN/components/dialog.md @@ -90,7 +90,7 @@ Dialog 弹框 主要由 [Action](./action) 触发,主要展示一个对话框 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "draggable": true, "columns": [ { @@ -126,7 +126,7 @@ Dialog 弹框 主要由 [Action](./action) 触发,主要展示一个对话框 "body": [ { "type": "form", - "api": "/api/sample/$id", + "api": "/api/mock2/sample/$id", "body": [ { "type": "input-text", @@ -147,7 +147,7 @@ Dialog 弹框 主要由 [Action](./action) 触发,主要展示一个对话框 ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "draggable": true, "columns": [ { @@ -186,7 +186,7 @@ Dialog 弹框 主要由 [Action](./action) 触发,主要展示一个对话框 "body": [ { "type": "form", - "api": "/api/sample/$id", + "api": "/api/mock2/sample/$id", "body": [ { "type": "input-text", diff --git a/docs/zh-CN/components/form/picker.md b/docs/zh-CN/components/form/picker.md index 0e1b65ccf..9bade20f6 100755 --- a/docs/zh-CN/components/form/picker.md +++ b/docs/zh-CN/components/form/picker.md @@ -59,15 +59,15 @@ order: 35 "valueField": "id", "labelField": "engine", "label": "多选", - "source": "/api/sample", + "source": "/api/mock2/sample", "size": "lg", "value": "4,5", "multiple": true, "pickerSchema": { "mode": "table", "name": "thelist", - "quickSaveApi": "/api/sample/bulkUpdate", - "quickSaveItemApi": "/api/sample/$id", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", + "quickSaveItemApi": "/api/mock2/sample/$id", "draggable": true, "headerToolbar": { "wrapWithPanel": false, @@ -203,7 +203,7 @@ order: 35 "body": { "type": "form", "name": "sample-edit-form", - "api": "/api/sample/$id", + "api": "/api/mock2/sample/$id", "body": [ { "type": "input-text", @@ -255,7 +255,7 @@ order: 35 "icon": "fa fa-times text-danger", "actionType": "ajax", "confirmText": "您确认要删除?", - "api": "delete:/api/sample/$id" + "api": "delete:/api/mock2/sample/$id" } ], "toggled": true @@ -291,8 +291,8 @@ order: 35 "pickerSchema": { "mode": "table", "name": "thelist", - "quickSaveApi": "/api/sample/bulkUpdate", - "quickSaveItemApi": "/api/sample/$id", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", + "quickSaveItemApi": "/api/mock2/sample/$id", "draggable": true, "headerToolbar": { "wrapWithPanel": false, @@ -428,7 +428,7 @@ order: 35 "body": { "type": "form", "name": "sample-edit-form", - "api": "/api/sample/$id", + "api": "/api/mock2/sample/$id", "body": [ { "type": "input-text", @@ -480,7 +480,7 @@ order: 35 "icon": "fa fa-times text-danger", "actionType": "ajax", "confirmText": "您确认要删除?", - "api": "delete:/api/sample/$id" + "api": "delete:/api/mock2/sample/$id" } ], "toggled": true diff --git a/docs/zh-CN/components/list.md b/docs/zh-CN/components/list.md index 7e7efc0d8..e61410b27 100755 --- a/docs/zh-CN/components/list.md +++ b/docs/zh-CN/components/list.md @@ -15,7 +15,7 @@ order: 56 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "panel", @@ -84,7 +84,7 @@ order: 56 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "panel", diff --git a/docs/zh-CN/components/search-box.md b/docs/zh-CN/components/search-box.md index 27dcae812..3e83aae8a 100644 --- a/docs/zh-CN/components/search-box.md +++ b/docs/zh-CN/components/search-box.md @@ -55,7 +55,7 @@ icon: ```schema: scope="body" { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "syncLocation": false, "headerToolbar": [ { diff --git a/docs/zh-CN/components/table.md b/docs/zh-CN/components/table.md index 6e457b986..f5d854eaf 100755 --- a/docs/zh-CN/components/table.md +++ b/docs/zh-CN/components/table.md @@ -15,7 +15,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -309,7 +309,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -331,7 +331,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -355,7 +355,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -387,7 +387,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -414,7 +414,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -448,7 +448,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -481,7 +481,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -531,7 +531,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "className": "w-xxl", "body": [ { @@ -584,7 +584,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -604,7 +604,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -628,7 +628,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -653,7 +653,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -685,7 +685,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -758,7 +758,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "affixHeader": false, "combineNum": 1, "columns": [ @@ -792,7 +792,7 @@ order: 67 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -1005,7 +1005,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -1303,7 +1303,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=5", + "api": "/api/mock2/sample?perPage=5", "body": [ { "type": "table", @@ -1361,7 +1361,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=10", + "api": "/api/mock2/sample?perPage=10", "body": [ { "type": "table", @@ -1410,7 +1410,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=10", + "api": "/api/mock2/sample?perPage=10", "body": [ { "type": "table", @@ -1448,7 +1448,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=10", + "api": "/api/mock2/sample?perPage=10", "body": [ { "type": "table", @@ -1494,7 +1494,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=10", + "api": "/api/mock2/sample?perPage=10", "body": [ { "type": "table", @@ -1544,7 +1544,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=10", + "api": "/api/mock2/sample?perPage=10", "body": [{ "type": "table", "source": "$rows", @@ -1586,7 +1586,7 @@ order: 67 ```schema: scope="body" { "type": "service", - "api": "/api/sample?perPage=10", + "api": "/api/mock2/sample?perPage=10", "body": [{ "type": "table", "source": "$rows", diff --git a/docs/zh-CN/concepts/linkage.md b/docs/zh-CN/concepts/linkage.md index a006dbf93..edd515b05 100755 --- a/docs/zh-CN/concepts/linkage.md +++ b/docs/zh-CN/concepts/linkage.md @@ -259,7 +259,7 @@ order: 14 }, { "type": "crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [ { "name": "id", @@ -306,7 +306,7 @@ order: 14 { "type": "crud", "name": "my_crud", - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [ { "name": "id", diff --git a/docs/zh-CN/concepts/schema.md b/docs/zh-CN/concepts/schema.md index a14122ed3..cc696c315 100755 --- a/docs/zh-CN/concepts/schema.md +++ b/docs/zh-CN/concepts/schema.md @@ -243,7 +243,7 @@ Page }, { "type": "crud", "className": "m-t-sm", - "api": "/api/sample", + "api": "/api/mock2/sample", "columns": [{ "name": "id", "label": "ID" diff --git a/docs/zh-CN/extend/tracker.md b/docs/zh-CN/extend/tracker.md index 467c9a404..2b45ec1ca 100644 --- a/docs/zh-CN/extend/tracker.md +++ b/docs/zh-CN/extend/tracker.md @@ -138,7 +138,7 @@ api 的来源有两方面,一个是各种组件的 api 及 source 配置,另 "eventType": "api", "eventData": { "method": "get", - "url": "/api/sample?page=1&perPage=10", + "url": "/api/mock2/sample?page=1&perPage=10", "query": { "page": 1, "perPage": 10 diff --git a/docs/zh-CN/index.md b/docs/zh-CN/index.md index d7c49cf57..5c06df08b 100644 --- a/docs/zh-CN/index.md +++ b/docs/zh-CN/index.md @@ -29,7 +29,7 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 "type": "crud", "draggable": true, "syncLocation": false, - "api": "/api/sample", + "api": "/api/mock2/sample", "keepItemSelectionOnPageChange": true, "autoGenerateFilter": true, "bulkActions": [ @@ -37,7 +37,7 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 "type": "button", "label": "批量删除", "actionType": "ajax", - "api": "delete:/api/sample/${ids|raw}", + "api": "delete:/api/mock2/sample/${ids|raw}", "confirmText": "确定要批量删除?" }, { @@ -49,7 +49,7 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 "name": "sample-bulk-edit", "body": { "type": "form", - "api": "/api/sample/bulkUpdate2", + "api": "/api/mock2/sample/bulkUpdate2", "body": [ { "type": "hidden", @@ -65,8 +65,8 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 } } ], - "quickSaveApi": "/api/sample/bulkUpdate", - "quickSaveItemApi": "/api/sample/$id", + "quickSaveApi": "/api/mock2/sample/bulkUpdate", + "quickSaveItemApi": "/api/mock2/sample/$id", "headerToolbar": [ "bulkActions", { @@ -74,7 +74,7 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 "label": "重置测试数据", "actionType": "ajax", "size": "sm", - "api": "/api/sample/reset" + "api": "/api/mock2/sample/reset" }, "export-excel", { @@ -160,7 +160,7 @@ amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可 "actionType": "ajax", "label": "删除", "confirmText": "您确认要删除?", - "api": "delete:/api/sample/$id" + "api": "delete:/api/mock2/sample/$id" } ] } diff --git a/docs/zh-CN/types/api.md b/docs/zh-CN/types/api.md index 15236ef93..6cd0d0e8d 100755 --- a/docs/zh-CN/types/api.md +++ b/docs/zh-CN/types/api.md @@ -450,7 +450,7 @@ API 还支持配置对象类型 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", @@ -476,7 +476,7 @@ API 还支持配置对象类型 ```schema: scope="body" { "type": "crud", - "api": "/api/sample?waitSeconds=1", + "api": "/api/mock2/sample?waitSeconds=1", "columns": [ { "name": "id", diff --git a/src/components/Overlay.tsx b/src/components/Overlay.tsx index 18f57db9d..4e373606a 100644 --- a/src/components/Overlay.tsx +++ b/src/components/Overlay.tsx @@ -295,6 +295,12 @@ export default class Overlay extends React.Component< {(ref: any) => { + if (React.isValidElement(child)) { + return React.cloneElement(child, { + ref: ref + }); + } + return
{child}
; }}