dpzvc-ui 1.2.1 → 1.2.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/dist/dpzvc.esm.js +33 -26
- package/dist/dpzvc.esm.js.map +1 -1
- package/dist/dpzvc.esm.min.js +1 -1
- package/dist/dpzvc.esm.min.js.map +1 -1
- package/dist/dpzvc.js +32 -26
- package/dist/dpzvc.js.map +1 -1
- package/dist/dpzvc.min.js +1 -1
- package/dist/dpzvc.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/message/confirm.js +37 -46
package/dist/dpzvc.js
CHANGED
|
@@ -5804,7 +5804,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
5804
5804
|
justify-content: center;
|
|
5805
5805
|
flex-direction: column;
|
|
5806
5806
|
}
|
|
5807
|
-
`, "",{"version":3,"sources":["webpack://./
|
|
5807
|
+
`, "",{"version":3,"sources":["webpack://./radiobox-group.vue"],"names":[],"mappings":";AA0EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"classes\">\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from \"../../utils/util\"\n const prefixCls = 'dpzvc-radioBoxGroup'\n export default {\n name:'radioBoxGroup',\n props:{\n value:{\n type:[String,Boolean,Number]\n },\n vertical:{\n type:Boolean,\n default:false\n }\n },\n mounted(){\n this.updateModel()\n },\n data(){\n return {\n currentValue:this.value,\n children:findComponentsDownward(this,'radioBox')\n }\n },\n computed:{\n classes(){\n return [\n `${prefixCls}`,\n {\n [`${prefixCls}-vertical`]:this.vertical\n }\n ]\n\n }\n },\n methods:{\n change(data){\n this.currentValue = data.value;\n this.updateModel();\n this.$emit('input',data.value);\n this.$emit('on-change',data.value);\n this.$emit('on-form-change',data.value)\n },\n updateModel(){\n let value = this.value;\n this.children = findComponentsDownward(this,'radioBox');\n this.children.forEach((child)=>{\n child.model = value == child.label;\n child.isGroup = true;\n\n })\n }\n },\n watch:{\n value(){\n this.updateModel();\n },\n }\n }\n</script>\n\n<style scoped >\n .dpzvc-radioBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
|
|
5808
5808
|
// Exports
|
|
5809
5809
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
5810
5810
|
|
|
@@ -7505,6 +7505,9 @@ var header_component = normalizeComponent(
|
|
|
7505
7505
|
*/
|
|
7506
7506
|
|
|
7507
7507
|
/* harmony default export */ const Header = (header);
|
|
7508
|
+
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
7509
|
+
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(154);
|
|
7510
|
+
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default = /*#__PURE__*/__webpack_require__.n(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_);
|
|
7508
7511
|
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/message/messageGroup.vue?vue&type=template&id=1acd65df
|
|
7509
7512
|
var messageGroupvue_type_template_id_1acd65df_render = function render() {
|
|
7510
7513
|
var _vm = this,
|
|
@@ -7735,45 +7738,48 @@ var messageGroup_component = normalizeComponent(
|
|
|
7735
7738
|
)
|
|
7736
7739
|
|
|
7737
7740
|
/* harmony default export */ const messageGroup = (messageGroup_component.exports);
|
|
7738
|
-
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
|
|
7739
|
-
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(154);
|
|
7740
|
-
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default = /*#__PURE__*/__webpack_require__.n(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_);
|
|
7741
7741
|
;// ./src/components/message/confirm.js
|
|
7742
|
+
|
|
7743
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7744
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7742
7745
|
/**
|
|
7743
|
-
*
|
|
7746
|
+
* messageGroup.js
|
|
7747
|
+
* 兼容 Vue 2.7 runtime-only 构建
|
|
7744
7748
|
*/
|
|
7745
7749
|
|
|
7746
7750
|
|
|
7751
|
+
// 你的 Vue 组件
|
|
7747
7752
|
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
var _props = props || {};
|
|
7751
|
-
var _prop = '';
|
|
7752
|
-
Object.keys(_props).forEach(function (prop) {
|
|
7753
|
-
_prop += ' :' + camelcaseToHyphen(prop) + '=' + prop;
|
|
7754
|
-
});
|
|
7753
|
+
messageGroup.newInstance = function () {
|
|
7754
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7755
7755
|
var div = document.createElement('div');
|
|
7756
7756
|
document.body.appendChild(div);
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7757
|
+
|
|
7758
|
+
// 使用 render 函数代替 template,兼容 runtime-only
|
|
7759
|
+
var messageVm = new (external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default())({
|
|
7760
|
+
data: function data() {
|
|
7761
|
+
return _objectSpread({}, props);
|
|
7762
|
+
},
|
|
7763
|
+
render: function render(h) {
|
|
7764
|
+
return h(messageGroup, {
|
|
7765
|
+
props: props
|
|
7766
|
+
});
|
|
7763
7767
|
}
|
|
7764
|
-
}).$
|
|
7768
|
+
}).$mount(div);
|
|
7769
|
+
var instance = messageVm.$children[0]; // 确保实例存在
|
|
7770
|
+
|
|
7765
7771
|
return {
|
|
7766
|
-
add: function add(
|
|
7767
|
-
|
|
7772
|
+
add: function add(options) {
|
|
7773
|
+
if (instance) instance.add(options);
|
|
7768
7774
|
},
|
|
7769
|
-
remove: function remove(
|
|
7770
|
-
|
|
7775
|
+
remove: function remove(options) {
|
|
7776
|
+
if (instance) instance.remove(options);
|
|
7771
7777
|
},
|
|
7772
|
-
component:
|
|
7778
|
+
component: instance,
|
|
7773
7779
|
destroy: function destroy() {
|
|
7774
|
-
|
|
7780
|
+
if (instance) instance.closeAll();
|
|
7775
7781
|
setTimeout(function () {
|
|
7776
|
-
|
|
7782
|
+
if (div.parentNode) div.parentNode.removeChild(div);
|
|
7777
7783
|
}, 500);
|
|
7778
7784
|
}
|
|
7779
7785
|
};
|