@zykjcommon/questions 0.0.39 → 0.0.41
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/dist/zykjcommon-questions.common.js +121 -40
- package/dist/zykjcommon-questions.css +1 -1
- package/dist/zykjcommon-questions.umd.js +121 -40
- package/dist/zykjcommon-questions.umd.min.js +5 -5
- package/package.json +3 -3
- package/src/assets/js/fun.js +2 -1
- package/src/assets/scss/questions/zykjcommon-questions.scss +34 -16
- package/src/components/questions/Question_Classify.vue +91 -14
- package/src/views/exam/FullScreen.vue +105 -23
- package/package2.json +0 -64
|
@@ -20320,7 +20320,8 @@ function getDeviceEnv() {
|
|
|
20320
20320
|
}
|
|
20321
20321
|
}
|
|
20322
20322
|
}
|
|
20323
|
-
|
|
20323
|
+
var touch = !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch);
|
|
20324
|
+
return IsIPad && touch;
|
|
20324
20325
|
}
|
|
20325
20326
|
var env = '';
|
|
20326
20327
|
var md = new MobileDetect(window.navigator.userAgent); //初始化mobile-detect
|
|
@@ -23824,70 +23825,69 @@ var index = {
|
|
|
23824
23825
|
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_411b6dae_render]])
|
|
23825
23826
|
|
|
23826
23827
|
/* harmony default export */ var Question_Programming = (Question_Programming_exports_);
|
|
23827
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-86.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
23828
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-86.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=template&id=dd48cf16
|
|
23828
23829
|
|
|
23829
|
-
var
|
|
23830
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_1 = {
|
|
23830
23831
|
class: "zykjcommon-question",
|
|
23831
23832
|
style: {
|
|
23832
23833
|
"width": "100%",
|
|
23833
23834
|
"height": "100%"
|
|
23834
23835
|
}
|
|
23835
23836
|
};
|
|
23836
|
-
var
|
|
23837
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_2 = {
|
|
23837
23838
|
class: "box"
|
|
23838
23839
|
};
|
|
23839
|
-
var
|
|
23840
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_3 = {
|
|
23840
23841
|
class: "main-block"
|
|
23841
23842
|
};
|
|
23842
|
-
var
|
|
23843
|
-
var
|
|
23843
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_4 = ["src"];
|
|
23844
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23844
23845
|
class: "main-content"
|
|
23845
23846
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23846
23847
|
class: "main-append"
|
|
23847
23848
|
})], -1);
|
|
23848
|
-
var
|
|
23849
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23849
23850
|
class: "prev"
|
|
23850
23851
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23851
23852
|
class: "prev-main"
|
|
23852
23853
|
})], -1);
|
|
23853
|
-
var
|
|
23854
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23854
23855
|
class: "next"
|
|
23855
23856
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23856
23857
|
class: "next-main"
|
|
23857
23858
|
})], -1);
|
|
23858
|
-
var
|
|
23859
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_8 = {
|
|
23859
23860
|
class: "list"
|
|
23860
23861
|
};
|
|
23861
|
-
var
|
|
23862
|
-
|
|
23863
|
-
|
|
23864
|
-
};
|
|
23865
|
-
function Question_Classifyvue_type_template_id_25cb7a86_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
23866
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Classifyvue_type_template_id_25cb7a86_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23862
|
+
var Question_Classifyvue_type_template_id_dd48cf16_hoisted_9 = ["idx"];
|
|
23863
|
+
function Question_Classifyvue_type_template_id_dd48cf16_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
23864
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Classifyvue_type_template_id_dd48cf16_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23867
23865
|
class: "question-classify",
|
|
23868
23866
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
|
|
23869
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
23867
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_dd48cf16_hoisted_2, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($data.bigBoxItemList, function (item, index) {
|
|
23870
23868
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
23871
23869
|
class: "box-item",
|
|
23872
23870
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
23873
23871
|
key: index
|
|
23874
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
23872
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_dd48cf16_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
23875
23873
|
src: item.imgUrl,
|
|
23876
23874
|
alt: ""
|
|
23877
|
-
}, null, 8,
|
|
23875
|
+
}, null, 8, Question_Classifyvue_type_template_id_dd48cf16_hoisted_4)]), Question_Classifyvue_type_template_id_dd48cf16_hoisted_5], 4);
|
|
23878
23876
|
}), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23879
23877
|
class: "list-outter",
|
|
23880
23878
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
|
|
23881
|
-
}, [
|
|
23879
|
+
}, [Question_Classifyvue_type_template_id_dd48cf16_hoisted_6, Question_Classifyvue_type_template_id_dd48cf16_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_dd48cf16_hoisted_8, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($data.optionList, function (item, index) {
|
|
23882
23880
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
23883
23881
|
class: "list-item",
|
|
23884
23882
|
idx: item.idx,
|
|
23885
23883
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
23886
23884
|
key: index
|
|
23887
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.
|
|
23885
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withDirectives)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23886
|
+
class: "list-item-text"
|
|
23887
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, item.content_type != 2]])], 12, Question_Classifyvue_type_template_id_dd48cf16_hoisted_9);
|
|
23888
23888
|
}), 128))])], 4)], 4)]);
|
|
23889
23889
|
}
|
|
23890
|
-
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
23890
|
+
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=dd48cf16
|
|
23891
23891
|
|
|
23892
23892
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
|
|
23893
23893
|
var es_array_sort = __webpack_require__(2707);
|
|
@@ -24034,10 +24034,12 @@ var env = js_fun.getDeviceEnv();
|
|
|
24034
24034
|
mouseup: env === 'mobile' ? 'touchend' : 'mouseup',
|
|
24035
24035
|
dragWay: '',
|
|
24036
24036
|
flag: false,
|
|
24037
|
-
scrollDistance: 3000
|
|
24037
|
+
scrollDistance: 3000,
|
|
24038
|
+
//设置一个死的滚动距离,保证能滚到底,目前够用
|
|
24039
|
+
lazyDragTimer: null,
|
|
24040
|
+
dragingStart: false
|
|
24038
24041
|
};
|
|
24039
24042
|
},
|
|
24040
|
-
|
|
24041
24043
|
watch: {
|
|
24042
24044
|
questionInfo: {
|
|
24043
24045
|
handler: function handler(nv, ov) {
|
|
@@ -24095,16 +24097,18 @@ var env = js_fun.getDeviceEnv();
|
|
|
24095
24097
|
var exam_options_data = nv.exam_options_data;
|
|
24096
24098
|
if (this.classify_question_info) {
|
|
24097
24099
|
if (this.classify_question_info.background_file) {
|
|
24098
|
-
this.bigBgCss = "background: url(".concat(this.classify_question_info.background_file.file_url, ")
|
|
24100
|
+
this.bigBgCss = "background-image: url(".concat(this.classify_question_info.background_file.file_url, ");");
|
|
24099
24101
|
}
|
|
24100
24102
|
if (this.classify_question_info.bottom_img_file) {
|
|
24101
|
-
this.bottomBgCss = "background: url(".concat(this.classify_question_info.bottom_img_file.file_url, ")
|
|
24103
|
+
this.bottomBgCss = "background-image: url(".concat(this.classify_question_info.bottom_img_file.file_url, ");");
|
|
24102
24104
|
}
|
|
24103
24105
|
var optionList = [];
|
|
24106
|
+
this.optionList = [];
|
|
24104
24107
|
exam_options_data.forEach(function (item) {
|
|
24105
24108
|
optionList.push({
|
|
24109
|
+
content_type: item.data.content_type,
|
|
24106
24110
|
content: item.data.option_content,
|
|
24107
|
-
bgUrlCss: "background: url(".concat(item.data.file_url, ")
|
|
24111
|
+
bgUrlCss: "background-image: url(".concat(item.data.file_url, ");color:").concat(item.data.font_color),
|
|
24108
24112
|
idx: item.index
|
|
24109
24113
|
});
|
|
24110
24114
|
});
|
|
@@ -24117,7 +24121,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24117
24121
|
bigBoxItemList.push({
|
|
24118
24122
|
imgUrl: big_type_option_list[index].file_url,
|
|
24119
24123
|
bgUrl: item.file_url,
|
|
24120
|
-
bgUrlCss: "background: url(".concat(item.file_url, ")
|
|
24124
|
+
bgUrlCss: "background-image: url(".concat(item.file_url, ");")
|
|
24121
24125
|
});
|
|
24122
24126
|
});
|
|
24123
24127
|
this.bigBoxItemList = bigBoxItemList;
|
|
@@ -24132,9 +24136,12 @@ var env = js_fun.getDeviceEnv();
|
|
|
24132
24136
|
document.removeEventListener('gesturestart', this.gesturestartListener);
|
|
24133
24137
|
$(this.$el).find('.question-classify .append-item').off(this.mousedown);
|
|
24134
24138
|
$(this.$el).find('.question-classify .list-item').off(this.mousedown);
|
|
24139
|
+
$(this.$el).find(".question-classify .next").off('click');
|
|
24140
|
+
$(this.$el).find(".question-classify .prev").off('click');
|
|
24135
24141
|
$(document).off(this.mouseup);
|
|
24136
24142
|
var html = document.getElementsByTagName("html")[0];
|
|
24137
24143
|
html.style.fontSize = "";
|
|
24144
|
+
document.onselectstart = null;
|
|
24138
24145
|
},
|
|
24139
24146
|
answeredNotify: function answeredNotify() {
|
|
24140
24147
|
var self = this;
|
|
@@ -24175,29 +24182,36 @@ var env = js_fun.getDeviceEnv();
|
|
|
24175
24182
|
});
|
|
24176
24183
|
return specArr;
|
|
24177
24184
|
},
|
|
24185
|
+
//移动端为了解决拖动事件和原生滚动条事件冲突,设置延迟100毫秒拖动(PC端不变)
|
|
24178
24186
|
bindDragDomEvent: function bindDragDomEvent(appendItem, way) {
|
|
24179
24187
|
var self = this;
|
|
24180
|
-
|
|
24188
|
+
function dragDomEventFn(e, ctx) {
|
|
24181
24189
|
if (self.moveDiv) {
|
|
24182
24190
|
return;
|
|
24183
24191
|
}
|
|
24192
|
+
env === 'mobile' && self.startLazyDrag();
|
|
24184
24193
|
self.flag = false;
|
|
24185
24194
|
self.dragWay = way;
|
|
24186
24195
|
console.log(e);
|
|
24187
24196
|
e.stopPropagation();
|
|
24188
24197
|
e.preventDefault();
|
|
24189
|
-
self.listItem = $(
|
|
24198
|
+
self.listItem = $(ctx);
|
|
24190
24199
|
self.listItem.addClass('drag');
|
|
24191
24200
|
self.p1.moveX = self.listItem.offset().left;
|
|
24192
24201
|
self.p1.moveY = self.listItem.offset().top - 30;
|
|
24193
24202
|
var idx = self.listItem.attr('idx');
|
|
24194
|
-
|
|
24203
|
+
var itemBgCss = "".concat(self.listItem.get(0).style.backgroundImage);
|
|
24204
|
+
var itemColorCss = "".concat(self.listItem.get(0).style.color);
|
|
24205
|
+
var textDisplayCss = self.listItem.find('.list-item-text').get(0).style.display;
|
|
24206
|
+
console.log(itemBgCss, 1234);
|
|
24207
|
+
self.moveDiv = $("<div class=\"question-classify-moveDiv\" idx=\"".concat(idx, "\"><div class=\"list-item-text\" style=\"").concat(textDisplayCss ? 'display:' + textDisplayCss : '', "\">").concat(self.listItem.find('.list-item-text').text(), "</div></div>"));
|
|
24195
24208
|
self.moveDiv.css({
|
|
24196
24209
|
left: "".concat(self.p1.moveX, "px"),
|
|
24197
|
-
top: "".concat(self.p1.moveY, "px")
|
|
24210
|
+
top: "".concat(self.p1.moveY, "px"),
|
|
24211
|
+
backgroundImage: itemBgCss,
|
|
24212
|
+
color: itemColorCss
|
|
24198
24213
|
});
|
|
24199
24214
|
$(self.$el).append(self.moveDiv);
|
|
24200
|
-
// $('body').append(self.moveDiv)
|
|
24201
24215
|
$(document).on(self.mousemove, function (e2) {
|
|
24202
24216
|
// e2.preventDefault()
|
|
24203
24217
|
e2.stopPropagation();
|
|
@@ -24210,15 +24224,31 @@ var env = js_fun.getDeviceEnv();
|
|
|
24210
24224
|
top: curY + 'px'
|
|
24211
24225
|
});
|
|
24212
24226
|
});
|
|
24227
|
+
}
|
|
24228
|
+
appendItem.off(this.mousedown);
|
|
24229
|
+
appendItem.on(this.mousedown, function (e) {
|
|
24230
|
+
var _this2 = this;
|
|
24231
|
+
if (env === 'mobile') {
|
|
24232
|
+
self.lazyDragTimer = setTimeout(function () {
|
|
24233
|
+
dragDomEventFn(e, _this2);
|
|
24234
|
+
}, 100);
|
|
24235
|
+
} else {
|
|
24236
|
+
dragDomEventFn(e, this);
|
|
24237
|
+
}
|
|
24213
24238
|
});
|
|
24214
24239
|
},
|
|
24215
24240
|
appendMoveDiv: function appendMoveDiv(options) {
|
|
24216
24241
|
var self = this;
|
|
24217
24242
|
self.listItem.remove();
|
|
24218
24243
|
var idx = self.moveDiv.attr('idx');
|
|
24219
|
-
var
|
|
24244
|
+
var itemBgCss = "".concat(self.moveDiv.get(0).style.backgroundImage);
|
|
24245
|
+
var itemColorCss = "".concat(self.moveDiv.get(0).style.color);
|
|
24246
|
+
var textDisplayCss = self.moveDiv.find('.list-item-text').get(0).style.display;
|
|
24247
|
+
var appendItem = $("<div class=\"".concat(options.appendItemClassName, "\" idx=\"").concat(idx, "\"><div class=\"list-item-text\" style=\"").concat(textDisplayCss ? 'display:' + textDisplayCss : '', "\">").concat(self.moveDiv.find('.list-item-text').text(), "</div></div>"));
|
|
24220
24248
|
appendItem.css({
|
|
24221
|
-
opacity: 0
|
|
24249
|
+
opacity: 0,
|
|
24250
|
+
backgroundImage: itemBgCss,
|
|
24251
|
+
color: itemColorCss
|
|
24222
24252
|
});
|
|
24223
24253
|
options.targetList.append(appendItem);
|
|
24224
24254
|
options.targetList[options.scrollDirection](self.scrollDistance);
|
|
@@ -24247,6 +24277,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24247
24277
|
},
|
|
24248
24278
|
bindNextPrevEvent: function bindNextPrevEvent(type) {
|
|
24249
24279
|
var self = this;
|
|
24280
|
+
$(this.$el).find(".question-classify .".concat(type)).off('click');
|
|
24250
24281
|
$(this.$el).find(".question-classify .".concat(type)).on('click', function (e) {
|
|
24251
24282
|
e.stopPropagation();
|
|
24252
24283
|
e.preventDefault();
|
|
@@ -24266,7 +24297,9 @@ var env = js_fun.getDeviceEnv();
|
|
|
24266
24297
|
this.setAnswerDo();
|
|
24267
24298
|
}
|
|
24268
24299
|
self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
|
|
24300
|
+
$(document).off(self.mouseup);
|
|
24269
24301
|
$(document).on(self.mouseup, function (e) {
|
|
24302
|
+
env === 'mobile' && self.stopLazyDrag();
|
|
24270
24303
|
if (self.animationing) {
|
|
24271
24304
|
return;
|
|
24272
24305
|
}
|
|
@@ -24328,17 +24361,58 @@ var env = js_fun.getDeviceEnv();
|
|
|
24328
24361
|
}
|
|
24329
24362
|
}
|
|
24330
24363
|
});
|
|
24364
|
+
|
|
24365
|
+
//禁止选中文字,解决拖动过程中文字老是被选中问题
|
|
24366
|
+
document.onselectstart = function () {
|
|
24367
|
+
return false;
|
|
24368
|
+
};
|
|
24369
|
+
if (env === 'mobile') {
|
|
24370
|
+
$('.list').off('scroll');
|
|
24371
|
+
$('.list').on('scroll', function () {
|
|
24372
|
+
if (!self.dragingStart) {
|
|
24373
|
+
self.stopLazyDrag();
|
|
24374
|
+
}
|
|
24375
|
+
}).addClass('noScrollBar');
|
|
24376
|
+
$('.main-append').off('scroll');
|
|
24377
|
+
$('.main-append').on('scroll', function (e) {
|
|
24378
|
+
if (!self.dragingStart) {
|
|
24379
|
+
self.stopLazyDrag();
|
|
24380
|
+
}
|
|
24381
|
+
}).addClass('noScrollBar');
|
|
24382
|
+
}
|
|
24331
24383
|
self.bindNextPrevEvent('next');
|
|
24332
24384
|
self.bindNextPrevEvent('prev');
|
|
24333
24385
|
},
|
|
24386
|
+
startLazyDrag: function startLazyDrag() {
|
|
24387
|
+
this.dragingStart = true;
|
|
24388
|
+
$('.list').css({
|
|
24389
|
+
overflow: 'hidden'
|
|
24390
|
+
});
|
|
24391
|
+
$('.main-append').css({
|
|
24392
|
+
overflow: 'hidden'
|
|
24393
|
+
});
|
|
24394
|
+
},
|
|
24395
|
+
stopLazyDrag: function stopLazyDrag() {
|
|
24396
|
+
this.dragingStart = false;
|
|
24397
|
+
this.lazyDragTimer && clearTimeout(this.lazyDragTimer);
|
|
24398
|
+
this.lazyDragTimer = null;
|
|
24399
|
+
$('.list').css({
|
|
24400
|
+
overflow: 'auto'
|
|
24401
|
+
});
|
|
24402
|
+
$('.main-append').css({
|
|
24403
|
+
overflow: 'auto'
|
|
24404
|
+
});
|
|
24405
|
+
},
|
|
24334
24406
|
//回显答案
|
|
24335
24407
|
setAnswerDo: function setAnswerDo() {
|
|
24336
|
-
var
|
|
24408
|
+
var _this3 = this;
|
|
24337
24409
|
var self = this;
|
|
24338
24410
|
var listItemIds = [];
|
|
24339
24411
|
$(this.$el).find('.question-classify .list-item').each(function (index, item) {
|
|
24340
24412
|
listItemIds.push(Number($(item).attr('idx')));
|
|
24341
24413
|
});
|
|
24414
|
+
// 如果两个上一题下一题切换组件,两个又是同一类型的组件,需要清空一下dom,以防两题篡了
|
|
24415
|
+
$(this.$el).find('.main-append').empty();
|
|
24342
24416
|
this.answerMap.classify_mapping_list.forEach(function (item, index) {
|
|
24343
24417
|
item.small_type_index_list.forEach(function (subItem) {
|
|
24344
24418
|
var idx = listItemIds.findIndex(function (i) {
|
|
@@ -24347,11 +24421,18 @@ var env = js_fun.getDeviceEnv();
|
|
|
24347
24421
|
if (idx > -1) {
|
|
24348
24422
|
//找到一个删掉一个,要不会有问题
|
|
24349
24423
|
listItemIds.splice(idx, 1);
|
|
24350
|
-
var listItemDom = $(
|
|
24424
|
+
var listItemDom = $(_this3.$el).find('.question-classify .list-item').eq(idx);
|
|
24425
|
+
var itemBgCss = "".concat(listItemDom.get(0).style.backgroundImage);
|
|
24426
|
+
var itemColorCss = "".concat(listItemDom.get(0).style.color);
|
|
24427
|
+
var textDisplayCss = listItemDom.find('.list-item-text').get(0).style.display;
|
|
24351
24428
|
var attrIdx = listItemDom.attr('idx');
|
|
24352
|
-
var appendItem = $("<div class=\"append-item\" idx=\"".concat(attrIdx, "\" style=\"").concat(
|
|
24429
|
+
var appendItem = $("<div class=\"append-item\" idx=\"".concat(attrIdx, "\"><div class=\"list-item-text\" style=\"").concat(textDisplayCss ? 'display:' + textDisplayCss : '', "\">").concat(listItemDom.find('.list-item-text').text(), "</div></div>"));
|
|
24430
|
+
appendItem.css({
|
|
24431
|
+
backgroundImage: itemBgCss,
|
|
24432
|
+
color: itemColorCss
|
|
24433
|
+
});
|
|
24353
24434
|
self.bindDragDomEvent(appendItem, 'back');
|
|
24354
|
-
$(
|
|
24435
|
+
$(_this3.$el).find('.main-append').eq(index).append(appendItem);
|
|
24355
24436
|
listItemDom.remove();
|
|
24356
24437
|
}
|
|
24357
24438
|
});
|
|
@@ -24369,7 +24450,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24369
24450
|
|
|
24370
24451
|
|
|
24371
24452
|
;
|
|
24372
|
-
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',
|
|
24453
|
+
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_dd48cf16_render]])
|
|
24373
24454
|
|
|
24374
24455
|
/* harmony default export */ var Question_Classify = (Question_Classify_exports_);
|
|
24375
24456
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|