dpzvc3-ui 3.0.5 → 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.esm.js +68 -64
- 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 +14 -10
- 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.717f5c8b51911571fb82.js +2 -0
- package/dist-prod/main.717f5c8b51911571fb82.js.map +1 -0
- package/package.json +1 -1
- package/src/components/action-sheet/actionSheet.vue +5 -1
- package/dist-prod/main.ca76d714164efdce0339.js +0 -2
- package/dist-prod/main.ca76d714164efdce0339.js.map +0 -1
package/dist/dpzvc3.esm.js
CHANGED
|
@@ -333,7 +333,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
333
333
|
justify-content: center;
|
|
334
334
|
flex-direction: column;
|
|
335
335
|
}
|
|
336
|
-
`, "",{"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":""}]);
|
|
336
|
+
`, "",{"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":""}]);
|
|
337
337
|
// Exports
|
|
338
338
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
339
339
|
|
|
@@ -1042,55 +1042,6 @@ const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_j
|
|
|
1042
1042
|
|
|
1043
1043
|
/***/ },
|
|
1044
1044
|
|
|
1045
|
-
/***/ 992
|
|
1046
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1047
|
-
|
|
1048
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1049
|
-
/* harmony export */ X: () => (/* binding */ render)
|
|
1050
|
-
/* harmony export */ });
|
|
1051
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5286);
|
|
1052
|
-
|
|
1053
|
-
var _hoisted_1 = ["onClick"];
|
|
1054
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1055
|
-
var _component_Popup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Popup");
|
|
1056
|
-
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Popup, {
|
|
1057
|
-
modelValue: _ctx.visible,
|
|
1058
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
1059
|
-
return _ctx.visible = $event;
|
|
1060
|
-
}),
|
|
1061
|
-
position: "bottom",
|
|
1062
|
-
styles: {
|
|
1063
|
-
background: 'transparent'
|
|
1064
|
-
}
|
|
1065
|
-
}, {
|
|
1066
|
-
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
|
|
1067
|
-
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
1068
|
-
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classes)
|
|
1069
|
-
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", {
|
|
1070
|
-
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.wrapperClasses)
|
|
1071
|
-
}, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(_ctx.actions, function (item, key) {
|
|
1072
|
-
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", {
|
|
1073
|
-
key: key,
|
|
1074
|
-
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.wrapperActionClass),
|
|
1075
|
-
onClick: function onClick($event) {
|
|
1076
|
-
return _ctx.emit(item, key);
|
|
1077
|
-
}
|
|
1078
|
-
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.text), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_1);
|
|
1079
|
-
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), _ctx.cancleText ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
|
|
1080
|
-
key: 0,
|
|
1081
|
-
href: "javascript:;",
|
|
1082
|
-
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.cancleClass),
|
|
1083
|
-
onClick: _cache[0] || (_cache[0] = function ($event) {
|
|
1084
|
-
return _ctx.visible = false;
|
|
1085
|
-
})
|
|
1086
|
-
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.cancleText), 3 /* TEXT, CLASS */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 2 /* CLASS */)];
|
|
1087
|
-
}),
|
|
1088
|
-
_: 1 /* STABLE */
|
|
1089
|
-
}, 8 /* PROPS */, ["modelValue"])]);
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
/***/ },
|
|
1093
|
-
|
|
1094
1045
|
/***/ 1071
|
|
1095
1046
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1096
1047
|
|
|
@@ -3006,6 +2957,55 @@ const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_j
|
|
|
3006
2957
|
|
|
3007
2958
|
/***/ },
|
|
3008
2959
|
|
|
2960
|
+
/***/ 2875
|
|
2961
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2962
|
+
|
|
2963
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2964
|
+
/* harmony export */ X: () => (/* binding */ render)
|
|
2965
|
+
/* harmony export */ });
|
|
2966
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5286);
|
|
2967
|
+
|
|
2968
|
+
var _hoisted_1 = ["onClick"];
|
|
2969
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2970
|
+
var _component_Popup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("Popup");
|
|
2971
|
+
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_Popup, {
|
|
2972
|
+
modelValue: _ctx.visible,
|
|
2973
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
|
|
2974
|
+
return _ctx.visible = $event;
|
|
2975
|
+
}),
|
|
2976
|
+
position: "bottom",
|
|
2977
|
+
styles: {
|
|
2978
|
+
background: 'transparent'
|
|
2979
|
+
}
|
|
2980
|
+
}, {
|
|
2981
|
+
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
|
|
2982
|
+
return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
|
|
2983
|
+
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.classes)
|
|
2984
|
+
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", {
|
|
2985
|
+
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.wrapperClasses)
|
|
2986
|
+
}, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)(_ctx.actions, function (item, key) {
|
|
2987
|
+
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", {
|
|
2988
|
+
key: key,
|
|
2989
|
+
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.wrapperActionClass),
|
|
2990
|
+
onClick: function onClick($event) {
|
|
2991
|
+
return _ctx.emit(item, key);
|
|
2992
|
+
}
|
|
2993
|
+
}, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(item.text), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_1);
|
|
2994
|
+
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), _ctx.cancleText ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("a", {
|
|
2995
|
+
key: 0,
|
|
2996
|
+
href: "javascript:;",
|
|
2997
|
+
"class": (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(_ctx.cancleClass),
|
|
2998
|
+
onClick: _cache[0] || (_cache[0] = function () {
|
|
2999
|
+
return _ctx.cancleClick && _ctx.cancleClick.apply(_ctx, arguments);
|
|
3000
|
+
})
|
|
3001
|
+
}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.cancleText), 3 /* TEXT, CLASS */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)("v-if", true)], 2 /* CLASS */)];
|
|
3002
|
+
}),
|
|
3003
|
+
_: 1 /* STABLE */
|
|
3004
|
+
}, 8 /* PROPS */, ["modelValue"])]);
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
/***/ },
|
|
3008
|
+
|
|
3009
3009
|
/***/ 2901
|
|
3010
3010
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
3011
3011
|
|
|
@@ -12377,6 +12377,9 @@ var prefixCls = 'dpzvc3-actionSheet';
|
|
|
12377
12377
|
// visible.value = false
|
|
12378
12378
|
emit('update:modelValue', false);
|
|
12379
12379
|
};
|
|
12380
|
+
var cancleClick = function cancleClick() {
|
|
12381
|
+
emit('update:modelValue', false);
|
|
12382
|
+
};
|
|
12380
12383
|
return {
|
|
12381
12384
|
visible: visible,
|
|
12382
12385
|
actions: actions,
|
|
@@ -12384,6 +12387,7 @@ var prefixCls = 'dpzvc3-actionSheet';
|
|
|
12384
12387
|
wrapperClasses: wrapperClasses,
|
|
12385
12388
|
wrapperActionClass: wrapperActionClass,
|
|
12386
12389
|
cancleClass: cancleClass,
|
|
12390
|
+
cancleClick: cancleClick,
|
|
12387
12391
|
emit: emitAction
|
|
12388
12392
|
};
|
|
12389
12393
|
}
|
|
@@ -12892,17 +12896,6 @@ exports.A = (sfc, props) => {
|
|
|
12892
12896
|
};
|
|
12893
12897
|
|
|
12894
12898
|
|
|
12895
|
-
/***/ },
|
|
12896
|
-
|
|
12897
|
-
/***/ 6277
|
|
12898
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
12899
|
-
|
|
12900
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12901
|
-
/* harmony export */ X: () => (/* reexport safe */ _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_actionSheet_vue_vue_type_template_id_3e21ff72__WEBPACK_IMPORTED_MODULE_0__.X)
|
|
12902
|
-
/* harmony export */ });
|
|
12903
|
-
/* harmony import */ var _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_actionSheet_vue_vue_type_template_id_3e21ff72__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(992);
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
12899
|
/***/ },
|
|
12907
12900
|
|
|
12908
12901
|
/***/ 6287
|
|
@@ -13550,6 +13543,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
13550
13543
|
|
|
13551
13544
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_rater__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A);
|
|
13552
13545
|
|
|
13546
|
+
/***/ },
|
|
13547
|
+
|
|
13548
|
+
/***/ 7194
|
|
13549
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
13550
|
+
|
|
13551
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13552
|
+
/* harmony export */ X: () => (/* reexport safe */ _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_actionSheet_vue_vue_type_template_id_78a5e8a8__WEBPACK_IMPORTED_MODULE_0__.X)
|
|
13553
|
+
/* harmony export */ });
|
|
13554
|
+
/* harmony import */ var _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_actionSheet_vue_vue_type_template_id_78a5e8a8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2875);
|
|
13555
|
+
|
|
13556
|
+
|
|
13553
13557
|
/***/ },
|
|
13554
13558
|
|
|
13555
13559
|
/***/ 7235
|
|
@@ -15164,7 +15168,7 @@ var prefixCls = 'dpzvc3-radiobox';
|
|
|
15164
15168
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15165
15169
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15166
15170
|
/* harmony export */ });
|
|
15167
|
-
/* harmony import */ var
|
|
15171
|
+
/* harmony import */ var _actionSheet_vue_vue_type_template_id_78a5e8a8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7194);
|
|
15168
15172
|
/* harmony import */ var _actionSheet_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2257);
|
|
15169
15173
|
/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6262);
|
|
15170
15174
|
|
|
@@ -15172,7 +15176,7 @@ var prefixCls = 'dpzvc3-radiobox';
|
|
|
15172
15176
|
|
|
15173
15177
|
|
|
15174
15178
|
;
|
|
15175
|
-
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(_actionSheet_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, [['render',
|
|
15179
|
+
const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(_actionSheet_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, [['render',_actionSheet_vue_vue_type_template_id_78a5e8a8__WEBPACK_IMPORTED_MODULE_0__/* .render */ .X]])
|
|
15176
15180
|
|
|
15177
15181
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__);
|
|
15178
15182
|
|
|
@@ -17228,7 +17232,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
17228
17232
|
display: flex;
|
|
17229
17233
|
flex-direction: column;
|
|
17230
17234
|
}
|
|
17231
|
-
`, "",{"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":""}]);
|
|
17235
|
+
`, "",{"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":""}]);
|
|
17232
17236
|
// Exports
|
|
17233
17237
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
17234
17238
|
|