Merge branch 'master' into 280-6.3.0

This commit is contained in:
liaoxuezhi 2024-05-06 20:33:17 +08:00 committed by GitHub
commit 351c0a0e5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
155 changed files with 6321 additions and 1478 deletions

View File

@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:

View File

@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
@ -30,11 +30,26 @@ jobs:
cd packages/office-viewer
npm i --legacy-peer-deps
cd ../../
- name: build amis-formula
run: |
npm run build --workspace amis-formula
- name: build amis-core
run: |
npm run build --workspace amis-core
- name: build amis-ui
run: |
npm run build --workspace amis-ui
- name: build amis
run: |
npm run build --workspace amis
- name: check schema.json
run: |
cp ./packages/amis/schema.json .
- name: build amis-editor-core
run: |
npm run build --workspace amis-editor-core
- name: build amis-editor
run: |
npm run build --workspace amis-editor
- name: typescript check
env:

View File

@ -231,8 +231,8 @@ order: 36
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的值 | 更新数据 |

View File

@ -264,6 +264,188 @@ order: 6
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "button-group-select",
"label": "选项",
"name": "type",
"id": "clear_type",
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
},
{
"label": "Option C",
"value": "c"
}
],
"value": "b"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_type"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"data": {
"abc": {
"type": "c"
}
},
"body": [
{
"type": "button-group-select",
"label": "选项",
"name": "type",
"id": "reset_type",
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
},
{
"label": "Option C",
"value": "c"
}
],
"value": "b"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_type"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "button-group-select",
"label": "选项",
"name": "type",
"id": "reload_type",
"source": "/api/mock2/form/getOptions?waitSeconds=1"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "button-group-select",
"label": "选项",
"name": "type",
"id": "setvalue_type",
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
},
{
"label": "Option C",
"value": "c"
}
],
"value": "b"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_type",
"args": {
"value": "c"
}
}
]
}
}
}
]
}
```

View File

@ -102,6 +102,145 @@ order: 7
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` 更新的值 | 更新数据,多个值用`,`分隔 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "type",
"id": "clear_type",
"type": "chained-select",
"label": "链式下拉",
"source": "/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4",
"value": "a,b"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_type"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "type",
"id": "reset_type",
"type": "chained-select",
"label": "链式下拉",
"source": "/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4",
"value": "a,b"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_type"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "type",
"id": "reload_type",
"type": "chained-select",
"label": "链式下拉",
"source": "/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4",
"value": "a,b"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "type",
"id": "setvalue_type",
"type": "chained-select",
"label": "链式下拉",
"source": "/api/mock2/options/chainedOptions?waitSeconds=1&parentId=$parentId&level=$level&maxLevel=4",
"value": "a,b"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_type",
"args": {
"value": "c"
}
}
]
}
}
}
]
}
```

View File

@ -143,8 +143,112 @@ order: 8
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string \|number \|boolean` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string \|number \|boolean` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkbox",
"label": "选项",
"name": "type",
"id": "clear_type",
"option": "选项说明",
"value": true
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_type"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkbox",
"label": "选项",
"name": "type",
"id": "reset_type",
"option": "选项说明",
"value": true
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkbox",
"label": "选项",
"name": "type",
"id": "setvalue_type",
"option": "选项说明",
"value": true
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_type",
"args": {
"value": false
}
}
]
}
}
}
]
}
```

View File

@ -682,6 +682,183 @@ order: 9
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` 更新的值 | 更新数据,多个值用`,`分隔 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkboxes",
"label": "选项",
"name": "type",
"id": "clear_type",
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
},
{
"label": "Option C",
"value": "c"
}
],
"value": "b"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_type"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkboxes",
"label": "选项",
"name": "type",
"id": "reset_type",
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
},
{
"label": "Option C",
"value": "c"
}
],
"value": "b"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_type"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkboxes",
"label": "选项",
"name": "type",
"id": "reload_type",
"source": "/api/mock2/form/getOptions?waitSeconds=1"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "checkboxes",
"label": "选项",
"name": "type",
"id": "setvalue_type",
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
},
{
"label": "Option C",
"value": "c"
}
],
"value": "b"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_type",
"args": {
"value": "c"
}
}
]
}
}
}
]
}
```

View File

@ -1134,9 +1134,113 @@ combo 还有一个作用是增加层级,比如返回的数据是一个深层
| -------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| addItem | `item: object` 新增项的值 | 只有开启`multiple`模式才能使用, `multiple`模式下,给新增项添加默认值 |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: object \| Array<object>` 更新的值<br/>`index?: number` 指定更新的数据索引, 1.10.1 及以上版本引入 | 更新数据,对象数组针对开启`multiple`模式, `multiple`模式下可以通过指定`index`来更新指定索引的数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "combo",
"name": "type",
"id": "clear_type",
"label": "用户",
"items": [
{
"name": "text",
"label": "名字",
"type": "input-text"
},
{
"name": "gender",
"label": "性别",
"type": "select",
"options": [
"男",
"女"
]
}
],
"value": {
"text": "amis",
"gender": "男"
}
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_type"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "combo",
"name": "type",
"id": "reset_type",
"label": "用户",
"items": [
{
"name": "text",
"label": "名字",
"type": "input-text"
},
{
"name": "gender",
"label": "性别",
"type": "select",
"options": [
"男",
"女"
]
}
],
"value": {
"text": "amis",
"gender": "男"
}
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_type"
}
]
}
}
}
]
}
```
### setValue
#### 复制数值
@ -1145,12 +1249,12 @@ combo 还有一个作用是增加层级,比如返回的数据是一个深层
此示例主要用来演示如何通过已有数据快速填充 combo 某条数据。点击 copy 按钮会弹出一个 crud 列表,点击对应行上的复制按钮,将选中数据填充到外层的 combo.
注意事项:
1. 需要给 combo 设置个 id 属性,用来给事件动作指定目标用。
2. 弹窗按钮配置了数据映射 `{comboIndex: "${index}"}` 因为 crud 的行数据上也有 index 变量,派送动作时获取 index 变量是 crud 所在行的序号。所以弹出弹窗的时候,先把 combo 的序号赋值给 comboIndex
3. crud 操作栏里面添加了个按钮close: true 设置是让动作完成后关闭弹窗。
4. 按钮里面添加了 onEvent 配置click 时做 `setValue` 动作,并设置参数 index 为 '${comboIndex}' 值为 `${&}`。其中 `${&}` 是特殊语法,用来取整个上下数据。
> 注意事项:
>
> 1. 需要给 combo 设置个 id 属性,用来给事件动作指定目标用。
> 2. 弹窗按钮配置了数据映射 `{comboIndex: "${index}"}` 因为 crud 的行数据上也有 index 变量,派送动作时获取 index 变量是 crud 所在行的序号。所以弹出弹窗的时候,先把 combo 的序号赋值给 comboIndex
> 3. crud 操作栏里面添加了个按钮close: true 设置是让动作完成后关闭弹窗。
> 4. 按钮里面添加了 onEvent 配置click 时做 `setValue` 动作,并设置参数 index 为 '${comboIndex}' 值为 `${&}`。其中 `${&}` 是特殊语法,用来取整个上下数据。
```schema: scope="body"
{

View File

@ -100,9 +100,146 @@ order: 17
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| focus | - | 获取焦点,焦点落在右侧编辑面板 |
| setValue | `value: string` 更新的右侧编辑面板中的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| focus | - | 获取焦点,焦点落在右侧编辑面板 |
| setValue | `value: string` 更新的右侧编辑面板中的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "diff-editor",
"name": "diff",
"id": "clear_text",
"label": "Diff-Editor",
"diffValue": "hello world",
"value": "hello"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"id": "reset_text",
"type": "diff-editor",
"name": "diff",
"label": "Diff-Editor",
"diffValue": "hello world",
"value": "hello"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### focus
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"id": "focus_text",
"type": "diff-editor",
"name": "diff",
"label": "Diff-Editor",
"diffValue": "hello world",
"value": "hello"
},
{
"type": "button",
"label": "聚焦",
"onEvent": {
"click": {
"actions": [
{
"actionType": "focus",
"componentId": "focus_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"id": "setvalue_text",
"type": "diff-editor",
"name": "diff",
"label": "Diff-Editor",
"diffValue": "hello world",
"value": "hello"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "amis go go go!"
}
}
]
}
}
}
]
}
```

View File

@ -181,9 +181,142 @@ amis 的编辑器是基于 monaco 开发的,如果想进行深度定制,比
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| focus | - | 获取焦点 |
| setValue | `value: string` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| focus | - | 获取焦点 |
| setValue | `value: string` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "editor",
"name": "editor",
"label": "编辑器",
"id": "clear_text",
"value": "hello"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "editor",
"id": "reset_text",
"name": "editor",
"label": "编辑器",
"value": "hello"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### focus
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "editor",
"id": "focus_text",
"name": "editor",
"label": "编辑器",
"value": "hello"
},
{
"type": "button",
"label": "聚焦",
"onEvent": {
"click": {
"actions": [
{
"actionType": "focus",
"componentId": "focus_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "editor",
"id": "setvalue_text",
"name": "editor",
"label": "编辑器",
"value": "hello"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "amis go go go!"
}
}
]
}
}
}
]
}
```

View File

@ -145,8 +145,109 @@ order: 10
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string \| number` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string \| number` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "city",
"type": "input-city",
"label": "城市",
"id": "clear_text",
"value": "110000"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "city",
"type": "input-city",
"label": "城市",
"id": "reset_text",
"value": "110000"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "city",
"type": "input-city",
"label": "城市",
"id": "setvalue_text",
"value": "110000"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "110100"
}
}
]
}
}
}
]
}
```

View File

