mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
8c5edfc494
@ -257,8 +257,7 @@ export const SubTable: any = observer(
|
||||
{field.editable && (
|
||||
<Space
|
||||
style={{
|
||||
marginTop: '10px',
|
||||
position: field.value?.length ? 'absolute' : 'relative',
|
||||
position: 'relative',
|
||||
bottom: '0',
|
||||
gap: 15,
|
||||
}}
|
||||
|
@ -26,12 +26,13 @@ import { Json } from '../input';
|
||||
const JT_VALUE_RE = /^\s*{{\s*([^{}]+)\s*}}\s*$/;
|
||||
|
||||
type ParseOptions = {
|
||||
defaultTypeOnNull?: string;
|
||||
stringToDate?: boolean;
|
||||
};
|
||||
|
||||
function parseValue(value: any, options: ParseOptions = {}): string | string[] {
|
||||
if (value == null) {
|
||||
return 'null';
|
||||
return options.defaultTypeOnNull ?? 'null';
|
||||
}
|
||||
const type = typeof value;
|
||||
if (type === 'string') {
|
||||
|
@ -57,6 +57,9 @@ export default class extends Instruction {
|
||||
placeholder: `{{t("Duration", { ns: "${NAMESPACE}" })}}`,
|
||||
useTypedConstant: [['number', { min: 1 }]],
|
||||
nullable: false,
|
||||
parseOptions: {
|
||||
defaultTypeOnNull: 'number',
|
||||
},
|
||||
},
|
||||
default: 1,
|
||||
required: true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user