@zykjcommon/questions 0.0.38 → 0.0.40
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 +106 -36
- package/dist/zykjcommon-questions.css +1 -1
- package/dist/zykjcommon-questions.umd.js +106 -36
- package/dist/zykjcommon-questions.umd.min.js +5 -5
- package/package.json +12 -11
- package/src/assets/scss/questions/zykjcommon-questions.scss +14 -6
- package/src/components/questions/Question_Classify.vue +78 -11
- package/src/views/exam/FullScreen.vue +105 -23
- package/tasks/mixins.js +6 -0
- package/tasks/setOriPackageJson.js +22 -0
- package/tasks/setPublishPackageJson.js +21 -0
|
@@ -23824,70 +23824,69 @@ var index = {
|
|
|
23824
23824
|
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_411b6dae_render]])
|
|
23825
23825
|
|
|
23826
23826
|
/* 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=
|
|
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=271ed9b4
|
|
23828
23828
|
|
|
23829
|
-
var
|
|
23829
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_1 = {
|
|
23830
23830
|
class: "zykjcommon-question",
|
|
23831
23831
|
style: {
|
|
23832
23832
|
"width": "100%",
|
|
23833
23833
|
"height": "100%"
|
|
23834
23834
|
}
|
|
23835
23835
|
};
|
|
23836
|
-
var
|
|
23836
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_2 = {
|
|
23837
23837
|
class: "box"
|
|
23838
23838
|
};
|
|
23839
|
-
var
|
|
23839
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_3 = {
|
|
23840
23840
|
class: "main-block"
|
|
23841
23841
|
};
|
|
23842
|
-
var
|
|
23843
|
-
var
|
|
23842
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_4 = ["src"];
|
|
23843
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23844
23844
|
class: "main-content"
|
|
23845
23845
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23846
23846
|
class: "main-append"
|
|
23847
23847
|
})], -1);
|
|
23848
|
-
var
|
|
23848
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23849
23849
|
class: "prev"
|
|
23850
23850
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23851
23851
|
class: "prev-main"
|
|
23852
23852
|
})], -1);
|
|
23853
|
-
var
|
|
23853
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23854
23854
|
class: "next"
|
|
23855
23855
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23856
23856
|
class: "next-main"
|
|
23857
23857
|
})], -1);
|
|
23858
|
-
var
|
|
23858
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_8 = {
|
|
23859
23859
|
class: "list"
|
|
23860
23860
|
};
|
|
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", {
|
|
23861
|
+
var Question_Classifyvue_type_template_id_271ed9b4_hoisted_9 = ["idx"];
|
|
23862
|
+
function Question_Classifyvue_type_template_id_271ed9b4_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
23863
|
+
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_271ed9b4_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23867
23864
|
class: "question-classify",
|
|
23868
23865
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
|
|
23869
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
23866
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_271ed9b4_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
23867
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
23871
23868
|
class: "box-item",
|
|
23872
23869
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
23873
23870
|
key: index
|
|
23874
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
23871
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_271ed9b4_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
23875
23872
|
src: item.imgUrl,
|
|
23876
23873
|
alt: ""
|
|
23877
|
-
}, null, 8,
|
|
23874
|
+
}, null, 8, Question_Classifyvue_type_template_id_271ed9b4_hoisted_4)]), Question_Classifyvue_type_template_id_271ed9b4_hoisted_5], 4);
|
|
23878
23875
|
}), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23879
23876
|
class: "list-outter",
|
|
23880
23877
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
|
|
23881
|
-
}, [
|
|
23878
|
+
}, [Question_Classifyvue_type_template_id_271ed9b4_hoisted_6, Question_Classifyvue_type_template_id_271ed9b4_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_271ed9b4_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
23879
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
23883
23880
|
class: "list-item",
|
|
23884
23881
|
idx: item.idx,
|
|
23885
23882
|
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
23886
23883
|
key: index
|
|
23887
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.
|
|
23884
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withDirectives)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
23885
|
+
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, Question_Classifyvue_type_template_id_271ed9b4_hoisted_9);
|
|
23888
23887
|
}), 128))])], 4)], 4)]);
|
|
23889
23888
|
}
|
|
23890
|
-
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
23889
|
+
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=271ed9b4
|
|
23891
23890
|
|
|
23892
23891
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
|
|
23893
23892
|
var es_array_sort = __webpack_require__(2707);
|
|
@@ -24034,10 +24033,12 @@ var env = js_fun.getDeviceEnv();
|
|
|
24034
24033
|
mouseup: env === 'mobile' ? 'touchend' : 'mouseup',
|
|
24035
24034
|
dragWay: '',
|
|
24036
24035
|
flag: false,
|
|
24037
|
-
scrollDistance: 3000
|
|
24036
|
+
scrollDistance: 3000,
|
|
24037
|
+
//设置一个死的滚动距离,保证能滚到底,目前够用
|
|
24038
|
+
lazyDragTimer: null,
|
|
24039
|
+
dragingStart: false
|
|
24038
24040
|
};
|
|
24039
24041
|
},
|
|
24040
|
-
|
|
24041
24042
|
watch: {
|
|
24042
24043
|
questionInfo: {
|
|
24043
24044
|
handler: function handler(nv, ov) {
|
|
@@ -24103,8 +24104,9 @@ var env = js_fun.getDeviceEnv();
|
|
|
24103
24104
|
var optionList = [];
|
|
24104
24105
|
exam_options_data.forEach(function (item) {
|
|
24105
24106
|
optionList.push({
|
|
24107
|
+
content_type: item.data.content_type,
|
|
24106
24108
|
content: item.data.option_content,
|
|
24107
|
-
bgUrlCss: "background: url(".concat(item.data.file_url, ") no-repeat center;background-size: 100% 100
|
|
24109
|
+
bgUrlCss: "background: url(".concat(item.data.file_url, ") no-repeat center;background-size: 100% 100%;color:").concat(item.data.font_color),
|
|
24108
24110
|
idx: item.index
|
|
24109
24111
|
});
|
|
24110
24112
|
});
|
|
@@ -24135,6 +24137,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24135
24137
|
$(document).off(this.mouseup);
|
|
24136
24138
|
var html = document.getElementsByTagName("html")[0];
|
|
24137
24139
|
html.style.fontSize = "";
|
|
24140
|
+
document.onselectstart = null;
|
|
24138
24141
|
},
|
|
24139
24142
|
answeredNotify: function answeredNotify() {
|
|
24140
24143
|
var self = this;
|
|
@@ -24175,29 +24178,36 @@ var env = js_fun.getDeviceEnv();
|
|
|
24175
24178
|
});
|
|
24176
24179
|
return specArr;
|
|
24177
24180
|
},
|
|
24181
|
+
//移动端为了解决拖动事件和原生滚动条事件冲突,设置延迟100毫秒拖动(PC端不变)
|
|
24178
24182
|
bindDragDomEvent: function bindDragDomEvent(appendItem, way) {
|
|
24179
24183
|
var self = this;
|
|
24180
|
-
|
|
24184
|
+
function dragDomEventFn(e, ctx) {
|
|
24181
24185
|
if (self.moveDiv) {
|
|
24182
24186
|
return;
|
|
24183
24187
|
}
|
|
24188
|
+
env === 'mobile' && self.startLazyDrag();
|
|
24184
24189
|
self.flag = false;
|
|
24185
24190
|
self.dragWay = way;
|
|
24186
24191
|
console.log(e);
|
|
24187
24192
|
e.stopPropagation();
|
|
24188
24193
|
e.preventDefault();
|
|
24189
|
-
self.listItem = $(
|
|
24194
|
+
self.listItem = $(ctx);
|
|
24190
24195
|
self.listItem.addClass('drag');
|
|
24191
24196
|
self.p1.moveX = self.listItem.offset().left;
|
|
24192
24197
|
self.p1.moveY = self.listItem.offset().top - 30;
|
|
24193
24198
|
var idx = self.listItem.attr('idx');
|
|
24194
|
-
|
|
24199
|
+
var itemBgCss = "".concat(self.listItem.get(0).style.background);
|
|
24200
|
+
var itemColorCss = "".concat(self.listItem.get(0).style.color);
|
|
24201
|
+
var textDisplayCss = self.listItem.find('.list-item-text').get(0).style.display;
|
|
24202
|
+
console.log(itemBgCss, 1234);
|
|
24203
|
+
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
24204
|
self.moveDiv.css({
|
|
24196
24205
|
left: "".concat(self.p1.moveX, "px"),
|
|
24197
|
-
top: "".concat(self.p1.moveY, "px")
|
|
24206
|
+
top: "".concat(self.p1.moveY, "px"),
|
|
24207
|
+
background: itemBgCss,
|
|
24208
|
+
color: itemColorCss
|
|
24198
24209
|
});
|
|
24199
24210
|
$(self.$el).append(self.moveDiv);
|
|
24200
|
-
// $('body').append(self.moveDiv)
|
|
24201
24211
|
$(document).on(self.mousemove, function (e2) {
|
|
24202
24212
|
// e2.preventDefault()
|
|
24203
24213
|
e2.stopPropagation();
|
|
@@ -24210,15 +24220,30 @@ var env = js_fun.getDeviceEnv();
|
|
|
24210
24220
|
top: curY + 'px'
|
|
24211
24221
|
});
|
|
24212
24222
|
});
|
|
24223
|
+
}
|
|
24224
|
+
appendItem.on(this.mousedown, function (e) {
|
|
24225
|
+
var _this2 = this;
|
|
24226
|
+
if (env === 'mobile') {
|
|
24227
|
+
self.lazyDragTimer = setTimeout(function () {
|
|
24228
|
+
dragDomEventFn(e, _this2);
|
|
24229
|
+
}, 100);
|
|
24230
|
+
} else {
|
|
24231
|
+
dragDomEventFn(e, this);
|
|
24232
|
+
}
|
|
24213
24233
|
});
|
|
24214
24234
|
},
|
|
24215
24235
|
appendMoveDiv: function appendMoveDiv(options) {
|
|
24216
24236
|
var self = this;
|
|
24217
24237
|
self.listItem.remove();
|
|
24218
24238
|
var idx = self.moveDiv.attr('idx');
|
|
24219
|
-
var
|
|
24239
|
+
var itemBgCss = "".concat(self.moveDiv.get(0).style.background);
|
|
24240
|
+
var itemColorCss = "".concat(self.moveDiv.get(0).style.color);
|
|
24241
|
+
var textDisplayCss = self.moveDiv.find('.list-item-text').get(0).style.display;
|
|
24242
|
+
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
24243
|
appendItem.css({
|
|
24221
|
-
opacity: 0
|
|
24244
|
+
opacity: 0,
|
|
24245
|
+
background: itemBgCss,
|
|
24246
|
+
color: itemColorCss
|
|
24222
24247
|
});
|
|
24223
24248
|
options.targetList.append(appendItem);
|
|
24224
24249
|
options.targetList[options.scrollDirection](self.scrollDistance);
|
|
@@ -24267,6 +24292,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24267
24292
|
}
|
|
24268
24293
|
self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
|
|
24269
24294
|
$(document).on(self.mouseup, function (e) {
|
|
24295
|
+
env === 'mobile' && self.stopLazyDrag();
|
|
24270
24296
|
if (self.animationing) {
|
|
24271
24297
|
return;
|
|
24272
24298
|
}
|
|
@@ -24328,12 +24354,49 @@ var env = js_fun.getDeviceEnv();
|
|
|
24328
24354
|
}
|
|
24329
24355
|
}
|
|
24330
24356
|
});
|
|
24357
|
+
|
|
24358
|
+
//禁止选中文字,解决拖动过程中文字老是被选中问题
|
|
24359
|
+
document.onselectstart = function () {
|
|
24360
|
+
return false;
|
|
24361
|
+
};
|
|
24362
|
+
if (env === 'mobile') {
|
|
24363
|
+
$('.list').scroll(function (e) {
|
|
24364
|
+
if (!self.dragingStart) {
|
|
24365
|
+
self.stopLazyDrag();
|
|
24366
|
+
}
|
|
24367
|
+
}).addClass('noScrollBar');
|
|
24368
|
+
$('.main-append').scroll(function (e) {
|
|
24369
|
+
if (!self.dragingStart) {
|
|
24370
|
+
self.stopLazyDrag();
|
|
24371
|
+
}
|
|
24372
|
+
}).addClass('noScrollBar');
|
|
24373
|
+
}
|
|
24331
24374
|
self.bindNextPrevEvent('next');
|
|
24332
24375
|
self.bindNextPrevEvent('prev');
|
|
24333
24376
|
},
|
|
24377
|
+
startLazyDrag: function startLazyDrag() {
|
|
24378
|
+
this.dragingStart = true;
|
|
24379
|
+
$('.list').css({
|
|
24380
|
+
overflow: 'hidden'
|
|
24381
|
+
});
|
|
24382
|
+
$('.main-append').css({
|
|
24383
|
+
overflow: 'hidden'
|
|
24384
|
+
});
|
|
24385
|
+
},
|
|
24386
|
+
stopLazyDrag: function stopLazyDrag() {
|
|
24387
|
+
this.dragingStart = false;
|
|
24388
|
+
this.lazyDragTimer && clearTimeout(this.lazyDragTimer);
|
|
24389
|
+
this.lazyDragTimer = null;
|
|
24390
|
+
$('.list').css({
|
|
24391
|
+
overflow: 'auto'
|
|
24392
|
+
});
|
|
24393
|
+
$('.main-append').css({
|
|
24394
|
+
overflow: 'auto'
|
|
24395
|
+
});
|
|
24396
|
+
},
|
|
24334
24397
|
//回显答案
|
|
24335
24398
|
setAnswerDo: function setAnswerDo() {
|
|
24336
|
-
var
|
|
24399
|
+
var _this3 = this;
|
|
24337
24400
|
var self = this;
|
|
24338
24401
|
var listItemIds = [];
|
|
24339
24402
|
$(this.$el).find('.question-classify .list-item').each(function (index, item) {
|
|
@@ -24347,11 +24410,18 @@ var env = js_fun.getDeviceEnv();
|
|
|
24347
24410
|
if (idx > -1) {
|
|
24348
24411
|
//找到一个删掉一个,要不会有问题
|
|
24349
24412
|
listItemIds.splice(idx, 1);
|
|
24350
|
-
var listItemDom = $(
|
|
24413
|
+
var listItemDom = $(_this3.$el).find('.question-classify .list-item').eq(idx);
|
|
24414
|
+
var itemBgCss = "".concat(listItemDom.get(0).style.background);
|
|
24415
|
+
var itemColorCss = "".concat(listItemDom.get(0).style.color);
|
|
24416
|
+
var textDisplayCss = listItemDom.find('.list-item-text').get(0).style.display;
|
|
24351
24417
|
var attrIdx = listItemDom.attr('idx');
|
|
24352
|
-
var appendItem = $("<div class=\"append-item\" idx=\"".concat(attrIdx, "\" style=\"").concat(
|
|
24418
|
+
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
|
+
appendItem.css({
|
|
24420
|
+
background: itemBgCss,
|
|
24421
|
+
color: itemColorCss
|
|
24422
|
+
});
|
|
24353
24423
|
self.bindDragDomEvent(appendItem, 'back');
|
|
24354
|
-
$(
|
|
24424
|
+
$(_this3.$el).find('.main-append').eq(index).append(appendItem);
|
|
24355
24425
|
listItemDom.remove();
|
|
24356
24426
|
}
|
|
24357
24427
|
});
|
|
@@ -24369,7 +24439,7 @@ var env = js_fun.getDeviceEnv();
|
|
|
24369
24439
|
|
|
24370
24440
|
|
|
24371
24441
|
;
|
|
24372
|
-
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',
|
|
24442
|
+
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_271ed9b4_render]])
|
|
24373
24443
|
|
|
24374
24444
|
/* harmony default export */ var Question_Classify = (Question_Classify_exports_);
|
|
24375
24445
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|