dpzvc-ui 1.2.2 → 1.2.4

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 CHANGED
@@ -1141,122 +1141,87 @@ _radiobox_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.group = _radiobox
1141
1141
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1142
1142
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
1143
1143
  /* harmony export */ });
1144
- /* harmony import */ var _Indicator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7913);
1145
- /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1819);
1146
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5286);
1144
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4467);
1145
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5286);
1146
+ /* harmony import */ var _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7913);
1147
+
1148
+ 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; }
1149
+ 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) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(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; }
1147
1150
  /**
1148
- * Created by admin on 2017/6/22.
1151
+ * Indicator - Vue 2.7 CLI 适配版
1149
1152
  */
1150
1153
 
1151
1154
 
1152
1155
 
1153
- var instance;
1154
- _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance = function (properties) {
1155
- var _props = properties || {};
1156
- var props = '';
1157
- Object.keys(_props).forEach(function (prop) {
1158
- props += ' :' + (0,_utils_util__WEBPACK_IMPORTED_MODULE_1__/* .camelcaseToHyphen */ .Ad)(prop) + '=' + prop;
1159
- });
1160
- var div = document.createElement('div');
1161
- document.body.appendChild(div);
1162
- var indicator = new vue__WEBPACK_IMPORTED_MODULE_2__["default"]({
1163
- el: div,
1164
- template: "<Indicator ".concat(props, " v-model=\"visible\" ></Indicator>"),
1165
- components: {
1166
- Indicator: _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A
1167
- },
1168
- data: Object.assign(_props, {
1169
- visible: false,
1156
+ var instance = null;
1157
+ function createInstance() {
1158
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1159
+ var IndicatorConstructor = vue__WEBPACK_IMPORTED_MODULE_1__["default"].extend(_Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
1160
+ var vm = new IndicatorConstructor({
1161
+ propsData: _objectSpread({
1170
1162
  size: 45,
1171
1163
  type: 'snake',
1172
1164
  color: '#ffffff',
1173
- text: '加载中...',
1174
- onRemove: function onRemove() {}
1175
- }),
1176
- methods: {
1177
- remove: function remove() {
1178
- var _this = this;
1179
- this.$children[0].visible = false;
1180
- setTimeout(function () {
1181
- _this.destroy();
1182
- }, 300);
1183
- },
1184
- destroy: function destroy() {
1185
- this.$destroy();
1186
-
1187
- // if (!this.$el) return;
1188
- document.body.removeChild(this.$el);
1189
- this.onRemove();
1190
- }
1191
- }
1192
- }).$children[0];
1193
- return {
1194
- open: function open(options) {
1195
- indicator.$parent.visible = true;
1196
- indicator.$parent.onRemove = options.onRemove;
1197
- if ('size' in options) {
1198
- indicator.$parent.size = options.size;
1199
- }
1200
- if ('type' in options) {
1201
- indicator.$parent.type = options.type;
1202
- }
1203
- if ('color' in options) {
1204
- indicator.$parent.color = options.color;
1205
- }
1206
- if ('text' in options) {
1207
- indicator.$parent.text = options.text;
1208
- }
1209
- },
1210
- remove: function remove() {
1211
- indicator.visible = false;
1212
- indicator.$parent.remove();
1213
- },
1214
- component: indicator
1215
- };
1216
- };
1217
- function confirm(options) {
1218
- instance = instance || _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance({
1219
- size: 45,
1220
- color: '#ffffff',
1221
- text: '正在加载...',
1222
- type: 'snake'
1165
+ text: '加载中...'
1166
+ }, props)
1223
1167
  });
1224
- options.onRemove = function () {
1225
- instance = null;
1226
- };
1227
- instance.open(options);
1168
+ vm.$mount();
1169
+ document.body.appendChild(vm.$el);
1170
+ vm.visible = false;
1171
+ vm.$on('remove', function () {
1172
+ destroyInstance();
1173
+ });
1174
+ return vm;
1228
1175
  }
1229
- _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.blade = function () {
1176
+ function destroyInstance() {
1177
+ if (!instance) return;
1178
+ instance.$destroy();
1179
+ if (instance.$el && instance.$el.parentNode) {
1180
+ instance.$el.parentNode.removeChild(instance.$el);
1181
+ }
1182
+ instance = null;
1183
+ }
1184
+ function open() {
1185
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1186
+ if (!instance) {
1187
+ instance = createInstance(options);
1188
+ }
1189
+ Object.keys(options).forEach(function (key) {
1190
+ instance.$props[key] = options[key];
1191
+ });
1192
+ instance.visible = true;
1193
+ }
1194
+ function close() {
1195
+ if (!instance) return;
1196
+ instance.visible = false;
1197
+ destroyInstance();
1198
+ }
1199
+
1200
+ /* ================== 对外 API ================== */
1201
+
1202
+ _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.open = open;
1203
+ _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.remove = close;
1204
+ _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.snake = function () {
1230
1205
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1231
- props.type = 'blade';
1232
- return confirm(props);
1206
+ props.type = 'snake';
1207
+ open(props);
1233
1208
  };
1234
- _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.snake = function () {
1209
+ _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.blade = function () {
1235
1210
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1236
- props.type = 'snake';
1237
- return confirm(props);
1211
+ props.type = 'blade';
1212
+ open(props);
1238
1213
  };
1239
- _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.circle = function () {
1214
+ _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.circle = function () {
1240
1215
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1241
1216
  props.type = 'fading-circle';
1242
- return confirm(props);
1217
+ open(props);
1243
1218
  };
1244
- _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.bounce = function () {
1219
+ _Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.bounce = function () {
1245
1220
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1246
1221
  props.type = 'double-bounce';
1247
- return confirm(props);
1222
+ open(props);
1248
1223
  };
1249
- _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.remove = function () {
1250
- if (!instance) return false;
1251
- instance = instance || _Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance({
1252
- size: 45,
1253
- color: '#ffffff',
1254
- text: '正在加载...',
1255
- type: 'snake'
1256
- });
1257
- instance.remove();
1258
- };
1259
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Indicator__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A);
1224
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
1260
1225
 
1261
1226
  /***/ },
1262
1227
 
@@ -2650,7 +2615,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
2650
2615
  justify-content: center;
2651
2616
  flex-direction: column;
2652
2617
  }
2653
- `, "",{"version":3,"sources":["webpack://./src/components/checkBox/checkbox-group.vue"],"names":[],"mappings":";AA4EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"['dpzvc-checkBoxGroup',vertical?'dpzvc-checkBoxGroup-vertical':'']\" >\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from '../../utils/util'\n import Emitter from '../../mixin/emitter'\n export default {\n name:'checkBoxGroup',\n mixins:[Emitter],\n props:{\n value:{\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 data(){\n return {\n currentValue:this.value,\n childrens:[]\n }\n },\n methods:{\n change(data){\n console.log(data)\n this.currentValue = data;\n this.$emit('input', data);\n this.$emit('on-change',data);\n this.dispatch('on-form-change',data)\n },\n updateModel(){\n let model = this.value;\n this.childrens = findComponentsDownward(this,'checkBox');\n if(this.childrens) {\n this.childrens.forEach((child)=>{\n\n child.model = model;\n child.currentValue = model.indexOf(child.label) >= 0;\n child.isGroup = true;\n })\n }\n\n }\n },\n mounted(){\n\n this.updateModel()\n },\n watch:{\n value(){\n this.updateModel()\n }\n }\n }\n</script>\n\n\n<style scoped>\n .dpzvc-checkBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
2618
+ `, "",{"version":3,"sources":["webpack://./checkbox-group.vue"],"names":[],"mappings":";AA4EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"['dpzvc-checkBoxGroup',vertical?'dpzvc-checkBoxGroup-vertical':'']\" >\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from '../../utils/util'\n import Emitter from '../../mixin/emitter'\n export default {\n name:'checkBoxGroup',\n mixins:[Emitter],\n props:{\n value:{\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 data(){\n return {\n currentValue:this.value,\n childrens:[]\n }\n },\n methods:{\n change(data){\n console.log(data)\n this.currentValue = data;\n this.$emit('input', data);\n this.$emit('on-change',data);\n this.dispatch('on-form-change',data)\n },\n updateModel(){\n let model = this.value;\n this.childrens = findComponentsDownward(this,'checkBox');\n if(this.childrens) {\n this.childrens.forEach((child)=>{\n\n child.model = model;\n child.currentValue = model.indexOf(child.label) >= 0;\n child.isGroup = true;\n })\n }\n\n }\n },\n mounted(){\n\n this.updateModel()\n },\n watch:{\n value(){\n this.updateModel()\n }\n }\n }\n</script>\n\n\n<style scoped>\n .dpzvc-checkBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
2654
2619
  // Exports
2655
2620
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
2656
2621
 
@@ -2730,13 +2695,12 @@ var staticRenderFns = [];
2730
2695
 
2731
2696
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2732
2697
  /* harmony export */ $U: () => (/* binding */ JPEG),
2733
- /* harmony export */ Ad: () => (/* binding */ camelcaseToHyphen),
2734
2698
  /* harmony export */ F1: () => (/* binding */ scrollTop),
2735
2699
  /* harmony export */ oE: () => (/* binding */ findComponentUpward),
2736
2700
  /* harmony export */ ox: () => (/* binding */ findComponentsDownward),
2737
2701
  /* harmony export */ qN: () => (/* binding */ random_str)
2738
2702
  /* harmony export */ });
2739
- /* unused harmony exports findComponentDownward, cookieStorage */
2703
+ /* unused harmony exports camelcaseToHyphen, findComponentDownward, cookieStorage */
2740
2704
  /* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6608);
2741
2705
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2742
2706
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -3787,7 +3751,7 @@ var prefixCls = 'dpzvc-upload';
3787
3751
  var _this = this;
3788
3752
  var data = null;
3789
3753
  var img = new Image();
3790
- var mpImg = new _lib_MegaPixImage__WEBPACK_IMPORTED_MODULE_1__(file);
3754
+ var mpImg = new _lib_MegaPixImage__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A(file);
3791
3755
  mpImg.render(img, {
3792
3756
  maxWidth: 600,
3793
3757
  quality: 0.8
@@ -3973,6 +3937,29 @@ var prefixCls = 'dpzvc-radiobox';
3973
3937
  }
3974
3938
  });
3975
3939
 
3940
+ /***/ },
3941
+
3942
+ /***/ 2901
3943
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
3944
+
3945
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3946
+ /* harmony export */ A: () => (/* binding */ _createClass)
3947
+ /* harmony export */ });
3948
+ /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9922);
3949
+
3950
+ function _defineProperties(e, r) {
3951
+ for (var t = 0; t < r.length; t++) {
3952
+ var o = r[t];
3953
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(o.key), o);
3954
+ }
3955
+ }
3956
+ function _createClass(e, r, t) {
3957
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
3958
+ writable: !1
3959
+ }), e;
3960
+ }
3961
+
3962
+
3976
3963
  /***/ },
