mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:57:53 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
c167435583
@ -2,11 +2,14 @@
|
|||||||
|
|
||||||
https://github.com/nocobase/nocobase/assets/1267426/29623e45-9a48-4598-bb9e-9dd173ade553
|
https://github.com/nocobase/nocobase/assets/1267426/29623e45-9a48-4598-bb9e-9dd173ade553
|
||||||
|
|
||||||
## 感谢你的支持!
|
## 感谢支持
|
||||||
<a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
<a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
||||||
|
|
||||||
<a href="https://www.producthunt.com/posts/nocobase?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=456520&theme=light&period=weekly&topic_id=267" alt="NocoBase - Scalability-first, open-source no-code platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
<a href="https://www.producthunt.com/posts/nocobase?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=456520&theme=light&period=weekly&topic_id=267" alt="NocoBase - Scalability-first, open-source no-code platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||||
|
|
||||||
|
## 加入我们
|
||||||
|
我们正在招聘**远程开发工程师**和**远程测试工程师**。 欢迎对 NocoBase 有强烈兴趣的伙伴加入。[查看详情](https://www.nocobase.com/cn/recruitment)
|
||||||
|
|
||||||
## 最近重要更新
|
## 最近重要更新
|
||||||
- [v1.0.1-alpha.1:区块支持高度设置 - 2024/06/07](https://docs-cn.nocobase.com/welcome/changelog/20240607)
|
- [v1.0.1-alpha.1:区块支持高度设置 - 2024/06/07](https://docs-cn.nocobase.com/welcome/changelog/20240607)
|
||||||
- [v1.0.0-alpha.15:新增插件、改进「配置操作」交互 - 2024/05/19](https://docs-cn.nocobase.com/welcome/changelog/20240519)
|
- [v1.0.0-alpha.15:新增插件、改进「配置操作」交互 - 2024/05/19](https://docs-cn.nocobase.com/welcome/changelog/20240519)
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* This file is part of the NocoBase (R) project.
|
||||||
|
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
||||||
|
* Authors: NocoBase Team.
|
||||||
|
*
|
||||||
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
||||||
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { processData } from '../utils';
|
||||||
|
|
||||||
|
describe('utils', () => {
|
||||||
|
it('processFields', () => {
|
||||||
|
expect(
|
||||||
|
processData(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name: 'tag',
|
||||||
|
type: 'bigInt',
|
||||||
|
interface: 'select',
|
||||||
|
uiSchema: {
|
||||||
|
type: 'string',
|
||||||
|
enum: [
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: 'Yes',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: 'No',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
label: 'Tag',
|
||||||
|
value: 'tag',
|
||||||
|
key: 'tag',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[{ tag: 1 }],
|
||||||
|
{},
|
||||||
|
),
|
||||||
|
).toEqual([{ tag: 'Yes' }]);
|
||||||
|
});
|
||||||
|
});
|
@ -93,7 +93,7 @@ export const processData = (selectedFields: FieldOption[], data: any[], scope: a
|
|||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
return value.map((v) => parseEnum(field, v));
|
return value.map((v) => parseEnum(field, v));
|
||||||
}
|
}
|
||||||
const option = options.find((option) => option.value === value);
|
const option = options.find((option) => option.value === (value?.toString?.() || value));
|
||||||
return Schema.compile(option?.label || value, scope);
|
return Schema.compile(option?.label || value, scope);
|
||||||
};
|
};
|
||||||
return data.map((record) => {
|
return data.map((record) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user