wip reset animate

This commit is contained in:
hufeixiong
2022-01-26 18:04:46 +08:00
parent 83ec24ff7e
commit 5629f2755d
15 changed files with 105 additions and 29 deletions

View File

@@ -243,20 +243,22 @@ function ActionButton(props: ActionButtonProps) {
<div>
<Row
style={{
padding: 20,
padding: 10,
justifyContent: 'space-between',
alignItems: 'center',
}}
>
<Col span={8}>ID</Col>
<Col span={16}>{props.current.id}</Col>
<Col span={16} style={{ textAlign: 'right' }}>
{props.current.id}
</Col>
</Row>
{currentOption.map((j, i) => {
return (
<Row
key={i}
style={{
padding: 20,
padding: 10,
justifyContent: 'space-between',
alignItems: 'center',
}}

View File

@@ -123,6 +123,7 @@ const timeFunction: Record<string, string> = {
let lastAnimate: AnimateItem[] = [];
let isOmit = false;
const padding = 10;
function AnimateControl(props: AnimateControlProps) {
const store = props.config.getStore();
@@ -137,8 +138,8 @@ function AnimateControl(props: AnimateControlProps) {
<>
{animate.map((v, i) => {
return (
<div key={v.uid}>
<Row style={{ padding: '20px', alignItems: 'center' }}>
<div key={v.uid} style={{ borderBottom: '1px dotted #9e9e9e' }}>
<Row style={{ padding: padding, alignItems: 'center' }}>
<Col span={5}>:</Col>
<Col span={7}>
<Select
@@ -193,7 +194,7 @@ function AnimateControl(props: AnimateControlProps) {
/>
</Col>
</Row>
<Row style={{ padding: '20px', alignItems: 'center' }}>
<Row style={{ padding: padding, alignItems: 'center' }}>
<Col span={5}>:</Col>
<Col span={7}>
<InputNumber
@@ -248,7 +249,7 @@ function AnimateControl(props: AnimateControlProps) {
</Select>
</Col>
</Row>
<Row style={{ padding: '20px', alignItems: 'center' }}>
<Row style={{ padding: padding, alignItems: 'center' }}>
<Col span={5}>:</Col>
<Col span={7}>
<Select
@@ -298,7 +299,7 @@ function AnimateControl(props: AnimateControlProps) {
);
})}
<Row style={{ padding: '20px', justifyContent: 'space-around' }}>
<Row style={{ padding: padding, justifyContent: 'space-around' }}>
{animate.length > 0 && (
<Button
onClick={() => {
@@ -325,6 +326,7 @@ function AnimateControl(props: AnimateControlProps) {
store.cleanLast();
store.setData(clone);
store.cleanLast();
props.config.timelineNeedleConfig.resetFunc();
});
}
}}
@@ -349,6 +351,7 @@ function AnimateControl(props: AnimateControlProps) {
}
});
store.setData(cloneData);
props.config.timelineNeedleConfig.resetFunc();
}}
>

View File

@@ -25,7 +25,7 @@ function MInput(props: MInputProps) {
}, [props.data]);
const store = props.config.getStore();
return (
<Row style={{ padding: '10px 20px' }}>
<Row style={{ padding: '10px' }}>
<Col span={6} style={{ lineHeight: '30px' }}>
{option.label || '文字'}
</Col>

View File

@@ -24,11 +24,11 @@ const MSwitch = (props: MSwitchProps) => {
}, [props.data]);
const store = props.config.getStore();
return (
<Row style={{ padding: '10px 20px' }}>
<Row style={{ padding: '10px' }}>
<Col span={8} style={{ lineHeight: '30px' }}>
{(option as any)?.label || '文字'}
</Col>
<Col span={16}>
<Col span={16} style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<Switch
checked={props.current.props[(option as any).receive] || ''}
onChange={(checked) => {