3977
3964
 
3978
3965
  /***/ 2924
@@ -4068,6 +4055,19 @@ var prefixCls = 'dpzvc-textBar';
4068
4055
  /* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_picker_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73);
4069
4056
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_picker_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A);
4070
4057
 
4058
+ /***/ },
4059
+
4060
+ /***/ 3029
4061
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
4062
+
4063
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4064
+ /* harmony export */ A: () => (/* binding */ _classCallCheck)
4065
+ /* harmony export */ });
4066
+ function _classCallCheck(a, n) {
4067
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
4068
+ }
4069
+
4070
+
4071
4071
  /***/ },
4072
4072
 
4073
4073
  /***/ 3055
@@ -4641,40 +4641,6 @@ var prefixCls = 'dpzvc-date-picker';
4641
4641
 
4642
4642
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_card__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A);
4643
4643
 
4644
- /***/ },
4645
-
4646
- /***/ 3610
4647
- (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4648
-
4649
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4650
- /* harmony export */ X: () => (/* binding */ render),
4651
- /* harmony export */ Y: () => (/* binding */ staticRenderFns)
4652
- /* harmony export */ });
4653
- var render = function render() {
4654
- var _vm = this,
4655
- _c = _vm._self._c;
4656
- return _c('div', {
4657
- "class": _vm.classes,
4658
- style: _vm.styles
4659
- }, [_vm._t("default", function () {
4660
- return [_c('div', {
4661
- "class": _vm.wrapperClasses
4662
- }, [_vm._v("图片上传")])];
4663
- }), _vm._v(" "), _c('input', {
4664
- ref: "upload",
4665
- attrs: {
4666
- "type": "file",
4667
- "accept": _vm.accept,
4668
- "multiple": _vm.multiple
4669
- },
4670
- on: {
4671
- "change": _vm.showPhoto
4672
- }
4673
- })], 2);
4674
- };
4675
- var staticRenderFns = [];
4676
-
4677
-
4678
4644
  /***/ },
