neo-cmp-cli 1.8.3 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/utils/cmpUtils/createCmpByTemplate.js +1 -1
- package/src/utils/projectUtils/createCmpProjectByTemplate.js +1 -1
- package/template/antd-custom-cmp-template/.prettierrc.js +12 -0
- package/template/antd-custom-cmp-template/README.md +153 -0
- package/template/antd-custom-cmp-template/commitlint.config.js +59 -0
- package/template/antd-custom-cmp-template/neo.config.js +144 -0
- package/template/antd-custom-cmp-template/package.json +60 -0
- package/template/antd-custom-cmp-template/public/css/base.css +283 -0
- package/template/antd-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/antd-custom-cmp-template/public/template.html +13 -0
- package/template/antd-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/antd-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/antd-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/antd-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/antd-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/README.md +39 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/index.tsx +462 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/model.ts +75 -0
- package/template/antd-custom-cmp-template/src/components/dataDashboard/style.scss +1667 -0
- package/template/antd-custom-cmp-template/src/components/infoCard/index.tsx +87 -0
- package/template/antd-custom-cmp-template/src/components/infoCard/model.ts +80 -0
- package/template/antd-custom-cmp-template/src/components/infoCard/style.scss +105 -0
- package/template/antd-custom-cmp-template/tsconfig.json +68 -0
- package/template/develop/neo-custom-cmp-template/.prettierrc.js +12 -0
- package/template/develop/neo-custom-cmp-template/README.md +48 -0
- package/template/develop/neo-custom-cmp-template/commitlint.config.js +59 -0
- package/template/develop/neo-custom-cmp-template/docs/README.md +13 -0
- package/template/develop/neo-custom-cmp-template/neo.config.js +121 -0
- package/template/develop/neo-custom-cmp-template/package.json +63 -0
- package/template/develop/neo-custom-cmp-template/public/css/base.css +283 -0
- package/template/develop/neo-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/develop/neo-custom-cmp-template/public/template.html +13 -0
- package/template/develop/neo-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/develop/neo-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/develop/neo-custom-cmp-template/src/assets/img/table.svg +1 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/README.md +65 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/index.tsx +180 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/model.ts +50 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactCardList/style.scss +260 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/README.md +94 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/index.tsx +251 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/model.ts +56 -0
- package/template/develop/neo-custom-cmp-template/src/components/contactForm/style.scss +120 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/README.md +115 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/index.tsx +304 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/model.ts +87 -0
- package/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/style.scss +127 -0
- package/template/develop/neo-custom-cmp-template/src/utils/axiosFetcher.ts +29 -0
- package/template/develop/neo-custom-cmp-template/src/utils/queryObjectData.ts +39 -0
- package/template/develop/neo-custom-cmp-template/src/utils/xobjects.ts +203 -0
- package/template/develop/neo-custom-cmp-template/tsconfig.json +68 -0
- package/template/echarts-custom-cmp-template/.prettierrc.js +12 -0
- package/template/echarts-custom-cmp-template/README.md +198 -0
- package/template/echarts-custom-cmp-template/commitlint.config.js +59 -0
- package/template/echarts-custom-cmp-template/neo.config.js +140 -0
- package/template/echarts-custom-cmp-template/package.json +61 -0
- package/template/echarts-custom-cmp-template/public/css/base.css +283 -0
- package/template/echarts-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/echarts-custom-cmp-template/public/template.html +13 -0
- package/template/echarts-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/echarts-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/echarts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/echarts-custom-cmp-template/src/assets/img/chart.svg +1 -0
- package/template/echarts-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/echarts-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/README.md +186 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/index.tsx +724 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/model.ts +151 -0
- package/template/echarts-custom-cmp-template/src/components/chartWidget/style.scss +209 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/README.md +125 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/USAGE.md +190 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/index.tsx +385 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/model.ts +107 -0
- package/template/echarts-custom-cmp-template/src/components/mapWidget/style.scss +192 -0
- package/template/echarts-custom-cmp-template/src/utils/url.ts +82 -0
- package/template/echarts-custom-cmp-template/tsconfig.json +68 -0
- package/template/empty-cmp/index.tsx +58 -0
- package/template/empty-cmp/model.ts +79 -0
- package/template/empty-cmp/style.scss +72 -0
- package/template/empty-custom-cmp-template/.prettierrc.js +12 -0
- package/template/empty-custom-cmp-template/README.md +154 -0
- package/template/empty-custom-cmp-template/commitlint.config.js +59 -0
- package/template/empty-custom-cmp-template/neo.config.js +138 -0
- package/template/empty-custom-cmp-template/package.json +58 -0
- package/template/empty-custom-cmp-template/public/css/base.css +283 -0
- package/template/empty-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/empty-custom-cmp-template/public/template.html +13 -0
- package/template/empty-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/empty-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/empty-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/empty-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/empty-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/empty-custom-cmp-template/src/assets/img/map.svg +1 -0
- package/template/empty-custom-cmp-template/src/components/README.md +3 -0
- package/template/empty-custom-cmp-template/tsconfig.json +68 -0
- package/template/neo-custom-cmp-template/.prettierrc.js +12 -0
- package/template/neo-custom-cmp-template/README.md +155 -0
- package/template/neo-custom-cmp-template/commitlint.config.js +59 -0
- package/template/neo-custom-cmp-template/docs/README.md +244 -0
- package/template/neo-custom-cmp-template/neo.config.js +140 -0
- package/template/neo-custom-cmp-template/package.json +66 -0
- package/template/neo-custom-cmp-template/public/css/base.css +283 -0
- package/template/neo-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/neo-custom-cmp-template/public/template.html +13 -0
- package/template/neo-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/neo-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/neo-custom-cmp-template/src/assets/img/card-list.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/contact-form.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/custom-form.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/data-list.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/detail.svg +1 -0
- package/template/neo-custom-cmp-template/src/assets/img/table.svg +1 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/README.md +61 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/index.tsx +202 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/model.ts +74 -0
- package/template/neo-custom-cmp-template/src/components/entityCardList/style.scss +260 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/README.md +176 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/index.tsx +334 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/model.ts +123 -0
- package/template/neo-custom-cmp-template/src/components/entityDetail/style.scss +292 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/README.md +176 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/index.tsx +615 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/model.ts +107 -0
- package/template/neo-custom-cmp-template/src/components/entityForm/style.scss +370 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/README.md +92 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/index.tsx +784 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/model.ts +134 -0
- package/template/neo-custom-cmp-template/src/components/entityTable/style.scss +304 -0
- package/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +37 -0
- package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +76 -0
- package/template/neo-custom-cmp-template/src/utils/xobjects.ts +162 -0
- package/template/neo-custom-cmp-template/tsconfig.json +49 -0
- package/template/react-custom-cmp-template/.prettierrc.js +12 -0
- package/template/react-custom-cmp-template/README.md +154 -0
- package/template/react-custom-cmp-template/commitlint.config.js +59 -0
- package/template/react-custom-cmp-template/neo.config.js +137 -0
- package/template/react-custom-cmp-template/package.json +57 -0
- package/template/react-custom-cmp-template/public/css/base.css +283 -0
- package/template/react-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/react-custom-cmp-template/public/template.html +13 -0
- package/template/react-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/react-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/react-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/react-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/react-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/react-custom-cmp-template/src/components/infoCard/index.jsx +45 -0
- package/template/react-custom-cmp-template/src/components/infoCard/model.js +81 -0
- package/template/react-custom-cmp-template/src/components/infoCard/style.scss +67 -0
- package/template/react-ts-custom-cmp-template/.prettierrc.js +12 -0
- package/template/react-ts-custom-cmp-template/README.md +154 -0
- package/template/react-ts-custom-cmp-template/commitlint.config.js +59 -0
- package/template/react-ts-custom-cmp-template/neo.config.js +138 -0
- package/template/react-ts-custom-cmp-template/package.json +59 -0
- package/template/react-ts-custom-cmp-template/public/css/base.css +283 -0
- package/template/react-ts-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/react-ts-custom-cmp-template/public/template.html +13 -0
- package/template/react-ts-custom-cmp-template/src/assets/css/common.scss +127 -0
- package/template/react-ts-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/react-ts-custom-cmp-template/src/assets/img/map.svg +1 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/README.md +2 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/index.tsx +208 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/model.ts +92 -0
- package/template/react-ts-custom-cmp-template/src/components/listWidget/style.scss +350 -0
- package/template/react-ts-custom-cmp-template/tsconfig.json +68 -0
- package/template/vue2-custom-cmp-template/.prettierrc.js +12 -0
- package/template/vue2-custom-cmp-template/README.md +154 -0
- package/template/vue2-custom-cmp-template/commitlint.config.js +59 -0
- package/template/vue2-custom-cmp-template/neo.config.js +146 -0
- package/template/vue2-custom-cmp-template/package.json +59 -0
- package/template/vue2-custom-cmp-template/public/css/base.css +283 -0
- package/template/vue2-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
- package/template/vue2-custom-cmp-template/public/template.html +13 -0
- package/template/vue2-custom-cmp-template/src/assets/css/common.scss +126 -0
- package/template/vue2-custom-cmp-template/src/assets/css/mixin.scss +47 -0
- package/template/vue2-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
- package/template/vue2-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
- package/template/vue2-custom-cmp-template/src/assets/img/favicon.png +0 -0
- package/template/vue2-custom-cmp-template/src/components/vueInfoCard/index.vue +131 -0
- package/template/vue2-custom-cmp-template/src/components/vueInfoCard/model.js +81 -0
- package/test/deprecate-versions.js +1 -1
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
.entity-form-container {
|
|
2
|
+
.form-header {
|
|
3
|
+
margin-bottom: 24px;
|
|
4
|
+
padding-bottom: 16px;
|
|
5
|
+
border-bottom: 1px solid #f0f0f0;
|
|
6
|
+
|
|
7
|
+
.form-title {
|
|
8
|
+
margin: 0;
|
|
9
|
+
font-size: 18px;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
color: #262626;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.form-content {
|
|
16
|
+
.ant-form {
|
|
17
|
+
.ant-form-item {
|
|
18
|
+
margin-bottom: 20px;
|
|
19
|
+
|
|
20
|
+
.ant-form-item-label {
|
|
21
|
+
padding-bottom: 6px;
|
|
22
|
+
|
|
23
|
+
label {
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
color: #262626;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
|
|
28
|
+
&::before {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
margin-right: 4px;
|
|
31
|
+
color: #ff4d4f;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
font-family: SimSun, sans-serif;
|
|
34
|
+
line-height: 1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-input,
|
|
40
|
+
.ant-select-selector,
|
|
41
|
+
.ant-input-number,
|
|
42
|
+
.ant-picker {
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
border: 1px solid #d9d9d9;
|
|
45
|
+
transition: all 0.3s;
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
border-color: #40a9ff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:focus,
|
|
52
|
+
&.ant-input-focused,
|
|
53
|
+
&.ant-select-focused .ant-select-selector,
|
|
54
|
+
&.ant-picker-focused {
|
|
55
|
+
border-color: #40a9ff;
|
|
56
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ant-input-number {
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ant-input-textarea {
|
|
65
|
+
textarea {
|
|
66
|
+
resize: vertical;
|
|
67
|
+
min-height: 80px;
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ant-picker {
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ant-select {
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// 错误提示样式
|
|
82
|
+
.ant-form-item-has-error {
|
|
83
|
+
.ant-input,
|
|
84
|
+
.ant-select-selector,
|
|
85
|
+
.ant-input-number,
|
|
86
|
+
.ant-picker {
|
|
87
|
+
border-color: #ff4d4f;
|
|
88
|
+
|
|
89
|
+
&:focus {
|
|
90
|
+
border-color: #ff4d4f;
|
|
91
|
+
box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.submit-success-message {
|
|
98
|
+
margin: 16px 0;
|
|
99
|
+
padding: 12px 16px;
|
|
100
|
+
background-color: #f6ffed;
|
|
101
|
+
border: 1px solid #b7eb8f;
|
|
102
|
+
border-radius: 4px;
|
|
103
|
+
color: #52c41a;
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
animation: fadeIn 0.3s ease-in;
|
|
108
|
+
|
|
109
|
+
.anticon {
|
|
110
|
+
margin-right: 8px;
|
|
111
|
+
font-size: 16px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.form-actions {
|
|
116
|
+
margin-top: 32px;
|
|
117
|
+
padding-top: 24px;
|
|
118
|
+
border-top: 1px solid #f0f0f0;
|
|
119
|
+
text-align: center;
|
|
120
|
+
|
|
121
|
+
.ant-space {
|
|
122
|
+
.ant-btn {
|
|
123
|
+
min-width: 100px;
|
|
124
|
+
height: 40px;
|
|
125
|
+
font-size: 15px;
|
|
126
|
+
border-radius: 4px;
|
|
127
|
+
font-weight: 500;
|
|
128
|
+
transition: all 0.3s;
|
|
129
|
+
|
|
130
|
+
&.ant-btn-primary {
|
|
131
|
+
background: #1890ff;
|
|
132
|
+
border-color: #1890ff;
|
|
133
|
+
|
|
134
|
+
&:hover {
|
|
135
|
+
background: #40a9ff;
|
|
136
|
+
border-color: #40a9ff;
|
|
137
|
+
transform: translateY(-2px);
|
|
138
|
+
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:active {
|
|
142
|
+
background: #096dd9;
|
|
143
|
+
border-color: #096dd9;
|
|
144
|
+
transform: translateY(0);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:disabled {
|
|
148
|
+
background: #f5f5f5;
|
|
149
|
+
border-color: #d9d9d9;
|
|
150
|
+
color: rgba(0, 0, 0, 0.25);
|
|
151
|
+
transform: none;
|
|
152
|
+
box-shadow: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:not(.ant-btn-primary) {
|
|
157
|
+
&:hover {
|
|
158
|
+
color: #40a9ff;
|
|
159
|
+
border-color: #40a9ff;
|
|
160
|
+
transform: translateY(-2px);
|
|
161
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&:active {
|
|
165
|
+
color: #096dd9;
|
|
166
|
+
border-color: #096dd9;
|
|
167
|
+
transform: translateY(0);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ant-empty {
|
|
175
|
+
padding: 40px 0;
|
|
176
|
+
|
|
177
|
+
.ant-empty-description {
|
|
178
|
+
color: #8c8c8c;
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 动画效果
|
|
185
|
+
@keyframes fadeIn {
|
|
186
|
+
from {
|
|
187
|
+
opacity: 0;
|
|
188
|
+
transform: translateY(-10px);
|
|
189
|
+
}
|
|
190
|
+
to {
|
|
191
|
+
opacity: 1;
|
|
192
|
+
transform: translateY(0);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// 响应式设计
|
|
197
|
+
@media (max-width: 768px) {
|
|
198
|
+
.form-header {
|
|
199
|
+
margin-bottom: 16px;
|
|
200
|
+
padding-bottom: 12px;
|
|
201
|
+
|
|
202
|
+
.form-title {
|
|
203
|
+
font-size: 16px;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.form-content {
|
|
208
|
+
.ant-form {
|
|
209
|
+
.ant-form-item {
|
|
210
|
+
margin-bottom: 16px;
|
|
211
|
+
|
|
212
|
+
.ant-form-item-label {
|
|
213
|
+
label {
|
|
214
|
+
font-size: 13px;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.ant-input,
|
|
219
|
+
.ant-select-selector,
|
|
220
|
+
.ant-input-number,
|
|
221
|
+
.ant-picker {
|
|
222
|
+
font-size: 14px;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.form-actions {
|
|
228
|
+
margin-top: 24px;
|
|
229
|
+
padding-top: 16px;
|
|
230
|
+
|
|
231
|
+
.ant-space {
|
|
232
|
+
.ant-btn {
|
|
233
|
+
min-width: 80px;
|
|
234
|
+
height: 36px;
|
|
235
|
+
font-size: 14px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@media (max-width: 576px) {
|
|
243
|
+
.form-header {
|
|
244
|
+
.form-title {
|
|
245
|
+
font-size: 15px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.form-content {
|
|
250
|
+
.ant-form {
|
|
251
|
+
// 在小屏幕上强制单列显示
|
|
252
|
+
.ant-row {
|
|
253
|
+
.ant-col {
|
|
254
|
+
max-width: 100% !important;
|
|
255
|
+
flex: 0 0 100% !important;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ant-form-item {
|
|
260
|
+
margin-bottom: 14px;
|
|
261
|
+
|
|
262
|
+
.ant-form-item-label {
|
|
263
|
+
label {
|
|
264
|
+
font-size: 13px;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.form-actions {
|
|
271
|
+
.ant-space {
|
|
272
|
+
width: 100%;
|
|
273
|
+
|
|
274
|
+
.ant-space-item {
|
|
275
|
+
flex: 1;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.ant-btn {
|
|
279
|
+
width: 100%;
|
|
280
|
+
min-width: auto;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// 全局样式覆盖
|
|
289
|
+
.ant-card {
|
|
290
|
+
border-radius: 6px;
|
|
291
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
292
|
+
|
|
293
|
+
.ant-card-body {
|
|
294
|
+
padding: 24px;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// Spin 加载样式
|
|
299
|
+
.ant-spin {
|
|
300
|
+
.ant-spin-dot {
|
|
301
|
+
font-size: 20px;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ant-spin-text {
|
|
305
|
+
color: #8c8c8c;
|
|
306
|
+
font-size: 14px;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Select 下拉样式优化
|
|
311
|
+
.ant-select-dropdown {
|
|
312
|
+
border-radius: 4px;
|
|
313
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
314
|
+
|
|
315
|
+
.ant-select-item {
|
|
316
|
+
padding: 8px 12px;
|
|
317
|
+
|
|
318
|
+
&:hover {
|
|
319
|
+
background-color: #f5f5f5;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
&.ant-select-item-option-selected {
|
|
323
|
+
background-color: #e6f7ff;
|
|
324
|
+
color: #1890ff;
|
|
325
|
+
font-weight: 500;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// DatePicker 日期选择器样式优化
|
|
331
|
+
.ant-picker-dropdown {
|
|
332
|
+
.ant-picker-panel-container {
|
|
333
|
+
border-radius: 4px;
|
|
334
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.ant-picker-cell-selected {
|
|
338
|
+
.ant-picker-cell-inner {
|
|
339
|
+
background-color: #1890ff;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.ant-picker-cell:hover:not(.ant-picker-cell-selected) {
|
|
344
|
+
.ant-picker-cell-inner {
|
|
345
|
+
background-color: #f5f5f5;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// InputNumber 数字输入框样式优化
|
|
351
|
+
.ant-input-number {
|
|
352
|
+
.ant-input-number-handler-wrap {
|
|
353
|
+
opacity: 0;
|
|
354
|
+
transition: opacity 0.3s;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
&:hover {
|
|
358
|
+
.ant-input-number-handler-wrap {
|
|
359
|
+
opacity: 1;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.ant-input-number-handler {
|
|
364
|
+
border-left: 1px solid #d9d9d9;
|
|
365
|
+
|
|
366
|
+
&:hover {
|
|
367
|
+
background-color: #f5f5f5;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# XObject 数据表格组件
|
|
2
|
+
基于 XObject 的数据表格组件,支持增删改查操作,表格列根据 `xObject.getDesc` 返回的 fields 动态生成。
|
|
3
|
+
备注:使用 Neo Open API SDK(neo-open-api) 提供的方法实现数据对象的增删改查相关操作。
|
|
4
|
+
|
|
5
|
+
## 功能特性
|
|
6
|
+
|
|
7
|
+
- 📊 **动态表格列**:根据 XObject 字段描述自动生成表格列
|
|
8
|
+
- ➕ **新增记录**:支持通过弹窗表单新增数据记录
|
|
9
|
+
- ✏️ **编辑记录**:支持编辑现有数据记录
|
|
10
|
+
- 🗑️ **删除记录**:支持删除数据记录,带确认提示
|
|
11
|
+
- 🔄 **数据刷新**:支持手动刷新数据
|
|
12
|
+
- 📄 **分页支持**:支持分页显示,可配置每页显示条数
|
|
13
|
+
- 🎨 **响应式设计**:适配不同屏幕尺寸
|
|
14
|
+
- ⚙️ **属性配置**:支持通过编辑器配置组件属性
|
|
15
|
+
|
|
16
|
+
## 组件属性
|
|
17
|
+
|
|
18
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
19
|
+
|--------|------|--------|------|
|
|
20
|
+
| title | string | '数据表格' | 表格标题 |
|
|
21
|
+
| xObjectApiKey | string | '' | 数据对象的 API Key |
|
|
22
|
+
| pageSize | number | 10 | 每页显示条数 |
|
|
23
|
+
| showPagination | boolean | true | 是否显示分页 |
|
|
24
|
+
| showAddButton | boolean | true | 是否显示新增按钮 |
|
|
25
|
+
| showEditButton | boolean | true | 是否显示编辑按钮 |
|
|
26
|
+
| showDeleteButton | boolean | true | 是否显示删除按钮 |
|
|
27
|
+
|
|
28
|
+
## 使用方法
|
|
29
|
+
|
|
30
|
+
### 1. 在编辑器中使用
|
|
31
|
+
|
|
32
|
+
1. 从组件面板拖拽 "XObject 数据表格" 组件到页面
|
|
33
|
+
2. 在右侧属性面板中选择要操作的数据对象
|
|
34
|
+
3. 配置其他属性(可选)
|
|
35
|
+
4. 保存并预览
|
|
36
|
+
|
|
37
|
+
### 2. 代码中使用
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import EntityTable from './components/entity-table';
|
|
41
|
+
|
|
42
|
+
// 使用组件
|
|
43
|
+
<EntityTable
|
|
44
|
+
title="联系人列表"
|
|
45
|
+
xObjectApiKey="customContact__c"
|
|
46
|
+
pageSize={20}
|
|
47
|
+
showPagination={true}
|
|
48
|
+
showAddButton={true}
|
|
49
|
+
showEditButton={true}
|
|
50
|
+
showDeleteButton={true}
|
|
51
|
+
/>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 技术实现
|
|
55
|
+
|
|
56
|
+
### 核心依赖
|
|
57
|
+
|
|
58
|
+
- **Ant Design**:UI 组件库
|
|
59
|
+
- **React**:前端框架
|
|
60
|
+
- **TypeScript**:类型支持
|
|
61
|
+
|
|
62
|
+
### 数据流程
|
|
63
|
+
|
|
64
|
+
1. **初始化**:组件挂载时获取实体列表和字段描述
|
|
65
|
+
2. **列生成**:根据字段描述动态生成表格列
|
|
66
|
+
3. **数据加载**:使用 `xObject.query` 获取数据列表
|
|
67
|
+
4. **操作处理**:通过对应的 API 方法处理增删改操作
|
|
68
|
+
|
|
69
|
+
## 样式定制
|
|
70
|
+
|
|
71
|
+
组件提供了完整的 SCSS 样式文件,支持以下定制:
|
|
72
|
+
|
|
73
|
+
- 表格样式(边框、悬停效果等)
|
|
74
|
+
- 按钮样式(颜色、大小、间距等)
|
|
75
|
+
- 弹窗样式(表单布局、输入框样式等)
|
|
76
|
+
- 响应式设计(移动端适配)
|
|
77
|
+
|
|
78
|
+
## 注意事项
|
|
79
|
+
|
|
80
|
+
1. **权限要求**:确保用户有对应 XObject 的读写权限
|
|
81
|
+
2. **字段类型**:目前支持 text、textarea、select 等基础字段类型
|
|
82
|
+
3. **必填字段**:表单会根据字段的 required 属性进行验证
|
|
83
|
+
4. **错误处理**:组件内置了完善的错误处理和用户提示
|
|
84
|
+
|
|
85
|
+
## 扩展开发
|
|
86
|
+
|
|
87
|
+
如需扩展功能,可以:
|
|
88
|
+
|
|
89
|
+
1. **添加字段类型支持**:在 `renderForm()` 方法中添加新的字段类型
|
|
90
|
+
2. **自定义操作列**:修改 `generateColumns()` 方法中的操作列配置
|
|
91
|
+
3. **添加批量操作**:扩展表格功能支持批量删除等操作
|
|
92
|
+
4. **自定义样式**:修改 `style.scss` 文件定制组件外观
|