Skip to content

Commit 1a98652

Browse files
authored
Merge pull request vincentzyc#9 from vincentzyc/develop
v1.1.0
2 parents 6fcfd18 + ca18044 commit 1a98652

File tree

15 files changed

+562
-343
lines changed

15 files changed

+562
-343
lines changed

src/assets/css/themes.styl

Lines changed: 51 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,59 @@
1-
$t1-base-color = #409EFF;
2-
$t2-base-color = #fe7c01;
3-
$t3-base-color = #6e7786;
4-
51
.theme1 {
6-
width: 90%;
7-
background: #fff;
8-
margin: 0 auto 20px auto;
9-
padding: 10px 0;
10-
overflow: hidden;
2+
.widget-child-form-list {
3+
position: relative;
4+
background: #fff;
5+
box-shadow: 5px 5px 10px 0 rgba(116, 116, 116, 0.6), -5px 5px 10px 0 rgba(116, 116, 116, 0.6);
6+
}
117
}
128

139
.theme2 {
14-
width: 90%;
15-
background: #fff;
16-
margin: 0 auto 20px auto;
17-
padding: 10px 0;
18-
overflow: hidden;
10+
.widget-form-list {
11+
.widget-child-form-list {
12+
position: relative;
13+
background: #fff;
14+
padding: 10px;
15+
}
16+
17+
.wg-title:after {
18+
content: '*';
19+
color: #e10012;
20+
font-weight: 700;
21+
font-size: 14px;
22+
}
23+
24+
.wg-input, .wg-select {
25+
border: none;
26+
}
27+
28+
.widget-view:not(:last-child) .wg-item {
29+
border-bottom: 1px solid #ddd;
30+
}
31+
32+
.widget-view .wg-item:not(:last-child) {
33+
border-bottom: 1px solid #ddd;
34+
}
35+
}
1936
}
2037

2138
.theme3 {
22-
position: relative;
23-
background: #fff;
24-
padding: 10px 0;
25-
box-shadow: 5px 5px 10px 0 rgba(116, 116, 116, 0.6), -5px 5px 10px 0 rgba(116, 116, 116, 0.6);
39+
.widget-form-list {
40+
.widget-child-form-list {
41+
position: relative;
42+
background: #fff;
43+
padding: 10px;
44+
}
45+
46+
.wg-title:after {
47+
content: '*';
48+
color: #e10012;
49+
font-weight: 700;
50+
font-size: 14px;
51+
}
52+
53+
.wg-input, .wg-select {
54+
border-radius: 10px;
55+
padding: 0 10px;
56+
border: 1px solid #a92200;
57+
}
58+
}
2659
}

src/assets/css/widget.styl

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ $primary-background-color = #d8e8fa;
3030