4679
4645
 
4680
4646
  /***/ 3649
@@ -6109,6 +6075,40 @@ var render = function render() {
6109
6075
  var staticRenderFns = [];
6110
6076
 
6111
6077
 
6078
+ /***/ },
6079
+
6080
+ /***/ 4708
6081
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6082
+
6083
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6084
+ /* harmony export */ X: () => (/* binding */ render),
6085
+ /* harmony export */ Y: () => (/* binding */ staticRenderFns)
6086
+ /* harmony export */ });
6087
+ var render = function render() {
6088
+ var _vm = this,
6089
+ _c = _vm._self._c;
6090
+ return _c('div', {
6091
+ "class": _vm.classes,
6092
+ style: _vm.styles
6093
+ }, [_vm._t("default", function () {
6094
+ return [_c('div', {
6095
+ "class": _vm.wrapperClasses
6096
+ }, [_vm._v("图片上传")])];
6097
+ }), _vm._v(" "), _c('input', {
6098
+ ref: "upload",
6099
+ attrs: {
6100
+ "type": "file",
6101
+ "accept": _vm.accept,
6102
+ "multiple": _vm.multiple
6103
+ },
6104
+ on: {
6105
+ "change": _vm.showPhoto
6106
+ }
6107
+ })], 2);
6108
+ };
6109
+ var staticRenderFns = [];
6110
+
6111
+
6112
6112
  /***/ },
6113
6113
 
6114
6114
  /***/ 4783
@@ -11431,59 +11431,98 @@ var staticRenderFns = [];
11431
11431
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11432
11432
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
11433
11433
  /* harmony export */ });
11434
- /* harmony import */ var _modal_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6869);
11435
- /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3471);
11436
- /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5286);
11434
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5286);
11435
+ /* harmony import */ var _modal_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6869);
11436
+ /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3471);
11437
11437
  /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1819);
11438
11438
  /**
11439
- * Created by admin on 2017/3/30.
11439
+ * confirm.js - 适配 Vue 2.7 runtime-only
11440
11440
  */
11441
11441
 
11442
11442
 
11443
11443
 
11444
11444
 
11445
11445
  var prefixCls = 'dpzvc-modal';
