yc-ui2 0.1.2-beta24 → 0.1.2-beta26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/yc-ui2.common.js +463 -40
- package/dist/yc-ui2.common.js.map +1 -1
- package/dist/yc-ui2.css +1 -1
- package/dist/yc-ui2.umd.js +463 -40
- package/dist/yc-ui2.umd.js.map +1 -1
- package/dist/yc-ui2.umd.min.js +1 -1
- package/dist/yc-ui2.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/App.vue +4 -4
- package/src/main.js +2 -2
package/dist/yc-ui2.common.js
CHANGED
@@ -6349,7 +6349,7 @@ if (typeof window !== 'undefined') {
|
|
6349
6349
|
// Indicate to webpack that this file can be concatenated
|
6350
6350
|
/* harmony default export */ var setPublicPath = (null);
|
6351
6351
|
|
6352
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=template&id=
|
6352
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=template&id=2c1e2525&scoped=true&
|
6353
6353
|
var render = function render() {
|
6354
6354
|
var _vm = this,
|
6355
6355
|
_c = _vm._self._c;
|
@@ -6387,62 +6387,403 @@ var staticRenderFns = [];
|
|
6387
6387
|
|
6388
6388
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
6389
6389
|
var es_array_push = __webpack_require__(7658);
|
6390
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/
|
6390
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/vue-monoplasty-slide-verify/src/lib/slide-verify.vue?vue&type=template&id=b67196d8&scoped=true&
|
6391
|
+
var slide_verifyvue_type_template_id_b67196d8_scoped_true_render = function render() {
|
6392
|
+
var _vm = this,
|
6393
|
+
_c = _vm._self._c;
|
6394
|
+
return _c('div', {
|
6395
|
+
staticClass: "slide-verify",
|
6396
|
+
style: {
|
6397
|
+
width: _vm.w + 'px'
|
6398
|
+
},
|
6399
|
+
attrs: {
|
6400
|
+
"id": "slideVerify",
|
6401
|
+
"onselectstart": "return false;"
|
6402
|
+
}
|
6403
|
+
}, [_c('div', {
|
6404
|
+
class: {
|
6405
|
+
'slider-verify-loading': _vm.loadBlock
|
6406
|
+
}
|
6407
|
+
}), _c('canvas', {
|
6408
|
+
ref: "canvas",
|
6409
|
+
attrs: {
|
6410
|
+
"width": _vm.w,
|
6411
|
+
"height": _vm.h
|
6412
|
+
}
|
6413
|
+
}), _vm.show ? _c('div', {
|
6414
|
+
staticClass: "slide-verify-refresh-icon",
|
6415
|
+
on: {
|
6416
|
+
"click": _vm.refresh
|
6417
|
+
}
|
6418
|
+
}) : _vm._e(), _c('canvas', {
|
6419
|
+
ref: "block",
|
6420
|
+
staticClass: "slide-verify-block",
|
6421
|
+
attrs: {
|
6422
|
+
"width": _vm.w,
|
6423
|
+
"height": _vm.h
|
6424
|
+
}
|
6425
|
+
}), _c('div', {
|
6426
|
+
staticClass: "slide-verify-slider",
|
6427
|
+
class: {
|
6428
|
+
'container-active': _vm.containerActive,
|
6429
|
+
'container-success': _vm.containerSuccess,
|
6430
|
+
'container-fail': _vm.containerFail
|
6431
|
+
}
|
6432
|
+
}, [_c('div', {
|
6433
|
+
staticClass: "slide-verify-slider-mask",
|
6434
|
+
style: {
|
6435
|
+
width: _vm.sliderMaskWidth
|
6436
|
+
}
|
6437
|
+
}, [_c('div', {
|
6438
|
+
staticClass: "slide-verify-slider-mask-item",
|
6439
|
+
style: {
|
6440
|
+
left: _vm.sliderLeft
|
6441
|
+
},
|
6442
|
+
on: {
|
6443
|
+
"mousedown": _vm.sliderDown,
|
6444
|
+
"touchstart": _vm.touchStartEvent,
|
6445
|
+
"touchmove": function ($event) {
|
6446
|
+
return _vm.handleMoveEvent($event, 'touch');
|
6447
|
+
},
|
6448
|
+
"touchend": function ($event) {
|
6449
|
+
return _vm.handleMoveEndEvent($event, 'touch');
|
6450
|
+
}
|
6451
|
+
}
|
6452
|
+
}, [_c('div', {
|
6453
|
+
staticClass: "slide-verify-slider-mask-item-icon"
|
6454
|
+
})])]), _c('span', {
|
6455
|
+
staticClass: "slide-verify-slider-text"
|
6456
|
+
}, [_vm._v(_vm._s(_vm.sliderText))])])]);
|
6457
|
+
};
|
6458
|
+
var slide_verifyvue_type_template_id_b67196d8_scoped_true_staticRenderFns = [];
|
6391
6459
|
|
6392
|
-
|
6393
|
-
|
6460
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/vue-monoplasty-slide-verify/src/lib/slide-verify.vue?vue&type=script&lang=js&
|
6461
|
+
|
6462
|
+
const PI = Math.PI;
|
6463
|
+
function sum(x, y) {
|
6464
|
+
return x + y;
|
6465
|
+
}
|
6466
|
+
function square(x) {
|
6467
|
+
return x * x;
|
6468
|
+
}
|
6469
|
+
/* harmony default export */ var slide_verifyvue_type_script_lang_js_ = ({
|
6470
|
+
name: "SlideVerify",
|
6394
6471
|
props: {
|
6395
|
-
|
6472
|
+
// block length
|
6473
|
+
l: {
|
6474
|
+
type: Number,
|
6475
|
+
default: 42
|
6476
|
+
},
|
6477
|
+
// block radius
|
6478
|
+
r: {
|
6479
|
+
type: Number,
|
6480
|
+
default: 10
|
6481
|
+
},
|
6482
|
+
// canvas width
|
6483
|
+
w: {
|
6484
|
+
type: Number,
|
6485
|
+
default: 310
|
6486
|
+
},
|
6487
|
+
// canvas height
|
6488
|
+
h: {
|
6489
|
+
type: Number,
|
6490
|
+
default: 155
|
6491
|
+
},
|
6492
|
+
sliderText: {
|
6396
6493
|
type: String,
|
6397
|
-
default: "
|
6494
|
+
default: "Slide filled right"
|
6398
6495
|
},
|
6399
|
-
|
6496
|
+
accuracy: {
|
6497
|
+
type: Number,
|
6498
|
+
default: 5 // 若为 -1 则不进行机器判断
|
6499
|
+
},
|
6500
|
+
|
6501
|
+
show: {
|
6400
6502
|
type: Boolean,
|
6401
6503
|
default: true
|
6504
|
+
},
|
6505
|
+
imgs: {
|
6506
|
+
type: Array,
|
6507
|
+
default: () => []
|
6402
6508
|
}
|
6403
6509
|
},
|
6404
6510
|
data() {
|
6405
6511
|
return {
|
6406
|
-
|
6407
|
-
|
6408
|
-
|
6512
|
+
containerActive: false,
|
6513
|
+
// container active class
|
6514
|
+
containerSuccess: false,
|
6515
|
+
// container success class
|
6516
|
+
containerFail: false,
|
6517
|
+
// container fail class
|
6518
|
+
canvasCtx: null,
|
6519
|
+
blockCtx: null,
|
6520
|
+
block: null,
|
6521
|
+
block_x: undefined,
|
6522
|
+
// container random position
|
6523
|
+
block_y: undefined,
|
6524
|
+
L: this.l + this.r * 2 + 3,
|
6525
|
+
// block real length
|
6526
|
+
img: undefined,
|
6527
|
+
originX: undefined,
|
6528
|
+
originY: undefined,
|
6529
|
+
isMouseDown: false,
|
6530
|
+
trail: [],
|
6531
|
+
sliderLeft: 0,
|
6532
|
+
// block right offset
|
6533
|
+
sliderMaskWidth: 0,
|
6534
|
+
// mask width,
|
6535
|
+
success: false,
|
6536
|
+
// Bug Fixes 修复了验证成功后还能滑动
|
6537
|
+
loadBlock: true,
|
6538
|
+
// Features 图片加载提示,防止图片没加载完就开始验证
|
6539
|
+
timestamp: null
|
6409
6540
|
};
|
6410
6541
|
},
|
6411
|
-
|
6412
|
-
|
6413
|
-
const list = [];
|
6414
|
-
for (let i = 1; i < 9; i++) {
|
6415
|
-
list.push(`/cloud-img/${i}.jpg`);
|
6416
|
-
}
|
6417
|
-
return list;
|
6418
|
-
}
|
6419
|
-
},
|
6420
|
-
watch: {
|
6421
|
-
isShow(newVal) {
|
6422
|
-
// 这里第三方引用,ref没有渲染完成,reset报错,还不能用?号
|
6423
|
-
newVal && this.$refs.slideblock && this.$refs.slideblock.reset && this.$refs.slideblock.reset();
|
6424
|
-
}
|
6542
|
+
mounted() {
|
6543
|
+
this.init();
|
6425
6544
|
},
|
6426
|
-
created() {},
|
6427
6545
|
methods: {
|
6428
|
-
|
6429
|
-
this
|
6546
|
+
init() {
|
6547
|
+
this.initDom();
|
6548
|
+
this.initImg();
|
6549
|
+
this.bindEvents();
|
6430
6550
|
},
|
6431
|
-
|
6432
|
-
|
6433
|
-
|
6434
|
-
|
6435
|
-
|
6436
|
-
|
6551
|
+
initDom() {
|
6552
|
+
this.block = this.$refs.block;
|
6553
|
+
this.canvasCtx = this.$refs.canvas.getContext("2d");
|
6554
|
+
this.blockCtx = this.block.getContext("2d");
|
6555
|
+
},
|
6556
|
+
initImg() {
|
6557
|
+
const img = this.createImg(() => {
|
6558
|
+
// 图片加载完关闭遮蔽罩
|
6559
|
+
this.loadBlock = false;
|
6560
|
+
this.drawBlock();
|
6561
|
+
this.canvasCtx.drawImage(img, 0, 0, this.w, this.h);
|
6562
|
+
this.blockCtx.drawImage(img, 0, 0, this.w, this.h);
|
6563
|
+
let {
|
6564
|
+
block_x: x,
|
6565
|
+
block_y: y,
|
6566
|
+
r,
|
6567
|
+
L
|
6568
|
+
} = this;
|
6569
|
+
let _y = y - r * 2 - 1;
|
6570
|
+
let ImageData = this.blockCtx.getImageData(x, _y, L, L);
|
6571
|
+
this.block.width = L;
|
6572
|
+
this.blockCtx.putImageData(ImageData, 0, _y);
|
6573
|
+
});
|
6574
|
+
this.img = img;
|
6575
|
+
},
|
6576
|
+
drawBlock() {
|
6577
|
+
this.block_x = this.getRandomNumberByRange(this.L + 10, this.w - (this.L + 10));
|
6578
|
+
this.block_y = this.getRandomNumberByRange(10 + this.r * 2, this.h - (this.L + 10));
|
6579
|
+
this.draw(this.canvasCtx, this.block_x, this.block_y, "fill");
|
6580
|
+
this.draw(this.blockCtx, this.block_x, this.block_y, "clip");
|
6581
|
+
},
|
6582
|
+
draw(ctx, x, y, operation) {
|
6583
|
+
let {
|
6584
|
+
l,
|
6585
|
+
r
|
6586
|
+
} = this;
|
6587
|
+
ctx.beginPath();
|
6588
|
+
ctx.moveTo(x, y);
|
6589
|
+
ctx.arc(x + l / 2, y - r + 2, r, 0.72 * PI, 2.26 * PI);
|
6590
|
+
ctx.lineTo(x + l, y);
|
6591
|
+
ctx.arc(x + l + r - 2, y + l / 2, r, 1.21 * PI, 2.78 * PI);
|
6592
|
+
ctx.lineTo(x + l, y + l);
|
6593
|
+
ctx.lineTo(x, y + l);
|
6594
|
+
ctx.arc(x + r - 2, y + l / 2, r + 0.4, 2.76 * PI, 1.24 * PI, true);
|
6595
|
+
ctx.lineTo(x, y);
|
6596
|
+
ctx.lineWidth = 2;
|
6597
|
+
ctx.fillStyle = "rgba(255, 255, 255, 0.7)";
|
6598
|
+
ctx.strokeStyle = "rgba(255, 255, 255, 0.7)";
|
6599
|
+
ctx.stroke();
|
6600
|
+
ctx[operation]();
|
6601
|
+
// Bug Fixes 修复了火狐和ie显示问题
|
6602
|
+
ctx.globalCompositeOperation = "destination-over";
|
6603
|
+
},
|
6604
|
+
createImg(onload) {
|
6605
|
+
const img = document.createElement("img");
|
6606
|
+
img.crossOrigin = "Anonymous";
|
6607
|
+
img.onload = onload;
|
6608
|
+
img.onerror = () => {
|
6609
|
+
img.src = this.getRandomImg();
|
6610
|
+
};
|
6611
|
+
img.src = this.getRandomImg();
|
6612
|
+
return img;
|
6613
|
+
},
|
6614
|
+
// 随机生成img src
|
6615
|
+
getRandomImg() {
|
6616
|
+
// return require('../assets/img.jpg')
|
6617
|
+
const len = this.imgs.length;
|
6618
|
+
return len > 0 ? this.imgs[this.getRandomNumberByRange(0, len - 1)] :
|
6619
|
+
// "https://bing.ioliu.cn/v1/rand?w=300&h=150";
|
6620
|
+
"https://source.unsplash.com/300x150/?book,library";
|
6621
|
+
// "https://api.dujin.org/pic/fengjing";
|
6622
|
+
},
|
6623
|
+
|
6624
|
+
getRandomNumberByRange(start, end) {
|
6625
|
+
return Math.round(Math.random() * (end - start) + start);
|
6626
|
+
},
|
6627
|
+
refresh() {
|
6628
|
+
this.reset();
|
6629
|
+
this.$emit("refresh");
|
6630
|
+
},
|
6631
|
+
sliderDown(event) {
|
6632
|
+
if (this.success) return;
|
6633
|
+
this.originX = event.clientX;
|
6634
|
+
this.originY = event.clientY;
|
6635
|
+
this.isMouseDown = true;
|
6636
|
+
this.timestamp = +new Date();
|
6637
|
+
},
|
6638
|
+
touchStartEvent(e) {
|
6639
|
+
if (this.success) return;
|
6640
|
+
this.originX = e.changedTouches[0].pageX;
|
6641
|
+
this.originY = e.changedTouches[0].pageY;
|
6642
|
+
this.isMouseDown = true;
|
6643
|
+
this.timestamp = +new Date();
|
6644
|
+
},
|
6645
|
+
bindEvents() {
|
6646
|
+
document.addEventListener("mousemove", this.handleMoveEvent);
|
6647
|
+
document.addEventListener("mouseup", this.handleMoveEndEvent);
|
6648
|
+
},
|
6649
|
+
// 处理函数抽离
|
6650
|
+
handleMoveEvent: throttle(function (e, type = "mouse") {
|
6651
|
+
if (!this.isMouseDown) return false;
|
6652
|
+
const moveX = type === "mouse" ? e.clientX - this.originX : e.changedTouches[0].pageX - this.originX;
|
6653
|
+
const moveY = type === "mouse" ? e.clientY - this.originY : e.changedTouches[0].pageY - this.originY;
|
6654
|
+
if (moveX < 0 || moveX + 38 >= this.w) return false;
|
6655
|
+
this.sliderLeft = moveX + "px";
|
6656
|
+
let blockLeft = (this.w - 40 - 20) / (this.w - 40) * moveX;
|
6657
|
+
this.block.style.left = blockLeft + "px";
|
6658
|
+
this.containerActive = true; // add active
|
6659
|
+
this.sliderMaskWidth = moveX + "px";
|
6660
|
+
this.trail.push(moveY);
|
6661
|
+
}),
|
6662
|
+
handleMoveEndEvent(e, type = "mouse") {
|
6663
|
+
if (!this.isMouseDown) return false;
|
6664
|
+
this.isMouseDown = false;
|
6665
|
+
if (type === "mouse" && e.clientX === this.originX || type === "touch" && e.changedTouches[0].pageX === this.originX) return false;
|
6666
|
+
this.containerActive = false; // remove active
|
6667
|
+
this.timestamp = +new Date() - this.timestamp;
|
6668
|
+
const {
|
6669
|
+
spliced,
|
6670
|
+
TuringTest
|
6671
|
+
} = this.verify();
|
6672
|
+
if (spliced) {
|
6673
|
+
if (this.accuracy === -1) {
|
6674
|
+
this.containerSuccess = true;
|
6675
|
+
this.success = true;
|
6676
|
+
this.$emit("success", this.timestamp);
|
6677
|
+
return;
|
6678
|
+
}
|
6679
|
+
if (TuringTest) {
|
6680
|
+
// succ
|
6681
|
+
this.containerSuccess = true;
|
6682
|
+
this.success = true;
|
6683
|
+
this.$emit("success", this.timestamp);
|
6684
|
+
} else {
|
6685
|
+
this.containerFail = true;
|
6686
|
+
this.$emit("again");
|
6687
|
+
}
|
6688
|
+
} else {
|
6689
|
+
this.containerFail = true;
|
6690
|
+
this.$emit("fail");
|
6691
|
+
setTimeout(() => {
|
6692
|
+
this.reset();
|
6693
|
+
}, 1000);
|
6694
|
+
}
|
6695
|
+
},
|
6696
|
+
verify() {
|
6697
|
+
const arr = this.trail; // drag y move distance
|
6698
|
+
const average = arr.reduce(sum) / arr.length; // average
|
6699
|
+
const deviations = arr.map(x => x - average); // deviation array
|
6700
|
+
const stddev = Math.sqrt(deviations.map(square).reduce(sum) / arr.length); // standard deviation
|
6701
|
+
const left = parseInt(this.block.style.left);
|
6702
|
+
const accuracy = this.accuracy <= 1 ? 1 : this.accuracy > 10 ? 10 : this.accuracy;
|
6703
|
+
return {
|
6704
|
+
spliced: Math.abs(left - this.block_x) <= accuracy,
|
6705
|
+
TuringTest: average !== stddev // equal => not person operate
|
6706
|
+
};
|
6707
|
+
},
|
6708
|
+
|
6709
|
+
reset() {
|
6710
|
+
this.success = false;
|
6711
|
+
this.containerActive = false;
|
6712
|
+
this.containerSuccess = false;
|
6713
|
+
this.containerFail = false;
|
6714
|
+
this.sliderLeft = 0;
|
6715
|
+
this.block.style.left = 0;
|
6716
|
+
this.sliderMaskWidth = 0;
|
6717
|
+
// canvas
|
6718
|
+
let {
|
6719
|
+
w,
|
6720
|
+
h
|
6721
|
+
} = this;
|
6722
|
+
this.canvasCtx.clearRect(0, 0, w, h);
|
6723
|
+
this.blockCtx.clearRect(0, 0, w, h);
|
6724
|
+
this.block.width = w;
|
6725
|
+
|
6726
|
+
// generate img
|
6727
|
+
this.img.src = this.getRandomImg();
|
6728
|
+
this.$emit("fulfilled");
|
6437
6729
|
}
|
6730
|
+
},
|
6731
|
+
destroyed() {
|
6732
|
+
document.removeEventListener("mousemove", this.handleMoveEvent);
|
6733
|
+
document.removeEventListener("mouseup", this.handleMoveEndEvent);
|
6438
6734
|
}
|
6439
6735
|
});
|
6440
|
-
|
6441
|
-
|
6442
|
-
|
6736
|
+
function throttle(fn, interval = 50, options = {
|
6737
|
+
leading: true,
|
6738
|
+
trailing: true
|
6739
|
+
}) {
|
6740
|
+
const {
|
6741
|
+
leading,
|
6742
|
+
trailing,
|
6743
|
+
resultCallback
|
6744
|
+
} = options;
|
6745
|
+
let lastTime = 0;
|
6746
|
+
let timer = null;
|
6747
|
+
const _throttle = function (...args) {
|
6748
|
+
return new Promise((resolve, reject) => {
|
6749
|
+
const nowTime = new Date().getTime();
|
6750
|
+
if (!lastTime && !leading) lastTime = nowTime;
|
6751
|
+
const remainTime = interval - (nowTime - lastTime);
|
6752
|
+
if (remainTime <= 0) {
|
6753
|
+
if (timer) {
|
6754
|
+
clearTimeout(timer);
|
6755
|
+
timer = null;
|
6756
|
+
}
|
6757
|
+
const result = fn.apply(this, args);
|
6758
|
+
if (resultCallback) resultCallback(result);
|
6759
|
+
resolve(result);
|
6760
|
+
lastTime = nowTime;
|
6761
|
+
return;
|
6762
|
+
}
|
6763
|
+
if (trailing && !timer) {
|
6764
|
+
timer = setTimeout(() => {
|
6765
|
+
timer = null;
|
6766
|
+
lastTime = !leading ? 0 : new Date().getTime();
|
6767
|
+
const result = fn.apply(this, args);
|
6768
|
+
if (resultCallback) resultCallback(result);
|
6769
|
+
resolve(result);
|
6770
|
+
}, remainTime);
|
6771
|
+
}
|
6772
|
+
});
|
6773
|
+
};
|
6774
|
+
_throttle.cancel = function () {
|
6775
|
+
if (timer) clearTimeout(timer);
|
6776
|
+
timer = null;
|
6777
|
+
lastTime = 0;
|
6778
|
+
};
|
6779
|
+
return _throttle;
|
6780
|
+
}
|
6781
|
+
;// CONCATENATED MODULE: ./node_modules/vue-monoplasty-slide-verify/src/lib/slide-verify.vue?vue&type=script&lang=js&
|
6782
|
+
/* harmony default export */ var lib_slide_verifyvue_type_script_lang_js_ = (slide_verifyvue_type_script_lang_js_);
|
6783
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./node_modules/vue-monoplasty-slide-verify/src/lib/slide-verify.vue?vue&type=style&index=0&id=b67196d8&prod&scoped=true&lang=css&
|
6443
6784
|
// extracted by mini-css-extract-plugin
|
6444
6785
|
|
6445
|
-
;// CONCATENATED MODULE: ./src/
|
6786
|
+
;// CONCATENATED MODULE: ./node_modules/vue-monoplasty-slide-verify/src/lib/slide-verify.vue?vue&type=style&index=0&id=b67196d8&prod&scoped=true&lang=css&
|
6446
6787
|
|
6447
6788
|
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
6448
6789
|
/* globals __VUE_SSR_CONTEXT__ */
|
@@ -6542,7 +6883,7 @@ function normalizeComponent(
|
|
6542
6883
|
}
|
6543
6884
|
}
|
6544
6885
|
|
6545
|
-
;// CONCATENATED MODULE: ./src/
|
6886
|
+
;// CONCATENATED MODULE: ./node_modules/vue-monoplasty-slide-verify/src/lib/slide-verify.vue
|
6546
6887
|
|
6547
6888
|
|
6548
6889
|
|
@@ -6552,17 +6893,99 @@ function normalizeComponent(
|
|
6552
6893
|
/* normalize component */
|
6553
6894
|
|
6554
6895
|
var component = normalizeComponent(
|
6896
|
+
lib_slide_verifyvue_type_script_lang_js_,
|
6897
|
+
slide_verifyvue_type_template_id_b67196d8_scoped_true_render,
|
6898
|
+
slide_verifyvue_type_template_id_b67196d8_scoped_true_staticRenderFns,
|
6899
|
+
false,
|
6900
|
+
null,
|
6901
|
+
"b67196d8",
|
6902
|
+
null
|
6903
|
+
|
6904
|
+
)
|
6905
|
+
|
6906
|
+
/* harmony default export */ var slide_verify = (component.exports);
|
6907
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=script&lang=js&
|
6908
|
+
|
6909
|
+
|
6910
|
+
/* harmony default export */ var YcSlideVerifyvue_type_script_lang_js_ = ({
|
6911
|
+
name: "YcSlideVerify",
|
6912
|
+
components: {
|
6913
|
+
SlideVerify: slide_verify
|
6914
|
+
},
|
6915
|
+
props: {
|
6916
|
+
title: {
|
6917
|
+
type: String,
|
6918
|
+
default: "滑动验证"
|
6919
|
+
},
|
6920
|
+
isShow: {
|
6921
|
+
type: Boolean,
|
6922
|
+
default: true
|
6923
|
+
}
|
6924
|
+
},
|
6925
|
+
data() {
|
6926
|
+
return {
|
6927
|
+
accuracy: 5,
|
6928
|
+
sliderText: "拖动完成上方拼图",
|
6929
|
+
countDownNum: 120
|
6930
|
+
};
|
6931
|
+
},
|
6932
|
+
computed: {
|
6933
|
+
imgs() {
|
6934
|
+
const list = [];
|
6935
|
+
for (let i = 1; i < 9; i++) {
|
6936
|
+
list.push(`/cloud-img/${i}.jpg`);
|
6937
|
+
}
|
6938
|
+
return list;
|
6939
|
+
}
|
6940
|
+
},
|
6941
|
+
watch: {
|
6942
|
+
isShow(newVal) {
|
6943
|
+
// 这里第三方引用,ref没有渲染完成,reset报错,还不能用?号
|
6944
|
+
newVal && this.$refs.slideblock && this.$refs.slideblock.reset && this.$refs.slideblock.reset();
|
6945
|
+
}
|
6946
|
+
},
|
6947
|
+
created() {},
|
6948
|
+
methods: {
|
6949
|
+
onSuccess() {
|
6950
|
+
this.$emit("success");
|
6951
|
+
},
|
6952
|
+
onFail() {},
|
6953
|
+
onAgain() {},
|
6954
|
+
onRefresh() {},
|
6955
|
+
onFulfilled() {},
|
6956
|
+
handleClose() {
|
6957
|
+
this.$emit("close");
|
6958
|
+
}
|
6959
|
+
}
|
6960
|
+
});
|
6961
|
+
;// CONCATENATED MODULE: ./src/components/YcSlideVerify/index.vue?vue&type=script&lang=js&
|
6962
|
+
/* harmony default export */ var components_YcSlideVerifyvue_type_script_lang_js_ = (YcSlideVerifyvue_type_script_lang_js_);
|
6963
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcSlideVerify/index.vue?vue&type=style&index=0&id=2c1e2525&prod&lang=scss&scoped=true&
|
6964
|
+
// extracted by mini-css-extract-plugin
|
6965
|
+
|
6966
|
+
;// CONCATENATED MODULE: ./src/components/YcSlideVerify/index.vue?vue&type=style&index=0&id=2c1e2525&prod&lang=scss&scoped=true&
|
6967
|
+
|
6968
|
+
;// CONCATENATED MODULE: ./src/components/YcSlideVerify/index.vue
|
6969
|
+
|
6970
|
+
|
6971
|
+
|
6972
|
+
;
|
6973
|
+
|
6974
|
+
|
6975
|
+
/* normalize component */
|
6976
|
+
|
6977
|
+
var YcSlideVerify_component = normalizeComponent(
|
6555
6978
|
components_YcSlideVerifyvue_type_script_lang_js_,
|
6556
6979
|
render,
|
6557
6980
|
staticRenderFns,
|
6558
6981
|
false,
|
6559
6982
|
null,
|
6560
|
-
"
|
6983
|
+
"2c1e2525",
|
6561
6984
|
null
|
6562
6985
|
|
6563
6986
|
)
|
6564
6987
|
|
6565
|
-
/* harmony default export */ var YcSlideVerify = (
|
6988
|
+
/* harmony default export */ var YcSlideVerify = (YcSlideVerify_component.exports);
|
6566
6989
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/YcCustomerService/index.vue?vue&type=template&id=849349a0&scoped=true&
|
6567
6990
|
var YcCustomerServicevue_type_template_id_849349a0_scoped_true_render = function render() {
|
6568
6991
|
var _vm = this,
|