Skip to content

Commit 7754336

Browse files
committed
init
1 parent 41a05b1 commit 7754336

5 files changed

Lines changed: 168 additions & 400 deletions

File tree

‎src/assets/css/config.scss‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
.widget-config-container {
2+
position: relative;
3+
4+
.ghost {
5+
position: relative;
6+
&::after {
7+
display: block;
8+
content: '';
9+
position: absolute;
10+
top: 0;
11+
left: 0;
12+
right: 0;
13+
bottom: 0;
14+
background: #fff;
15+
}
16+
}
17+
18+
.el-header {
19+
border-bottom: solid 2px #e4e7ed;
20+
padding: 0 5px;
21+
}
22+
23+
.move-icon {
24+
font-size: 20px;
25+
color: #999;
26+
margin: 0 10px;
27+
cursor: move;
28+
29+
&:hover {
30+
color: #409EFF;
31+
}
32+
}
33+
.delect-icon {
34+
font-size: 20px;
35+
color: #999;
36+
margin-left: 5px;
37+
cursor: pointer;
38+
39+
&:hover {
40+
color: #f56c6c;
41+
}
42+
}
43+
44+
.avatar-uploader .el-upload {
45+
border: 1px dashed #d9d9d9;
46+
border-radius: 6px;
47+
cursor: pointer;
48+
position: relative;
49+
overflow: hidden;
50+
}
51+
.avatar-uploader .el-upload:hover {
52+
border-color: $primary-color;
53+
}
54+
.avatar-uploader-icon {
55+
font-size: 28px;
56+
color: #8c939d;
57+
width: 100px;
58+
height: 100px;
59+
line-height: 100px;
60+
text-align: center;
61+
border: 1px dashed #d9d9d9;
62+
}
63+
.avatar {
64+
width: 100px;
65+
height: 100px;
66+
display: block;
67+
}
68+
69+
.config-tab {
70+
height: 45px;
71+
line-height: 45px;
72+
display: inline-block;
73+
width: 145px;
74+
text-align: center;
75+
font-size: 14px;
76+
font-weight: 500;
77+
position: relative;
78+
cursor: pointer;
79+
80+
&.active {
81+
border-bottom: solid 2px $primary-color;
82+
}
83+
}
84+
85+
.config-content {
86+
padding: 10px;
87+
88+
.el-form-item__label {
89+
padding: 0;
90+
font-weight: 500;
91+
}
92+
93+
.el-form-item {
94+
border-bottom: solid 1px #e1e1e1;
95+
padding-bottom: 10px;
96+
}
97+
}
98+
}

‎src/assets/css/index.scss‎

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -88,91 +88,4 @@ $primary-background-color: #ecf5ff;
8888
background: #F4F6FC;
8989
}
9090
}
91-
}
92-
93-
.widget-config-container {
94-
position: relative;
95-
96-
.el-header {
97-
border-bottom: solid 2px #e4e7ed;
98-
padding: 0 5px;
99-
}
100-
101-
.config-tab {
102-
height: 45px;
103-
line-height: 45px;
104-
display: inline-block;
105-
width: 145px;
106-
text-align: center;
107-
font-size: 14px;
108-
font-weight: 500;
109-
position: relative;
110-
cursor: pointer;
111-
112-
&.active {
113-
border-bottom: solid 2px $primary-color;
114-
}
115-
}
116-
117-
.config-content {
118-
padding: 10px;
119-
120-
.el-form-item__label {
121-
padding: 0;
122-
font-weight: 500;
123-
}
124-
125-
.el-form-item {
126-
border-bottom: solid 1px #e1e1e1;
127-
padding-bottom: 10px;
128-
}
129-
}
130-
131-
.ghost {
132-
background: #fff;
133-
border: 1px dashed $primary-color;
134-
135-
&::after {
136-
background: #fff;
137-
display: block;
138-
content: '';
139-
position: absolute;
140-
top: 0;
141-
left: 0;
142-
right: 0;
143-
bottom: 0;
144-
}
145-
}
146-
147-
li.ghost {
148-
list-style: none;
149-
font-size: 0;
150-
display: block;
151-
position: relative;
152-
}
153-
}
154-
155-
.avatar-uploader .el-upload {
156-
border: 1px dashed #d9d9d9;
157-
border-radius: 6px;
158-
cursor: pointer;
159-
position: relative;
160-
overflow: hidden;
161-
}
162-
.avatar-uploader .el-upload:hover {
163-
border-color: $primary-color;
164-
}
165-
.avatar-uploader-icon {
166-
font-size: 28px;
167-
color: #8c939d;
168-
width: 100px;
169-
height: 100px;
170-
line-height: 100px;
171-
text-align: center;
172-
border: 1px dashed #d9d9d9;
173-
}
174-
.avatar {
175-
width: 100px;
176-
height: 100px;
177-
display: block;
17891
}

‎src/assets/json/all-widget.json‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
{
22
"basicComponents": [{
33
"type": "input",
4-
"name": "单行文本",
4+
"name": "输入框",
55
"config": {
6-
"width": "100%",
7-
"defaultValue": "",
6+
"selectType":"name",
7+
"inputTypes":[{
8+
"value": "name",
9+
"label": "姓名"
10+
},{
11+
"value": "mail",
12+
"label": "邮箱"
13+
},{
14+
"value": "age",
15+
"label": "年龄(岁)"
16+
},{
17+
"value": "idCard",
18+
"label": "身份证"
19+
},{
20+
"value": "phone",
21+
"label": "手机号"
22+
}],
23+
"defaultValue": "",
24+
"apiKey":"name",
825
"required": false,
9-
"dataType": "string",
10-
"pattern": "",
11-
"placeholder": ""
26+
"placeholder": "请输入内容"
1227
}
1328
},
1429
{
@@ -96,7 +111,7 @@
96111
"multiple": false,
97112
"disabled": false,
98113
"clearable": false,
99-
"placeholder": "",
114+
"placeholder": "请选择",
100115
"required": false,
101116
"showLabel": false,
102117
"width": "",

0 commit comments

Comments
 (0)