dpzvc3-ui 3.0.4 → 3.0.5
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 +121 -89
- 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 +39 -16
- package/dist/dpzvc3.js.map +1 -1
- package/dist/dpzvc3.min.js +1 -1
- package/dist/dpzvc3.min.js.map +1 -1
- package/dist-prod/index.html +1 -1
- package/dist-prod/main.ca76d714164efdce0339.js +2 -0
- package/dist-prod/main.ca76d714164efdce0339.js.map +1 -0
- package/package.json +2 -2
- package/src/components/swipe/swipe.vue +4 -3
- package/src/lib/lib.js +22 -0
- package/dist-prod/main.bcc12e5051993020bbea.js +0 -2
- package/dist-prod/main.bcc12e5051993020bbea.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
|
|
|
@@ -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=
|
|
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
|
|
11364
|
-
var
|
|
11365
|
-
var
|
|
11366
|
-
var
|
|
11367
|
-
function
|
|
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 */,
|
|
11400
|
-
})], 10 /* CLASS, PROPS */,
|
|
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 */,
|
|
11414
|
-
})], 10 /* CLASS, PROPS */,
|
|
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=
|
|
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 =
|
|
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',
|
|
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
|