mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix(collection manager): collection manager primarykey & nanoid & uuid suport index setting (#3943)
* fix: formula field caluation error * fix: collection manager primarykey * fix: nanoid & uuid suport index
This commit is contained in:
parent
a08e96adae
commit
bd6ffcef83
@ -1,5 +1,5 @@
|
|||||||
import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
|
import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
|
||||||
import { operators, autoFill } from './properties';
|
import { operators, autoFill, primaryKey, unique } from './properties';
|
||||||
export class NanoidFieldInterface extends CollectionFieldInterface {
|
export class NanoidFieldInterface extends CollectionFieldInterface {
|
||||||
name = 'nanoid';
|
name = 'nanoid';
|
||||||
type = 'object';
|
type = 'object';
|
||||||
@ -49,6 +49,21 @@ export class NanoidFieldInterface extends CollectionFieldInterface {
|
|||||||
'x-component': 'InputNumber',
|
'x-component': 'InputNumber',
|
||||||
},
|
},
|
||||||
autoFill,
|
autoFill,
|
||||||
|
layout: {
|
||||||
|
type: 'void',
|
||||||
|
title: '{{t("Index")}}',
|
||||||
|
'x-component': 'Space',
|
||||||
|
'x-decorator': 'FormItem',
|
||||||
|
'x-decorator-props': {
|
||||||
|
style: {
|
||||||
|
marginBottom: '0px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
primaryKey,
|
||||||
|
unique,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
filterable = {
|
filterable = {
|
||||||
operators: operators.string,
|
operators: operators.string,
|
||||||
|
@ -60,7 +60,7 @@ export const primaryKey = {
|
|||||||
'x-reactions': [
|
'x-reactions': [
|
||||||
{
|
{
|
||||||
dependencies: ['unique'],
|
dependencies: ['unique'],
|
||||||
when: '{{$deps[0]}}',
|
when: '{{$deps[0]&&createMainOnly}}',
|
||||||
fulfill: {
|
fulfill: {
|
||||||
state: {
|
state: {
|
||||||
value: false,
|
value: false,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
|
import { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
|
||||||
import { operators, autoFill } from './properties';
|
import { operators, autoFill, primaryKey, unique } from './properties';
|
||||||
|
|
||||||
export class UUIDFieldInterface extends CollectionFieldInterface {
|
export class UUIDFieldInterface extends CollectionFieldInterface {
|
||||||
name = 'uuid';
|
name = 'uuid';
|
||||||
@ -37,6 +37,21 @@ export class UUIDFieldInterface extends CollectionFieldInterface {
|
|||||||
"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}",
|
"{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}",
|
||||||
},
|
},
|
||||||
autoFill,
|
autoFill,
|
||||||
|
layout: {
|
||||||
|
type: 'void',
|
||||||
|
title: '{{t("Index")}}',
|
||||||
|
'x-component': 'Space',
|
||||||
|
'x-decorator': 'FormItem',
|
||||||
|
'x-decorator-props': {
|
||||||
|
style: {
|
||||||
|
marginBottom: '0px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
primaryKey,
|
||||||
|
unique,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
filterable = {
|
filterable = {
|
||||||
operators: operators.string,
|
operators: operators.string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user