fix(plugin-workflow): fix select width (#552)

* fix(plugin-workflow): fix select width

* test(plugin-workflow): skip schedule cases
This commit is contained in:
Junyi 2022-06-29 14:30:33 +08:00 committed by GitHub
parent 44f23ca920
commit 8f0ea6c3c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 7 deletions

View File

@ -309,10 +309,6 @@ export function Calculation({ calculator, operands = [], onChange }) {
display: flex;
gap: .5em;
align-items: center;
.ant-select{
width: auto;
}
`}>
<Operand value={operands[0]} onChange={(v => onChange({ calculator, operands: [v, operands[1]] }))} />
{operands[0]

View File

@ -230,6 +230,7 @@ export function NodeDefaultView(props) {
.ant-input-number,
.ant-input-affix-wrapper{
width: auto;
min-width: 6em;
}
`
},

View File

@ -47,7 +47,35 @@ export default {
title: '{{t("Collection event")}}',
type: 'collection',
fieldset: {
'config.collection': collection,
'config.collection': {
...collection,
['x-reactions']: [
{
target: 'config.mode',
fulfill: {
state: {
visible: '{{!!$self.value}}',
},
}
},
{
target: 'config.changed',
fulfill: {
state: {
visible: '{{!!$self.value}}',
},
}
},
{
target: 'config.condition',
fulfill: {
state: {
visible: '{{!!$self.value}}',
},
}
}
]
},
'config.mode': {
type: 'number',
title: '{{t("Trigger on")}}',
@ -63,7 +91,17 @@ export default {
],
placeholder: '{{t("Trigger on")}}'
},
required: true
required: true,
'x-reactions': [
{
target: 'config.changed',
fulfill: {
state: {
disabled: '{{!($self.value & 0b010)}}',
},
}
},
]
},
'config.changed': {
type: 'array',

View File

@ -97,6 +97,7 @@ export const TriggerConfig = () => {
className: css`
.ant-select{
width: auto;
min-width: 6em;
}
`
},

View File

@ -4,7 +4,7 @@ import { getApp, sleep } from '..';
describe('workflow > triggers > schedule', () => {
describe.skip('workflow > triggers > schedule', () => {
let app: Application;
let db: Database;
let PostRepo;