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