dpzvc3-ui 3.0.4 → 3.0.6

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/dpzvc3.js CHANGED
@@ -11358,13 +11358,13 @@ const radiobox_group_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(rad
11358
11358
 
11359
11359
  radiobox.group = radiobox_group;
11360
11360
  /* harmony default export */ const radioBox = (radiobox);
11361
- ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/swipe/swipe.vue?vue&type=template&id=0053c134
11361
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/swipe/swipe.vue?vue&type=template&id=d6e9d1f0
11362
11362
 
11363
- var swipevue_type_template_id_0053c134_hoisted_1 = ["onClick"];
11364
- var swipevue_type_template_id_0053c134_hoisted_2 = ["src"];
11365
- var swipevue_type_template_id_0053c134_hoisted_3 = ["onClick"];
11366
- var swipevue_type_template_id_0053c134_hoisted_4 = ["src"];
11367
- function swipevue_type_template_id_0053c134_render(_ctx, _cache, $props, $setup, $data, $options) {
11363
+ var swipevue_type_template_id_d6e9d1f0_hoisted_1 = ["onClick"];
11364
+ var swipevue_type_template_id_d6e9d1f0_hoisted_2 = ["src"];
11365
+ var swipevue_type_template_id_d6e9d1f0_hoisted_3 = ["onClick"];
11366
+ var swipevue_type_template_id_d6e9d1f0_hoisted_4 = ["src"];
11367
+ function swipevue_type_template_id_d6e9d1f0_render(_ctx, _cache, $props, $setup, $data, $options) {
11368
11368
  return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
11369
11369
  ref: "swipeRef",
11370
11370
  "class": (0,external_vue_.normalizeClass)(_ctx.classes),
@@ -11396,8 +11396,8 @@ function swipevue_type_template_id_0053c134_render(_ctx, _cache, $props, $setup,
11396
11396
  }, function () {
11397
11397
  return [(0,external_vue_.createElementVNode)("img", {
11398
11398
  src: _item.image
11399
- }, null, 8 /* PROPS */, swipevue_type_template_id_0053c134_hoisted_2), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_item.spec), 1 /* TEXT */)];
11400
- })], 10 /* CLASS, PROPS */, swipevue_type_template_id_0053c134_hoisted_1);
11399
+ }, null, 8 /* PROPS */, swipevue_type_template_id_d6e9d1f0_hoisted_2), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_item.spec), 1 /* TEXT */)];
11400
+ })], 10 /* CLASS, PROPS */, swipevue_type_template_id_d6e9d1f0_hoisted_1);
11401
11401
  }), 128 /* KEYED_FRAGMENT */)) : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("a", {
11402
11402
  key: 1,
11403
11403
  "class": (0,external_vue_.normalizeClass)(_ctx.singleClass),
@@ -11410,8 +11410,8 @@ function swipevue_type_template_id_0053c134_render(_ctx, _cache, $props, $setup,
11410
11410
  }, function () {
11411
11411
  return [(0,external_vue_.createElementVNode)("img", {
11412
11412
  src: item.image
11413
- }, null, 8 /* PROPS */, swipevue_type_template_id_0053c134_hoisted_4), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(item.spec), 1 /* TEXT */)];
11414
- })], 10 /* CLASS, PROPS */, swipevue_type_template_id_0053c134_hoisted_3))], 2 /* CLASS */);
11413
+ }, null, 8 /* PROPS */, swipevue_type_template_id_d6e9d1f0_hoisted_4), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(item.spec), 1 /* TEXT */)];
11414
+ })], 10 /* CLASS, PROPS */, swipevue_type_template_id_d6e9d1f0_hoisted_3))], 2 /* CLASS */);
11415
11415
  }), 128 /* KEYED_FRAGMENT */)) : (0,external_vue_.createCommentVNode)("v-if", true)], 6 /* CLASS, STYLE */), (0,external_vue_.createCommentVNode)(" :class=\"['dpzvc3-swipe-dots-item', (loop ? index + 1 : index) === slideIndex ? 'active' : '']\" "), (0,external_vue_.createElementVNode)("div", {
11416
11416
  "class": (0,external_vue_.normalizeClass)(_ctx.dotsClasses)
11417
11417
  }, [((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.dotLength, function (item, index) {
@@ -11421,12 +11421,34 @@ function swipevue_type_template_id_0053c134_render(_ctx, _cache, $props, $setup,
11421
11421
  }, null, 2 /* CLASS */);
11422
11422
  }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 6 /* CLASS, STYLE */);
11423
11423
  }
11424
- ;// ./src/components/swipe/swipe.vue?vue&type=template&id=0053c134
11424
+ ;// ./src/components/swipe/swipe.vue?vue&type=template&id=d6e9d1f0
11425
+
11426
+ ;// ./src/lib/lib.js
11427
+ var rafTimeout = function rafTimeout(callback, delay) {
11428
+ var start = null;
11429
+ var rafId;
11430
+ function loop(timestamp) {
11431
+ if (!start) start = timestamp;
11432
+ if (timestamp - start >= delay) {
11433
+ callback();
11434
+ cancelAnimationFrame(rafId);
11435
+ } else {
11436
+ rafId = requestAnimationFrame(loop);
11437
+ }
11438
+ }
11439
+ rafId = requestAnimationFrame(loop);
11425
11440
 
11441
+ // 返回清除方法
11442
+ return function () {
11443
+ return cancelAnimationFrame(rafId);
11444
+ };
11445
+ };
11446
+ /* harmony default export */ const lib = (rafTimeout);
11426
11447
  ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/swipe/swipe.vue?vue&type=script&lang=js
11427
11448
 
11428
11449
 
11429
11450
 
11451
+
11430
11452
  var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
11431
11453
  /* harmony default export */ const swipevue_type_script_lang_js = ((0,external_vue_.defineComponent)({
11432
11454
  name: 'Dpzvc3Swipe',
@@ -11610,7 +11632,7 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
11610
11632
  }
11611
11633
  }
11612
11634
  function autoSlide() {
11613
- timer.value = setTimeout(function () {
11635
+ timer.value = lib(function () {
11614
11636
  if (!dragging.value && autoSwipe.value) {
11615
11637
  translateX.value -= clientWidth.value;
11616
11638
  console.log(slideIndex.value, maxIndex.value, 'dsdadddasdss');
@@ -11636,7 +11658,8 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
11636
11658
  }, 0);
11637
11659
  }
11638
11660
  function clearTimer() {
11639
- if (timer.value) clearTimeout(timer.value);
11661
+ // if (timer.value) clearTimeout(timer.value)
11662
+ timer.value && timer.value();
11640
11663
  timer.value = null;
11641
11664
  }
11642
11665
  function onResize() {
@@ -11691,7 +11714,7 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
11691
11714
 
11692
11715
 
11693
11716
  ;
11694
- const swipe_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(swipevue_type_script_lang_js, [['render',swipevue_type_template_id_0053c134_render]])
11717
+ const swipe_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(swipevue_type_script_lang_js, [['render',swipevue_type_template_id_d6e9d1f0_render]])
11695
11718
 
11696
11719
  /* harmony default export */ const swipe = (swipe_exports_);
11697
11720
  ;// ./src/components/swipe/index.js
@@ -13446,10 +13469,10 @@ const upload_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(uploadvue_t
13446
13469
  */
13447
13470
 
13448
13471
  /* harmony default export */ const components_upload = (upload);
13449
- ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/action-sheet/actionSheet.vue?vue&type=template&id=3e21ff72
13472
+ ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/action-sheet/actionSheet.vue?vue&type=template&id=78a5e8a8
13450
13473
 
13451
- var actionSheetvue_type_template_id_3e21ff72_hoisted_1 = ["onClick"];
13452
- function actionSheetvue_type_template_id_3e21ff72_render(_ctx, _cache, $props, $setup, $data, $options) {
13474
+ var actionSheetvue_type_template_id_78a5e8a8_hoisted_1 = ["onClick"];
13475
+ function actionSheetvue_type_template_id_78a5e8a8_render(_ctx, _cache, $props, $setup, $data, $options) {
13453
13476
  var _component_Popup = (0,external_vue_.resolveComponent)("Popup");
13454
13477
  return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", null, [(0,external_vue_.createVNode)(_component_Popup, {
13455
13478
  modelValue: _ctx.visible,
@@ -13473,20 +13496,20 @@ function actionSheetvue_type_template_id_3e21ff72_render(_ctx, _cache, $props, $
13473
13496
  onClick: function onClick($event) {
13474
13497
  return _ctx.emit(item, key);
13475
13498
  }
13476
- }, [(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(item.text), 1 /* TEXT */)], 10 /* CLASS, PROPS */, actionSheetvue_type_template_id_3e21ff72_hoisted_1);
13499
+ }, [(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(item.text), 1 /* TEXT */)], 10 /* CLASS, PROPS */, actionSheetvue_type_template_id_78a5e8a8_hoisted_1);
13477
13500
  }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), _ctx.cancleText ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("a", {
13478
13501
  key: 0,
13479
13502
  href: "javascript:;",
13480
13503
  "class": (0,external_vue_.normalizeClass)(_ctx.cancleClass),
13481
- onClick: _cache[0] || (_cache[0] = function ($event) {
13482
- return _ctx.visible = false;
13504
+ onClick: _cache[0] || (_cache[0] = function () {
13505
+ return _ctx.cancleClick && _ctx.cancleClick.apply(_ctx, arguments);
13483
13506
  })
13484
13507
  }, (0,external_vue_.toDisplayString)(_ctx.cancleText), 3 /* TEXT, CLASS */)) : (0,external_vue_.createCommentVNode)("v-if", true)], 2 /* CLASS */)];
13485
13508
  }),