11446
- _modal_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance = function (properties) {
11447
- var _props = properties || {};
11448
- var props = '';
11449
- Object.keys(_props).forEach(function (prop) {
11450
- props += ' :' + (0,_utils_util__WEBPACK_IMPORTED_MODULE_3__/* .camelcaseToHyphen */ .Ad)(prop) + '=' + prop;
11451
- });
11452
- var div = document.createElement('div');
11453
- document.body.appendChild(div);
11454
- var modal = new vue__WEBPACK_IMPORTED_MODULE_2__["default"]({
11455
- el: div,
11456
- template: "<Modal ".concat(props, " v-model=\"visible\" :width=\"width\" >\n <div class=\"").concat(prefixCls, "-header-inner ellipse-fir\" v-html=\"title\" slot=\"header\"></div>\n <div class=\"").concat(prefixCls, "-body-inner\" v-html=\"body\" slot=\"body\"></div>\n <template slot=\"footer\">\n <v-button type=\"primary\" :radius=\"false\" @click=\"cancle\" v-if=\"showCancle\">{{cancleText}}</v-button>\n <v-button type=\"normal\" :radius=\"false\" @click=\"ok\" :loading=\"buttonLoading\">{{okText}}</v-button>\n </template>\n </Modal>"),
11446
+ _modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.newInstance = function () {
11447
+ var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11448
+ // 创建一个新的 Vue 构造函数
11449
+ var ModalConstructor = vue__WEBPACK_IMPORTED_MODULE_0__["default"].extend({
11457
11450
  components: {
11458
- Modal: _modal_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A,
11459
- VButton: _button__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A
11451
+ Modal: _modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A,
11452
+ VButton: _button__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A
11453
+ },
11454
+ data: function data() {
11455
+ return Object.assign({
11456
+ visible: false,
11457
+ width: '70%',
11458
+ body: '',
11459
+ title: '',
11460
+ okText: '确定',
11461
+ cancleText: '取消',
11462
+ loading: false,
11463
+ buttonLoading: false,
11464
+ showCancle: true,
11465
+ showHead: true,
11466
+ onOk: function onOk() {},
11467
+ onCancle: function onCancle() {},
11468
+ onRemove: function onRemove() {}
11469
+ }, properties);
11470
+ },
11471
+ render: function render(h) {
11472
+ var footer = [this.showCancle ? h('v-button', {
11473
+ props: {
11474
+ type: 'primary',
11475
+ radius: false
11476
+ },
11477
+ on: {
11478
+ click: this.cancle
11479
+ }
11480
+ }, this.cancleText) : null, h('v-button', {
11481
+ props: {
11482
+ type: 'normal',
11483
+ radius: false,
11484
+ loading: this.buttonLoading
11485
+ },
11486
+ on: {
11487
+ click: this.ok
11488
+ }
11489
+ }, this.okText)];
11490
+ return h(_modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, {
11491
+ props: {
11492
+ value: this.visible,
11493
+ width: this.width,
11494
+ showHead: this.showHead,
11495
+ footerHide: false
11496
+ },
11497
+ on: {
11498
+ 'on-ok': this.ok,
11499
+ 'on-cancle': this.cancle
11500
+ }
11501
+ }, [h('div', {
11502
+ slot: 'header',
11503
+ domProps: {
11504
+ innerHTML: this.title
11505
+ },
11506
+ "class": "".concat(prefixCls, "-header-inner ellipse-fir")
11507
+ }), h('div', {
11508
+ slot: 'body',
11509
+ domProps: {
11510
+ innerHTML: this.body
11511
+ },
11512
+ "class": "".concat(prefixCls, "-body-inner")
11513
+ }), h('template', {
11514
+ slot: 'footer'
11515
+ }, footer)]);
11460
11516
  },
11461
- data: Object.assign(_props, {
11462
- visible: false,
11463
- width: '70%',
11464
- body: '',
11465
- title: '',
11466
- okText: '确定',
11467
- cancleText: '取消',
11468
- loading: false,
11469
- buttonLoading: false,
11470
- showCancle: true,
11471
- showHead: true,
11472
- onOk: function onOk() {},
11473
- onCancle: function onCancle() {},
11474
- onRemove: function onRemove() {}
11475
- }),
11476
11517
  methods: {
11477
11518
  cancle: function cancle() {
11478
- this.$children[0].visible = false;
11519
+ this.visible = false;
11479
11520
  this.onCancle();
11480
11521
  this.remove();
11481
11522
  },
11482
11523
  ok: function ok() {
11483
- console.log('asd');
11484
11524
  if (this.loading) {
11485
11525
  this.buttonLoading = true;
11486
- this.$children[0].buttonLoading = true;
11487
11526
  } else {
11488
11527
  this.visible = false;
11489
11528
  this.remove();
@@ -11492,73 +11531,42 @@ _modal_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance = functi
11492
11531
  },
11493
11532
  remove: function remove() {
11494
11533
  var _this = this;
11495
- this.$children[0].visible = false;
11534
+ this.visible = false;
11496
11535
  setTimeout(function () {
11497
- _this.destroy();
11536
+ return _this.destroy();
11498
11537
  }, 300);
11499
11538
  },
11500
11539
  destroy: function destroy() {
11501
11540
  this.$destroy();
11502
- document.body.removeChild(this.$el);
11541
+ if (this.$el && this.$el.parentNode) {
11542
+ this.$el.parentNode.removeChild(this.$el);
11543
+ }
11503
11544
  this.onRemove();
11504
11545
  }
11505
11546
  }
11506
- }).$children[0];
11547
+ });
11548
+
11549
+ // 实例化并挂载到 DOM
11550
+ var div = document.createElement('div');
11551
+ document.body.appendChild(div);
11552
+ var instance = new ModalConstructor().$mount(div);
11507
11553
  return {
11508
- show: function show(props) {
11509
- // if ('width' in props) {
11510
- // modal.$parent.width = props.width
11511
- // }
11512
- //
11513
- // if ('title' in props) {
11514
- // modal.$parent.title = props.title
11515
- // }
11516
- //
11517
- // if ('showHead' in props) {
11518
- // modal.$parent.showHead = props.showHead
11519
- // }
11520
- //
11521
- // if ('okText' in props) {
11522
- // modal.$parent.okText = props.okText
11523
- // }
11524
- //
11525
- // if ('cancleText' in props) {
11526
- // modal.$parent.cancleText = props.cancleText
11527
- // }
11528
- //
11529
- //
11530
- // if ('onCancle' in props) {
11531
- // modal.$parent.onCancle = props.onCancle
11532
- // }
11533
- //
11534
- // if ('onOk' in props) {
11535
- // modal.$parent.onOk = props.onOk
11536
- // }
11537
- //
11538
- // if ('loading' in props) {
11539
- // modal.$parent.loading = props.loading
11540
- // }
11541
- //
11542
- // if ('body' in props) {
11543
- // modal.$parent.body = props.body
11544
- // }
11545
-
11546
- Object.keys(props).forEach(function (item) {
11547
- modal.$parent[item] = props[item];
11554
+ show: function show() {
11555
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11556
+ Object.keys(props).forEach(function (key) {
11557
+ if (key in instance) {
11558
+ instance[key] = props[key];
11559
+ }
11548
11560
  });
11549
- modal.$parent.showCancle = props.showCancle;
11550
- modal.$parent.onRemove = props.onRemove;
11551
- modal.visible = true;
11561
+ instance.visible = true;
11552
11562
  },
11553
11563
  remove: function remove() {
11554
- modal.visible = false;
11555
- modal.$parent.buttonLoading = false;
11556
- modal.$parent.remove();
11564
+ instance.remove();
11557
11565
  },
11558
- component: modal
11566
+ component: instance
11559
11567
  };
11560
11568
  };
11561
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_modal_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A);
11569
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A);
11562
11570
 
11563
11571
  /***/ },
11564
11572
 
@@ -12229,7 +12237,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
12229
12237
  justify-content: center;
12230
12238
  flex-direction: column;
12231
12239
  }
12232
- `, "",{"version":3,"sources":["webpack://./src/components/radioBox/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":""}]);
12240
+ `, "",{"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":""}]);
12233
12241
  // Exports
12234
12242
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
12235
12243
 
@@ -13705,239 +13713,221 @@ var staticRenderFns = [];
13705
13713
  /***/ },
13706
13714
 
13707
13715
  /***/ 8037
13708
- (module, __webpack_exports__, __webpack_require__) {
13716
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
13709
13717
 
13710
- __webpack_require__.r(__webpack_exports__);
13711
- /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2284);
13712
- /* module decorator */ module = __webpack_require__.hmd(module);
13718
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13719
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
13720
+ /* harmony export */ });
13721
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4467);
13722
+ /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3029);
13723
+ /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2901);
13713
13724
 
13725
+
13726
+
13727
+ 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; }
13728
+ 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) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(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; }
13714
13729
  // MegaPixImage.js
