guoshilong
2023-08-30 95c0f5417c756864a3a5f8c459a5ea81e887ce5e
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
87
88
89
90
91
92
93
94
95
96
97
98
99
<template>
    <div class="project_add">
        <div class="side-header">
            <div class="side-option flex-display flex-align-center">
                <left-outlined :style="{ fontSize: '18px', marginRight: '8px' }" />
                <h2 class="title">创建项目</h2>
            </div>
            <div class="border-bottom"></div>
        </div>
        <div class="side-form-content">
            <a-form layout="vertical" :model="formState">
                <a-form-item label="项目名称">
                    <a-input v-model:value="formState[FormProject.PROJECT_NAME]" placeholder="项目名称" />
                </a-form-item>
                <a-form-item label="项目简介">
                    <a-textarea :auto-size="{ minRows: 4, maxRows: 8 }" type="textarea" v-model:value="formState[FormProject.PROJCECT_INTRO]" placeholder="项目简介" />
                </a-form-item>
                <a-form-item>
                    <div class="application">
                        <p>申请码加入项目</p>
                        <div class="button">
                            <a-button type="text">
                                未开启
                                <template #icon><right-outlined /></template>
                            </a-button>
                        </div>
                    </div>
                    <a-textarea :auto-size="{ minRows: 4, maxRows: 8 }" type="textarea" v-model:value="formState[FormProject.PROJCECT_INTRO]" placeholder="项目简介" />
                </a-form-item>
                <a-form-item>
                    <a-button type="primary">Submit</a-button>
                </a-form-item>
            </a-form>
        </div>
    </div>
</template>
 
<script setup lang="ts">
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue'
import { FormState, FormProject } from './type'
 
const formState = ref<FormState>({
  [FormProject.PROJECT_NAME]: '',
  [FormProject.PROJECT_STATUS]: '',
  [FormProject.PROJCECT_INTRO]: '',
  [FormProject.LONGITUDE]: 0,
  [FormProject.LATITUDE]: 0,
  [FormProject.USERLIST]: []
})
</script>
 
<style scoped lang="scss">
.project_add {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #232323;
 
    .side-header {
        height: 60px;
        font-size: 16px;
        line-height: 60px;
        box-sizing: border-box;
        background-color: #232323;
        border-bottom: 1px solid #4f4f4f;
 
        .side-option {
            padding: 0 16px;
 
            .title {
                color: $text-white-basic;
                font-size: 18px;
                margin: 0;
                font-weight: 700;
            }
        }
    }
 
    .side-form-content {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
    }
 
    :deep(.ant-form-item-label > label) {
        color: #fff;
    }
 
    :deep(.ant-input) {
        background: #101010;
        border: 1px solid #444;
        color: #fff;
    }
 
    :deep(.ant-input-affix-wrapper) {
        background: #101010;
    }
}
</style>