fix: 修复 popover 弹窗位置不对 (#3074)

This commit is contained in:
liaoxuezhi 2021-11-28 11:18:33 +08:00 committed by GitHub
parent c3fe0a5d8e
commit 8165d6000e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 123 additions and 117 deletions

View File

@ -264,7 +264,7 @@ icon 也可以是 url 地址,比如
{
"type": "crud",
"name": "crud",
"api": "/api/sample?waitSeconds=1",
"api": "/api/mock2/sample?waitSeconds=1",
"columns": [
{
"name": "id",

View File

@ -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",

View File

@ -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",

View File

@ -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

View File

@ -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",

View File

@ -55,7 +55,7 @@ icon:
```schema: scope="body"
{
"type": "crud",
"api": "/api/sample",
"api": "/api/mock2/sample",
"syncLocation": false,
"headerToolbar": [
{

View File

@ -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",

View File

@ -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",

View File

@ -243,7 +243,7 @@ Page
}, {
"type": "crud",
"className": "m-t-sm",
"api": "/api/sample",
"api": "/api/mock2/sample",
"columns": [{
"name": "id",
"label": "ID"

View File

@ -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

View File

@ -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"
}
]
}

View File

@ -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",

View File

@ -295,6 +295,12 @@ export default class Overlay extends React.Component<
<Portal container={container}>
<RootClose onRootClose={props.onHide}>
{(ref: any) => {
if (React.isValidElement(child)) {
return React.cloneElement(child, {
ref: ref
});
}
return <div ref={ref}>{child}</div>;
}}
</RootClose>