dpzvc-ui 1.2.1 → 1.2.3
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/build-style.js +11 -22
- package/dist/dpzvc.esm.js +241 -313
- 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 +231 -303
- 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 +3 -2
- package/src/components/Indicator/index.js +58 -123
- package/src/components/message/confirm.js +37 -46
- package/src/components/modal/confirm.js +106 -153
- package/src/components/prompt/confirm.js +70 -169
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
|
|
1145
|
-
/* harmony import */ var
|
|
1146
|
-
/* harmony import */ var
|
|
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
|
-
*
|
|
1151
|
+
* Indicator - Vue 2.7 CLI 适配版
|
|
1149
1152
|
*/
|
|
1150
1153
|
|
|
1151
1154
|
|
|
1152
1155
|
|
|
1153
|
-
var instance;
|
|
1154
|
-
|
|
1155
|
-
var
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1158
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1168
|
+
vm.$mount();
|
|
1169
|
+
document.body.appendChild(vm.$el);
|
|
1170
|
+
vm.visible = false;
|
|
1171
|
+
vm.$on('remove', function () {
|
|
1172
|
+
destroyInstance();
|
|
1173
|
+
});
|
|
1174
|
+
return vm;
|
|
1175
|
+
}
|
|
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();
|
|
1228
1198
|
}
|
|
1229
|
-
|
|
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 = '
|
|
1232
|
-
|
|
1206
|
+
props.type = 'snake';
|
|
1207
|
+
open(props);
|
|
1233
1208
|
};
|
|
1234
|
-
|
|
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 = '
|
|
1237
|
-
|
|
1211
|
+
props.type = 'blade';
|
|
1212
|
+
open(props);
|
|
1238
1213
|
};
|
|
1239
|
-
|
|
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
|
-
|
|
1217
|
+
open(props);
|
|
1243
1218
|
};
|
|
1244
|
-
|
|
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
|
-
|
|
1248
|
-
};
|
|
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();
|
|
1222
|
+
open(props);
|
|
1258
1223
|
};
|
|
1259
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
1224
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Indicator_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
|
|
1260
1225
|
|
|
1261
1226
|
/***/ },
|
|
1262
1227
|
|
|
@@ -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; } }
|
|
@@ -4714,49 +4678,56 @@ var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__
|
|
|
4714
4678
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4715
4679
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4716
4680
|
/* harmony export */ });
|
|
4717
|
-
/* harmony import */ var
|
|
4681
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4467);
|
|
4718
4682
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5286);
|
|
4719
|
-
/* harmony import */ var
|
|
4683
|
+
/* harmony import */ var _messageGroup_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4998);
|
|
4684
|
+
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1819);
|
|
4685
|
+
|
|
4686
|
+
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; }
|
|
4687
|
+
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; }
|
|
4720
4688
|
/**
|
|
4721
|
-
*
|
|
4689
|
+
* messageGroup.js
|
|
4690
|
+
* 兼容 Vue 2.7 runtime-only 构建
|
|
4722
4691
|
*/
|
|
4723
4692
|
|
|
4724
4693
|
|
|
4694
|
+
// 你的 Vue 组件
|
|
4725
4695
|
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
var _props = props || {};
|
|
4729
|
-
var _prop = '';
|
|
4730
|
-
Object.keys(_props).forEach(function (prop) {
|
|
4731
|
-
_prop += ' :' + (0,_utils_util__WEBPACK_IMPORTED_MODULE_2__/* .camelcaseToHyphen */ .Ad)(prop) + '=' + prop;
|
|
4732
|
-
});
|
|
4696
|
+
_messageGroup_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.newInstance = function () {
|
|
4697
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4733
4698
|
var div = document.createElement('div');
|
|
4734
4699
|
document.body.appendChild(div);
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4700
|
+
|
|
4701
|
+
// 使用 render 函数代替 template,兼容 runtime-only
|
|
4702
|
+
var messageVm = new vue__WEBPACK_IMPORTED_MODULE_1__["default"]({
|
|
4703
|
+
data: function data() {
|
|
4704
|
+
return _objectSpread({}, props);
|
|
4705
|
+
},
|
|
4706
|
+
render: function render(h) {
|
|
4707
|
+
return h(_messageGroup_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A, {
|
|
4708
|
+
props: props
|
|
4709
|
+
});
|
|
4741
4710
|
}
|
|
4742
|
-
}).$
|
|
4711
|
+
}).$mount(div);
|
|
4712
|
+
var instance = messageVm.$children[0]; // 确保实例存在
|
|
4713
|
+
|
|
4743
4714
|
return {
|
|
4744
|
-
add: function add(
|
|
4745
|
-
|
|
4715
|
+
add: function add(options) {
|
|
4716
|
+
if (instance) instance.add(options);
|
|
4746
4717
|
},
|
|
4747
|
-
remove: function remove(
|
|
4748
|
-
|
|
4718
|
+
remove: function remove(options) {
|
|
4719
|
+
if (instance) instance.remove(options);
|
|
4749
4720
|
},
|
|
4750
|
-
component:
|
|
4721
|
+
component: instance,
|
|
4751
4722
|
destroy: function destroy() {
|
|
4752
|
-
|
|
4723
|
+
if (instance) instance.closeAll();
|
|
4753
4724
|
setTimeout(function () {
|
|
4754
|
-
|
|
4725
|
+
if (div.parentNode) div.parentNode.removeChild(div);
|
|
4755
4726
|
}, 500);
|
|
4756
4727
|
}
|
|
4757
4728
|
};
|
|
4758
4729
|
};
|
|
4759
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
4730
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_messageGroup_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
|
|
4760
4731
|
|
|
4761
4732
|
/***/ },
|
|
4762
4733
|
|
|
@@ -11424,59 +11395,98 @@ var staticRenderFns = [];
|
|
|
11424
11395
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11425
11396
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11426
11397
|
/* harmony export */ });
|
|
11427
|
-
/* harmony import */ var
|
|
11428
|
-
/* harmony import */ var
|
|
11429
|
-
/* harmony import */ var
|
|
11398
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5286);
|
|
11399
|
+
/* harmony import */ var _modal_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6869);
|
|
11400
|
+
/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3471);
|
|
11430
11401
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1819);
|
|
11431
11402
|
/**
|
|
11432
|
-
*
|
|
11403
|
+
* confirm.js - 适配 Vue 2.7 runtime-only
|
|
11433
11404
|
*/
|
|
11434
11405
|
|
|
11435
11406
|
|
|
11436
11407
|
|
|
11437
11408
|
|
|
11438
11409
|
var prefixCls = 'dpzvc-modal';
|
|
11439
|
-
|
|
11440
|
-
var
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
props += ' :' + (0,_utils_util__WEBPACK_IMPORTED_MODULE_3__/* .camelcaseToHyphen */ .Ad)(prop) + '=' + prop;
|
|
11444
|
-
});
|
|
11445
|
-
var div = document.createElement('div');
|
|
11446
|
-
document.body.appendChild(div);
|
|
11447
|
-
var modal = new vue__WEBPACK_IMPORTED_MODULE_2__["default"]({
|
|
11448
|
-
el: div,
|
|
11449
|
-
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>"),
|
|
11410
|
+
_modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.newInstance = function () {
|
|
11411
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11412
|
+
// 创建一个新的 Vue 构造函数
|
|
11413
|
+
var ModalConstructor = vue__WEBPACK_IMPORTED_MODULE_0__["default"].extend({
|
|
11450
11414
|
components: {
|
|
11451
|
-
Modal:
|
|
11452
|
-
VButton:
|
|
11415
|
+
Modal: _modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A,
|
|
11416
|
+
VButton: _button__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A
|
|
11417
|
+
},
|
|
11418
|
+
data: function data() {
|
|
11419
|
+
return Object.assign({
|
|
11420
|
+
visible: false,
|
|
11421
|
+
width: '70%',
|
|
11422
|
+
body: '',
|
|
11423
|
+
title: '',
|
|
11424
|
+
okText: '确定',
|
|
11425
|
+
cancleText: '取消',
|
|
11426
|
+
loading: false,
|
|
11427
|
+
buttonLoading: false,
|
|
11428
|
+
showCancle: true,
|
|
11429
|
+
showHead: true,
|
|
11430
|
+
onOk: function onOk() {},
|
|
11431
|
+
onCancle: function onCancle() {},
|
|
11432
|
+
onRemove: function onRemove() {}
|
|
11433
|
+
}, properties);
|
|
11434
|
+
},
|
|
11435
|
+
render: function render(h) {
|
|
11436
|
+
var footer = [this.showCancle ? h('v-button', {
|
|
11437
|
+
props: {
|
|
11438
|
+
type: 'primary',
|
|
11439
|
+
radius: false
|
|
11440
|
+
},
|
|
11441
|
+
on: {
|
|
11442
|
+
click: this.cancle
|
|
11443
|
+
}
|
|
11444
|
+
}, this.cancleText) : null, h('v-button', {
|
|
11445
|
+
props: {
|
|
11446
|
+
type: 'normal',
|
|
11447
|
+
radius: false,
|
|
11448
|
+
loading: this.buttonLoading
|
|
11449
|
+
},
|
|
11450
|
+
on: {
|
|
11451
|
+
click: this.ok
|
|
11452
|
+
}
|
|
11453
|
+
}, this.okText)];
|
|
11454
|
+
return h(_modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, {
|
|
11455
|
+
props: {
|
|
11456
|
+
value: this.visible,
|
|
11457
|
+
width: this.width,
|
|
11458
|
+
showHead: this.showHead,
|
|
11459
|
+
footerHide: false
|
|
11460
|
+
},
|
|
11461
|
+
on: {
|
|
11462
|
+
'on-ok': this.ok,
|
|
11463
|
+
'on-cancle': this.cancle
|
|
11464
|
+
}
|
|
11465
|
+
}, [h('div', {
|
|
11466
|
+
slot: 'header',
|
|
11467
|
+
domProps: {
|
|
11468
|
+
innerHTML: this.title
|
|
11469
|
+
},
|
|
11470
|
+
"class": "".concat(prefixCls, "-header-inner ellipse-fir")
|
|
11471
|
+
}), h('div', {
|
|
11472
|
+
slot: 'body',
|
|
11473
|
+
domProps: {
|
|
11474
|
+
innerHTML: this.body
|
|
11475
|
+
},
|
|
11476
|
+
"class": "".concat(prefixCls, "-body-inner")
|
|
11477
|
+
}), h('template', {
|
|
11478
|
+
slot: 'footer'
|
|
11479
|
+
}, footer)]);
|
|
11453
11480
|
},
|
|
11454
|
-
data: Object.assign(_props, {
|
|
11455
|
-
visible: false,
|
|
11456
|
-
width: '70%',
|
|
11457
|
-
body: '',
|
|
11458
|
-
title: '',
|
|
11459
|
-
okText: '确定',
|
|
11460
|
-
cancleText: '取消',
|
|
11461
|
-
loading: false,
|
|
11462
|
-
buttonLoading: false,
|
|
11463
|
-
showCancle: true,
|
|
11464
|
-
showHead: true,
|
|
11465
|
-
onOk: function onOk() {},
|
|
11466
|
-
onCancle: function onCancle() {},
|
|
11467
|
-
onRemove: function onRemove() {}
|
|
11468
|
-
}),
|
|
11469
11481
|
methods: {
|
|
11470
11482
|
cancle: function cancle() {
|
|
11471
|
-
this
|
|
11483
|
+
this.visible = false;
|
|
11472
11484
|
this.onCancle();
|
|
11473
11485
|
this.remove();
|
|
11474
11486
|
},
|
|
11475
11487
|
ok: function ok() {
|
|
11476
|
-
console.log('asd');
|
|
11477
11488
|
if (this.loading) {
|
|
11478
11489
|
this.buttonLoading = true;
|
|
11479
|
-
this.$children[0].buttonLoading = true;
|
|
11480
11490
|
} else {
|
|
11481
11491
|
this.visible = false;
|
|
11482
11492
|
this.remove();
|
|
@@ -11485,73 +11495,42 @@ _modal_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance = functi
|
|
|
11485
11495
|
},
|
|
11486
11496
|
remove: function remove() {
|
|
11487
11497
|
var _this = this;
|
|
11488
|
-
this
|
|
11498
|
+
this.visible = false;
|
|
11489
11499
|
setTimeout(function () {
|
|
11490
|
-
_this.destroy();
|
|
11500
|
+
return _this.destroy();
|
|
11491
11501
|
}, 300);
|
|
11492
11502
|
},
|
|
11493
11503
|
destroy: function destroy() {
|
|
11494
11504
|
this.$destroy();
|
|
11495
|
-
|
|
11505
|
+
if (this.$el && this.$el.parentNode) {
|
|
11506
|
+
this.$el.parentNode.removeChild(this.$el);
|
|
11507
|
+
}
|
|
11496
11508
|
this.onRemove();
|
|
11497
11509
|
}
|
|
11498
11510
|
}
|
|
11499
|
-
})
|
|
11511
|
+
});
|
|
11512
|
+
|
|
11513
|
+
// 实例化并挂载到 DOM
|
|
11514
|
+
var div = document.createElement('div');
|
|
11515
|
+
document.body.appendChild(div);
|
|
11516
|
+
var instance = new ModalConstructor().$mount(div);
|
|
11500
11517
|
return {
|
|
11501
|
-
show: function show(
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
// modal.$parent.title = props.title
|
|
11508
|
-
// }
|
|
11509
|
-
//
|
|
11510
|
-
// if ('showHead' in props) {
|
|
11511
|
-
// modal.$parent.showHead = props.showHead
|
|
11512
|
-
// }
|
|
11513
|
-
//
|
|
11514
|
-
// if ('okText' in props) {
|
|
11515
|
-
// modal.$parent.okText = props.okText
|
|
11516
|
-
// }
|
|
11517
|
-
//
|
|
11518
|
-
// if ('cancleText' in props) {
|
|
11519
|
-
// modal.$parent.cancleText = props.cancleText
|
|
11520
|
-
// }
|
|
11521
|
-
//
|
|
11522
|
-
//
|
|
11523
|
-
// if ('onCancle' in props) {
|
|
11524
|
-
// modal.$parent.onCancle = props.onCancle
|
|
11525
|
-
// }
|
|
11526
|
-
//
|
|
11527
|
-
// if ('onOk' in props) {
|
|
11528
|
-
// modal.$parent.onOk = props.onOk
|
|
11529
|
-
// }
|
|
11530
|
-
//
|
|
11531
|
-
// if ('loading' in props) {
|
|
11532
|
-
// modal.$parent.loading = props.loading
|
|
11533
|
-
// }
|
|
11534
|
-
//
|
|
11535
|
-
// if ('body' in props) {
|
|
11536
|
-
// modal.$parent.body = props.body
|
|
11537
|
-
// }
|
|
11538
|
-
|
|
11539
|
-
Object.keys(props).forEach(function (item) {
|
|
11540
|
-
modal.$parent[item] = props[item];
|
|
11518
|
+
show: function show() {
|
|
11519
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11520
|
+
Object.keys(props).forEach(function (key) {
|
|
11521
|
+
if (key in instance) {
|
|
11522
|
+
instance[key] = props[key];
|
|
11523
|
+
}
|
|
11541
11524
|
});
|
|
11542
|
-
|
|
11543
|
-
modal.$parent.onRemove = props.onRemove;
|
|
11544
|
-
modal.visible = true;
|
|
11525
|
+
instance.visible = true;
|
|
11545
11526
|
},
|
|
11546
11527
|
remove: function remove() {
|
|
11547
|
-
|
|
11548
|
-
modal.$parent.buttonLoading = false;
|
|
11549
|
-
modal.$parent.remove();
|
|
11528
|
+
instance.remove();
|
|
11550
11529
|
},
|
|
11551
|
-
component:
|
|
11530
|
+
component: instance
|
|
11552
11531
|
};
|
|
11553
11532
|
};
|
|
11554
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
11533
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_modal_vue__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A);
|
|
11555
11534
|
|
|
11556
11535
|
/***/ },
|
|
11557
11536
|
|
|
@@ -12222,7 +12201,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
12222
12201
|
justify-content: center;
|
|
12223
12202
|
flex-direction: column;
|
|
12224
12203
|
}
|
|
12225
|
-
`, "",{"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":""}]);
|
|
12204
|
+
`, "",{"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":""}]);
|
|
12226
12205
|
// Exports
|
|
12227
12206
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
12228
12207
|
|
|
@@ -14897,34 +14876,31 @@ var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__
|
|
|
14897
14876
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14898
14877
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
14899
14878
|
/* harmony export */ });
|
|
14900
|
-
/* harmony import */ var
|
|
14879
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4467);
|
|
14901
14880
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5286);
|
|
14902
|
-
/* harmony import */ var
|
|
14881
|
+
/* harmony import */ var _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5455);
|
|
14882
|
+
|
|
14883
|
+
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; }
|
|
14884
|
+
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; }
|
|
14903
14885
|
/**
|
|
14904
|
-
* Created by admin on
|
|
14886
|
+
* Created by admin on 2025/12/10
|
|
14887
|
+
* Rewritten for Vue 2.7 + Vue CLI (runtime-only)
|
|
14905
14888
|
*/
|
|
14906
14889
|
|
|
14907
14890
|
|
|
14908
14891
|
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
var
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
el: div,
|
|
14920
|
-
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>"),
|
|
14921
|
-
components: {
|
|
14922
|
-
Prompt: _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A
|
|
14923
|
-
},
|
|
14924
|
-
data: Object.assign(_props, {
|
|
14892
|
+
_prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.newInstance = function () {
|
|
14893
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14894
|
+
// 1. 创建构造器
|
|
14895
|
+
var PromptConstructor = vue__WEBPACK_IMPORTED_MODULE_1__["default"].extend(_prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
|
|
14896
|
+
|
|
14897
|
+
// 2. 初始化 props(等价你之前 data + v-model)
|
|
14898
|
+
var instance = new PromptConstructor({
|
|
14899
|
+
propsData: _objectSpread(_objectSpread({}, properties), {}, {
|
|
14900
|
+
// 默认值(保持你原来的语义)
|
|
14901
|
+
visible: false,
|
|
14925
14902
|
text: '',
|
|
14926
14903
|
placeholderText: '请输入',
|
|
14927
|
-
visible: false,
|
|
14928
14904
|
width: '70%',
|
|
14929
14905
|
title: '',
|
|
14930
14906
|
okText: '确定',
|
|
@@ -14935,94 +14911,46 @@ _prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.newInstance
|
|
|
14935
14911
|
message: '',
|
|
14936
14912
|
validator: null,
|
|
14937
14913
|
onOk: function onOk() {},
|
|
14938
|
-
onCancle: function onCancle(
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
},
|
|
14956
|
-
remove: function remove() {
|
|
14957
|
-
var _this = this;
|
|
14958
|
-
this.$children[0].visible = false;
|
|
14959
|
-
setTimeout(function () {
|
|
14960
|
-
_this.destroy();
|
|
14961
|
-
}, 300);
|
|
14962
|
-
},
|
|
14963
|
-
destroy: function destroy() {
|
|
14964
|
-
this.$destroy();
|
|
14965
|
-
document.body.removeChild(this.$el);
|
|
14966
|
-
this.onRemove();
|
|
14967
|
-
},
|
|
14968
|
-
mounted: function mounted() {}
|
|
14969
|
-
}
|
|
14970
|
-
}).$children[0];
|
|
14914
|
+
onCancle: function onCancle() {}
|
|
14915
|
+
})
|
|
14916
|
+
});
|
|
14917
|
+
|
|
14918
|
+
// 3. 挂载到 DOM
|
|
14919
|
+
instance.$mount();
|
|
14920
|
+
document.body.appendChild(instance.$el);
|
|
14921
|
+
|
|
14922
|
+
// 4. 移除逻辑(统一)
|
|
14923
|
+
var destroy = function destroy() {
|
|
14924
|
+
instance.visible = false;
|
|
14925
|
+
setTimeout(function () {
|
|
14926
|
+
instance.$destroy();
|
|
14927
|
+
instance.$el && document.body.removeChild(instance.$el);
|
|
14928
|
+
instance.onRemove && instance.onRemove();
|
|
14929
|
+
}, 300);
|
|
14930
|
+
};
|
|
14971
14931
|
return {
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
}
|
|
14982
|
-
if ('spec' in props) {
|
|
14983
|
-
propmt.$parent.spec = props.spec;
|
|
14984
|
-
}
|
|
14985
|
-
if ('title' in props) {
|
|
14986
|
-
propmt.$parent.title = props.title;
|
|
14987
|
-
}
|
|
14988
|
-
if ('placeholderText' in props) {
|
|
14989
|
-
propmt.$parent.placeholderText = props.placeholderText;
|
|
14990
|
-
}
|
|
14991
|
-
if ('content' in props) {
|
|
14992
|
-
propmt.$parent.body = props.body;
|
|
14993
|
-
}
|
|
14994
|
-
if ('okText' in props) {
|
|
14995
|
-
propmt.$parent.okText = props.okText;
|
|
14996
|
-
}
|
|
14997
|
-
if ('cancleText' in props) {
|
|
14998
|
-
propmt.$parent.cancleText = props.cancleText;
|
|
14999
|
-
}
|
|
15000
|
-
if ('onCancle' in props) {
|
|
15001
|
-
propmt.$parent.onCancle = props.onCancle;
|
|
15002
|
-
}
|
|
15003
|
-
if ('onOk' in props) {
|
|
15004
|
-
propmt.$parent.onOk = props.onOk;
|
|
15005
|
-
}
|
|
15006
|
-
if ('loading' in props) {
|
|
15007
|
-
propmt.$parent.loading = props.loading;
|
|
15008
|
-
}
|
|
15009
|
-
if ('message' in props) {
|
|
15010
|
-
propmt.$parent.message = props.message;
|
|
15011
|
-
}
|
|
15012
|
-
if ('validator' in props) {
|
|
15013
|
-
propmt.$parent.validator = props.validator;
|
|
15014
|
-
}
|
|
15015
|
-
console.log(propmt.$parent);
|
|
14932
|
+
/**
|
|
14933
|
+
* 显示 Prompt
|
|
14934
|
+
*/
|
|
14935
|
+
show: function show() {
|
|
14936
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14937
|
+
Object.keys(props).forEach(function (key) {
|
|
14938
|
+
instance[key] = props[key];
|
|
14939
|
+
});
|
|
14940
|
+
instance.visible = true;
|
|
15016
14941
|
},
|
|
14942
|
+
/**
|
|
14943
|
+
* 关闭 Prompt
|
|
14944
|
+
*/
|
|
15017
14945
|
remove: function remove() {
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
14946
|
+
instance.visible = false;
|
|
14947
|
+
instance.buttonLoading = false;
|
|
14948
|
+
destroy();
|
|
15021
14949
|
},
|
|
15022
|
-
component:
|
|
14950
|
+
component: instance
|
|
15023
14951
|
};
|
|
15024
14952
|
};
|
|
15025
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
14953
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_prompt_prompt_vue__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A);
|
|
15026
14954
|
|
|
15027
14955
|
/***/ },
|
|
15028
14956
|
|