13715
- (function (global, factory) {
13716
- if (( false ? 0 : (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(module)) === 'object' && (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(module.exports) === 'object') {
13717
- module.exports = factory(); // CommonJS
13718
- } else if (typeof define === 'function' && __webpack_require__.amdO) {
13719
- define([], factory); // AMD
13720
- } else {
13721
- global.MegaPixImage = factory(); // Browser global
13722
- }
13723
- })(typeof window !== 'undefined' ? window : undefined, function () {
13724
- // -------------------------
13725
- // Helper functions
13726
- // -------------------------
13727
- function detectSubsampling(img) {
13728
- var iw = img.naturalWidth,
13729
- ih = img.naturalHeight;
13730
- if (iw * ih > 1024 * 1024) {
13731
- var canvas = document.createElement('canvas');
13732
- canvas.width = canvas.height = 1;
13733
- var ctx = canvas.getContext('2d');
13734
- ctx.drawImage(img, -iw + 1, 0);
13735
- return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
13736
- } else {
13737
- return false;
13738
- }
13739
- }
13740
- function detectVerticalSquash(img, iw, ih) {
13730
+ // 将原先的 UMD/CommonJS 改为 ESM export default
13731
+
13732
+ // -------------------------
13733
+ // Helper functions
13734
+ // -------------------------
13735
+ function detectSubsampling(img) {
13736
+ var iw = img.naturalWidth,
13737
+ ih = img.naturalHeight;
13738
+ if (iw * ih > 1024 * 1024) {
13741
13739
  var canvas = document.createElement('canvas');
13742
- canvas.width = 1;
13743
- canvas.height = ih;
13740
+ canvas.width = canvas.height = 1;
13744
13741
  var ctx = canvas.getContext('2d');
13745
- ctx.drawImage(img, 0, 0);
13746
- var data = ctx.getImageData(0, 0, 1, ih).data;
13747
- var sy = 0,
13748
- ey = ih,
13749
- py = ih;
13750
- while (py > sy) {
13751
- var alpha = data[(py - 1) * 4 + 3];
13752
- if (alpha === 0) {
13753
- ey = py;
13754
- } else {
13755
- sy = py;
13756
- }
13757
- py = ey + sy >> 1;
13758
- }
13759
- var ratio = py / ih;
13760
- return ratio === 0 ? 1 : ratio;
13742
+ ctx.drawImage(img, -iw + 1, 0);
13743
+ return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
13761
13744
  }
13762
- function renderImageToDataURL(img, options, doSquash) {
13763
- var canvas = document.createElement('canvas');
13764
- renderImageToCanvas(img, canvas, options, doSquash);
13765
- return canvas.toDataURL("image/jpeg", options.quality || 0.8);
13745
+ return false;
13746
+ }
13747
+ function detectVerticalSquash(img, iw, ih) {
13748
+ var canvas = document.createElement('canvas');
13749
+ canvas.width = 1;
13750
+ canvas.height = ih;
13751
+ var ctx = canvas.getContext('2d');
13752
+ ctx.drawImage(img, 0, 0);
13753
+ var data = ctx.getImageData(0, 0, 1, ih).data;
13754
+ var sy = 0,
13755
+ ey = ih,
13756
+ py = ih;
13757
+ while (py > sy) {
13758
+ var alpha = data[(py - 1) * 4 + 3];
13759
+ if (alpha === 0) ey = py;else sy = py;
13760
+ py = ey + sy >> 1;
13766
13761
  }
13767
- function renderImageToCanvas(img, canvas, options, doSquash) {
13768
- var iw = img.naturalWidth,
13769
- ih = img.naturalHeight;
13770
- if (!(iw + ih)) return;
13771
- var width = options.width,
13772
- height = options.height;
13773
- var ctx = canvas.getContext('2d');
13774
- ctx.save();
13775
- transformCoordinate(canvas, ctx, width, height, options.orientation);
13776
- var subsampled = detectSubsampling(img);
13777
- if (subsampled) {
13778
- iw /= 2;
13779
- ih /= 2;
13780
- }
13781
- var d = 1024;
13782
- var tmpCanvas = document.createElement('canvas');
13783
- tmpCanvas.width = tmpCanvas.height = d;
13784
- var tmpCtx = tmpCanvas.getContext('2d');
13785
- var vertSquashRatio = doSquash ? detectVerticalSquash(img, iw, ih) : 1;
13786
- var dw = Math.ceil(d * width / iw);
13787
- var dh = Math.ceil(d * height / ih / vertSquashRatio);
13788
- var sy = 0,
13789
- dy = 0;
13790
- while (sy < ih) {
13791
- var sx = 0,
13792
- dx = 0;
13793
- while (sx < iw) {
13794
- tmpCtx.clearRect(0, 0, d, d);
13795
- tmpCtx.drawImage(img, -sx, -sy);
13796
- ctx.drawImage(tmpCanvas, 0, 0, d, d, dx, dy, dw, dh);
13797
- sx += d;
13798
- dx += dw;
13799
- }
13800
- sy += d;
13801
- dy += dh;
13802
- }
13803
- ctx.restore();
13804
- tmpCanvas = tmpCtx = null;
13762
+ var ratio = py / ih;
13763
+ return ratio === 0 ? 1 : ratio;
13764
+ }
13765
+ function renderImageToDataURL(img, options, doSquash) {
13766
+ var canvas = document.createElement('canvas');
13767
+ renderImageToCanvas(img, canvas, options, doSquash);
13768
+ return canvas.toDataURL("image/jpeg", options.quality || 0.8);
13769
+ }
13770
+ function renderImageToCanvas(img, canvas, options, doSquash) {
13771
+ var iw = img.naturalWidth,
13772
+ ih = img.naturalHeight;
13773
+ if (!(iw + ih)) return;
13774
+ var width = options.width,
13775
+ height = options.height;
13776
+ var ctx = canvas.getContext('2d');
13777
+ ctx.save();
13778
+ transformCoordinate(canvas, ctx, width, height, options.orientation);
13779
+ var subsampled = detectSubsampling(img);
13780
+ if (subsampled) {
13781
+ iw /= 2;
13782
+ ih /= 2;
13805
13783
  }
13806
- function transformCoordinate(canvas, ctx, width, height, orientation) {
13807
- switch (orientation) {
13808
- case 5:
13809
- case 6:
13810
- case 7:
13811
- case 8:
13812
- canvas.width = height;
13813
- canvas.height = width;
13814
- break;
13815
- default:
13816
- canvas.width = width;
13817
- canvas.height = height;
13818
- }
13819
- switch (orientation) {
13820
- case 2:
13821
- ctx.translate(width, 0);
13822
- ctx.scale(-1, 1);
13823
- break;
13824
- case 3:
13825
- ctx.translate(width, height);
13826
- ctx.rotate(Math.PI);
13827
- break;
13828
- case 4:
13829
- ctx.translate(0, height);
13830
- ctx.scale(1, -1);
13831
- break;
13832
- case 5:
13833
- ctx.rotate(0.5 * Math.PI);
13834
- ctx.scale(1, -1);
13835
- break;
13836
- case 6:
13837
- ctx.rotate(0.5 * Math.PI);
13838
- ctx.translate(0, -height);
13839
- break;
13840
- case 7:
13841
- ctx.rotate(0.5 * Math.PI);
13842
- ctx.translate(width, -height);
13843
- ctx.scale(-1, 1);
13844
- break;
13845
- case 8:
13846
- ctx.rotate(-0.5 * Math.PI);
13847
- ctx.translate(-width, 0);
13848
- break;
13849
- }
13784
+ var d = 1024;
13785
+ var tmpCanvas = document.createElement('canvas');
13786
+ tmpCanvas.width = tmpCanvas.height = d;
13787
+ var tmpCtx = tmpCanvas.getContext('2d');
13788
+ var vertSquashRatio = doSquash ? detectVerticalSquash(img, iw, ih) : 1;
13789
+ var dw = Math.ceil(d * width / iw);
13790
+ var dh = Math.ceil(d * height / ih / vertSquashRatio);
13791
+ var sy = 0,
13792
+ dy = 0;
13793
+ while (sy < ih) {
13794
+ var sx = 0,
13795
+ dx = 0;
13796
+ while (sx < iw) {
13797
+ tmpCtx.clearRect(0, 0, d, d);
13798
+ tmpCtx.drawImage(img, -sx, -sy);
13799
+ ctx.drawImage(tmpCanvas, 0, 0, d, d, dx, dy, dw, dh);
13800
+ sx += d;
13801
+ dx += dw;
13802
+ }
13803
+ sy += d;
13804
+ dy += dh;
13805
+ }
13806
+ ctx.restore();
13807
+ }
13808
+ function transformCoordinate(canvas, ctx, width, height, orientation) {
13809
+ switch (orientation) {
13810
+ case 5:
13811
+ case 6:
13812
+ case 7:
13813
+ case 8:
13814
+ canvas.width = height;
13815
+ canvas.height = width;
13816
+ break;
13817
+ default:
13818
+ canvas.width = width;
13819
+ canvas.height = height;
13850
13820
  }
13851
- var URL = window.URL && window.URL.createObjectURL ? window.URL : window.webkitURL && window.webkitURL.createObjectURL ? window.webkitURL : null;
13821
+ switch (orientation) {
13822
+ case 2:
13823
+ ctx.translate(width, 0);
13824
+ ctx.scale(-1, 1);
13825
+ break;
13826
+ case 3:
13827
+ ctx.translate(width, height);
13828
+ ctx.rotate(Math.PI);
13829
+ break;
13830
+ case 4:
13831
+ ctx.translate(0, height);
13832
+ ctx.scale(1, -1);
13833
+ break;
13834
+ case 5:
13835
+ ctx.rotate(0.5 * Math.PI);
13836
+ ctx.scale(1, -1);
13837
+ break;
13838
+ case 6:
13839
+ ctx.rotate(0.5 * Math.PI);
13840
+ ctx.translate(0, -height);
13841
+ break;
13842
+ case 7:
13843
+ ctx.rotate(0.5 * Math.PI);
13844
+ ctx.translate(width, -height);
13845
+ ctx.scale(-1, 1);
13846
+ break;
13847
+ case 8:
13848
+ ctx.rotate(-0.5 * Math.PI);
13849
+ ctx.translate(-width, 0);
13850
+ break;
13851
+ }
13852
+ }
13853
+ var URL = window.URL && window.URL.createObjectURL ? window.URL : window.webkitURL && window.webkitURL.createObjectURL ? window.webkitURL : null;
13852
13854
 
13853
- // -------------------------
13854
- // MegaPixImage class
13855
- // -------------------------
13855
+ // -------------------------
13856
+ // MegaPixImage class
13857
+ // -------------------------
13858
+ var MegaPixImage = /*#__PURE__*/function () {
13856
13859
  function MegaPixImage(srcImage) {
13860
+ (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(this, MegaPixImage);
13857
13861
  if (window.Blob && srcImage instanceof Blob) {
13858
- if (!URL) {
13859
- throw Error("No createObjectURL function found");
13860
- }
13862
+ if (!URL) throw Error("No createObjectURL function found");
13861
13863
  var img = new Image();
13862
13864
  img.src = URL.createObjectURL(srcImage);
13863
13865
  this.blob = srcImage;
13864
13866
  srcImage = img;
13865
13867
  }
13866
13868
  if (!srcImage.naturalWidth && !srcImage.naturalHeight) {
13869
+ this.imageLoadListeners = [];
13867
13870
  var _this = this;
13868
13871
  srcImage.onload = srcImage.onerror = function () {
13869
13872
  var listeners = _this.imageLoadListeners;
13870
13873
  if (listeners) {
13871
13874
  _this.imageLoadListeners = null;
13872
- for (var i = 0; i < listeners.length; i++) {
13873
- listeners[i]();
13874
- }
13875
+ listeners.forEach(function (fn) {
13876
+ return fn();
13877
+ });
13875
13878
  }
13876
13879
  };
13877
- this.imageLoadListeners = [];
13878
13880
  }
13879
13881
  this.srcImage = srcImage;
13880
13882
  }
13881
- MegaPixImage.prototype.render = function (target, options, callback) {
13882
- if (this.imageLoadListeners) {
13883
- var _this = this;
13884
- this.imageLoadListeners.push(function () {
13885
- _this.render(target, options, callback);
13886
- });
13887
- return;
13888
- }
13889
- options = options || {};
13890
- var imgWidth = this.srcImage.naturalWidth,
13891
- imgHeight = this.srcImage.naturalHeight,
13892
- width = options.width,
13893
- height = options.height,
13894
- maxWidth = options.maxWidth,
13895
- maxHeight = options.maxHeight,
13896
- doSquash = !this.blob || this.blob.type === 'image/jpeg';
13897
- if (width && !height) {
13898
- height = imgHeight * width / imgWidth << 0;
13899
- } else if (height && !width) {
13900
- width = imgWidth * height / imgHeight << 0;
13901
- } else {
13902
- width = imgWidth;
13903
- height = imgHeight;
13904
- }
13905
- if (maxWidth && width > maxWidth) {
13906
- width = maxWidth;
13907
- height = imgHeight * width / imgWidth << 0;
13908
- }
13909
- if (maxHeight && height > maxHeight) {
13910
- height = maxHeight;
13911
- width = imgWidth * height / imgHeight << 0;
13912
- }
13913
- var opt = {
13914
- width: width,
13915
- height: height
13916
- };
13917
- for (var k in options) opt[k] = options[k];
13918
- var tagName = target.tagName.toLowerCase();
13919
- if (tagName === 'img') {
13920
- target.src = renderImageToDataURL(this.srcImage, opt, doSquash);
13921
- } else if (tagName === 'canvas') {
13922
- renderImageToCanvas(this.srcImage, target, opt, doSquash);
13923
- }
13924
- if (typeof this.onrender === 'function') {
13925
- this.onrender(target);
13926
- }
13927
- if (callback) {
13928
- callback();
13929
- }
13930
- if (this.blob) {
13931
- this.blob = null;
13932
- URL.revokeObjectURL(this.srcImage.src);
13883
+ return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(MegaPixImage, [{
13884
+ key: "render",
13885
+ value: function render(target, options, callback) {
13886
+ var _this2 = this;
13887
+ if (this.imageLoadListeners) {
13888
+ this.imageLoadListeners.push(function () {
13889
+ _this2.render(target, options, callback);
13890
+ });
13891
+ return;
13892
+ }
13893
+ options = options || {};
13894
+ var imgWidth = this.srcImage.naturalWidth,
13895
+ imgHeight = this.srcImage.naturalHeight;
13896
+ var width = options.width,
13897
+ height = options.height;
13898
+ var maxWidth = options.maxWidth,
13899
+ maxHeight = options.maxHeight;
13900
+ var doSquash = !this.blob || this.blob.type === 'image/jpeg';
13901
+ if (width && !height) height = imgHeight * width / imgWidth << 0;else if (height && !width) width = imgWidth * height / imgHeight << 0;else {
13902
+ width = imgWidth;
13903
+ height = imgHeight;
13904
+ }
13905
+ if (maxWidth && width > maxWidth) {
13906
+ width = maxWidth;
13907
+ height = imgHeight * width / imgWidth << 0;
13908
+ }
13909
+ if (maxHeight && height > maxHeight) {
13910
+ height = maxHeight;
13911
+ width = imgWidth * height / imgHeight << 0;
13912
+ }
13913
+ var opt = _objectSpread({
13914
+ width: width,
13915
+ height: height
13916
+ }, options);
13917
+ var tagName = target.tagName.toLowerCase();
13918
+ if (tagName === 'img') target.src = renderImageToDataURL(this.srcImage, opt, doSquash);else if (tagName === 'canvas') renderImageToCanvas(this.srcImage, target, opt, doSquash);
13919
+ if (typeof this.onrender === 'function') this.onrender(target);
13920
+ if (callback) callback();
13921
+ if (this.blob) {
13922
+ this.blob = null;
13923
+ URL.revokeObjectURL(this.srcImage.src);
13924
+ }
13933
13925
  }
13934
- };
13935
-
13936
- // -------------------------
13937
- // Export as ESM default
13938
- // -------------------------
13939
- return MegaPixImage;
13940
- });
13926
+ }]);
13927
+ }(); // -------------------------
13928
+ // ESM export default
13929
+ // -------------------------
13930
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MegaPixImage);
13941
13931
 
13942
13932
  /***/ },
13943
13933
 
@@ -14027,7 +14017,7 @@ _textBar__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Number = _Number__WEBP
14027
14017
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14028
14018
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
14029
14019
  /* harmony export */ });
14030
- /* harmony import */ var _upload_vue_vue_type_template_id_b2513a8a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3610);
14020
+ /* harmony import */ var _upload_vue_vue_type_template_id_23492f0b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4708);
14031
14021
  /* harmony import */ var _upload_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7426);
14032
14022
  /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4486);
