dpzvc3-ui 3.0.1 → 3.0.3
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.esm.js +255 -228
- package/dist/dpzvc3.esm.js.map +1 -1
- package/dist/dpzvc3.esm.min.js +1 -1
- package/dist/dpzvc3.esm.min.js.map +1 -1
- package/dist/dpzvc3.js +71 -44
- package/dist/dpzvc3.js.map +1 -1
- package/dist/dpzvc3.min.js +1 -1
- package/dist/dpzvc3.min.js.map +1 -1
- package/dist/styles/components/swipe.css +1 -1
- package/dist/styles/dpzvc3.css +1 -1
- package/dist-prod/index.html +1 -1
- package/dist-prod/main.09c75d988141f805e29c.js +2 -0
- package/dist-prod/main.09c75d988141f805e29c.js.map +1 -0
- package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js +2 -0
- package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js.map +1 -0
- package/dist-prod/swipe.75b7d741be73c0064982.chunk.js +2 -0
- package/dist-prod/swipe.75b7d741be73c0064982.chunk.js.map +1 -0
- package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js +2 -0
- package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js.map +1 -0
- package/package.json +1 -1
- package/src/components/radioBox/radiobox.vue +5 -4
- package/src/components/slideBar/slideBar.vue +23 -5
- package/src/components/swipe/swipe.vue +18 -11
- package/src/styles/components/swipe.less +1 -1
- package/src/views/SlideBar.vue +5 -2
- package/src/views/Swipe.vue +8 -10
- package/dist-prod/main.2e9aaa9095e329ea2d7b.js +0 -2
- package/dist-prod/main.2e9aaa9095e329ea2d7b.js.map +0 -1
- package/dist-prod/slidebar.3d3f48a631f03a2210c9.chunk.js +0 -2
- package/dist-prod/slidebar.3d3f48a631f03a2210c9.chunk.js.map +0 -1
- package/dist-prod/swipe.2e5b0acc3bbb2bf49dd5.chunk.js +0 -2
- package/dist-prod/swipe.2e5b0acc3bbb2bf49dd5.chunk.js.map +0 -1
- package/dist-prod/upload.ec7a954970889869d93e.chunk.js +0 -2
- package/dist-prod/upload.ec7a954970889869d93e.chunk.js.map +0 -1
package/dist/dpzvc3.js
CHANGED
|
@@ -11158,10 +11158,10 @@ const picker_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(pickervue_t
|
|
|
11158
11158
|
*/
|
|
11159
11159
|
|
|
11160
11160
|
/* harmony default export */ const components_picker = (picker);
|
|
11161
|
-
;// ./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/radioBox/radiobox.vue?vue&type=template&id=
|
|
11161
|
+
;// ./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/radioBox/radiobox.vue?vue&type=template&id=1ec5a25f
|
|
11162
11162
|
|
|
11163
|
-
var
|
|
11164
|
-
function
|
|
11163
|
+
var radioboxvue_type_template_id_1ec5a25f_hoisted_1 = ["disabled", "checked"];
|
|
11164
|
+
function radioboxvue_type_template_id_1ec5a25f_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11165
11165
|
return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("label", {
|
|
11166
11166
|
"class": (0,external_vue_.normalizeClass)(_ctx.classes)
|
|
11167
11167
|
}, [(0,external_vue_.createElementVNode)("span", {
|
|
@@ -11176,7 +11176,7 @@ function radioboxvue_type_template_id_12c1d7f9_render(_ctx, _cache, $props, $set
|
|
|
11176
11176
|
onChange: _cache[0] || (_cache[0] = function () {
|
|
11177
11177
|
return _ctx.handleChange && _ctx.handleChange.apply(_ctx, arguments);
|
|
11178
11178
|
})
|
|
11179
|
-
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */,
|
|
11179
|
+
}, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, radioboxvue_type_template_id_1ec5a25f_hoisted_1)], 2 /* CLASS */)], 2 /* CLASS */), _ctx.show ? (0,external_vue_.renderSlot)(_ctx.$slots, "default", {
|
|
11180
11180
|
key: 0
|
|
11181
11181
|
}, function () {
|
|
11182
11182
|
return [(0,external_vue_.createElementVNode)("span", {
|
|
@@ -11184,7 +11184,7 @@ function radioboxvue_type_template_id_12c1d7f9_render(_ctx, _cache, $props, $set
|
|
|
11184
11184
|
}, (0,external_vue_.toDisplayString)(_ctx.label), 513 /* TEXT, NEED_PATCH */)];
|
|
11185
11185
|
}) : (0,external_vue_.createCommentVNode)("v-if", true)], 2 /* CLASS */);
|
|
11186
11186
|
}
|
|
11187
|
-
;// ./src/components/radioBox/radiobox.vue?vue&type=template&id=
|
|
11187
|
+
;// ./src/components/radioBox/radiobox.vue?vue&type=template&id=1ec5a25f
|
|
11188
11188
|
|
|
11189
11189
|
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/radioBox/radiobox.vue?vue&type=script&lang=js
|
|
11190
11190
|
|
|
@@ -11197,7 +11197,7 @@ var radioboxvue_type_script_lang_js_prefixCls = 'dpzvc3-radiobox';
|
|
|
11197
11197
|
type: [String, Number],
|
|
11198
11198
|
required: true
|
|
11199
11199
|
},
|
|
11200
|
-
|
|
11200
|
+
modelValue: {
|
|
11201
11201
|
type: Boolean,
|
|
11202
11202
|
"default": false
|
|
11203
11203
|
},
|
|
@@ -11206,7 +11206,7 @@ var radioboxvue_type_script_lang_js_prefixCls = 'dpzvc3-radiobox';
|
|
|
11206
11206
|
"default": false
|
|
11207
11207
|
}
|
|
11208
11208
|
},
|
|
11209
|
-
emits: ['update:
|
|
11209
|
+
emits: ['update:modelValue', 'on-change'],
|
|
11210
11210
|
setup: function setup(props, _ref) {
|
|
11211
11211
|
var emit = _ref.emit;
|
|
11212
11212
|
var slotEl = (0,external_vue_.ref)(null);
|
|
@@ -11217,7 +11217,7 @@ var radioboxvue_type_script_lang_js_prefixCls = 'dpzvc3-radiobox';
|
|
|
11217
11217
|
if (group) {
|
|
11218
11218
|
return group.currentValue.value === props.label;
|
|
11219
11219
|
} else {
|
|
11220
|
-
return props.
|
|
11220
|
+
return props.modelValue;
|
|
11221
11221
|
}
|
|
11222
11222
|
});
|
|
11223
11223
|
var classes = (0,external_vue_.computed)(function () {
|
|
@@ -11238,7 +11238,8 @@ var radioboxvue_type_script_lang_js_prefixCls = 'dpzvc3-radiobox';
|
|
|
11238
11238
|
if (group) {
|
|
11239
11239
|
group.change(props.label);
|
|
11240
11240
|
} else {
|
|
11241
|
-
|
|
11241
|
+
// console.log(checked, 'ddadda')
|
|
11242
|
+
emit('update:modelValue', checked);
|
|
11242
11243
|
emit('on-change', checked);
|
|
11243
11244
|
}
|
|
11244
11245
|
}
|
|
@@ -11270,7 +11271,7 @@ var radioboxvue_type_script_lang_js_prefixCls = 'dpzvc3-radiobox';
|
|
|
11270
11271
|
|
|
11271
11272
|
|
|
11272
11273
|
;
|
|
11273
|
-
const radiobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(radioboxvue_type_script_lang_js, [['render',
|
|
11274
|
+
const radiobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(radioboxvue_type_script_lang_js, [['render',radioboxvue_type_template_id_1ec5a25f_render]])
|
|
11274
11275
|
|
|
11275
11276
|
/* harmony default export */ const radiobox = (radiobox_exports_);
|
|
11276
11277
|
;// ./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/radioBox/radiobox-group.vue?vue&type=template&id=d101a504&scoped=true
|
|
@@ -11354,13 +11355,13 @@ const radiobox_group_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(rad
|
|
|
11354
11355
|
|
|
11355
11356
|
radiobox.group = radiobox_group;
|
|
11356
11357
|
/* harmony default export */ const radioBox = (radiobox);
|
|
11357
|
-
;// ./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=
|
|
11358
|
+
;// ./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
|
|
11358
11359
|
|
|
11359
|
-
var
|
|
11360
|
-
var
|
|
11361
|
-
var
|
|
11362
|
-
var
|
|
11363
|
-
function
|
|
11360
|
+
var swipevue_type_template_id_0053c134_hoisted_1 = ["onClick"];
|
|
11361
|
+
var swipevue_type_template_id_0053c134_hoisted_2 = ["src"];
|
|
11362
|
+
var swipevue_type_template_id_0053c134_hoisted_3 = ["onClick"];
|
|
11363
|
+
var swipevue_type_template_id_0053c134_hoisted_4 = ["src"];
|
|
11364
|
+
function swipevue_type_template_id_0053c134_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11364
11365
|
return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
11365
11366
|
ref: "swipeRef",
|
|
11366
11367
|
"class": (0,external_vue_.normalizeClass)(_ctx.classes),
|
|
@@ -11392,8 +11393,8 @@ function swipevue_type_template_id_79ae3ca4_render(_ctx, _cache, $props, $setup,
|
|
|
11392
11393
|
}, function () {
|
|
11393
11394
|
return [(0,external_vue_.createElementVNode)("img", {
|
|
11394
11395
|
src: _item.image
|
|
11395
|
-
}, null, 8 /* PROPS */,
|
|
11396
|
-
})], 10 /* CLASS, PROPS */,
|
|
11396
|
+
}, null, 8 /* PROPS */, swipevue_type_template_id_0053c134_hoisted_2), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_item.spec), 1 /* TEXT */)];
|
|
11397
|
+
})], 10 /* CLASS, PROPS */, swipevue_type_template_id_0053c134_hoisted_1);
|
|
11397
11398
|
}), 128 /* KEYED_FRAGMENT */)) : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("a", {
|
|
11398
11399
|
key: 1,
|
|
11399
11400
|
"class": (0,external_vue_.normalizeClass)(_ctx.singleClass),
|
|
@@ -11406,18 +11407,18 @@ function swipevue_type_template_id_79ae3ca4_render(_ctx, _cache, $props, $setup,
|
|
|
11406
11407
|
}, function () {
|
|
11407
11408
|
return [(0,external_vue_.createElementVNode)("img", {
|
|
11408
11409
|
src: item.image
|
|
11409
|
-
}, null, 8 /* PROPS */,
|
|
11410
|
-
})], 10 /* CLASS, PROPS */,
|
|
11411
|
-
}), 128 /* KEYED_FRAGMENT */)) : (0,external_vue_.createCommentVNode)("v-if", true)], 6 /* CLASS, STYLE */), (0,external_vue_.createElementVNode)("div", {
|
|
11410
|
+
}, null, 8 /* PROPS */, swipevue_type_template_id_0053c134_hoisted_4), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(item.spec), 1 /* TEXT */)];
|
|
11411
|
+
})], 10 /* CLASS, PROPS */, swipevue_type_template_id_0053c134_hoisted_3))], 2 /* CLASS */);
|
|
11412
|
+
}), 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", {
|
|
11412
11413
|
"class": (0,external_vue_.normalizeClass)(_ctx.dotsClasses)
|
|
11413
11414
|
}, [((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.dotLength, function (item, index) {
|
|
11414
11415
|
return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", {
|
|
11415
11416
|
key: index,
|
|
11416
|
-
"class": (0,external_vue_.normalizeClass)(['dpzvc3-swipe-dots-item',
|
|
11417
|
+
"class": (0,external_vue_.normalizeClass)(['dpzvc3-swipe-dots-item', index === _ctx.slideIndex ? 'active' : ''])
|
|
11417
11418
|
}, null, 2 /* CLASS */);
|
|
11418
11419
|
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 6 /* CLASS, STYLE */);
|
|
11419
11420
|
}
|
|
11420
|
-
;// ./src/components/swipe/swipe.vue?vue&type=template&id=
|
|
11421
|
+
;// ./src/components/swipe/swipe.vue?vue&type=template&id=0053c134
|
|
11421
11422
|
|
|
11422
11423
|
;// ./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
|
|
11423
11424
|
|
|
@@ -11480,9 +11481,11 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11480
11481
|
var autoSwipe = (0,external_vue_.ref)(true);
|
|
11481
11482
|
var startX = (0,external_vue_.ref)(0);
|
|
11482
11483
|
var distance = (0,external_vue_.ref)(0);
|
|
11483
|
-
|
|
11484
|
+
// const slideIndex = ref(props.loop ? props.startIndex + 1 : props.startIndex)
|
|
11485
|
+
var slideIndex = (0,external_vue_.ref)(props.startIndex);
|
|
11484
11486
|
var timer = (0,external_vue_.ref)(null);
|
|
11485
11487
|
var localList = (0,external_vue_.ref)(_toConsumableArray(props.list));
|
|
11488
|
+
var transitionRef = (0,external_vue_.ref)('transform .2s ease-out');
|
|
11486
11489
|
var isMultiple = (0,external_vue_.computed)(function () {
|
|
11487
11490
|
if (props.perpage <= 1) return false;
|
|
11488
11491
|
var page = props.perpage;
|
|
@@ -11502,15 +11505,18 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11502
11505
|
var arrayList = (0,external_vue_.computed)(function () {
|
|
11503
11506
|
if (!localList.value.length) return [];
|
|
11504
11507
|
if (props.loop) {
|
|
11505
|
-
return [localList.value[localList.value.length - 1]
|
|
11508
|
+
// return [localList.value[localList.value.length - 1], ...localList.value, localList.value[0]]
|
|
11509
|
+
return [].concat(_toConsumableArray(localList.value), [localList.value[0]]);
|
|
11506
11510
|
}
|
|
11507
11511
|
return localList.value;
|
|
11508
11512
|
});
|
|
11509
11513
|
var dotLength = (0,external_vue_.computed)(function () {
|
|
11510
11514
|
return localList.value.length;
|
|
11511
11515
|
});
|
|
11516
|
+
|
|
11517
|
+
// const minIndex = computed(() => (props.loop ? 1 : 0))
|
|
11512
11518
|
var minIndex = (0,external_vue_.computed)(function () {
|
|
11513
|
-
return
|
|
11519
|
+
return 0;
|
|
11514
11520
|
});
|
|
11515
11521
|
var maxIndex = (0,external_vue_.computed)(function () {
|
|
11516
11522
|
return props.loop ? arrayList.value.length - 2 : arrayList.value.length - 1;
|
|
@@ -11539,7 +11545,8 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11539
11545
|
return {
|
|
11540
11546
|
width: arrayList.value.length * clientWidth.value + 'px',
|
|
11541
11547
|
transform: "translate3d(".concat(translateX.value, "px,0,0)"),
|
|
11542
|
-
height: 'auto'
|
|
11548
|
+
height: 'auto',
|
|
11549
|
+
transition: transitionRef.value
|
|
11543
11550
|
};
|
|
11544
11551
|
});
|
|
11545
11552
|
function choose(item, index, e) {
|
|
@@ -11603,10 +11610,11 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11603
11610
|
timer.value = setTimeout(function () {
|
|
11604
11611
|
if (!dragging.value && autoSwipe.value) {
|
|
11605
11612
|
translateX.value -= clientWidth.value;
|
|
11613
|
+
console.log(slideIndex.value, maxIndex.value, 'dsdadddasdss');
|
|
11606
11614
|
slideIndex.value++;
|
|
11607
|
-
// console.log(slideIndex.value, maxIndex.value, 'dsdadddasdss')
|
|
11608
11615
|
if (slideIndex.value > maxIndex.value && props.loop) {
|
|
11609
11616
|
slideIndex.value = minIndex.value;
|
|
11617
|
+
// resetSlide()
|
|
11610
11618
|
wrapper.value.addEventListener('transitionend', resetSlide, false);
|
|
11611
11619
|
}
|
|
11612
11620
|
autoSlide();
|
|
@@ -11617,10 +11625,11 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11617
11625
|
wrapper.value.removeEventListener('transitionend', resetSlide, false);
|
|
11618
11626
|
slideIndex.value = minIndex.value;
|
|
11619
11627
|
autoSwipe.value = false;
|
|
11620
|
-
|
|
11628
|
+
transitionRef.value = 'none';
|
|
11621
11629
|
translateX.value = -slideIndex.value * clientWidth.value;
|
|
11622
11630
|
setTimeout(function () {
|
|
11623
11631
|
autoSwipe.value = true;
|
|
11632
|
+
transitionRef.value = 'transform .2s ease-out';
|
|
11624
11633
|
}, 0);
|
|
11625
11634
|
}
|
|
11626
11635
|
function clearTimer() {
|
|
@@ -11628,7 +11637,8 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11628
11637
|
timer.value = null;
|
|
11629
11638
|
}
|
|
11630
11639
|
function onResize() {
|
|
11631
|
-
if (wrapper.value) clientWidth.value = wrapper.value.clientWidth
|
|
11640
|
+
// if (wrapper.value) clientWidth.value = wrapper.value.clientWidth
|
|
11641
|
+
clientWidth.value = swipeRef.value ? swipeRef.value.clientWidth : 0;
|
|
11632
11642
|
}
|
|
11633
11643
|
(0,external_vue_.onMounted)(function () {
|
|
11634
11644
|
// nextTick(() => {
|
|
@@ -11678,7 +11688,7 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11678
11688
|
|
|
11679
11689
|
|
|
11680
11690
|
;
|
|
11681
|
-
const swipe_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(swipevue_type_script_lang_js, [['render',
|
|
11691
|
+
const swipe_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(swipevue_type_script_lang_js, [['render',swipevue_type_template_id_0053c134_render]])
|
|
11682
11692
|
|
|
11683
11693
|
/* harmony default export */ const swipe = (swipe_exports_);
|
|
11684
11694
|
;// ./src/components/swipe/index.js
|
|
@@ -12377,13 +12387,13 @@ prompt_confirm.remove = function () {
|
|
|
12377
12387
|
instance.remove();
|
|
12378
12388
|
};
|
|
12379
12389
|
/* harmony default export */ const components_prompt = (prompt_confirm);
|
|
12380
|
-
;// ./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/slideBar/slideBar.vue?vue&type=template&id=
|
|
12390
|
+
;// ./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/slideBar/slideBar.vue?vue&type=template&id=b7dd0e7a
|
|
12381
12391
|
|
|
12382
|
-
var
|
|
12383
|
-
var
|
|
12392
|
+
var slideBarvue_type_template_id_b7dd0e7a_hoisted_1 = ["onClick"];
|
|
12393
|
+
var slideBarvue_type_template_id_b7dd0e7a_hoisted_2 = {
|
|
12384
12394
|
"class": "content ellipse-fir"
|
|
12385
12395
|
};
|
|
12386
|
-
function
|
|
12396
|
+
function slideBarvue_type_template_id_b7dd0e7a_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12387
12397
|
return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
12388
12398
|
"class": (0,external_vue_.normalizeClass)(_ctx.classes),
|
|
12389
12399
|
style: (0,external_vue_.normalizeStyle)(_ctx.getStyles)
|
|
@@ -12410,8 +12420,8 @@ function slideBarvue_type_template_id_6ee7198d_render(_ctx, _cache, $props, $set
|
|
|
12410
12420
|
return _ctx.changeBar(key);
|
|
12411
12421
|
}
|
|
12412
12422
|
}, [(0,external_vue_.renderSlot)(_ctx.$slots, 'slide-bar-header-' + key, {}, function () {
|
|
12413
|
-
return [(0,external_vue_.createElementVNode)("a",
|
|
12414
|
-
})], 14 /* CLASS, STYLE, PROPS */,
|
|
12423
|
+
return [(0,external_vue_.createElementVNode)("a", slideBarvue_type_template_id_b7dd0e7a_hoisted_2, (0,external_vue_.toDisplayString)(item.name), 1 /* TEXT */)];
|
|
12424
|
+
})], 14 /* CLASS, STYLE, PROPS */, slideBarvue_type_template_id_b7dd0e7a_hoisted_1);
|
|
12415
12425
|
}), 128 /* KEYED_FRAGMENT */))], 6 /* CLASS, STYLE */), (0,external_vue_.createElementVNode)("div", {
|
|
12416
12426
|
"class": (0,external_vue_.normalizeClass)(_ctx.absoluteClass),
|
|
12417
12427
|
style: (0,external_vue_.normalizeStyle)(_ctx.getScrollStyle)
|
|
@@ -12434,7 +12444,7 @@ function slideBarvue_type_template_id_6ee7198d_render(_ctx, _cache, $props, $set
|
|
|
12434
12444
|
}, [(0,external_vue_.renderSlot)(_ctx.$slots, 'slot-item-' + index)], 6 /* CLASS, STYLE */);
|
|
12435
12445
|
}), 128 /* KEYED_FRAGMENT */))], 6 /* CLASS, STYLE */)], 6 /* CLASS, STYLE */)], 6 /* CLASS, STYLE */);
|
|
12436
12446
|
}
|
|
12437
|
-
;// ./src/components/slideBar/slideBar.vue?vue&type=template&id=
|
|
12447
|
+
;// ./src/components/slideBar/slideBar.vue?vue&type=template&id=b7dd0e7a
|
|
12438
12448
|
|
|
12439
12449
|
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./src/components/slideBar/slideBar.vue?vue&type=script&lang=js
|
|
12440
12450
|
|
|
@@ -12523,9 +12533,8 @@ var slideBarvue_type_script_lang_js_prefixCls = 'dpzvc3-slideBar';
|
|
|
12523
12533
|
var getItemWidth = (0,external_vue_.computed)(function () {
|
|
12524
12534
|
return isFlex.value ? clientWidth.value / items.value.length : props.childWidth;
|
|
12525
12535
|
});
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
});
|
|
12536
|
+
// const translateX = computed(() => -startIndex.value * clientWidth.value)
|
|
12537
|
+
var translateX = (0,external_vue_.ref)(0);
|
|
12529
12538
|
var classes = (0,external_vue_.computed)(function () {
|
|
12530
12539
|
return [slideBarvue_type_script_lang_js_prefixCls];
|
|
12531
12540
|
});
|
|
@@ -12573,6 +12582,7 @@ var slideBarvue_type_script_lang_js_prefixCls = 'dpzvc3-slideBar';
|
|
|
12573
12582
|
function changeBar(index) {
|
|
12574
12583
|
if (startIndex.value === index) return;
|
|
12575
12584
|
startIndex.value = index;
|
|
12585
|
+
translateX.value = -startIndex.value * clientWidth.value;
|
|
12576
12586
|
emit('on-change', index);
|
|
12577
12587
|
}
|
|
12578
12588
|
|
|
@@ -12586,21 +12596,35 @@ var slideBarvue_type_script_lang_js_prefixCls = 'dpzvc3-slideBar';
|
|
|
12586
12596
|
function onTouchMove(e) {
|
|
12587
12597
|
var currentX = e.touches[0].clientX;
|
|
12588
12598
|
distance.value = props.distanceIndex ? (currentX - startX.value) / props.distanceIndex : currentX - startX.value;
|
|
12599
|
+
translateX.value = startTranslateX.value + distance.value;
|
|
12589
12600
|
}
|
|
12590
12601
|
function onTouchEnd() {
|
|
12591
12602
|
if (distance.value < 0 && Math.abs(distance.value) > clientWidth.value / 2) {
|
|
12592
12603
|
slideLeft();
|
|
12593
12604
|
} else if (distance.value > 0 && Math.abs(distance.value) > clientWidth.value / 2) {
|
|
12594
12605
|
slideRight();
|
|
12606
|
+
} else {
|
|
12607
|
+
translateX.value = startTranslateX.value;
|
|
12595
12608
|
}
|
|
12596
12609
|
dragging.value = false;
|
|
12597
12610
|
}
|
|
12598
12611
|
function slideLeft() {
|
|
12599
|
-
if (startIndex.value
|
|
12612
|
+
if (startIndex.value >= maxIndex.value) {
|
|
12613
|
+
translateX.value = startTranslateX.value;
|
|
12614
|
+
} else {
|
|
12615
|
+
startIndex.value++;
|
|
12616
|
+
translateX.value = startTranslateX.value - clientWidth.value;
|
|
12617
|
+
}
|
|
12600
12618
|
emit('on-change', startIndex.value);
|
|
12601
12619
|
}
|
|
12602
12620
|
function slideRight() {
|
|
12603
|
-
if (startIndex.value > 0) startIndex.value
|
|
12621
|
+
// if (startIndex.value > 0) startIndex.value--
|
|
12622
|
+
if (startIndex.value <= 0) {
|
|
12623
|
+
translateX.value = startTranslateX.value;
|
|
12624
|
+
} else {
|
|
12625
|
+
startIndex.value--;
|
|
12626
|
+
translateX.value = startTranslateX.value + clientWidth.value;
|
|
12627
|
+
}
|
|
12604
12628
|
emit('on-change', startIndex.value);
|
|
12605
12629
|
}
|
|
12606
12630
|
|
|
@@ -12613,8 +12637,11 @@ var slideBarvue_type_script_lang_js_prefixCls = 'dpzvc3-slideBar';
|
|
|
12613
12637
|
}
|
|
12614
12638
|
(0,external_vue_.onMounted)(function () {
|
|
12615
12639
|
clientWidth.value = header.value.clientWidth;
|
|
12640
|
+
translateX.value = -startIndex.value * clientWidth.value;
|
|
12616
12641
|
window.addEventListener('resize', onResize);
|
|
12642
|
+
onScroll();
|
|
12617
12643
|
if (props.canDrag && content.value) {
|
|
12644
|
+
// console.log(content.value, 'dadsds')
|
|
12618
12645
|
content.value.addEventListener('touchstart', onTouchStart);
|
|
12619
12646
|
content.value.addEventListener('touchmove', onTouchMove);
|
|
12620
12647
|
content.value.addEventListener('touchend', onTouchEnd);
|
|
@@ -12661,7 +12688,7 @@ var slideBarvue_type_script_lang_js_prefixCls = 'dpzvc3-slideBar';
|
|
|
12661
12688
|
|
|
12662
12689
|
|
|
12663
12690
|
;
|
|
12664
|
-
const slideBar_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(slideBarvue_type_script_lang_js, [['render',
|
|
12691
|
+
const slideBar_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(slideBarvue_type_script_lang_js, [['render',slideBarvue_type_template_id_b7dd0e7a_render]])
|
|
12665
12692
|
|
|
12666
12693
|
/* harmony default export */ const slideBar = (slideBar_exports_);
|
|
12667
12694
|
;// ./src/components/slideBar/index.js
|