@zykjcommon/questions 0.0.40 → 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 +43 -32
- package/dist/zykjcommon-questions.css +1 -1
- package/dist/zykjcommon-questions.umd.js +43 -32
- package/dist/zykjcommon-questions.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/assets/js/fun.js +2 -1
- package/src/assets/scss/questions/zykjcommon-questions.scss +20 -10
- package/src/components/questions/Question_Classify.vue +22 -12
|
@@ -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,58 +23825,58 @@ 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
|
-
function
|
|
23863
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("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", {
|
|
23864
23865
|
class: "question-classify",
|
|
23865
23866
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
|
|
23866
|
-
}, [(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) {
|
|
23867
23868
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
23868
23869
|
class: "box-item",
|
|
23869
23870
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
23870
23871
|
key: index
|
|
23871
|
-
}, [(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", {
|
|
23872
23873
|
src: item.imgUrl,
|
|
23873
23874
|
alt: ""
|
|
23874
|
-
}, null, 8,
|
|
23875
|
+
}, null, 8, Question_Classifyvue_type_template_id_dd48cf16_hoisted_4)]), Question_Classifyvue_type_template_id_dd48cf16_hoisted_5], 4);
|
|
23875
23876
|
}), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23876
23877
|
class: "list-outter",
|
|
23877
23878
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
|
|
23878
|
-
}, [
|
|
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) {
|
|
23879
23880
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
23880
23881
|
class: "list-item",
|
|
23881
23882
|
idx: item.idx,
|
|
@@ -23883,10 +23884,10 @@ function Question_Classifyvue_type_template_id_271ed9b4_render(_ctx, _cache, $pr
|
|
|
23883
23884
|
key: index
|
|
23884
23885
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withDirectives)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23885
23886
|
class: "list-item-text"
|
|
23886
|
-
}, (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,
|
|
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);
|
|
23887
23888
|
}), 128))])], 4)], 4)]);
|
|
23888
23889
|
}
|
|
23889
|
-
;// 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
|
|
23890
23891
|
|
|
23891
23892
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
|
|
23892
23893
|
var es_array_sort = __webpack_require__(2707);
|
|
@@ -24096,17 +24097,18 @@ var env = js_fun.getDeviceEnv();
|
|
|
24096
24097
|
var exam_options_data = nv.exam_options_data;
|
|
24097
24098
|
if (this.classify_question_info) {
|
|
24098
24099
|
if (this.classify_question_info.background_file) {
|
|
24099
|
-
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, ");");
|
|
24100
24101
|
}
|
|
24101
24102
|
if (this.classify_question_info.bottom_img_file) {
|
|
24102
|
-
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, ");");
|
|
24103
24104
|
}
|
|
24104
24105
|
var optionList = [];
|
|
24106
|
+
this.optionList = [];
|
|
24105
24107
|
exam_options_data.forEach(function (item) {
|
|
24106
24108
|
optionList.push({
|
|
24107
24109
|
content_type: item.data.content_type,
|
|
24108
24110
|
content: item.data.option_content,
|
|
24109
|
-
bgUrlCss: "background: url(".concat(item.data.file_url, ")
|
|
24111
|
+
bgUrlCss: "background-image: url(".concat(item.data.file_url, ");color:").concat(item.data.font_color),
|
|
24110
24112
|
idx: item.index
|
|
24111
24113
|
});
|
|
24112
24114
|
});
|
|
@@ -24119,7 +24121,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24119
24121
|
bigBoxItemList.push({
|
|
24120
24122
|
imgUrl: big_type_option_list[index].file_url,
|
|
24121
24123
|
bgUrl: item.file_url,
|
|
24122
|
-
bgUrlCss: "background: url(".concat(item.file_url, ")
|
|
24124
|
+
bgUrlCss: "background-image: url(".concat(item.file_url, ");")
|
|
24123
24125
|
});
|
|
24124
24126
|
});
|
|
24125
24127
|
this.bigBoxItemList = bigBoxItemList;
|
|
@@ -24134,6 +24136,8 @@ var env = js_fun.getDeviceEnv();
|
|
|
24134
24136
|
document.removeEventListener('gesturestart', this.gesturestartListener);
|
|
24135
24137
|
$(this.$el).find('.question-classify .append-item').off(this.mousedown);
|
|
24136
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');
|
|
24137
24141
|
$(document).off(this.mouseup);
|
|
24138
24142
|
var html = document.getElementsByTagName("html")[0];
|
|
24139
24143
|
html.style.fontSize = "";
|
|
@@ -24196,7 +24200,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24196
24200
|
self.p1.moveX = self.listItem.offset().left;
|
|
24197
24201
|
self.p1.moveY = self.listItem.offset().top - 30;
|
|
24198
24202
|
var idx = self.listItem.attr('idx');
|
|
24199
|
-
var itemBgCss = "".concat(self.listItem.get(0).style.
|
|
24203
|
+
var itemBgCss = "".concat(self.listItem.get(0).style.backgroundImage);
|
|
24200
24204
|
var itemColorCss = "".concat(self.listItem.get(0).style.color);
|
|
24201
24205
|
var textDisplayCss = self.listItem.find('.list-item-text').get(0).style.display;
|
|
24202
24206
|
console.log(itemBgCss, 1234);
|
|
@@ -24204,7 +24208,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24204
24208
|
self.moveDiv.css({
|
|
24205
24209
|
left: "".concat(self.p1.moveX, "px"),
|
|
24206
24210
|
top: "".concat(self.p1.moveY, "px"),
|
|
24207
|
-
|
|
24211
|
+
backgroundImage: itemBgCss,
|
|
24208
24212
|
color: itemColorCss
|
|
24209
24213
|
});
|
|
24210
24214
|
$(self.$el).append(self.moveDiv);
|
|
@@ -24221,6 +24225,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24221
24225
|
});
|
|
24222
24226
|
});
|
|
24223
24227
|
}
|
|
24228
|
+
appendItem.off(this.mousedown);
|
|
24224
24229
|
appendItem.on(this.mousedown, function (e) {
|
|
24225
24230
|
var _this2 = this;
|
|
24226
24231
|
if (env === 'mobile') {
|
|
@@ -24236,13 +24241,13 @@ var env = js_fun.getDeviceEnv();
|
|
|
24236
24241
|
var self = this;
|
|
24237
24242
|
self.listItem.remove();
|
|
24238
24243
|
var idx = self.moveDiv.attr('idx');
|
|
24239
|
-
var itemBgCss = "".concat(self.moveDiv.get(0).style.
|
|
24244
|
+
var itemBgCss = "".concat(self.moveDiv.get(0).style.backgroundImage);
|
|
24240
24245
|
var itemColorCss = "".concat(self.moveDiv.get(0).style.color);
|
|
24241
24246
|
var textDisplayCss = self.moveDiv.find('.list-item-text').get(0).style.display;
|
|
24242
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>"));
|
|
24243
24248
|
appendItem.css({
|
|
24244
24249
|
opacity: 0,
|
|
24245
|
-
|
|
24250
|
+
backgroundImage: itemBgCss,
|
|
24246
24251
|
color: itemColorCss
|
|
24247
24252
|
});
|
|
24248
24253
|
options.targetList.append(appendItem);
|
|
@@ -24272,6 +24277,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24272
24277
|
},
|
|
24273
24278
|
bindNextPrevEvent: function bindNextPrevEvent(type) {
|
|
24274
24279
|
var self = this;
|
|
24280
|
+
$(this.$el).find(".question-classify .".concat(type)).off('click');
|
|
24275
24281
|
$(this.$el).find(".question-classify .".concat(type)).on('click', function (e) {
|
|
24276
24282
|
e.stopPropagation();
|
|
24277
24283
|
e.preventDefault();
|
|
@@ -24291,6 +24297,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24291
24297
|
this.setAnswerDo();
|
|
24292
24298
|
}
|
|
24293
24299
|
self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
|
|
24300
|
+
$(document).off(self.mouseup);
|
|
24294
24301
|
$(document).on(self.mouseup, function (e) {
|
|
24295
24302
|
env === 'mobile' && self.stopLazyDrag();
|
|
24296
24303
|
if (self.animationing) {
|
|
@@ -24360,12 +24367,14 @@ var env = js_fun.getDeviceEnv();
|
|
|
24360
24367
|
return false;
|
|
24361
24368
|
};
|
|
24362
24369
|
if (env === 'mobile') {
|
|
24363
|
-
$('.list').scroll
|
|
24370
|
+
$('.list').off('scroll');
|
|
24371
|
+
$('.list').on('scroll', function () {
|
|
24364
24372
|
if (!self.dragingStart) {
|
|
24365
24373
|
self.stopLazyDrag();
|
|
24366
24374
|
}
|
|
24367
24375
|
}).addClass('noScrollBar');
|
|
24368
|
-
$('.main-append').scroll
|
|
24376
|
+
$('.main-append').off('scroll');
|
|
24377
|
+
$('.main-append').on('scroll', function (e) {
|
|
24369
24378
|
if (!self.dragingStart) {
|
|
24370
24379
|
self.stopLazyDrag();
|
|
24371
24380
|
}
|
|
@@ -24402,6 +24411,8 @@ var env = js_fun.getDeviceEnv();
|
|
|
24402
24411
|
$(this.$el).find('.question-classify .list-item').each(function (index, item) {
|
|
24403
24412
|
listItemIds.push(Number($(item).attr('idx')));
|
|
24404
24413
|
});
|
|
24414
|
+
// 如果两个上一题下一题切换组件,两个又是同一类型的组件,需要清空一下dom,以防两题篡了
|
|
24415
|
+
$(this.$el).find('.main-append').empty();
|
|
24405
24416
|
this.answerMap.classify_mapping_list.forEach(function (item, index) {
|
|
24406
24417
|
item.small_type_index_list.forEach(function (subItem) {
|
|
24407
24418
|
var idx = listItemIds.findIndex(function (i) {
|
|
@@ -24411,13 +24422,13 @@ var env = js_fun.getDeviceEnv();
|
|
|
24411
24422
|
//找到一个删掉一个,要不会有问题
|
|
24412
24423
|
listItemIds.splice(idx, 1);
|
|
24413
24424
|
var listItemDom = $(_this3.$el).find('.question-classify .list-item').eq(idx);
|
|
24414
|
-
var itemBgCss = "".concat(listItemDom.get(0).style.
|
|
24425
|
+
var itemBgCss = "".concat(listItemDom.get(0).style.backgroundImage);
|
|
24415
24426
|
var itemColorCss = "".concat(listItemDom.get(0).style.color);
|
|
24416
24427
|
var textDisplayCss = listItemDom.find('.list-item-text').get(0).style.display;
|
|
24417
24428
|
var attrIdx = listItemDom.attr('idx');
|
|
24418
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>"));
|
|
24419
24430
|
appendItem.css({
|
|
24420
|
-
|
|
24431
|
+
backgroundImage: itemBgCss,
|
|
24421
24432
|
color: itemColorCss
|
|
24422
24433
|
});
|
|
24423
24434
|
self.bindDragDomEvent(appendItem, 'back');
|
|
@@ -24439,7 +24450,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24439
24450
|
|
|
24440
24451
|
|
|
24441
24452
|
;
|
|
24442
|
-
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]])
|
|
24443
24454
|
|
|
24444
24455
|
/* harmony default export */ var Question_Classify = (Question_Classify_exports_);
|
|
24445
24456
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|