@ -234,58 +234,58 @@ order: 15
> `3.5.0`及以上版本
默认情况下日期范围选择器组件的绑定值的开始时间为所选时间当天的0点使用`moment().startOf('day')`处理结束时间为所选时间当天的23时59分59秒999毫秒使用`moment().endOf('day')`处理)。如果设置了`timeFormat`(时间格式),则会基于`timeFormat`配置决定**最小时间单位**,举例:
默认情况下,日期范围选择器组件的绑定值的开始时间为所选时间当天的 0 点(使用`moment().startOf('day')`处理),结束时间为所选时间当天的 23 59 59 999 毫秒(使用`moment().endOf('day')`处理)。如果设置了`timeFormat`(时间格式),则会基于`timeFormat`配置决定**最小时间单位**,举例:
- 不设置`timeFormat`(时间格式),默认按照天(day)级处理:
```typescript
moment().startOf('day'); // 2008-08-08 00:00:00.000
moment().endOf('day'); // 2008-08-08 23:59:59.999
```
```typescript
moment().startOf('day'); // 2008-08-08 00:00:00.000
moment().endOf('day'); // 2008-08-08 23:59:59.999
```
- `timeFormat`(时间格式)为 `"HH:mm:ss"`,则会按照秒(second)级处理:
```typescript
moment().startOf('second'); // 2008-08-08 08:08:08.000
moment().endOf('second'); // 2008-08-08 08:08:08.999
```
```typescript
moment().startOf('second'); // 2008-08-08 08:08:08.000
moment().endOf('second'); // 2008-08-08 08:08:08.999
```
- `timeFormat`(时间格式)为 `"HH:mm"`,则会按照分钟(minute)级处理:
```typescript
moment().startOf('minute'); // 2008-08-08 08:08:00.000
moment().endOf('minute'); // 2008-08-08 08:08:59.999
```
```typescript
moment().startOf('minute'); // 2008-08-08 08:08:00.000
moment().endOf('minute'); // 2008-08-08 08:08:59.999
```
- `timeFormat`(时间格式)为 `"HH"`,则会按照小时(hour)级处理:
```typescript
moment().startOf('hour'); // 2008-08-08 08:00:00.000
moment().endOf('hour'); // 2008-08-08 08:59:59.999
```
```typescript
moment().startOf('hour'); // 2008-08-08 08:00:00.000
moment().endOf('hour'); // 2008-08-08 08:59:59.999
```
部分情况下,即使配置`timeFormat`也无法满足需求,此时可以使用`transform`函数对时间值做进一步处理, 函数签名如下:
```typescript
interface TransFormFunc {
(
/* 当前值Moment对象 */
value: moment.Moment,
config: {
/* 操作类型start起始时间end结束时间 */
type: 'start' | 'end';
/* 初始值,最近一次选择的时间值 */
originValue: moment.Moment,
/* 时间格式 */
timeFormat: string
},
/* 当前组件的属性 */
props: any,
/* 当前组件数据域 */
data: any,
/* moment函数 */
moment: moment
): moment.Moment;
(
/* 当前值Moment对象 */
value: moment.Moment,
config: {
/* 操作类型start起始时间end结束时间 */
type: 'start' | 'end';
/* 初始值,最近一次选择的时间值 */
originValue: moment.Moment;
/* 时间格式 */
timeFormat: string;
},
/* 当前组件的属性 */
props: any,
/* 当前组件数据域 */
data: any,
/* moment函数 */
moment: moment
): moment.Moment;
}
```
@ -316,46 +316,42 @@ interface TransFormFunc {
```typescript
function transform(value, config, props, data) {
const now = moment();
const now = moment();
if (config.type === 'end') {
value.set({
hours: now.hours(),
minutes: now.minutes(),
seconds: now.seconds(),
milliseconds: now.milliseconds()
});
}
if (config.type === 'end') {
value.set({
hours: now.hours(),
minutes: now.minutes(),
seconds: now.seconds(),
milliseconds: now.milliseconds()
});
}
return value;
return value;
}
```
## 属性表
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------- |
| valueFormat | `string` | `X` | [日期选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD` | [日期选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择日期范围"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{label: string; startDate: string; endDate: string}>` | `"yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter"` | 日期范围快捷键 | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2days |
| maxDuration | `string` | | 限制最大跨度1year |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| transform | `string` | | 日期数据处理函数,用来处理选择日期之后的的值,返回值为 `Moment`对象 | `3.5.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------- | ----------------------- |
| valueFormat | `string` | `X` | [日期选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD` | [日期选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择日期范围"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{label: string; startDate: string; endDate: string}>` | `"yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter"` | 日期范围快捷键 | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2days |
| maxDuration | `string` | | 限制最大跨度1year |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| transform | `string` | | 日期数据处理函数,用来处理选择日期之后的的值,返回值为 `Moment`对象 | `3.5.0` |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -376,5 +372,106 @@ function transform(value, config, props, data) {
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | ----------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间区间值,用`,`隔开 | 更新数据,,依赖格式`format`,例如:'1650556800,1652889599' |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-date-range",
"name": "date",
"label": "日期",
"id": "clear_text",
"value": "1714060800,1714319999"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-date-range",
"name": "date",
"label": "日期",
"id": "reset_text",
"value": "1714060800,1714319999"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-date-range",
"name": "date",
"label": "日期",
"id": "setvalue_text",
"value": "1714060800,1714319999"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "1714060800,1714492799"
}
}
]
}
}
}
]
}
```

View File

@ -412,20 +412,21 @@ order: 13
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | -------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------- |
| value | `string` | | [默认值](./date#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 日期选择器值格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD` | 日期选择器显示格式,即时间戳格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| closeOnSelect | `boolean` | `false` | 点选日期后,是否马上关闭选择框 |
| placeholder | `string` | `"请选择日期"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{"label": string; date: string}>` | | 日期快捷键,字符串格式为预设值,对象格式支持写表达式 | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期 |
| maxDate | `string` | | 限制最大日期 |
| utc | `boolean` | `false` | 保存 utc 值 |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| disabledDate | `string` | | 用字符函数来控制哪些天不可以被点选 |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | -------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------- |
| value | `string` | | [默认值](./date#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 日期选择器值格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD` | 日期选择器显示格式,即时间戳格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| closeOnSelect | `boolean` | `false` | 点选日期后,是否马上关闭选择框 |
| placeholder | `string` | `"请选择日期"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{"label": string; date: string}>` | | 日期快捷键,字符串格式为预设值,对象格式支持写表达式 | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期 |
| maxDate | `string` | | 限制最大日期 |
| utc | `boolean` | `false` | 保存 utc 值 |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| disabledDate | `string` | | 用字符函数来控制哪些天不可以被点选 |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -443,8 +444,109 @@ order: 13
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1650556800' |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1650556800' |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-date",
"name": "date",
"label": "日期",
"id": "clear_text",
"value": "1714060800"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-date",
"name": "date",
"label": "日期",
"id": "reset_text",
"value": "1714060800"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-date",
"name": "date",
"label": "日期",
"id": "setvalue_text",
"value": "1714060800"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "1714233600"
}
}
]
}
}
}
]
}
```

View File

@ -126,18 +126,19 @@ order: 16
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------- |
| valueFormat | `string` | `X` | [日期时间选择器值格式](./input-datetime#%E5%80%BC%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD` | [日期时间选择器显示格式](./input-datetime#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择日期范围"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{label: string; startDate: string; endDate: string}>` | `"yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter"` | 日期范围快捷键,详情参考[快捷键](./input-date-range#快捷键) | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期时间,用法同 [限制范围](./input-datetime#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期时间,用法同 [限制范围](./input-datetime#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| utc | `boolean` | `false` | [保存 UTC 值](./input-datetime#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------- |
| valueFormat | `string` | `X` | [日期时间选择器值格式](./input-datetime#%E5%80%BC%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD` | [日期时间选择器显示格式](./input-datetime#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择日期范围"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{label: string; startDate: string; endDate: string}>` | `"yesterday,7daysago,prevweek,thismonth,prevmonth,prevquarter"` | 日期范围快捷键,详情参考[快捷键](./input-date-range#快捷键) | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期时间,用法同 [限制范围](./input-datetime#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期时间,用法同 [限制范围](./input-datetime#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| utc | `boolean` | `false` | [保存 UTC 值](./input-datetime#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -158,5 +159,5 @@ order: 16
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | -------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间区间值,用`,`隔开 | 更新数据,依赖格式`format`,例如 '1650556800,1652889599' |

View File

@ -411,21 +411,22 @@ order: 14
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| --------------- | -------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------- |
| value | `string` | | [默认值](./datetime#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 日期时间选择器值格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD HH:mm:ss` | 日期时间选择器显示格式,即时间戳格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择日期以及时间"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{"label": string; date: string}>` | | 日期时间快捷键 | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期时间 |
| maxDate | `string` | | 限制最大日期时间 |
| utc | `boolean` | `false` | 保存 utc 值 |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联 |
| timeConstraints | `object` | `true` | 请参考 [input-time](./input-time#控制输入范围) 里的说明 |
| isEndDate | `boolean` | `false` | 如果配置为 true会自动默认为 23:59:59 秒 |
| disabledDate | `string` | | 用字符函数来控制哪些天不可以被点选 |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | -------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------- |
| value | `string` | | [默认值](./datetime#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 日期时间选择器值格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| displayFormat | `string` | `YYYY-MM-DD HH:mm:ss` | 日期时间选择器显示格式,即时间戳格式,更多格式类型请参考 [文档](https://momentjs.com/docs/#/displaying/format/) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择日期以及时间"` | 占位文本 |
| shortcuts | `string \| string[] \| Array<{"label": string; date: string}>` | | 日期时间快捷键 | `3.1.0`版本后支持表达式 |
| minDate | `string` | | 限制最小日期时间 |
| maxDate | `string` | | 限制最大日期时间 |
| utc | `boolean` | `false` | 保存 utc 值 |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联 |
| timeConstraints | `object` | `true` | 请参考 [input-time](./input-time#控制输入范围) 里的说明 |
| isEndDate | `boolean` | `false` | 如果配置为 true会自动默认为 23:59:59 秒 |
| disabledDate | `string` | | 用字符函数来控制哪些天不可以被点选 |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0`版本后支持 |
## 事件表
@ -443,8 +444,8 @@ order: 14
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1650556800' |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1650556800' |

View File

@ -275,17 +275,16 @@ interface InputExcelData {
}
```
## 属性表
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------ | ----------------------- | ------------------------------- | ------------------ | ------- |
| allSheets | `boolean` | false | 是否解析所有 sheet |
| parseMode | `'array'``'object'` | 'object' | 解析模式 |
| includeEmpty | `boolean` | true | 是否包含空值 |
| plainText | `boolean` | true | 是否解析为纯文本 |
| placeholder | `string` | `"拖拽 Excel 到这,或点击上传"` | 占位文本提示 | `2.8.1` |
| autoFill | `Record<string, string>` | | 自动填充 | `3.5.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------ | ------------------------ | ------------------------------- | ------------------ | ------- |
| allSheets | `boolean` | false | 是否解析所有 sheet |
| parseMode | `'array'``'object'` | 'object' | 解析模式 |
| includeEmpty | `boolean` | true | 是否包含空值 |
| plainText | `boolean` | true | 是否解析为纯文本 |
| placeholder | `string` | `"拖拽 Excel 到这,或点击上传"` | 占位文本提示 | `2.8.1` |
| autoFill | `Record<string, string>` | | 自动填充 | `3.5.0` |
## 事件表
@ -301,8 +300,117 @@ interface InputExcelData {
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: Array<object>` 更新的 excel 解析后数据 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: Array<object>` 更新的 excel 解析后数据 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-excel",
"name": "excel",
"label": "上传 Excel",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-excel",
"name": "excel",
"label": "上传 Excel",
"id": "reset_text",
"value": [
{
"ID": "1",
"NAME": "amis"
}
]
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-excel",
"name": "excel",
"label": "上传 Excel",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": [
{
"ID": "1",
"NAME": "amis"
}
]
}
}
]
}
}
}
]
}
```

View File

@ -185,7 +185,7 @@ order: 21
## 作为表单项上传
如果不希望 InputFile 组件在提交Form之前上传可以配置 `asBlob` 或者 `asBase64`,采用这种方式后,组件不再自己上传了,而是直接把文件数据作为表单项的值,文件内容会在 Form 表单提交的接口里面一起带上。
如果不希望 InputFile 组件在提交 Form 之前上传,可以配置 `asBlob` 或者 `asBase64`,采用这种方式后,组件不再自己上传了,而是直接把文件数据作为表单项的值,文件内容会在 Form 表单提交的接口里面一起带上。
```schema: scope="body"
{
@ -435,7 +435,6 @@ order: 21
}
```
## 属性表
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
@ -502,3 +501,36 @@ order: 21
| 动作名称 | 动作配置 | 说明 |
| -------- | -------- | ---- |
| clear | - | 清空 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-file",
"name": "file",
"label": "File",
"accept": "*",
"receiver": "/api/upload/file",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```

View File

@ -733,3 +733,35 @@ app.listen(8080, function () {});
| 动作名称 | 动作配置 | 说明 |
| -------- | -------- | ---- |
| clear | - | 清空 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-image",
"name": "image",
"label": "Image",
"receiver": "/api/upload/file",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```

View File

@ -222,8 +222,8 @@ key 只能是字符串,因此输入格式是 `input-text`,但 value 格式
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: object` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: object` 更新的值 | 更新数据 |

View File

@ -67,20 +67,21 @@ order: 15
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ----------- | --------- | ------------------ | ---------------------------------------------------------------------------- | ------- |
| format | `string` | `X` | [日期选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) |
| inputFormat | `string` | `YYYY-DD` | [日期选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) |
| placeholder | `string` | `"请选择月份范围"` | 占位文本 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2days |
| maxDuration | `string` | | 限制最大跨度1year |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | --------- | ------------------ | ---------------------------------------------------------------------------- | ------- |
| format | `string` | `X` | [日期选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) |
| inputFormat | `string` | `YYYY-DD` | [日期选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) |
| placeholder | `string` | `"请选择月份范围"` | 占位文本 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2days |
| maxDuration | `string` | | 限制最大跨度1year |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -101,5 +102,5 @@ order: 15
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | -------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间区间值,用`,`隔开 | 更新数据,依赖格式`format`,例如 '1646064000,1651334399' |

View File

@ -146,13 +146,14 @@ order: 81
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | --------- | -------------- | ----------------------------------------------------------------------------------- | ------- |
| value | `string` | | [默认值](./date#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 月份选择器值格式,更多格式类型请参考 [moment](http://momentjs.com/) | `3.4.0` |
| displayFormat | `string` | `YYYY-MM` | 月份选择器显示格式,即时间戳格式,更多格式类型请参考 [moment](http://momentjs.com/) | `3.4.0` |
| placeholder | `string` | `"请选择月份"` | 占位文本 |
| clearable | `boolean` | `true` | 是否可清除 |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | --------- | -------------- | ----------------------------------------------------------------------------------- | ------- |
| value | `string` | | [默认值](./date#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 月份选择器值格式,更多格式类型请参考 [moment](http://momentjs.com/) | `3.4.0` |
| displayFormat | `string` | `YYYY-MM` | 月份选择器显示格式,即时间戳格式,更多格式类型请参考 [moment](http://momentjs.com/) | `3.4.0` |
| placeholder | `string` | `"请选择月份"` | 占位文本 |
| clearable | `boolean` | `true` | 是否可清除 |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -170,8 +171,8 @@ order: 81
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`valueFormat`,例如:'1646064000' |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | --------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`valueFormat`,例如:'1646064000' |

View File

@ -314,3 +314,104 @@ order: 32
| clear | - | 清空 |
| reset | - | 将值重置为 `resetValue`,若没有配置 `resetValue`,则清空 |
| setValue | `value: number` 更新的数值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-number",
"name": "number",
"label": "数字",
"id": "clear_text",
"value": 1
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-number",
"name": "number",
"label": "数字",
"id": "reset_text",
"value": 1
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-number",
"name": "number",
"label": "数字",
"id": "setvalue_text",
"value": 1
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": 2
}
}
]
}
}
}
]
}
```

View File

@ -66,20 +66,21 @@ order: 15
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | --------- | ------------------ | ---------------------------------------------------------------------------- | ------- |
| valueFormat | `string` | `X` | [日期选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| displayFormat | `string` | `YYYY-DD` | [日期选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| placeholder | `string` | `"请选择季度范围"` | 占位文本 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2quarter |
| maxDuration | `string` | | 限制最大跨度4quarter |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | --------- | ------------------ | ---------------------------------------------------------------------------- | ------- |
| valueFormat | `string` | `X` | [日期选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| displayFormat | `string` | `YYYY-DD` | [日期选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| placeholder | `string` | `"请选择季度范围"` | 占位文本 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2quarter |
| maxDuration | `string` | | 限制最大跨度4quarter |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -100,5 +101,5 @@ order: 15
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | -------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间区间值,用`,`隔开 | 更新数据,依赖格式`format`,例如 '1640966400,1664553600' |

View File

@ -42,8 +42,8 @@ order: 62
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1640966400' |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1640966400' |

View File

@ -232,7 +232,7 @@ order: 38
## 显示单位
在打开`showInput`输入框且设置了`unit`单位的前提下,开启`showInputUnit`可在input框中显示已配置的单位。
在打开`showInput`输入框且设置了`unit`单位的前提下,开启`showInputUnit`可在 input 框中显示已配置的单位。
```schema: scope="body"
{
@ -311,18 +311,18 @@ order: 38
| showSteps | `boolean` | `false` | 是否显示步长 |
| parts | `number` or `number[]` | `1` | 分割的块数<br/>主持数组传入分块的节点 |
| marks | <code>{ [number &#124; string]: string &#124; number &#124; SchemaObject }</code> or <code>{ [number &#124; string]: { style: CSSProperties, label: string } }</code> | | 刻度标记<br/>- 支持自定义样式<br/>- 设置百分比 |
| tooltipVisible | `boolean` | `false` | 是否显示滑块标签 |
| tooltipPlacement | `auto` or `bottom` or `left` or `right` | `top` | 滑块标签的位置,默认`auto`,方向自适应<br/>前置条件tooltipVisible 不为 false 时有效 |
| tipFormatter | `function` | | 控制滑块标签显隐函数<br/>前置条件tooltipVisible 不为 false 时有效 |
| multiple | `boolean` | `false` | 支持选择范围 |
| joinValues | `boolean` | `true` | 默认为 `true`,选择的 `value` 会通过 `delimiter` 连接起来,否则直接将以`{min: 1, max: 100}`的形式提交<br/>前置条件:开启`multiple`时有效 |
| delimiter | `string` | `,` | 分隔符 |
| unit | `string` | | 单位 |
| clearable | `boolean` | `false` | 是否可清除<br/>前置条件:开启`showInput`时有效 |
| showInput | `boolean` | `false` | 是否显示输入框 |
| showInputUnit | `boolean` | `false` | 是否显示输入框单位<br/>前置条件:开启`showInput`且配置了`unit`单位时有效 |`6.0.0`后支持变量
| onChange | `function` | | 当 组件 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入 |
| onAfterChange | `function` | | 与 `onmouseup` 触发时机一致,把当前值作为参数传入 |
| tooltipVisible | `boolean` | `false` | 是否显示滑块标签 |
| tooltipPlacement | `auto` or `bottom` or `left` or `right` | `top` | 滑块标签的位置,默认`auto`,方向自适应<br/>前置条件tooltipVisible 不为 false 时有效 |
| tipFormatter | `function` | | 控制滑块标签显隐函数<br/>前置条件tooltipVisible 不为 false 时有效 |
| multiple | `boolean` | `false` | 支持选择范围 |
| joinValues | `boolean` | `true` | 默认为 `true`,选择的 `value` 会通过 `delimiter` 连接起来,否则直接将以`{min: 1, max: 100}`的形式提交<br/>前置条件:开启`multiple`时有效 |
| delimiter | `string` | `,` | 分隔符 |
| unit | `string` | | 单位 |
| clearable | `boolean` | `false` | 是否可清除<br/>前置条件:开启`showInput`时有效 |
| showInput | `boolean` | `false` | 是否显示输入框 |
| showInputUnit | `boolean` | `false` | 是否显示输入框单位<br/>前置条件:开启`showInput`且配置了`unit`单位时有效 | `6.0.0`后支持变量 |
| onChange | `function` | | 当 组件 的值发生改变时,会触发 onChange 事件,并把改变后的值作为参数传入 |
| onAfterChange | `function` | | 与 `onmouseup` 触发时机一致,把当前值作为参数传入 |
## 事件表
@ -433,8 +433,109 @@ order: 38
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------------------------------------- | ---------------------------------------------------------- |
| clear | - | 清除输入框<br />前置条件showInput 和 clearable 都为 true |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: number \| string \| {min: number, max: number}` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------------------------------------------- | ------------------------------------------------ |
| clear | - | 清除输入框 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: number \| string \| {min: number, max: number}` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-range",
"label": "滑块",
"name": "range",
"value": 20,
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-range",
"label": "滑块",
"name": "range",
"value": 20,
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-range",
"label": "滑块",
"name": "range",
"value": 20,
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": 30
}
}
]
}
}
}
]
}
```

View File

@ -174,8 +174,115 @@ order: 37
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: number` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: number` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-rating",
"name": "rating",
"label": "评分",
"count": 5,
"value": 3.5,
"half": true,
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-rating",
"name": "rating",
"label": "评分",
"count": 5,
"value": 3.5,
"half": true,
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-rating",
"name": "rating",
"label": "评分",
"count": 5,
"value": 3.5,
"half": true,
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": 4
}
}
]
}
}
}
]
}
```

