jufubao-forms 1.0.1 → 1.0.2-beta2
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 +1 -1
- package/src/components/JfbFormsDynamicForm/JfbFormsDynamicForm.vue +26 -28
- package/src/components/JfbFormsDynamicForm/JfbFormsDynamicFormLess.less +5 -4
- package/src/components/JfbFormsList/JfbFormsList.vue +4 -2
- package/src/components/JfbFormsList/JfbFormsListLess.less +5 -4
- package/src/components/JfbFormsQaResult/JfbFormsQaResult.vue +5 -3
- package/src/components/JfbFormsQaResult/JfbFormsQaResultLess.less +5 -4
- package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswer.vue +11 -5
- package/src/components/JfbFormsQuestionAndAnswer/JfbFormsQuestionAndAnswerLess.less +5 -4
package/package.json
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-dynamic-form__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-dynamic-form__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-dynamic-form__body">
|
|
@@ -117,28 +119,18 @@
|
|
|
117
119
|
<view class="status_btn" @click="toQaList" style="border-radius: 8rpx;margin-top: 100rpx;">返回列表</view>
|
|
118
120
|
</view>
|
|
119
121
|
</view>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
|
|
123
|
+
|
|
122
124
|
<xd-dialog :show.sync="isShowDialog" title="请输入验证码" :showCloseIcon="false">
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<view class="capture" @click="switchValidToken">
|
|
133
|
-
<image
|
|
134
|
-
style="width: 100%;height:100%"
|
|
135
|
-
:src="validImageAPIUrl + '?image_width=180&image_height=80&token='+ valid_token"
|
|
136
|
-
/>
|
|
137
|
-
</view>
|
|
138
|
-
</view>
|
|
139
|
-
</xd-form-item>
|
|
140
|
-
</xd-form>
|
|
141
|
-
|
|
125
|
+
<view class="valid_wrap">
|
|
126
|
+
<input v-model="valid_code" placeholder="请输入验证码" class="valid_input"></input>
|
|
127
|
+
<view class="capture" @click="switchValidToken">
|
|
128
|
+
<image
|
|
129
|
+
style="width: 100%;height:100%"
|
|
130
|
+
:src="validImageAPIUrl + '?image_width=180&image_height=80&token='+ valid_token"
|
|
131
|
+
/>
|
|
132
|
+
</view>
|
|
133
|
+
</view>
|
|
142
134
|
<view slot="btn">
|
|
143
135
|
<xd-button type="primary" width="400rpx" @click="doCheckValidCode">提交</xd-button>
|
|
144
136
|
</view>
|
|
@@ -198,7 +190,7 @@
|
|
|
198
190
|
renderForm: "renderForm",
|
|
199
191
|
form_id: "",
|
|
200
192
|
foreign_id: "",
|
|
201
|
-
isShowDialog:
|
|
193
|
+
isShowDialog: true,
|
|
202
194
|
validImageAPIUrl: "",
|
|
203
195
|
valid_token: "",
|
|
204
196
|
valid_code: "",
|
|
@@ -287,7 +279,7 @@
|
|
|
287
279
|
}
|
|
288
280
|
this.dynamicFormList = res.list.map((item, i) => {
|
|
289
281
|
item.error = "";
|
|
290
|
-
|
|
282
|
+
|
|
291
283
|
if(item.is_show_explain !== 'Y'){
|
|
292
284
|
item.explain = "";
|
|
293
285
|
}
|
|
@@ -620,7 +612,7 @@
|
|
|
620
612
|
return this.getDecimalTip(item);
|
|
621
613
|
}
|
|
622
614
|
}
|
|
623
|
-
|
|
615
|
+
|
|
624
616
|
//开始验证限制范围
|
|
625
617
|
if(fieldValue && !showRange) return errTip;
|
|
626
618
|
max = Number(max);
|
|
@@ -740,7 +732,7 @@
|
|
|
740
732
|
}
|
|
741
733
|
}
|
|
742
734
|
}
|
|
743
|
-
|
|
735
|
+
|
|
744
736
|
.align-center{
|
|
745
737
|
display: flex;
|
|
746
738
|
align-items: center;
|
|
@@ -755,6 +747,12 @@
|
|
|
755
747
|
display: flex;
|
|
756
748
|
align-items: center;
|
|
757
749
|
border: 1px solid #DDD;
|
|
750
|
+
.valid_input{
|
|
751
|
+
width: 300rpx;
|
|
752
|
+
text-align: left;
|
|
753
|
+
padding-left: 20rpx;
|
|
754
|
+
flex: 1;
|
|
755
|
+
}
|
|
758
756
|
}
|
|
759
757
|
.capture{
|
|
760
758
|
width: 180rpx;
|
|
@@ -815,7 +813,7 @@
|
|
|
815
813
|
}
|
|
816
814
|
.uni-easyinput__content-input{
|
|
817
815
|
font-size: 24rpx;
|
|
818
|
-
|
|
816
|
+
|
|
819
817
|
.uni-easyinput__placeholder-class{
|
|
820
818
|
font-size: 24rpx;
|
|
821
819
|
}
|
|
@@ -827,7 +825,7 @@
|
|
|
827
825
|
font-size: 24rpx !important;
|
|
828
826
|
border: none !important;
|
|
829
827
|
}
|
|
830
|
-
|
|
828
|
+
|
|
831
829
|
}
|
|
832
830
|
.description{
|
|
833
831
|
color: #666666;
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-list__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-list__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-list__body">
|
|
17
19
|
<view v-if="loaded" class="activity_list_wrap" :style="listWrapBoxStyle">
|
|
18
20
|
<view class="activity_list" v-if="list.length">
|
|
19
21
|
<view class="activity_item"
|
|
20
|
-
v-for="(item,i) in list" :key="item.
|
|
22
|
+
v-for="(item,i) in list" :key="item.form_id"
|
|
21
23
|
:style="listItemBoxStyle"
|
|
22
24
|
@click="toDetail(item)"
|
|
23
25
|
>
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-qa-result__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-qa-result__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-qa-result__body" :style="{
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
<view v-if="is_show_error_answer_analysis==='Y'" class="btn primary" @click="isShowAnalysis=true">答案解析</view>
|
|
30
32
|
</view>
|
|
31
33
|
</view>
|
|
32
|
-
|
|
34
|
+
|
|
33
35
|
<template v-if="isShowAnalysis">
|
|
34
36
|
<view class="analysis_head">
|
|
35
37
|
<view class="_left">答案解析</view>
|
|
@@ -422,7 +424,7 @@
|
|
|
422
424
|
&.a_right{
|
|
423
425
|
color: #FFFFFF;
|
|
424
426
|
background: var(--main-color);
|
|
425
|
-
}
|
|
427
|
+
}
|
|
426
428
|
// &.a_error{
|
|
427
429
|
// color: #FF7063;
|
|
428
430
|
// background: #FFE3E0;
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|
|
@@ -10,12 +10,15 @@
|
|
|
10
10
|
:class="{ editx : isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-forms-question-and-answer__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-forms-question-and-answer__edit-icon" @click.stop="delEdit">
|
|
14
|
+
<xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
|
|
15
|
+
</view>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-forms-question-and-answer__body" :style="{
|
|
17
19
|
'--main-color': mainColor,
|
|
18
20
|
'--main-color-alpha': mainColorAlpha,
|
|
21
|
+
'min-height': layoutInfo.bodyMinHeight
|
|
19
22
|
}">
|
|
20
23
|
<view v-if="loaded">
|
|
21
24
|
<view v-if="form_status === 'content'">
|
|
@@ -58,10 +61,12 @@
|
|
|
58
61
|
</view>
|
|
59
62
|
</template>
|
|
60
63
|
</view> -->
|
|
61
|
-
<view class="bottom_fixed">
|
|
64
|
+
<view class="bottom_fixed" :style="fixedBottom">
|
|
62
65
|
<xd-button type="primary" :disabled="curIndex === 0"
|
|
63
66
|
:style="[fixedButtonStyle]" @click="handlePrev">上一题</xd-button>
|
|
64
|
-
<xd-button
|
|
67
|
+
<xd-button v-if="curQA.required && (!qaValue || qaValue.length === 0)" type="primary" :disabled="true"
|
|
68
|
+
:style="[fixedButtonStyle]" @click="handleNext">{{isLastQA ? '确认提交':'下一题'}}</xd-button>
|
|
69
|
+
<xd-button type="primary" :disabled="false" v-else
|
|
65
70
|
:style="[fixedButtonStyle]" @click="handleNext">{{isLastQA ? '确认提交':'下一题'}}</xd-button>
|
|
66
71
|
</view>
|
|
67
72
|
</view>
|
|
@@ -141,6 +146,9 @@
|
|
|
141
146
|
}
|
|
142
147
|
},
|
|
143
148
|
computed: {
|
|
149
|
+
fixedBottom(){
|
|
150
|
+
return this.fixedStyle({paddingBottom: 24, zIndex: 111})
|
|
151
|
+
},
|
|
144
152
|
progressBarInnerStyle(){
|
|
145
153
|
let width = ((this.curIndex + 1) / this.formList.length) * 100 + '%';
|
|
146
154
|
return {
|
|
@@ -224,8 +232,6 @@
|
|
|
224
232
|
this.init(this.container);
|
|
225
233
|
this.mainColorAlpha = Color(this.mainColor).alpha(0.15).string();
|
|
226
234
|
this.isPreview = this.$configProject['isPreview'];
|
|
227
|
-
|
|
228
|
-
//todo
|
|
229
235
|
},
|
|
230
236
|
methods: {
|
|
231
237
|
onJfbLoad(options) {
|
|
@@ -44,17 +44,18 @@
|
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
position: absolute;
|
|
46
46
|
right: unit(0, rpx);
|
|
47
|
-
top: unit(
|
|
47
|
+
top: unit(0, rpx);
|
|
48
48
|
height: unit(50, rpx);
|
|
49
|
-
|
|
49
|
+
z-index: 100;
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
|
-
background: rgba(0, 0, 0, .
|
|
54
|
-
border-radius:
|
|
53
|
+
background: rgba(0, 0, 0, .4);
|
|
54
|
+
border-radius: 0 0 0 20rpx;
|
|
55
55
|
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
56
|
color: #fff;
|
|
57
57
|
font-size: unit(22, rpx);
|
|
58
|
+
padding: 0 6rpx 0 6px;
|
|
58
59
|
|
|
59
60
|
&-icon{
|
|
60
61
|
padding: 0 unit(20, rpx);
|