13486
13509
  _: 1 /* STABLE */
13487
13510
  }, 8 /* PROPS */, ["modelValue"])]);
13488
13511
  }
13489
- ;// ./src/components/action-sheet/actionSheet.vue?vue&type=template&id=3e21ff72
13512
+ ;// ./src/components/action-sheet/actionSheet.vue?vue&type=template&id=78a5e8a8
13490
13513
 
13491
13514
  ;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/action-sheet/actionSheet.vue?vue&type=script&lang=js
13492
13515
 
@@ -13554,6 +13577,9 @@ var actionSheetvue_type_script_lang_js_prefixCls = 'dpzvc3-actionSheet';
13554
13577
  // visible.value = false
13555
13578
  emit('update:modelValue', false);
13556
13579
  };
13580
+ var cancleClick = function cancleClick() {
13581
+ emit('update:modelValue', false);
13582
+ };
13557
13583
  return {
13558
13584
  visible: visible,
13559
13585
  actions: actions,
@@ -13561,6 +13587,7 @@ var actionSheetvue_type_script_lang_js_prefixCls = 'dpzvc3-actionSheet';
13561
13587
  wrapperClasses: wrapperClasses,
13562
13588
  wrapperActionClass: wrapperActionClass,
13563
13589
  cancleClass: cancleClass,
13590
+ cancleClick: cancleClick,
13564
13591
  emit: emitAction
13565
13592
  };
13566
13593
  }
@@ -13573,7 +13600,7 @@ var actionSheetvue_type_script_lang_js_prefixCls = 'dpzvc3-actionSheet';
13573
13600
 
13574
13601
 
13575
13602
  ;
13576
- const actionSheet_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(actionSheetvue_type_script_lang_js, [['render',actionSheetvue_type_template_id_3e21ff72_render]])
13603
+ const actionSheet_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(actionSheetvue_type_script_lang_js, [['render',actionSheetvue_type_template_id_78a5e8a8_render]])
13577
13604
 
13578
13605
  /* harmony default export */ const actionSheet = (actionSheet_exports_);
13579
13606
  ;// ./src/components/action-sheet/index.js