View File

@ -2549,7 +2549,7 @@ order: 54
"label": "表格表单",
"id": "reset-input-table",
"name": "table",
"resetValue": [
"value": [
{
"a": "a-resetValue1",
"b": "b-resetValue1"

View File

@ -256,6 +256,164 @@ order: 55
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` 更新的值 | 更新数据,多个值用`,`分隔 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-tag",
"name": "tag",
"label": "标签",
"placeholder": "请选择标签",
"options": [
"Aaron Rodgers",
"Tom Brady",
"Charlse Woodson",
"Aaron Jones"
],
"value": "Charlse Woodson",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-tag",
"name": "tag",
"label": "标签",
"placeholder": "请选择标签",
"options": [
"Aaron Rodgers",
"Tom Brady",
"Charlse Woodson",
"Aaron Jones"
],
"value": "Charlse Woodson",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-tag",
"name": "tag",
"label": "标签",
"placeholder": "请选择标签",
"id": "reload_type",
"source": "/api/mock2/form/getOptions?waitSeconds=1",
"value": "a"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-tag",
"name": "tag",
"label": "标签",
"placeholder": "请选择标签",
"options": [
"Aaron Rodgers",
"Tom Brady",
"Charlse Woodson",
"Aaron Jones"
],
"value": "Charlse Woodson",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "Tom Brady"
}
}
]
}
}
}
]
}
```

View File

@ -626,3 +626,173 @@ order: 56
| focus | - | 获取焦点 |
| reload | - | 刷新(重新加载),只针对配置了`source`的输入框有效 |
| setValue | `value: string` 更新的值 | 更新数据,开启`multiple`多选时用`,`分隔 |
### clear
如果配置了`clearValueOnEmpty: true`,则清空时将置为`undefined`,否则置为空字符串。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "clear_text",
"type": "input-text",
"label": "text",
"value": "清空我"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "reset_text",
"type": "input-text",
"label": "text",
"value": "重置我"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### focus
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "focus_text",
"type": "input-text",
"label": "text",
"value": "聚焦我"
},
{
"type": "button",
"label": "聚焦",
"onEvent": {
"click": {
"actions": [
{
"actionType": "focus",
"componentId": "focus_text"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "reload_text",
"type": "input-text",
"label": "text",
"value": "a",
"source": "/api/mock2/form/getOptions?waitSeconds=1"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "setvalue_text",
"type": "input-text",
"label": "text",
"value": "amis"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "amis go go go!"
}
}
]
}
}
}
]
}
```

View File

@ -88,15 +88,16 @@ order: 15
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | --------- | ------------------ | --------------------------------------------------------------------- | ------- |
| valueFormat | `string` | `HH:mm` | [时间范围选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| displayFormat | `string` | `HH:mm` | [时间范围选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| placeholder | `string` | `"请选择时间范围"` | 占位文本 |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | --------- | ------------------ | --------------------------------------------------------------------- | ------- |
| valueFormat | `string` | `HH:mm` | [时间范围选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| displayFormat | `string` | `HH:mm` | [时间范围选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| placeholder | `string` | `"请选择时间范围"` | 占位文本 |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| extraName | `string` | | 是否存成两个字段 | `3.3.0` |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -117,5 +118,5 @@ order: 15
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | -------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间区间值,用`,`隔开 | 更新数据,依赖格式`format`,例如 '1617206400,1743436800' |

View File

@ -250,14 +250,15 @@ order: 58
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| --------------- | --------- | -------------- | ----------------------------------------------------------------------------------- | ---------------- |
| value | `string` | | [默认值](./date#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 时间选择器值格式,更多格式类型请参考 [moment](http://momentjs.com/) | 3.4.0 版本后支持 |
| displayFormat | `string` | `HH:mm` | 时间选择器显示格式,即时间戳格式,更多格式类型请参考 [moment](http://momentjs.com/) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择时间"` | 占位文本 |
| clearable | `boolean` | `true` | 是否可清除 |
| timeConstraints | `object` | `true` | |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | --------- | -------------- | ----------------------------------------------------------------------------------- | ---------------- |
| value | `string` | | [默认值](./date#%E9%BB%98%E8%AE%A4%E5%80%BC) |
| valueFormat | `string` | `X` | 时间选择器值格式,更多格式类型请参考 [moment](http://momentjs.com/) | 3.4.0 版本后支持 |
| displayFormat | `string` | `HH:mm` | 时间选择器显示格式,即时间戳格式,更多格式类型请参考 [moment](http://momentjs.com/) | 3.4.0 版本后支持 |
| placeholder | `string` | `"请选择时间"` | 占位文本 |
| clearable | `boolean` | `true` | 是否可清除 |
| timeConstraints | `object` | `true` | |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -275,8 +276,8 @@ order: 58
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1648746120' |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1648746120' |

View File

@ -1453,5 +1453,139 @@ true false false [{label: 'A/B/C', value: 'a/b/c'},{label: 'A
| delete | value: ` any` | 删除数据项的 value如果配置了 valueField以 valueField 的字段值为准) |
| reload | - | 刷新 |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-tree",
"name": "tree",
"label": "Tree",
"options": [
{
"label": "Folder A",
"value": 1,
"children": [
{
"label": "file A",
"value": 2
},
{
"label": "Folder B",
"value": 3,
"children": [
{
"label": "file b1",
"value": 3.1
},
{
"label": "file b2",
"value": 3.2
}
]
}
]
},
{
"label": "file C",
"value": 4
},
{
"label": "file D",
"value": 5
}
],
"value": 5,
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "input-tree",
"name": "tree",
"label": "Tree",
"options": [
{
"label": "Folder A",
"value": 1,
"children": [
{
"label": "file A",
"value": 2
},
{
"label": "Folder B",
"value": 3,
"children": [
{
"label": "file b1",
"value": 3.1
},
{
"label": "file b2",
"value": 3.2
}
]
}
]
},
{
"label": "file C",
"value": 4
},
{
"label": "file D",
"value": 5
}
],
"value": 5,
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```

View File

@ -67,19 +67,20 @@ order: 15
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------- | --------- | ------------------ | ---------------------------------------------------------------------------- | ------- |
| valueFormat | `string` | `X` | [年份选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| displayFormat | `string` | `YYYY` | [年份选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| placeholder | `string` | `"请选择年份范围"` | 占位文本 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2year |
| maxDuration | `string` | | 限制最大跨度4year |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ------------------------ | --------- | ------------------ | ---------------------------------------------------------------------------- | ------- |
| valueFormat | `string` | `X` | [年份选择器值格式](./date#%E5%80%BC%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| displayFormat | `string` | `YYYY` | [年份选择器显示格式](./date#%E6%98%BE%E7%A4%BA%E6%A0%BC%E5%BC%8F) | `3.4.0` |
| placeholder | `string` | `"请选择年份范围"` | 占位文本 |
| minDate | `string` | | 限制最小日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| maxDate | `string` | | 限制最大日期,用法同 [限制范围](./date#%E9%99%90%E5%88%B6%E8%8C%83%E5%9B%B4) |
| minDuration | `string` | | 限制最小跨度,如: 2year |
| maxDuration | `string` | | 限制最大跨度4year |
| utc | `boolean` | `false` | [保存 UTC 值](./date#utc) |
| clearable | `boolean` | `true` | 是否可清除 |
| embed | `boolean` | `false` | 是否内联模式 |
| animation | `boolean` | `true` | 是否启用游标动画 | `2.2.0` |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 | `6.4.0` |
## 事件表
@ -100,5 +101,5 @@ order: 15
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | -------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间区间值,用`,`隔开 | 更新数据,依赖格式`format`,例如 '1648746120,1648760760' |

View File

@ -42,8 +42,8 @@ order: 61
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1617206400' |
| 动作名称 | 动作配置 | 说明 |
| -------- | ---------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` 更新的时间值 | 更新数据,依赖格式`format`,例如:'1617206400' |

View File

@ -147,6 +147,176 @@ ListSelect 一般用来实现选择,可以单选也可以多选,和 Radio/Ch
| 动作名称 | 动作配置 | 说明 |
| -------- | -------------------------------------- | --------------------------------------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "list-select",
"name": "select",
"label": "单选",
"clearable": true,
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
}
],
"value": "a",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "list-select",
"name": "select",
"label": "单选",
"clearable": true,
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
}
],
"value": "a",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "list-select",
"name": "select",
"label": "单选",
"clearable": true,
"id": "reload_type",
"source": "/api/mock2/form/getOptions?waitSeconds=1",
"value": "a"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "list-select",
"name": "select",
"label": "单选",
"clearable": true,
"options": [
{
"label": "Option A",
"value": "a"
},
{
"label": "Option B",
"value": "b"
}
],
"value": "a",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "b"
}
}
]
}
}
}
]
}
```

View File

@ -123,8 +123,129 @@ order: 30
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | -------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value` | 参考 [`LocationData`](#LocationData) |
| 动作名称 | 动作配置 | 说明 |
| -------- | -------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value` | 参考 [`LocationData`](#LocationData) |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "location-picker",
"name": "location",
"ak": "LiZT5dVbGTsPI91tFGcOlSpe5FDehpf7",
"label": "地址",
"value": {
"address":"北京市西城区府右街131号",
"lat":39.916383659908185,
"lng":116.38854914523102,
"city":"北京市",
"vendor":"baidu"
},
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "location-picker",
"name": "location",
"ak": "LiZT5dVbGTsPI91tFGcOlSpe5FDehpf7",
"label": "地址",
"value": {
"address":"北京市西城区府右街131号",
"lat":39.916383659908185,
"lng":116.38854914523102,
"city":"北京市",
"vendor":"baidu"
},
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "location-picker",
"name": "location",
"ak": "LiZT5dVbGTsPI91tFGcOlSpe5FDehpf7",
"label": "地址",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": {
"address":"北京市西城区府右街131号",
"lat":39.916383659908185,
"lng":116.38854914523102,
"city":"北京市",
"vendor":"baidu"
}
}
}
]
}
}
}
]
}
```

View File

@ -383,6 +383,257 @@ row 模式,每行只能单选某个单元格
| 动作名称 | 动作配置 | 说明 |
| -------- | ----------------------- | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: Array` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "matrix-checkboxes",
"name": "matrix",
"label": "Matrix",
"rowLabel": "行标题说明",
"columns": [
{
"label": "列1"
},
{
"label": "列2"
}
],
"rows": [
{
"label": "行1"
},
{
"label": "行2"
}
],
"value": [
[
{
"label": "列1",
"checked": true
},
{
"label": "列1",
"checked": false
}
],
[
{
"label": "列2",
"checked": false
},
{
"label": "列2",
"checked": true
}
]
],
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "matrix-checkboxes",
"name": "matrix",
"label": "Matrix",
"rowLabel": "行标题说明",
"columns": [
{
"label": "列1"
},
{
"label": "列2"
}
],
"rows": [
{
"label": "行1"
},
{
"label": "行2"
}
],
"value": [
[
{
"label": "列1",
"checked": true
},
{
"label": "列1",
"checked": false
}
],
[
{
"label": "列2",
"checked": false
},
{
"label": "列2",
"checked": true
}
]
],
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "list-select",
"name": "select",
"label": "单选",
"clearable": true,
"id": "reload_type",
"source": "/api/mock2/form/getOptions?waitSeconds=1",
"value": "a"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "matrix-checkboxes",
"name": "matrix",
"label": "Matrix",
"rowLabel": "行标题说明",
"columns": [
{
"label": "列1"
},
{
"label": "列2"
}
],
"rows": [
{
"label": "行1"
},
{
"label": "行2"
}
],
"value": "a",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": [
[
{
"label": "列1",
"checked": true
},
{
"label": "列1",
"checked": true
}
],
[
{
"label": "列2",
"checked": false
},
{
"label": "列2",
"checked": true
}
]
]
}
}
]
}
}
}
]
}
```

View File

@ -844,6 +844,226 @@ order: 31
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` 更新的值 | 更新数据,开启`multiple`时,多个值用`,`分隔 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "nested-select",
"name": "nestedSelect",
"label": "级联选择器",
"options": [
{
"label": "A",
"value": "a"
},
{
"label": "B",
"value": "b",
"children": [
{
"label": "B-1",
"value": "b-1"
},
{
"label": "B-2",
"value": "b-2"
},
{
"label": "B-3",
"value": "b-3"
}
]
},
{
"label": "C",
"value": "c"
}
],
"value": "a",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "nested-select",
"name": "nestedSelect",
"label": "级联选择器",
"options": [
{
"label": "A",
"value": "a"
},
{
"label": "B",
"value": "b",
"children": [
{
"label": "B-1",
"value": "b-1"
},
{
"label": "B-2",
"value": "b-2"
},
{
"label": "B-3",
"value": "b-3"
}
]
},
{
"label": "C",
"value": "c"
}
],
"value": "a",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "nested-select",
"name": "nestedSelect",
"label": "级联选择器",
"id": "reload_type",
"source": "/api/mock2/form/getTreeOptions",
"value": "a"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "nested-select",
"name": "nestedSelect",
"label": "级联选择器",
"options": [
{
"label": "A",
"value": "a"
},
{
"label": "B",
"value": "b",
"children": [
{
"label": "B-1",
"value": "b-1"
},
{
"label": "B-2",
"value": "b-2"
},
{
"label": "B-3",
"value": "b-3"
}
]
},
{
"label": "C",
"value": "c"
}
],
"value": "a",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "b"
}
}
]
}
}
}
]
}
```

View File

@ -210,8 +210,112 @@ order: 8
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| setValue | `value: string \|number \|boolean` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------------- | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string \|number \|boolean` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "radio",
"label": "选项",
"name": "type",
"id": "clear_type",
"option": "选项说明",
"value": true
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_type"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "radio",
"label": "选项",
"name": "type",
"id": "reset_type",
"option": "选项说明",
"value": false
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "radio",
"label": "选项",
"name": "type",
"id": "setvalue_type",
"option": "选项说明",
"value": true
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_type",
"args": {
"value": false
}
}
]
}
}
}
]
}
```

View File

@ -313,6 +313,196 @@ api 返回内容需要包含 options 字段
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "radios",
"type": "radios",
"label": "radios",
"options": [
{
"label": "OptionA",
"value": "a"
},
{
"label": "OptionB",
"value": "b"
},
{
"label": "OptionC",
"value": "c"
},
{
"label": "OptionD",
"value": "d"
}
],
"value": "a",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "radios",
"type": "radios",
"label": "radios",
"options": [
{
"label": "OptionA",
"value": "a"
},
{
"label": "OptionB",
"value": "b"
},
{
"label": "OptionC",
"value": "c"
},
{
"label": "OptionD",
"value": "d"
}
],
"value": "a",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### reload
只有选择器模式支持,即配置`source`,用于重新加载选择器的数据源。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "radios",
"type": "radios",
"label": "radios",
"id": "reload_type",
"source": "/api/mock2/form/getOptions",
"value": "a"
},
{
"type": "button",
"label": "重新加载",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reload",
"componentId": "reload_type"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "radios",
"type": "radios",
"label": "radios",
"options": [
{
"label": "OptionA",
"value": "a"
},
{
"label": "OptionB",
"value": "b"
},
{
"label": "OptionC",
"value": "c"
},
{
"label": "OptionD",
"value": "d"
}
],
"value": "a",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "b"
}
}
]
}
}
}
]
}
```

View File

@ -1566,10 +1566,112 @@ leftOptions 动态加载,默认 source 接口是返回 options 部分,而 le
| 动作名称 | 动作配置 | 说明 |
| -------- | -------------------------------------- | --------------------------------------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| reload | - | 重新加载,调用 `source`,刷新数据域数据刷新(重新加载) |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "select",
"type": "select",
"label": "select",
"options": [
{
"label": "OptionA",
"value": "a"
},
{
"label": "OptionB",
"value": "b"
},
{
"label": "OptionC",
"value": "c"
},
{
"label": "OptionD",
"value": "d"
}
],
"value": "a",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "select",
"type": "select",
"label": "select",
"options": [
{
"label": "OptionA",
"value": "a"
},
{
"label": "OptionB",
"value": "b"
},
{
"label": "OptionC",
"value": "c"
},
{
"label": "OptionD",
"value": "d"
}
],
"value": "a",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### 刷新数据源 reload
```schema: scope="body"
@ -1635,3 +1737,56 @@ leftOptions 动态加载,默认 source 接口是返回 options 部分,而 le
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "select",
"type": "select",
"label": "select",
"options": [
{
"label": "OptionA",
"value": "a"
},
{
"label": "OptionB",
"value": "b"
},
{
"label": "OptionC",
"value": "c"
},
{
"label": "OptionD",
"value": "d"
}
],
"value": "a",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "b"
}
}
]
}
}
}
]
}
```

View File

@ -102,7 +102,7 @@ order: 51
}
```
### 使用Schema配置文本
### 使用 Schema 配置文本
> `3.6.0` 版本之后支持
@ -142,7 +142,6 @@ order: 51
}
```
## 默认值
和其它表单项一样,如果要设置默认值,可以使用 value 属性
@ -294,15 +293,15 @@ order: 51
除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ---------- | --------------------------- | ------- | -------------------- | --- |
| option | `string` | | 选项说明 |
| onText | `string \| IconSchema \| SchemaCollection` | | 开启时开关显示的内容 | `3.6.0`支持Schema |
| offText | `string \| IconSchema \| SchemaCollection` | | 关闭时开关显示的内容 | `3.6.0`支持Schema |
| trueValue | `boolean \| string \| number` | `true` | 标识真值 |
| falseValue | `boolean \| string \| number` | `false` | 标识假值 |
| size | `"sm" \| "md"` | `"md"` | 开关大小 |
| loading | `boolean` | `false` | 是否处于加载状态 | `3.6.0` |
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
| ---------- | ------------------------------------------ | ------- | -------------------- | ------------------ |
| option | `string` | | 选项说明 |
| onText | `string \| IconSchema \| SchemaCollection` | | 开启时开关显示的内容 | `3.6.0`支持 Schema |
| offText | `string \| IconSchema \| SchemaCollection` | | 关闭时开关显示的内容 | `3.6.0`支持 Schema |
| trueValue | `boolean \| string \| number` | `true` | 标识真值 |
| falseValue | `boolean \| string \| number` | `false` | 标识假值 |
| size | `"sm" \| "md"` | `"md"` | 开关大小 |
| loading | `boolean` | `false` | 是否处于加载状态 | `3.6.0` |
IconSchema 配置
| 属性名 | 类型 | 默认值 | 说明 |
@ -420,9 +419,76 @@ switch 值更新时弹出确认提示,确认后发送请求。
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------- | -------- |
| setValue | `value: string \| boolean` 更新的数据 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------------------- | ---------------------------------------------------------------------- | --- |
| clear | - | 清空6.3.1 及以上版本支持 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue`6.3.1 及以上版本支持 | |
| setValue | `value: string \| boolean` 更新的数据 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "switch",
"label": "开关",
"type": "switch",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "switch",
"label": "开关",
"type": "switch",
"id": "reset_text",
"value": true
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue

