#
luxiaotao1123
2024-03-12 0fbfa75f0e3b822c4f7d13bd331de52a06093a4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import React, { useState, useRef, useEffect } from 'react';
import { Col, Form, Input, Row, Checkbox, Slider, Select, Drawer, Space, Button, InputNumber, Card } from 'antd';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
import { createStyles } from 'antd-style';
import * as Utils from '../utils'
import * as PIXI from 'pixi.js';
 
const useStyles = createStyles(({ token, css }) => {
 
})
 
const ConfigSettings = (props) => {
    const intl = useIntl();
    const { styles } = useStyles();
    const { curSprite, configForm: form } = props;
 
    useEffect(() => {
    }, []);
 
    const formValuesChange = (changeList) => {
        if (curSprite && changeList && changeList.length > 0) {
            changeList.forEach(change => {
                const { name: nameList, value } = change;
                nameList.forEach(name => {
                    console.log(name, value);
                    switch (name) {
                        default:
                            break;
                    }
                    Utils.removeSelectedEffect();
                    Utils.showSelectedEffect(curSprite);
                })
            })
        }
    }
 
    const onFinishFailed = (errorInfo) => {
    };
 
    const handleFinish = async (values) => {
        props.onSubmit({ ...values });
    }
 
    return (
        <>
            <Form
                form={form}
                onFieldsChange={formValuesChange}
                initialValues={{
                }}
                onFinish={handleFinish}
                onFinishFailed={onFinishFailed}
                autoComplete="off"
                style={{
                    maxWidth: 600,
                }}
                size='default'    // small | default | large
                variant='filled'    // outlined | borderless | filled
                labelWrap   // label 换行
                disabled={false}
                layout='horizontal'
            >
 
                <Row gutter={[24, 16]}>
 
                    <Col span={24}>
                        <Row gutter={24}>
                            <Col span={18}>
                                <Form.Item
                                    label={intl.formatMessage({ id: 'map.settings.type', defaultMessage: '类型' })}
                                    labelCol={{ span: 4 }}
                                >
                                    <span>{curSprite?.data?.type}</span>
                                </Form.Item>
                            </Col>
                        </Row>
                    </Col>
 
 
                </Row>
            </Form>
        </>
    )
}
 
export default ConfigSettings;