Cyrus Zhou
2023-01-18 16574395697669052b000df857a886c0a3121a11
refs
用户 Cyrus Zhou <lsqtzj@msn.com>
星期三, 一月 18, 2023 11:17 +0800
提交者 GitHub <noreply@github.com>
星期三, 一月 18, 2023 11:17 +0800
提交16574395697669052b000df857a886c0a3121a11
目录 3bb7a726b68d6599496de6464c08f59cabb6c7e0 目录 | zip | gz
parent 8dd8a5ed011834e851703df8beac4003d357471a 查看 | 对比
修复 updateSchema 多个field 属性时,第二个无效问题。 (#2493)

* Table BasicColumn 添加 editDynamicDisabled
Co-authored-by: Cyrus Zhou <6802207@qq.com>
使用方式同 Form FormSchema dynamicDisabled
```
export const Columns: BasicColumn[] = [
{
title: 'Title',
dataIndex: 'Title',
editRow: true,
editComponent: 'Select',
editDynamicDisabled: ({ record }) => record.isDisabled,
},

* editComponentProps onChange 功能恢复
Co-authored-by: Cyrus Zhou <6802207@qq.com>
说明:
...omit(compProps, 'onChange')
这会忽略 onChange ,导致 editComponentProps onChange 被取消

如下功能将不支持:
```
editComponentProps: ({ record }) => {
return {
options: effectTypeData,
onChange: () => {
},
};
},
```

* tableData == null 报错

* ApiSelect 第一次选择触发required错误提示问题

* 恢复 虽然可以解决第一次选择提示报错问题,但是会导致 onChange: (e: any, options: any) => 无法获得 options 的值

* 修复标签页切换灰屏不显示内容问题
Co-authored-by: Cyrus Zhou <6802207@qq.com>
问题描述页面没有用 div 包括 会提示 Component inside <Transition> renders non-element root node that cannot be animated ,
导致页灰屏必须刷新页面才可以显示内容

* 添加 Form ApiTransfer
## 使用方式
api 方式:
```
......
component: 'ApiTransfer',
componentProps: {
api: sysUserSelector,
labelField: 'name',
valueField: 'id',
},
.....
```
数据方式:
```
....
componentProps: {
dataSource: [
{ title: 'Test01', key: '0', disabled: false, description: 'description 01' },
{ title: 'Test02', key: '1', disabled: false, description: 'description 02' },
{ title: 'Test03', key: '2', disabled: false, description: 'description 03' },
{ title: 'Test04', key: '3', disabled: false, description: 'description 04' },
{ title: 'Test05', key: '4', disabled: false, description: 'description 05' },
],
},
....
```

* style: eslint 书写规范

* fix: 频繁切换页面导致灰屏

* fix: 修复 updateSchema 多个field 属性时,第二个无效问题。

如:
```
updateSchema([
{
field: 'password',
ifShow: !unref(isUpdate),
},
{
field: 'confirm',
ifShow: !unref(isUpdate),
},
]);
```

Co-authored-by: CyrusZhou <6802207@qq.com>
6个文件已修改
45 ■■■■ 已修改文件
.vscode/settings.json 20 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/components/Form/src/hooks/useFormEvents.ts 16 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/components/Tree/src/types/tree.ts 2 ●●● 对比 | 查看 | 原始文档 | blame | 历史
src/layouts/page/index.vue 4 ●●● 对比 | 查看 | 原始文档 | blame | 历史
src/utils/dateUtil.ts 1 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
src/utils/index.ts 2 ●●● 对比 | 查看 | 原始文档 | blame | 历史