View File

@ -169,5 +169,391 @@ icon:
| 动作名称 | 动作配置 | 说明 |
| -------- | -------------------------------------- | --------------------------------------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "穿梭选择器",
"type": "tabs-transfer-picker",
"name": "a",
"sortable": true,
"selectMode": "tree",
"options": [
{
"label": "成员",
"selectMode": "tree",
"searchable": true,
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
]
}
]
},
{
"label": "用户",
"selectMode": "chained",
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang2"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao2"
},
{
"label": "钟无艳",
"value": "zhongwuyan2"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai2"
},
{
"label": "韩信",
"value": "hanxin2"
},
{
"label": "云中君",
"value": "yunzhongjun2"
}
]
}
]
}
],
"value": "zhugeliang",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "穿梭选择器",
"type": "tabs-transfer-picker",
"name": "a",
"sortable": true,
"selectMode": "tree",
"options": [
{
"label": "成员",
"selectMode": "tree",
"searchable": true,
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
]
}
]
},
{
"label": "用户",
"selectMode": "chained",
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang2"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao2"
},
{
"label": "钟无艳",
"value": "zhongwuyan2"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai2"
},
{
"label": "韩信",
"value": "hanxin2"
},
{
"label": "云中君",
"value": "yunzhongjun2"
}
]
}
]
}
],
"value": "zhugeliang",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "穿梭选择器",
"type": "tabs-transfer-picker",
"name": "a",
"sortable": true,
"selectMode": "tree",
"options": [
{
"label": "成员",
"selectMode": "tree",
"searchable": true,
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
]
}
]
},
{
"label": "用户",
"selectMode": "chained",
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang2"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao2"
},
{
"label": "钟无艳",
"value": "zhongwuyan2"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai2"
},
{
"label": "韩信",
"value": "hanxin2"
},
{
"label": "云中君",
"value": "yunzhongjun2"
}
]
}
]
}
],
"value": "zhugeliang",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "yunzhongjun2"
}
}
]
}
}
}
]
}
```

View File

@ -631,7 +631,393 @@ icon:
| 动作名称 | 动作配置 | 说明 |
| ------------ | -------------------------------------- | --------------------------------------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| selectAll | - | 全选 |
| changeTabKey | `activeKey: number` 选中的 Tab | 修改当前选中 tab来选择其他选项 |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "组合穿梭器",
"type": "tabs-transfer",
"name": "a",
"sortable": true,
"selectMode": "tree",
"options": [
{
"label": "成员",
"selectMode": "tree",
"searchable": true,
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
]
}
]
},
{
"label": "用户",
"selectMode": "chained",
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang2"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao2"
},
{
"label": "钟无艳",
"value": "zhongwuyan2"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai2"
},
{
"label": "韩信",
"value": "hanxin2"
},
{
"label": "云中君",
"value": "yunzhongjun2"
}
]
}
]
}
],
"value": "zhugeliang",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "组合穿梭器",
"type": "tabs-transfer",
"name": "a",
"sortable": true,
"selectMode": "tree",
"options": [
{
"label": "成员",
"selectMode": "tree",
"searchable": true,
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
]
}
]
},
{
"label": "用户",
"selectMode": "chained",
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang2"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao2"
},
{
"label": "钟无艳",
"value": "zhongwuyan2"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai2"
},
{
"label": "韩信",
"value": "hanxin2"
},
{
"label": "云中君",
"value": "yunzhongjun2"
}
]
}
]
}
],
"value": "zhugeliang",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "组合穿梭器",
"type": "tabs-transfer",
"name": "a",
"sortable": true,
"selectMode": "tree",
"options": [
{
"label": "成员",
"selectMode": "tree",
"searchable": true,
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
]
}
]
},
{
"label": "用户",
"selectMode": "chained",
"children": [
{
"label": "法师",
"children": [
{
"label": "诸葛亮",
"value": "zhugeliang2"
}
]
},
{
"label": "战士",
"children": [
{
"label": "曹操",
"value": "caocao2"
},
{
"label": "钟无艳",
"value": "zhongwuyan2"
}
]
},
{
"label": "打野",
"children": [
{
"label": "李白",
"value": "libai2"
},
{
"label": "韩信",
"value": "hanxin2"
},
{
"label": "云中君",
"value": "yunzhongjun2"
}
]
}
]
}
],
"value": "zhugeliang",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "yunzhongjun2"
}
}
]
}
}
}
]
}
```