14033
14023
 
@@ -14039,8 +14029,8 @@ _textBar__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.Number = _Number__WEBP
14039
14029
  ;
14040
14030
  var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(
14041
14031
  _upload_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A,
14042
- _upload_vue_vue_type_template_id_b2513a8a__WEBPACK_IMPORTED_MODULE_0__/* .render */ .X,
14043
- _upload_vue_vue_type_template_id_b2513a8a__WEBPACK_IMPORTED_MODULE_0__/* .staticRenderFns */ .Y,
14032
+ _upload_vue_vue_type_template_id_23492f0b__WEBPACK_IMPORTED_MODULE_0__/* .render */ .X,
14033
+ _upload_vue_vue_type_template_id_23492f0b__WEBPACK_IMPORTED_MODULE_0__/* .staticRenderFns */ .Y,
14044
14034
  false,
14045
14035
  null,
14046
14036
  null,
@@ -14904,34 +14894,31 @@ var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__
14904
14894
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14905
14895
  /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
14906
14896
  /* harmony export */ });
14907
- /* harmony import */ var _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5455);
14897
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4467);
14908
14898
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5286);
14909
- /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1819);
14899
+ /* harmony import */ var _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5455);
14900
+
14901
+ 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; }
14902
+ 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) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(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; }
14910
14903
  /**
14911
- * Created by admin on 2017/5/10.
14904
+ * Created by admin on 2025/12/10
14905
+ * Rewritten for Vue 2.7 + Vue CLI (runtime-only)
14912
14906
  */
