dpzvc3-ui 3.0.0 → 3.0.2
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/README.md +0 -8
- package/dist/dpzvc3.esm.js +101 -93
- 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 +30 -22
- 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.500d6bc40855d284c027.js +2 -0
- package/dist-prod/main.500d6bc40855d284c027.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/swipe/swipe.vue +18 -11
- package/src/styles/components/swipe.less +1 -1
- 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/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
|
@@ -4160,7 +4160,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
4160
4160
|
justify-content: center;
|
|
4161
4161
|
flex-direction: column;
|
|
4162
4162
|
}
|
|
4163
|
-
`, "",{"version":3,"sources":["webpack://./radiobox-group.vue"],"names":[],"mappings":";AA4DA;EACE,aAAa;EACb,uBAAuB;EACvB,sBAAsB;AACxB","sourcesContent":["<template>\n <div :class=\"classes\">\n <slot />\n </div>\n</template>\n\n<script>\nimport { defineComponent, computed, watch, provide, ref } from 'vue'\n\nconst prefixCls = 'dpzvc3-radioBoxGroup'\n\nexport default defineComponent({\n name: 'RadioBoxGroup',\n props: {\n modelValue: {\n type: [String, Boolean, Number],\n default: ''\n },\n vertical: {\n type: Boolean,\n default: false\n }\n },\n emits: ['update:modelValue', 'on-change', 'on-form-change'],\n setup (props, { emit }) {\n const currentValue = ref(props.modelValue)\n\n // 提供给子组件\n provide('radioBoxGroup', {\n currentValue,\n change: (val) => {\n currentValue.value = val\n emit('update:modelValue', val)\n emit('on-change', val)\n emit('on-form-change', val)\n }\n })\n\n // 监听外部 v-model 改变\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n }\n )\n\n const classes = computed(() => [\n prefixCls,\n { [`${prefixCls}-vertical`]: props.vertical }\n ])\n\n return {\n classes,\n currentValue\n }\n }\n})\n</script>\n\n<style scoped>\n.dpzvc3-radioBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
4163
|
+
`, "",{"version":3,"sources":["webpack://./src/components/radioBox/radiobox-group.vue"],"names":[],"mappings":";AA4DA;EACE,aAAa;EACb,uBAAuB;EACvB,sBAAsB;AACxB","sourcesContent":["<template>\n <div :class=\"classes\">\n <slot />\n </div>\n</template>\n\n<script>\nimport { defineComponent, computed, watch, provide, ref } from 'vue'\n\nconst prefixCls = 'dpzvc3-radioBoxGroup'\n\nexport default defineComponent({\n name: 'RadioBoxGroup',\n props: {\n modelValue: {\n type: [String, Boolean, Number],\n default: ''\n },\n vertical: {\n type: Boolean,\n default: false\n }\n },\n emits: ['update:modelValue', 'on-change', 'on-form-change'],\n setup (props, { emit }) {\n const currentValue = ref(props.modelValue)\n\n // 提供给子组件\n provide('radioBoxGroup', {\n currentValue,\n change: (val) => {\n currentValue.value = val\n emit('update:modelValue', val)\n emit('on-change', val)\n emit('on-form-change', val)\n }\n })\n\n // 监听外部 v-model 改变\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n }\n )\n\n const classes = computed(() => [\n prefixCls,\n { [`${prefixCls}-vertical`]: props.vertical }\n ])\n\n return {\n classes,\n currentValue\n }\n }\n})\n</script>\n\n<style scoped>\n.dpzvc3-radioBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
4164
4164
|
// Exports
|
|
4165
4165
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
4166
4166
|
|
|
@@ -4811,7 +4811,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
4811
4811
|
display: flex;
|
|
4812
4812
|
flex-direction: column;
|
|
4813
4813
|
}
|
|
4814
|
-
`, "",{"version":3,"sources":["webpack://./checkbox-group.vue"],"names":[],"mappings":";AAqEA;EACE,aAAa;EACb,sBAAsB;AACxB","sourcesContent":["<template>\n <div\n :class=\"[\n 'dpzvc3-checkBoxGroup',\n vertical ? 'dpzvc3-checkBoxGroup-vertical' : ''\n ]\"\n >\n <slot />\n </div>\n</template>\n\n<script>\nimport { defineComponent, ref, watch, provide } from 'vue'\n// import Emitter from '../../mixin/emitter'\n\nexport default defineComponent({\n name: 'CheckBoxGroup',\n // mixins: [Emitter],\n\n props: {\n modelValue: {\n type: Array,\n default: () => []\n },\n single: {\n type: Boolean,\n default: false\n },\n vertical: {\n type: Boolean,\n default: false\n }\n },\n\n emits: ['update:modelValue', 'on-change'],\n\n setup (props, { emit }) {\n // alert(props)\n const currentValue = ref([...props.modelValue])\n\n /** 对外暴露给 checkbox 的方法 */\n const toggleOption = (label) => {\n let newValue = []\n newValue = [...label]\n // currentValue.value = newValue\n emit('update:modelValue', newValue)\n emit('on-change', newValue)\n }\n\n /** 提供给子 checkbox */\n provide('CheckBoxGroup', {\n currentValue,\n toggleOption\n // single: props.single\n })\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = [...val]\n }\n )\n\n return {}\n }\n})\n</script>\n\n<style scoped>\n.dpzvc3-checkBoxGroup-vertical {\n display: flex;\n flex-direction: column;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
4814
|
+
`, "",{"version":3,"sources":["webpack://./src/components/checkBox/checkbox-group.vue"],"names":[],"mappings":";AAqEA;EACE,aAAa;EACb,sBAAsB;AACxB","sourcesContent":["<template>\n <div\n :class=\"[\n 'dpzvc3-checkBoxGroup',\n vertical ? 'dpzvc3-checkBoxGroup-vertical' : ''\n ]\"\n >\n <slot />\n </div>\n</template>\n\n<script>\nimport { defineComponent, ref, watch, provide } from 'vue'\n// import Emitter from '../../mixin/emitter'\n\nexport default defineComponent({\n name: 'CheckBoxGroup',\n // mixins: [Emitter],\n\n props: {\n modelValue: {\n type: Array,\n default: () => []\n },\n single: {\n type: Boolean,\n default: false\n },\n vertical: {\n type: Boolean,\n default: false\n }\n },\n\n emits: ['update:modelValue', 'on-change'],\n\n setup (props, { emit }) {\n // alert(props)\n const currentValue = ref([...props.modelValue])\n\n /** 对外暴露给 checkbox 的方法 */\n const toggleOption = (label) => {\n let newValue = []\n newValue = [...label]\n // currentValue.value = newValue\n emit('update:modelValue', newValue)\n emit('on-change', newValue)\n }\n\n /** 提供给子 checkbox */\n provide('CheckBoxGroup', {\n currentValue,\n toggleOption\n // single: props.single\n })\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = [...val]\n }\n )\n\n return {}\n }\n})\n</script>\n\n<style scoped>\n.dpzvc3-checkBoxGroup-vertical {\n display: flex;\n flex-direction: column;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
4815
4815
|
// Exports
|
|
4816
4816
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
4817
4817
|
|
|
@@ -11354,13 +11354,13 @@ const radiobox_group_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(rad
|
|
|
11354
11354
|
|
|
11355
11355
|
radiobox.group = radiobox_group;
|
|
11356
11356
|
/* 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=
|
|
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=4bcc6d9d
|
|
11358
11358
|
|
|
11359
|
-
var
|
|
11360
|
-
var
|
|
11361
|
-
var
|
|
11362
|
-
var
|
|
11363
|
-
function
|
|
11359
|
+
var swipevue_type_template_id_4bcc6d9d_hoisted_1 = ["onClick"];
|
|
11360
|
+
var swipevue_type_template_id_4bcc6d9d_hoisted_2 = ["src"];
|
|
11361
|
+
var swipevue_type_template_id_4bcc6d9d_hoisted_3 = ["onClick"];
|
|
11362
|
+
var swipevue_type_template_id_4bcc6d9d_hoisted_4 = ["src"];
|
|
11363
|
+
function swipevue_type_template_id_4bcc6d9d_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11364
11364
|
return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
11365
11365
|
ref: "swipeRef",
|
|
11366
11366
|
"class": (0,external_vue_.normalizeClass)(_ctx.classes),
|
|
@@ -11392,8 +11392,8 @@ function swipevue_type_template_id_79ae3ca4_render(_ctx, _cache, $props, $setup,
|
|
|
11392
11392
|
}, function () {
|
|
11393
11393
|
return [(0,external_vue_.createElementVNode)("img", {
|
|
11394
11394
|
src: _item.image
|
|
11395
|
-
}, null, 8 /* PROPS */,
|
|
11396
|
-
})], 10 /* CLASS, PROPS */,
|
|
11395
|
+
}, null, 8 /* PROPS */, swipevue_type_template_id_4bcc6d9d_hoisted_2), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_item.spec), 1 /* TEXT */)];
|
|
11396
|
+
})], 10 /* CLASS, PROPS */, swipevue_type_template_id_4bcc6d9d_hoisted_1);
|
|
11397
11397
|
}), 128 /* KEYED_FRAGMENT */)) : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("a", {
|
|
11398
11398
|
key: 1,
|
|
11399
11399
|
"class": (0,external_vue_.normalizeClass)(_ctx.singleClass),
|
|
@@ -11406,18 +11406,18 @@ function swipevue_type_template_id_79ae3ca4_render(_ctx, _cache, $props, $setup,
|
|
|
11406
11406
|
}, function () {
|
|
11407
11407
|
return [(0,external_vue_.createElementVNode)("img", {
|
|
11408
11408
|
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", {
|
|
11409
|
+
}, null, 8 /* PROPS */, swipevue_type_template_id_4bcc6d9d_hoisted_4), (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(item.spec), 1 /* TEXT */)];
|
|
11410
|
+
})], 10 /* CLASS, PROPS */, swipevue_type_template_id_4bcc6d9d_hoisted_3))], 2 /* CLASS */);
|
|
11411
|
+
}), 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
11412
|
"class": (0,external_vue_.normalizeClass)(_ctx.dotsClasses)
|
|
11413
11413
|
}, [((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.dotLength, function (item, index) {
|
|
11414
11414
|
return (0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", {
|
|
11415
11415
|
key: index,
|
|
11416
|
-
"class": (0,external_vue_.normalizeClass)(['dpzvc3-swipe-dots-item',
|
|
11416
|
+
"class": (0,external_vue_.normalizeClass)(['dpzvc3-swipe-dots-item', index === _ctx.slideIndex ? 'active' : ''])
|
|
11417
11417
|
}, null, 2 /* CLASS */);
|
|
11418
11418
|
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 6 /* CLASS, STYLE */);
|
|
11419
11419
|
}
|
|
11420
|
-
;// ./src/components/swipe/swipe.vue?vue&type=template&id=
|
|
11420
|
+
;// ./src/components/swipe/swipe.vue?vue&type=template&id=4bcc6d9d
|
|
11421
11421
|
|
|
11422
11422
|
;// ./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
11423
|
|
|
@@ -11480,9 +11480,11 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11480
11480
|
var autoSwipe = (0,external_vue_.ref)(true);
|
|
11481
11481
|
var startX = (0,external_vue_.ref)(0);
|
|
11482
11482
|
var distance = (0,external_vue_.ref)(0);
|
|
11483
|
-
|
|
11483
|
+
// const slideIndex = ref(props.loop ? props.startIndex + 1 : props.startIndex)
|
|
11484
|
+
var slideIndex = (0,external_vue_.ref)(props.startIndex);
|
|
11484
11485
|
var timer = (0,external_vue_.ref)(null);
|
|
11485
11486
|
var localList = (0,external_vue_.ref)(_toConsumableArray(props.list));
|
|
11487
|
+
var transitionRef = (0,external_vue_.ref)('transform .2s ease-out');
|
|
11486
11488
|
var isMultiple = (0,external_vue_.computed)(function () {
|
|
11487
11489
|
if (props.perpage <= 1) return false;
|
|
11488
11490
|
var page = props.perpage;
|
|
@@ -11502,15 +11504,18 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11502
11504
|
var arrayList = (0,external_vue_.computed)(function () {
|
|
11503
11505
|
if (!localList.value.length) return [];
|
|
11504
11506
|
if (props.loop) {
|
|
11505
|
-
return [localList.value[localList.value.length - 1]
|
|
11507
|
+
// return [localList.value[localList.value.length - 1], ...localList.value, localList.value[0]]
|
|
11508
|
+
return [].concat(_toConsumableArray(localList.value), [localList.value[0]]);
|
|
11506
11509
|
}
|
|
11507
11510
|
return localList.value;
|
|
11508
11511
|
});
|
|
11509
11512
|
var dotLength = (0,external_vue_.computed)(function () {
|
|
11510
11513
|
return localList.value.length;
|
|
11511
11514
|
});
|
|
11515
|
+
|
|
11516
|
+
// const minIndex = computed(() => (props.loop ? 1 : 0))
|
|
11512
11517
|
var minIndex = (0,external_vue_.computed)(function () {
|
|
11513
|
-
return
|
|
11518
|
+
return 0;
|
|
11514
11519
|
});
|
|
11515
11520
|
var maxIndex = (0,external_vue_.computed)(function () {
|
|
11516
11521
|
return props.loop ? arrayList.value.length - 2 : arrayList.value.length - 1;
|
|
@@ -11539,7 +11544,8 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11539
11544
|
return {
|
|
11540
11545
|
width: arrayList.value.length * clientWidth.value + 'px',
|
|
11541
11546
|
transform: "translate3d(".concat(translateX.value, "px,0,0)"),
|
|
11542
|
-
height: 'auto'
|
|
11547
|
+
height: 'auto',
|
|
11548
|
+
transition: transitionRef.value
|
|
11543
11549
|
};
|
|
11544
11550
|
});
|
|
11545
11551
|
function choose(item, index, e) {
|
|
@@ -11603,10 +11609,11 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11603
11609
|
timer.value = setTimeout(function () {
|
|
11604
11610
|
if (!dragging.value && autoSwipe.value) {
|
|
11605
11611
|
translateX.value -= clientWidth.value;
|
|
11612
|
+
console.log(slideIndex.value, maxIndex.value, 'dsdadddasdss');
|
|
11606
11613
|
slideIndex.value++;
|
|
11607
|
-
// console.log(slideIndex.value, maxIndex.value, 'dsdadddasdss')
|
|
11608
11614
|
if (slideIndex.value > maxIndex.value && props.loop) {
|
|
11609
11615
|
slideIndex.value = minIndex.value;
|
|
11616
|
+
// resetSlide()
|
|
11610
11617
|
wrapper.value.addEventListener('transitionend', resetSlide, false);
|
|
11611
11618
|
}
|
|
11612
11619
|
autoSlide();
|
|
@@ -11617,10 +11624,11 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11617
11624
|
wrapper.value.removeEventListener('transitionend', resetSlide, false);
|
|
11618
11625
|
slideIndex.value = minIndex.value;
|
|
11619
11626
|
autoSwipe.value = false;
|
|
11620
|
-
|
|
11627
|
+
transitionRef.value = 'none';
|
|
11621
11628
|
translateX.value = -slideIndex.value * clientWidth.value;
|
|
11622
11629
|
setTimeout(function () {
|
|
11623
11630
|
autoSwipe.value = true;
|
|
11631
|
+
transitionRef.value = 'transform .2s ease-out';
|
|
11624
11632
|
}, 0);
|
|
11625
11633
|
}
|
|
11626
11634
|
function clearTimer() {
|
|
@@ -11678,7 +11686,7 @@ var swipevue_type_script_lang_js_prefixCls = 'dpzvc3-swipe';
|
|
|
11678
11686
|
|
|
11679
11687
|
|
|
11680
11688
|
;
|
|
11681
|
-
const swipe_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(swipevue_type_script_lang_js, [['render',
|
|
11689
|
+
const swipe_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(swipevue_type_script_lang_js, [['render',swipevue_type_template_id_4bcc6d9d_render]])
|
|
11682
11690
|
|
|
11683
11691
|
/* harmony default export */ const swipe = (swipe_exports_);
|
|
11684
11692
|
;// ./src/components/swipe/index.js
|