View File

@ -121,9 +121,142 @@ order: 57
当前组件对外暴露以下特性动作,其他组件可以通过指定`actionType: 动作名称`、`componentId: 该组件id`来触发这些动作,动作配置可以通过`args: {动作配置项名称: xxx}`来配置具体的参数,详细请查看[事件动作](../../docs/concepts/event-action#触发其他组件的动作)。
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| focus | - | 获取焦点 |
| setValue | `value: string` 更新的值 | 更新数据 |
| 动作名称 | 动作配置 | 说明 |
| -------- | ------------------------ | ------------------------------------------------ |
| clear | - | 清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| focus | - | 获取焦点 |
| setValue | `value: string` 更新的值 | 更新数据 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "clear_text",
"type": "textarea",
"label": "text",
"value": "清空我"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "reset_text",
"type": "textarea",
"label": "text",
"value": "重置我"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### focus
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "focus_text",
"type": "textarea",
"label": "text",
"value": "聚焦我"
},
{
"type": "button",
"label": "聚焦",
"onEvent": {
"click": {
"actions": [
{
"actionType": "focus",
"componentId": "focus_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "text",
"id": "setvalue_text",
"type": "textarea",
"label": "text",
"value": "amis"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "amis go go go!"
}
}
]
}
}
}
]
}
```

View File

@ -117,12 +117,13 @@ icon:
```
## 属性表
下面属性为`transfer-picker`独占属性, 更多属性用法,参考[穿梭器Transfer](./transfer)
| 属性名 | 类型 | 默认值 | 说明
| ----------------- | --------- | ------- | -------------------------------------------------
| borderMode | `'full'` \| `'half'` \| `'none'` | | 边框模式,`'full'`为全边框,`'half'`为半边框,`'none'`为没边框 |
| pickerSize | string | | 弹窗大小,支持: xs、sm、md、lg、xl、full |
| 属性名 | 类型 | 默认值 | 说明 |
| ---------- | -------------------------------- | ------ | -------------------------------------------------------------- |
| borderMode | `'full'` \| `'half'` \| `'none'` | | 边框模式,`'full'`为全边框,`'half'`为半边框,`'none'`为没边框 |
| pickerSize | string | | 弹窗大小,支持: xs、sm、md、lg、xl、full |
## 事件表
@ -143,5 +144,187 @@ icon:
| 动作名称 | 动作配置 | 说明 |
| -------- | -------------------------------------- | --------------------------------------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "默认",
"type": "transfer-picker",
"name": "transfer",
"value": "zhugeliang,libai",
"options": [
{
"label": "诸葛亮",
"value": "zhugeliang"
},
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
},
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
],
"value": "zhugeliang",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "默认",
"type": "transfer-picker",
"name": "transfer",
"value": "zhugeliang,libai",
"options": [
{
"label": "诸葛亮",
"value": "zhugeliang"
},
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
},
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
],
"value": "zhugeliang",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "默认",
"type": "transfer-picker",
"name": "transfer",
"value": "zhugeliang,libai",
"options": [
{
"label": "诸葛亮",
"value": "zhugeliang"
},
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
},
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
],
"value": "zhugeliang",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "yunzhongjun"
}
}
]
}
}
}
]
}
```

View File

@ -1101,7 +1101,189 @@ icon:
| 动作名称 | 动作配置 | 说明 |
| ----------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| clearSearch | `left: boolean` 左侧搜索、`right:boolean`右侧搜索 | 默认清除所有搜索态,可以单独配置`left`、`right`为`true`来清空对应左侧或者右侧面板(`3.4.0`及以上版本支持) |
| selectAll | - | 全选 |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "默认",
"type": "transfer",
"name": "transfer",
"value": "zhugeliang,libai",
"options": [
{
"label": "诸葛亮",
"value": "zhugeliang"
},
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
},
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
],
"value": "zhugeliang",
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "默认",
"type": "transfer",
"name": "transfer",
"value": "zhugeliang,libai",
"options": [
{
"label": "诸葛亮",
"value": "zhugeliang"
},
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
},
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
],
"value": "zhugeliang",
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```
### setValue
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"label": "默认",
"type": "transfer",
"name": "transfer",
"value": "zhugeliang,libai",
"options": [
{
"label": "诸葛亮",
"value": "zhugeliang"
},
{
"label": "曹操",
"value": "caocao"
},
{
"label": "钟无艳",
"value": "zhongwuyan"
},
{
"label": "李白",
"value": "libai"
},
{
"label": "韩信",
"value": "hanxin"
},
{
"label": "云中君",
"value": "yunzhongjun"
}
],
"value": "zhugeliang",
"id": "setvalue_text"
},
{
"type": "button",
"label": "赋值",
"onEvent": {
"click": {
"actions": [
{
"actionType": "setValue",
"componentId": "setvalue_text",
"args": {
"value": "yunzhongjun"
}
}
]
}
}
}
]
}
```

View File

@ -823,5 +823,139 @@ order: 60
| delete | value: ` any` | 删除数据项的 value如果配置了 valueField以 valueField 的字段值为准) |
| reload | - | 刷新 |
| clear | - | 清空 |
| reset | - | 将值重置为`resetValue`,若没有配置`resetValue`,则清空 |
| reset | - | 将值重置为初始值。6.3.0 及以下版本为`resetValue` |
| setValue | `value: string` \| `string[]` 更新的值 | 更新数据,开启`multiple`支持设置多项,开启`joinValues`时,多值用`,`分隔,否则多值用数组 |
### clear
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "tree-select",
"name": "tree",
"label": "Tree",
"options": [
{
"label": "Folder A",
"value": 1,
"children": [
{
"label": "file A",
"value": 2
},
{
"label": "Folder B",
"value": 3,
"children": [
{
"label": "file b1",
"value": 3.1
},
{
"label": "file b2",
"value": 3.2
}
]
}
]
},
{
"label": "file C",
"value": 4
},
{
"label": "file D",
"value": 5
}
],
"value": 5,
"id": "clear_text"
},
{
"type": "button",
"label": "清空",
"onEvent": {
"click": {
"actions": [
{
"actionType": "clear",
"componentId": "clear_text"
}
]
}
}
}
]
}
```
### reset
如果配置了`resetValue`,则重置时使用`resetValue`的值,否则使用初始值。
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"type": "tree-select",
"name": "tree",
"label": "Tree",
"options": [
{
"label": "Folder A",
"value": 1,
"children": [
{
"label": "file A",
"value": 2
},
{
"label": "Folder B",
"value": 3,
"children": [
{
"label": "file b1",
"value": 3.1
},
{
"label": "file b2",
"value": 3.2
}
]
}
]
},
{
"label": "file C",
"value": 4
},
{
"label": "file D",
"value": 5
}
],
"value": 5,
"id": "reset_text"
},
{
"type": "button",
"label": "重置",
"onEvent": {
"click": {
"actions": [
{
"actionType": "reset",
"componentId": "reset_text"
}
]
}
}
}
]
}
```

View File

@ -1452,7 +1452,9 @@ run action ajax
> 6.2.0 及以后版本
打印页面中的某个组件,对应的组件需要配置 `testid`,如果要打印多个,可以使用 `"testids": ["x", "y"]` 来打印多个组件
打印页面中的某个组件,对应的组件需要配置 `id`,如果要打印多个,可以使用 `"ids": ["x", "y"]` 来打印多个组件,只支持主要是容器类组件 `crud`、`crud2`、`form`、`table`、`wrapper`、`container`、`flex`、`grid`、`grid2d`、`tableview`
> breaking在 6.2.0 版本中配置是 testid但这个配置会导致性能问题所以新版使用 id 作为标识。
```schema
{
@ -1469,7 +1471,7 @@ run action ajax
{
actionType: 'print',
args: {
testid: 'mycrud'
id: 'mycrud'
}
}
]
@ -1479,7 +1481,7 @@ run action ajax
{
"type": "crud",
"api": "/api/mock2/sample",
"testid": "mycrud",
"id": "mycrud",
"syncLocation": false,
"columns": [
{

View File

@ -8,5 +8,5 @@
"packages/amis-editor"
],
"useWorkspaces": false,
"version": "6.4.0-280.0"
"version": "6.4.0"
}

View File

@ -1,6 +1,6 @@
{
"name": "amis-core",
"version": "6.4.0-280.0",
"version": "6.4.0",
"description": "amis-core",
"main": "lib/index.js",
"module": "esm/index.js",
@ -48,7 +48,7 @@
"esm"
],
"dependencies": {
"amis-formula": "^6.4.0-280.0",
"amis-formula": "^6.4.0",
"classnames": "2.3.2",
"file-saver": "^2.0.2",
"hoist-non-react-statics": "^3.3.2",

View File

@ -10,8 +10,8 @@ import {
export interface IPrintAction extends ListenerAction {
actionType: 'copy';
args: {
testid?: string;
testids?: string[];
id?: string;
ids?: string[];
};
}
@ -28,17 +28,15 @@ export class PrintAction implements RendererAction {
renderer: ListenerContext,
event: RendererEvent<any>
) {
if (action.args?.testid) {
const element = document.querySelector(
`[data-testid='${action.args.testid}']`
);
if (action.args?.id) {
const element = document.querySelector(`[data-id='${action.args.id}']`);
if (element) {
printElements([element]);
}
} else if (action.args?.testids) {
} else if (action.args?.ids) {
const elements: Element[] = [];
action.args.testids.forEach(testid => {
const element = document.querySelector(`[data-testid='${testid}']`);
action.args.ids.forEach(id => {
const element = document.querySelector(`[data-id='${id}']`);
if (element) {
elements.push(element);
}

View File

@ -20,9 +20,6 @@ export const styleIdCount = new Map();
export default function (props: CustomStyleProps) {
const {config, env, data} = props;
const {themeCss, classNames, id, defaultData, wrapperCustomStyle} = config;
if (!themeCss && !wrapperCustomStyle) {
return null;
}
useEffect(() => {
if (styleIdCount.has(id)) {

View File

@ -713,7 +713,7 @@ export default class Form extends React.Component<FormProps, object> {
async dispatchInited(value: any) {
const {data, store, dispatchEvent} = this.props;
if (store.fetching) {
if (!isAlive(store) || store.fetching) {
return value;
}

View File

@ -1,6 +1,6 @@
{
"name": "amis-editor-core",
"version": "6.4.0-280.0",
"version": "6.4.0",
"description": "amis 可视化编辑器",
"main": "lib/index.js",
"module": "esm/index.js",

View File

@ -1,6 +1,6 @@
{
"name": "amis-editor",
"version": "6.4.0-280.0",
"version": "6.4.0",
"description": "amis 可视化编辑器",
"main": "lib/index.js",
"module": "esm/index.js",
@ -41,7 +41,7 @@
],
"dependencies": {
"@webcomponents/webcomponentsjs": "^2.6.0",
"amis-editor-core": "^6.4.0-280.0",
"amis-editor-core": "^6.4.0",
"amis-postcss": "1.0.0",
"amis-theme-editor-helper": "*",
"i18n-runtime": "*",

View File

@ -632,9 +632,7 @@ extendLocale('en-US', {
'528609917710d813a55e5a6cecf1e458': 'Selected value',
'288f0c404c4e546aa3683ff5054e85e2': 'Clear',
'c374a44713fa5ff5da2565beb398c7d3': 'Delete selected value',
'8db57ba01ffb9bf29c1656de5f0208f5':
'Reset the value to resetValue. If the resetValue is not configured, the value is cleared.',
'8f40db3b25528063f1b6a59602a05cd5': 'Value assignment',
'8db57ba01ffb9bf29c1656de5f0208f5': 'Reset the value to the initial value.',
'944908c981a86bfa0cfab9360ab38184':
'Allow the button to occupy the parent container fully. The width of individual buttons is adaptive.',
'ac3880323853de9adc4f66bc06d438ff': 'Button style',

View File

@ -636,8 +636,7 @@ extendLocale('zh-CN', {
'528609917710d813a55e5a6cecf1e458': '选中值',
'288f0c404c4e546aa3683ff5054e85e2': '清空',
'c374a44713fa5ff5da2565beb398c7d3': '清除选中值',
'8db57ba01ffb9bf29c1656de5f0208f5':
'将值重置为resetValue若没有配置resetValue则清空',
'8db57ba01ffb9bf29c1656de5f0208f5': '将值重置为初始值',
'8f40db3b25528063f1b6a59602a05cd5': '赋值',
'944908c981a86bfa0cfab9360ab38184': '使按钮宽度占满父容器,各按钮宽度自适应',
'0b98b0bea3db6ae5b67a09c7bb2d032b': '按钮选中样式',

View File

@ -131,7 +131,7 @@ export class CalendarPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -100,7 +100,7 @@ export class ButtonGroupControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -88,7 +88,7 @@ export class ChainedSelectControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -108,7 +108,7 @@ export class CheckboxControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -113,7 +113,7 @@ export class CheckboxesControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -120,7 +120,7 @@ export class CodeEditorControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'focus',

View File

@ -254,7 +254,7 @@ export class ComboControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'addItem',

View File

@ -127,7 +127,7 @@ export class DiffEditorControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'focus',

View File

@ -253,7 +253,7 @@ export class DateControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -299,7 +299,7 @@ export class DateRangeControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -85,7 +85,7 @@ export class ExcelControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -118,7 +118,7 @@ export class KVControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -160,7 +160,7 @@ export class RangeControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -85,7 +85,7 @@ export class RateControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -1094,7 +1094,7 @@ export class TableControlPlugin extends BasePlugin {
// {
// actionType: 'reset',
// actionLabel: '重置',
// description: '将值重置为resetValue若没有配置resetValue则清空'
// description: '将值重置为初始值'
// },
{
actionType: 'clear',

View File

@ -190,7 +190,7 @@ export class TextControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -107,7 +107,7 @@ export class ListControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -95,7 +95,7 @@ export class LocationControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -201,7 +201,7 @@ export class NestedSelectControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -103,7 +103,7 @@ export class RadiosControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -176,7 +176,7 @@ export class SelectControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'reload',

View File

@ -94,6 +94,16 @@ export class SwitchControlPlugin extends BasePlugin {
// 动作定义
actions: RendererPluginAction[] = [
{
actionType: 'clear',
actionLabel: '清空',
description: '清除选中值'
},
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为初始值'
},
{
actionType: 'setValue',
actionLabel: '赋值',

View File

@ -119,7 +119,7 @@ export class TextareaControlPlugin extends BasePlugin {
{
actionType: 'reset',
actionLabel: '重置',
description: '将值重置为resetValue若没有配置resetValue则清空'
description: '将值重置为初始值'
},
{
actionType: 'setValue',

View File

@ -497,6 +497,7 @@ const TransferTableControl = BaseOptionControl(TransferTableOption);
@FormItem({
type: 'ae-transferTableControl',
strictMode: false,
renderLabel: false
})
export class TransferTableControlRenderer extends TransferTableControl {}

View File

@ -1261,10 +1261,7 @@ export class EventControl extends React.Component<
}
)}
>
<Icon
className="icon"
icon="edit-full-btn"
/>
<Icon className="icon" icon="setting" />
</div>
<div
onClick={this.delAction.bind(

View File

@ -1,6 +1,6 @@
{
"name": "amis-formula",
"version": "6.4.0-280.0",
"version": "6.4.0",
"description": "负责 amis 里面的表达式实现,内置公式,编辑器等",
"main": "lib/index.js",
"module": "esm/index.js",

View File

@ -3,7 +3,7 @@
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"version": "6.4.0-280.0",
"version": "6.4.0",
"description": "",
"scripts": {
"build": "npm run clean-dist && NODE_ENV=production rollup -c ",
@ -36,8 +36,8 @@
},
"dependencies": {
"@rc-component/mini-decimal": "^1.0.1",
"amis-core": "^6.4.0-280.0",
"amis-formula": "^6.4.0-280.0",
"amis-core": "^6.4.0",
"amis-formula": "^6.4.0",
"classnames": "2.3.2",
"codemirror": "^5.63.0",
"downshift": "6.1.12",

View File

@ -2040,6 +2040,7 @@
--Collapse-content-color: var(--collapse-default-content-color);
--Collapse-content-fontSize: var(--collapse-default-content-fontSize);
--Collapse-content-fontWeight: var(--collapse-default-content-fontWeight);
--Collapse-mobile-marginBottom: var(--sizes-size-9);
// 选项卡
--Tabs-borderColor: var(--colors-neutral-line-8);

View File

@ -223,7 +223,7 @@
.#{$ns}Collapse {
border: none;
position: relative;
margin-bottom: var(--Collapse-mobile-marginBottom);
&::before {
@include hairline-bottom(var(--collapse-default-bottom-border-color));
}

View File

@ -175,7 +175,8 @@
}
}
.#{$ns}PickerControl.is-inline {
.#{$ns}PickerControl.is-inline,
.#{$ns}Form-item--inline {
.#{$ns}Picker {
display: inline-block;
min-width: px2rem(150px);

File diff suppressed because it is too large Load Diff

View File

@ -307,6 +307,7 @@ export interface DateProps extends LocaleProps, ThemeProps {
};
};
popOverContainer?: any;
popOverContainerSelector?: string;
label?: string | false;
borderMode?: 'full' | 'half' | 'none';
// 是否为内嵌模式,如果开启就不是 picker 了,直接页面点选。
@ -929,6 +930,7 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
viewMode,
timeConstraints,
popOverContainer,
popOverContainerSelector,
clearable,
shortcuts,
utc,
@ -1130,6 +1132,7 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
<Overlay
target={this.getTarget}
container={popOverContainer || this.getParent}
containerSelector={popOverContainerSelector}
rootClose={false}
placement={overlayPlacement}
show

View File

@ -74,6 +74,7 @@ export interface DateRangePickerProps extends ThemeProps, LocaleProps {
timeFormat?: string;
resetValue?: any;
popOverContainer?: any;
popOverContainerSelector?: string;
dateFormat?: string;
embed?: boolean;
viewMode?: ViewMode;
@ -1445,9 +1446,8 @@ export class DateRangePicker extends React.Component<
}
// 重置
reset() {
reset(resetValue?: any) {
const {
resetValue,
onChange,
format,
valueFormat,
@ -1457,17 +1457,16 @@ export class DateRangePicker extends React.Component<
displayFormat,
data
} = this.props;
if (!resetValue) {
return;
}
const tmpResetValue = resetValue ?? this.props.resetValue;
const {startDate, endDate} = DateRangePicker.unFormatValue(
resetValue,
tmpResetValue,
valueFormat || (format as string),
joinValues,
delimiter,
data
);
onChange(resetValue);
onChange?.(tmpResetValue);
this.setState({
startInputValue: startDate?.format(displayFormat || inputFormat),
endInputValue: endDate?.format(displayFormat || inputFormat)
@ -1982,6 +1981,7 @@ export class DateRangePicker extends React.Component<
startPlaceholder,
endPlaceholder,
popOverContainer,
popOverContainerSelector,
inputFormat,
displayFormat,
joinValues,
@ -2167,6 +2167,7 @@ export class DateRangePicker extends React.Component<
target={() => this.dom.current}
onHide={this.close}
container={popOverContainer || (() => findDOMNode(this))}
containerSelector={popOverContainerSelector}
rootClose={false}
placement={overlayPlacement}
show

View File

@ -110,6 +110,7 @@ import ScaleOrigin from '../icons/scale-origin.svg';
import If from '../icons/if.svg';
import isObject from 'lodash/isObject';
import type {TestIdBuilder} from 'amis-core';
// 兼容原来的用法,后续不直接试用。
@ -284,10 +285,12 @@ export function Icon({
onTouchMove,
onTouchEnd,
onTouchCancel,
style
style,
testIdBuilder
}: {
icon: string;
iconContent?: string;
testIdBuilder?: TestIdBuilder;
} & React.ComponentProps<any>) {
let cx = iconCx || cxClass;
@ -356,6 +359,7 @@ export function Icon({
className={cx(iconContent, className, classNameProp)}
ref={refFn}
style={style}
{...testIdBuilder?.getTestId()}
></div>
);
}
@ -370,6 +374,7 @@ export function Icon({
// @ts-ignore
icon={icon}
style={style}
{...testIdBuilder?.getTestId()}
/>
);
}

View File

@ -8,6 +8,7 @@ import React from 'react';
import {ThemeProps, ClassNamesFn} from 'amis-core';
import {ColumnProps} from './index';
import type {TestIdBuilder} from 'amis-core';
const zIndex = 1;
@ -26,6 +27,7 @@ export interface Props extends ThemeProps {
col?: string;
index?: number;
classnames: ClassNamesFn;
testIdBuilder?: TestIdBuilder;
}
export default class BodyCell extends React.PureComponent<Props> {
@ -48,7 +50,8 @@ export default class BodyCell extends React.PureComponent<Props> {
depth,
col,
wrapperComponent: Component,
classnames: cx
classnames: cx,
testIdBuilder
} = this.props;
return (
@ -62,6 +65,7 @@ export default class BodyCell extends React.PureComponent<Props> {
style={fixed ? {position: 'sticky', zIndex, ...style} : {...style}}
data-depth={depth || null}
data-col={col}
{...testIdBuilder?.getTestId()}
>
{children}
</Component>

View File

@ -23,6 +23,7 @@ import Cell from './Cell';
import HeadCellSort from './HeadCellSort';
import HeadCellFilter from './HeadCellFilter';
import HeadCellSelect from './HeadCellSelect';
import type {TestIdBuilder} from 'amis-core';
export interface Props extends ThemeProps {
draggable: boolean;
@ -48,6 +49,7 @@ export interface Props extends ThemeProps {
onSelectAll: Function;
onFilter?: Function;
onResizeMouseDown: Function;
testIdBuilder?: TestIdBuilder;
}
export default class Head extends React.PureComponent<Props> {
@ -130,7 +132,8 @@ export default class Head extends React.PureComponent<Props> {
onSort,
onSelectAll,
onFilter,
onResizeMouseDown
onResizeMouseDown,
testIdBuilder
} = this.props;
const {thColumns, tdColumns} = getBuildColumns(columns);
@ -186,6 +189,7 @@ export default class Head extends React.PureComponent<Props> {
col="drag"
classnames={cx}
classPrefix={classPrefix}
testIdBuilder={testIdBuilder?.getChild(`drag-${index}`)}
></Cell>
) : null}
{!draggable && selectable && index === 0 ? (
@ -198,6 +202,7 @@ export default class Head extends React.PureComponent<Props> {
col="select"
classnames={cx}
classPrefix={classPrefix}
testIdBuilder={testIdBuilder?.getChild(`select-${index}`)}
>
{rowSelectionType !== 'radio'
? [
@ -243,6 +248,9 @@ export default class Head extends React.PureComponent<Props> {
onSort={(payload: SortProps) => {
onSort && onSort(payload, item);
}}
testIdBuilder={testIdBuilder?.getChild(
`sort-${colIndex}`
)}
></HeadCellSort>
);
}
@ -256,6 +264,9 @@ export default class Head extends React.PureComponent<Props> {
column={item}
popOverContainer={popOverContainer}
onFilter={onFilter}
testIdBuilder={testIdBuilder?.getChild(
`filter-${colIndex}`
)}
></HeadCellFilter>
);
}
@ -310,6 +321,7 @@ export default class Head extends React.PureComponent<Props> {
})}
depth={item.depth}
col={String(colIndex)}
testIdBuilder={testIdBuilder?.getChild(`cell-${colIndex}`)}
>
{typeof item.title === 'function'
? item.title(children)

View File

@ -16,6 +16,8 @@ import {
PopOver
} from 'amis-core';
import type {TestIdBuilder} from 'amis-core';
export interface FilterPayload {
closeDropdown?: boolean;
}
@ -38,6 +40,7 @@ export interface Props extends ThemeProps, LocaleProps {
setSelectedKeys?: (keys: Array<string | number> | string) => void;
classnames: ClassNamesFn;
classPrefix: string;
testIdBuilder?: TestIdBuilder;
}
export interface State {

View File

@ -21,6 +21,7 @@ import HeadCellDropDown, {
import CheckBox from '../Checkbox';
import Button from '../Button';
import {Icon} from '../icons';
import type {TestIdBuilder} from 'amis-core';
export interface Props extends ThemeProps, LocaleProps {
column: any;
@ -30,6 +31,7 @@ export interface Props extends ThemeProps, LocaleProps {
popOverContainer?: () => HTMLElement;
classnames: ClassNamesFn;
classPrefix: string;
testIdBuilder?: TestIdBuilder;
}
export interface OptionProps {
@ -92,7 +94,8 @@ export class HeadCellFilter extends React.PureComponent<Props, State> {
column,
popOverContainer,
classnames: cx,
classPrefix: ns
classPrefix: ns,
testIdBuilder
} = this.props;
const filterProps = {
@ -110,6 +113,7 @@ export class HeadCellFilter extends React.PureComponent<Props, State> {
onClick={() =>
this.handleClick(confirm, setSelectedKeys, [option.value])
}
{...testIdBuilder?.getChild(`${index}`).getTestId()}
>
{option.text}
</li>
@ -126,6 +130,7 @@ export class HeadCellFilter extends React.PureComponent<Props, State> {
)
}
checked={option.selected}
testIdBuilder={testIdBuilder?.getChild(`ckbx-${index}`)}
>
{option.text}
</CheckBox>
@ -140,6 +145,7 @@ export class HeadCellFilter extends React.PureComponent<Props, State> {
size={'xs'}
level={'primary'}
onClick={() => this.handleConfirmClick(confirm)}
testIdBuilder={testIdBuilder?.getChild(`btn-confirm`)}
>
</Button>
@ -148,6 +154,7 @@ export class HeadCellFilter extends React.PureComponent<Props, State> {
onClick={() =>
this.handleCancelClick(confirm, setSelectedKeys)
}
testIdBuilder={testIdBuilder?.getChild(`btn-cancel`)}
>
</Button>
@ -169,6 +176,7 @@ export class HeadCellFilter extends React.PureComponent<Props, State> {
icon="column-filter"
className="icon"
iconContent="table-filter-icon"
testIdBuilder={testIdBuilder?.getChild(`icon`)}
/>
}
active={

View File

@ -14,12 +14,14 @@ import {
} from 'amis-core';
import {Icon} from '../icons';
import {ColumnProps} from './index';
import type {TestIdBuilder} from 'amis-core';
export interface Props extends ThemeProps, LocaleProps {
column: ColumnProps;
onSort?: (payload: {orderBy: string; orderDir: string}) => any;
active?: boolean;
classnames: ClassNamesFn;
testIdBuilder?: TestIdBuilder;
}
export interface State {
@ -50,11 +52,12 @@ export class HeadCellSort extends React.PureComponent<Props, State> {
}
render() {
const {active, column, onSort, classnames: cx} = this.props;
const {active, column, onSort, classnames: cx, testIdBuilder} = this.props;
return (
<span
className={cx('TableCell-sortBtn', 'aaa')}
{...testIdBuilder?.getTestId()}
onClick={async () => {
let sortPayload: State = {
orderBy: '',
@ -97,6 +100,7 @@ export class HeadCellSort extends React.PureComponent<Props, State> {
icon="sort-desc"
className="icon"
iconContent="table-sort-down"
testIdBuilder={testIdBuilder?.getChild('desc')}
/>
</i>
<i
@ -105,7 +109,12 @@ export class HeadCellSort extends React.PureComponent<Props, State> {
active && this.state.orderDir === 'asc' ? 'is-active' : ''
)}
>
<Icon icon="sort-asc" className="icon" iconContent="table-sort-up" />
<Icon
icon="sort-asc"
className="icon"
iconContent="table-sort-up"
testIdBuilder={testIdBuilder?.getChild('asc')}
/>
</i>
<i
className={cx(
@ -117,6 +126,7 @@ export class HeadCellSort extends React.PureComponent<Props, State> {
icon="sort-default"
className="icon"
iconContent="table-sort-default"
testIdBuilder={testIdBuilder?.getChild('default')}
/>
</i>
</span>

View File

@ -18,6 +18,7 @@ import {
hasFixedColumn,
levelsSplit
} from './util';
import type {TestIdBuilder} from 'amis-core';
export interface Props extends ThemeProps {
data: any;
@ -53,6 +54,7 @@ export interface Props extends ThemeProps {
expandedRowClassName: string;
expandedRowRender?: Function;
isExpanded: boolean;
testIdBuilder?: TestIdBuilder;
[propName: string]: any; // 对应checkbox属性
}
@ -204,6 +206,7 @@ class BodyRow extends React.PureComponent<Props> {
onMouseLeave,
onClick,
onChange,
testIdBuilder,
...rest
} = this.props;
@ -223,6 +226,7 @@ class BodyRow extends React.PureComponent<Props> {
const cells = tdColumns.map((item, i) => {
// 为了支持灵活合并单元格renderers层的Table2传递的render方法返回{children: <ReactElement>, props: {rowSpan, colSpan}}
// 但直接使用amis-ui的tablerender方法一般直接返回ReactElement
const cellIDBuilder = testIdBuilder?.getChild(`cell-${i}`);
const render =
item.render && typeof item.render === 'function'
? item.render(data[item.name], data, rowIndex, i, levelsSplit(levels))
@ -256,6 +260,7 @@ class BodyRow extends React.PureComponent<Props> {
[`${className}`]: !!className
})}
col={i > -1 ? i.toString() : undefined}
testIdBuilder={cellIDBuilder}
>
<div
className={cx('Table-cell-wrapper', {
@ -272,7 +277,6 @@ class BodyRow extends React.PureComponent<Props> {
</Cell>
);
});
const rowClassNameClass =
rowClassName && typeof rowClassName === 'function'
? rowClassName(data, rowIndex)

View File

@ -43,6 +43,8 @@ import {
getSortData
} from './util';
import type {TestIdBuilder} from 'amis-core';
export interface ColumnProps {
title: string | React.ReactNode | Function;
name: string;
@ -176,6 +178,7 @@ export interface TableProps extends ThemeProps, LocaleProps, SpinnerExtraProps {
*/
autoFillHeight?: boolean | AutoFillHeightObject;
lazyRenderAfter?: boolean;
testIdBuilder?: TestIdBuilder;
}
export interface ScrollProps {
@ -682,9 +685,11 @@ export class Table extends React.PureComponent<TableProps, TableState> {
dataSource,
onSort,
onSelectAll,
onFilter
onFilter,
testIdBuilder
} = this.props;
console.log(testIdBuilder);
const rowSelectionKeyField = this.getRowSelectionKeyField();
const dataList =
rowSelection && rowSelection.getCheckboxProps
@ -751,6 +756,7 @@ export class Table extends React.PureComponent<TableProps, TableState> {
}}
onFilter={onFilter}
onResizeMouseDown={this.onResizeMouseDown.bind(this)}
testIdBuilder={testIdBuilder?.getChild('head')}
></Head>
);
}
@ -995,7 +1001,8 @@ export class Table extends React.PureComponent<TableProps, TableState> {
columns,
lazyRenderAfter,
classPrefix,
classnames: cx
classnames: cx,
testIdBuilder
} = this.props;
const rowSelectionKeyField = this.getRowSelectionKeyField();
@ -1003,6 +1010,7 @@ export class Table extends React.PureComponent<TableProps, TableState> {
this.state.selectedRowKeys,
key => key === data[rowSelectionKeyField]
);
const rowTIDBuilder = testIdBuilder?.getChild(`row-${rowIndex}`);
const childrenColumnName = this.getChildrenColumnName();
// 当前行是否可展开
@ -1070,6 +1078,7 @@ export class Table extends React.PureComponent<TableProps, TableState> {
lazyRenderAfter={lazyRenderAfter}
classnames={cx}
classPrefix={classPrefix}
testIdBuilder={rowTIDBuilder}
{...checkboxProps}
/>,
children

View File

@ -25,6 +25,7 @@ exports[`doAction:crud reload 1`] = `
</button>
<div
class="cxd-Crud is-loading"
data-id="crud_reload"
>
<div
class="cxd-Table cxd-Crud-body"
@ -332,6 +333,7 @@ exports[`doAction:crud reload with data1 1`] = `
</button>
<div
class="cxd-Crud is-loading"
data-id="crud_reload"
>
<div
class="cxd-Table cxd-Crud-body"
@ -639,6 +641,7 @@ exports[`doAction:crud reload with data2 1`] = `
</button>
<div
class="cxd-Crud is-loading"
data-id="crud_reload"
>
<div
class="cxd-Table cxd-Crud-body"

Some files were not shown because too many files have changed in this diff Show More