3131
.widget-form-list {
3232
min-height: 360px;
33+
padding: 1px;
3334

3435
.ghost {
3536
background: #fff;
@@ -75,6 +76,50 @@ $primary-background-color = #d8e8fa;
7576
z-index: 1009;
7677
}
7778

79+
.widget-view.no-padding {
80+
padding: 0;
81+
82+
.img-placeholder {
83+
background: #f1f1f1;
84+
}
85+
}
86+
87+
.widget-child-form-list {
88+
position: relative;
89+
transition: 0.2s;
90+
padding: 10px;
91+
92+
.el-icon-rank {
93+
display: none;
94+
position: absolute;
95+
left: -28px;
96+
top: 15px;
97+
font-size: 24px;
98+
padding: 2px;
99+
background-color: #409eff;
100+
color: #fff;
101+
z-index: 1001;
102+
cursor: move;
103+
}
104+
105+
&:hover {
106+
box-shadow: 0px 1px 10px 1px #90c7ff inset;
107+
108+
.el-icon-rank {
109+
display: block;
110+
}
111+
}
112+
113+
&.active {
114+
box-shadow: 0px 1px 10px 1px #90c7ff;
115+
z-index: 1111;
116+
117+
.el-icon-rank {
118+
display: block;
119+
}
120+
}
121+
}
122+
78123
.widget-view {
79124
margin: 0;
80125
padding: 5px 10px;
@@ -114,16 +159,14 @@ $primary-background-color = #d8e8fa;
114159

115160
.wg-phone {
116161
.getVerCode-btn {
117-
border: 0;
118162
outline: 0;
119-
font-size: 14px;
120-
color: #fff;
121-
border-radius: 5px;
122-
height: 40px;
163+
font-size: 12px;
164+
height: 36px;
123165
min-width: 100px;
124166
margin-top: 5px;
125167
margin-left: 10px;
126168
cursor: pointer;
169+
border: 1px solid transparent;
127170
}
128171
}
129172

src/assets/js/field-types.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
export default {
2+
"inputTypes": [{
3+
"value": "name",
4+
"label": "姓名"
5+
}, {
6+
"value": "mail",
7+
"label": "邮箱"
8+
}, {
9+
"value": "idCard",
10+
"label": "身份证"
11+
}],
12+
13+
"checkboxTypes": [{
14+
"value": "shootPlace",
15+
"label": "旅拍城市",
16+
"options": ["北京", "三亚", "丽江", "巴厘岛", "马尔代夫", "威尼斯", "其他"]
17+
}, {
18+
"value": "sex",
19+
"label": "性别",
20+
"options": ["男", "女"]
21+
}, {
22+
"value": "loanTimeList",
23+
"label": "贷款时间",
24+
"options": ["12个月", "24个月", "36个月", "48个月"]
25+
}],
26+
27+
"selectTypes": [{
28+
"value": "educationLevel",
29+
"label": "教育程度",
30+
"options": ["硕士及以上", "本科", "大专", "中专/高中及以下"]
31+
}, {
32+
"value": "profession",
33+
"label": "职业身份",
34+
"options": ["上班族", "个体户", "电商主", "自由职业者", "企业主"]
35+
}, {
36+
"value": "AutomobileAssets",
37+
"label": "名下是否有车",
38+
"options": ["无车", "无车,准备购买", "本人名下有车,无贷款", "本人名下有车,有按揭贷款", "本人名下有车,但已被抵押"]
39+
}],
40+
41+
"switchTypes": [{
42+
"value": "creditCard",
43+
"label": "是否有信用卡"
44+
}, {
45+
"value": "socialSecurity",
46+
"label": "是否有社保"
47+
}, {
48+
"value": "accFund",
49+
"label": "是否有公积金"
50+
}],
51+
52+
"hPickerTypes": [{
53+
"value": "age",
54+
"label": "年龄",
55+
"options": ["20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40"]
56+
}, {
57+
"value": "amount",
58+
"label": "金额",
59+
"options": ["1000以下", "2000", "3000", "5000", "1万", "3万", "5万", "10万", "10万以上"]
60+
}],
61+
62+
"dateTypes": [{
63+
"value": "birthday",
64+
"label": "生日"
65+
}, {
66+
"value": "idCardValidity",
67+
"label": "身份证有效期"
68+
}]
69+
}

src/assets/js/page-config.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/json/widget.json renamed to src/assets/js/widget.js

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
export default {
22
"basicComponents": [
33
{
44
"type": "phone",
@@ -19,7 +19,11 @@
1919
"style": {
2020
"margin": "0px 0px 0px 0px",
2121
"btnStyle": {
22-
"background": "#409EFF"
22+
"background": "#409EFF",
23+
color: "#fff",
24+
borderColor: "#409EFF",
25+
borderRadius: '5px',
26+
borderradius: 5,
2327
}
2428
}
2529
},
@@ -126,7 +130,7 @@
126130
{
127131
"type": "h-picker",
128132
"name": "横向滑动单选",
129-
"value": "",
133+
"value": "20",
130134
"options": [
131135
"20",
132136
"21",
@@ -183,8 +187,13 @@
183187
],
184188
"style": {
185189
"margin": "0px 0px 0px 0px",
186-
"btnStyle": {
187-
"background": "#409EFF"
190+
isImgBtn: false,
191+
value: "",
192+
btnStyle: {
193+
borderRadius: '20px',
194+
borderradius: 20,
195+
background: "#409EFF",
196+
color: "#fff"
188197
}
189198
}
190199
}
@@ -249,5 +258,21 @@
249258
"margin": "20px 0px 20px 0px"
250259
}
251260
}
261+
],
262+
"advancedComponents": [
263+
{
264+
"type": "formList",
265+
"name": "表单内容区",
266+
"list": [],
267+
"style": {
268+
margin: "10px 20px 0px 20px",
269+
borderradius: 10,
270+
borderRadius: '10px',
271+
borderColor: "#409eff",
272+
borderwidth: 3,
273+
borderWidth: '3px',
274+
borderStyle:"solid"
275+
}
276+
}
252277
]
253278
}

0 commit comments

Comments
 (0)