14913
14907
 
14914
14908
 
14915
14909
 
14916
- var prefixCls = 'v-lc-modal';
14917
- _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance = function (properties) {
14918
- var _props = properties || {};
14919
- var props = '';
14920
- Object.keys(_props).forEach(function (prop) {
14921
- props += ' :' + (0,_utils_util__WEBPACK_IMPORTED_MODULE_2__/* .camelcaseToHyphen */ .Ad)(prop) + '=' + prop;
14922
- });
14923
- var div = document.createElement('div');
14924
- document.body.appendChild(div);
14925
- var propmt = new vue__WEBPACK_IMPORTED_MODULE_1__["default"]({
14926
- el: div,
14927
- template: "<Prompt ".concat(props, " v-model=\"visible\" \n :width=\"width\" \n :text=\"text\" \n :title=\"title\" \n :ok-text=\"okText\" \n :cancle-text=\"cancleText\" \n :loading=\"loading\" \n :spec=\"spec\" \n :message=\"message\" \n :validator=\"validator\"\n :on-ok=\"onOk\" \n :on-cancle=\"onCancle\"> </Prompt>"),
14928
- components: {
14929
- Prompt: _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A
14930
- },
14931
- data: Object.assign(_props, {
14910
+ _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.newInstance = function () {
14911
+ var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14912
+ // 1. 创建构造器
14913
+ var PromptConstructor = vue__WEBPACK_IMPORTED_MODULE_1__["default"].extend(_prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
14914
+
14915
+ // 2. 初始化 props(等价你之前 data + v-model)
14916
+ var instance = new PromptConstructor({
14917
+ propsData: _objectSpread(_objectSpread({}, properties), {}, {
14918
+ // 默认值(保持你原来的语义)
14919
+ visible: false,
14932
14920
  text: '',
14933
14921
  placeholderText: '请输入',
14934
- visible: false,
14935
14922
  width: '70%',
14936
14923
  title: '',
14937
14924
  okText: '确定',
@@ -14942,94 +14929,46 @@ _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance
14942
14929
  message: '',
14943
14930
  validator: null,
14944
14931
  onOk: function onOk() {},
14945
- onCancle: function onCancle(prop) {},
14946
- onRemove: function onRemove() {}
14947
- }),
14948
- methods: {
14949
- cancle: function cancle() {
14950
- this.$children[0].visible = false;
14951
- this.onCancle();
14952
- this.remove();
14953
- },
14954
- ok: function ok() {
14955
- if (this.loading) {
14956
- this.buttonLoading = true;
14957
- } else {
14958
- this.visible = false;
14959
- this.remove();
14960
- }
14961
- this.onOk();
14962
- },
14963
- remove: function remove() {
14964
- var _this = this;
14965
- this.$children[0].visible = false;
14966
- setTimeout(function () {
14967
- _this.destroy();
14968
- }, 300);
14969
- },
14970
- destroy: function destroy() {
14971
- this.$destroy();
14972
- document.body.removeChild(this.$el);
14973
- this.onRemove();
14974
- },
14975
- mounted: function mounted() {}
14976
- }
14977
- }).$children[0];
14932
+ onCancle: function onCancle() {}
14933
+ })
14934
+ });
14935
+
14936
+ // 3. 挂载到 DOM
14937
+ instance.$mount();
14938
+ document.body.appendChild(instance.$el);
14939
+
14940
+ // 4. 移除逻辑(统一)
14941
+ var destroy = function destroy() {
14942
+ instance.visible = false;
14943
+ setTimeout(function () {
14944
+ instance.$destroy();
14945
+ instance.$el && document.body.removeChild(instance.$el);
14946
+ instance.onRemove && instance.onRemove();
14947
+ }, 300);
14948
+ };
14978
14949
  return {
14979
- show: function show(props) {
14980
- propmt.$parent.showCancle = props.showCancle;
14981
- propmt.$parent.onRemove = props.onRemove;
14982
- propmt.visible = true;
14983
- if ('width' in props) {
14984
- propmt.$parent.width = props.width;
14985
- }
14986
- if ('text' in props) {
14987
- propmt.$parent.text = props.text;
14988
- }
14989
- if ('spec' in props) {
14990
- propmt.$parent.spec = props.spec;
14991
- }
14992
- if ('title' in props) {
14993
- propmt.$parent.title = props.title;
14994
- }
14995
- if ('placeholderText' in props) {
14996
- propmt.$parent.placeholderText = props.placeholderText;
14997
- }
14998
- if ('content' in props) {
14999
- propmt.$parent.body = props.body;
15000
- }
15001
- if ('okText' in props) {
15002
- propmt.$parent.okText = props.okText;
15003
- }
15004
- if ('cancleText' in props) {
15005
- propmt.$parent.cancleText = props.cancleText;
15006
- }
15007
- if ('onCancle' in props) {
15008
- propmt.$parent.onCancle = props.onCancle;
15009
- }
15010
- if ('onOk' in props) {
15011
- propmt.$parent.onOk = props.onOk;
15012
- }
15013
- if ('loading' in props) {
15014
- propmt.$parent.loading = props.loading;
15015
- }
15016
- if ('message' in props) {
15017
- propmt.$parent.message = props.message;
15018
- }
15019
- if ('validator' in props) {
15020
- propmt.$parent.validator = props.validator;
15021
- }
15022
- console.log(propmt.$parent);
14950
+ /**
14951
+ * 显示 Prompt
14952
+ */
14953
+ show: function show() {
14954
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14955
+ Object.keys(props).forEach(function (key) {
14956
+ instance[key] = props[key];
14957
+ });
14958
+ instance.visible = true;
15023
14959
  },
14960
+ /**
14961
+ * 关闭 Prompt
14962
+ */
15024
14963
  remove: function remove() {
15025
- propmt.visible = false;
15026
- propmt.$parent.buttonLoading = false;
15027
- propmt.$parent.remove();
14964
+ instance.visible = false;
14965
+ instance.buttonLoading = false;
14966
+ destroy();
15028
14967
  },
15029
- component: propmt
14968
+ component: instance
15030
14969
  };
15031
14970
  };
15032
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A);
14971
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
15033
14972
 
15034
14973
  /***/ },
15035
14974
 
@@ -15295,26 +15234,18 @@ _confirm__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.remove = function () {
15295
15234
  /******/ // Create a new module (and put it into the cache)
15296
15235
  /******/ var module = __webpack_module_cache__[moduleId] = {
15297
15236
  /******/ id: moduleId,
15298
- /******/ loaded: false,
15237
+ /******/ // no module.loaded needed
15299
15238
  /******/ exports: {}
15300
15239
  /******/ };
15301
15240
  /******/
15302
15241
  /******/ // Execute the module function
15303
15242
  /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
15304
15243
  /******/
15305
- /******/ // Flag the module as loaded
15306
- /******/ module.loaded = true;
15307
- /******/
15308
15244
  /******/ // Return the exports of the module
15309
15245
  /******/ return module.exports;
15310
15246
  /******/ }
15311
15247
  /******/
15312
15248
  /************************************************************************/
15313
- /******/ /* webpack/runtime/amd options */
15314
- /******/ (() => {
15315
- /******/ __webpack_require__.amdO = {};
15316
- /******/ })();
15317
- /******/
15318
15249
  /******/ /* webpack/runtime/compat get default export */
15319
15250
  /******/ (() => {
15320
15251
  /******/ // getDefaultExport function for compatibility with non-harmony modules
@@ -15339,21 +15270,6 @@ _confirm__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.remove = function () {
15339
15270
  /******/ };
15340
15271
  /******/ })();
15341
15272
  /******/
15342
- /******/ /* webpack/runtime/harmony module decorator */
15343
- /******/ (() => {
15344
- /******/ __webpack_require__.hmd = (module) => {
15345
- /******/ module = Object.create(module);
15346
- /******/ if (!module.children) module.children = [];
15347
- /******/ Object.defineProperty(module, 'exports', {
15348
- /******/ enumerable: true,
15349
- /******/ set: () => {
15350
- /******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
15351
- /******/ }
15352
- /******/ });
15353
- /******/ return module;
15354
- /******/ };
15355
- /******/ })();
15356
- /******/
15357
15273
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
15358
15274
  /******/ (() => {
15359
15275
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))