@weitutech/by-components 1.1.87 → 1.1.88
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/lib/by-components.common.js +408 -1
- package/lib/by-components.umd.js +504 -97
- package/lib/by-components.umd.min.js +1 -1
- package/lib/index.css +1 -1
- package/package.json +1 -1
package/lib/by-components.umd.js
CHANGED
|
@@ -2643,6 +2643,100 @@ module.exports = USE_SYMBOL_AS_UID ? function (it) {
|
|
|
2643
2643
|
|
|
2644
2644
|
/***/ }),
|
|
2645
2645
|
|
|
2646
|
+
/***/ 815:
|
|
2647
|
+
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
2648
|
+
|
|
2649
|
+
//! moment.js locale configuration
|
|
2650
|
+
//! locale : Telugu [te]
|
|
2651
|
+
//! author : Krishna Chaitanya Thota : https://github.com/kcthota
|
|
2652
|
+
|
|
2653
|
+
;
|
|
2654
|
+
(function (global, factory) {
|
|
2655
|
+
true ? factory(__webpack_require__(9618)) : 0;
|
|
2656
|
+
})(this, function (moment) {
|
|
2657
|
+
'use strict';
|
|
2658
|
+
|
|
2659
|
+
//! moment.js locale configuration
|
|
2660
|
+
var te = moment.defineLocale('te', {
|
|
2661
|
+
months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
|
|
2662
|
+
monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),
|
|
2663
|
+
monthsParseExact: true,
|
|
2664
|
+
weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
|
|
2665
|
+
weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
|
|
2666
|
+
weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
|
|
2667
|
+
longDateFormat: {
|
|
2668
|
+
LT: 'A h:mm',
|
|
2669
|
+
LTS: 'A h:mm:ss',
|
|
2670
|
+
L: 'DD/MM/YYYY',
|
|
2671
|
+
LL: 'D MMMM YYYY',
|
|
2672
|
+
LLL: 'D MMMM YYYY, A h:mm',
|
|
2673
|
+
LLLL: 'dddd, D MMMM YYYY, A h:mm'
|
|
2674
|
+
},
|
|
2675
|
+
calendar: {
|
|
2676
|
+
sameDay: '[నేడు] LT',
|
|
2677
|
+
nextDay: '[రేపు] LT',
|
|
2678
|
+
nextWeek: 'dddd, LT',
|
|
2679
|
+
lastDay: '[నిన్న] LT',
|
|
2680
|
+
lastWeek: '[గత] dddd, LT',
|
|
2681
|
+
sameElse: 'L'
|
|
2682
|
+
},
|
|
2683
|
+
relativeTime: {
|
|
2684
|
+
future: '%s లో',
|
|
2685
|
+
past: '%s క్రితం',
|
|
2686
|
+
s: 'కొన్ని క్షణాలు',
|
|
2687
|
+
ss: '%d సెకన్లు',
|
|
2688
|
+
m: 'ఒక నిమిషం',
|
|
2689
|
+
mm: '%d నిమిషాలు',
|
|
2690
|
+
h: 'ఒక గంట',
|
|
2691
|
+
hh: '%d గంటలు',
|
|
2692
|
+
d: 'ఒక రోజు',
|
|
2693
|
+
dd: '%d రోజులు',
|
|
2694
|
+
M: 'ఒక నెల',
|
|
2695
|
+
MM: '%d నెలలు',
|
|
2696
|
+
y: 'ఒక సంవత్సరం',
|
|
2697
|
+
yy: '%d సంవత్సరాలు'
|
|
2698
|
+
},
|
|
2699
|
+
dayOfMonthOrdinalParse: /\d{1,2}వ/,
|
|
2700
|
+
ordinal: '%dవ',
|
|
2701
|
+
meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
|
|
2702
|
+
meridiemHour: function (hour, meridiem) {
|
|
2703
|
+
if (hour === 12) {
|
|
2704
|
+
hour = 0;
|
|
2705
|
+
}
|
|
2706
|
+
if (meridiem === 'రాత్రి') {
|
|
2707
|
+
return hour < 4 ? hour : hour + 12;
|
|
2708
|
+
} else if (meridiem === 'ఉదయం') {
|
|
2709
|
+
return hour;
|
|
2710
|
+
} else if (meridiem === 'మధ్యాహ్నం') {
|
|
2711
|
+
return hour >= 10 ? hour : hour + 12;
|
|
2712
|
+
} else if (meridiem === 'సాయంత్రం') {
|
|
2713
|
+
return hour + 12;
|
|
2714
|
+
}
|
|
2715
|
+
},
|
|
2716
|
+
meridiem: function (hour, minute, isLower) {
|
|
2717
|
+
if (hour < 4) {
|
|
2718
|
+
return 'రాత్రి';
|
|
2719
|
+
} else if (hour < 10) {
|
|
2720
|
+
return 'ఉదయం';
|
|
2721
|
+
} else if (hour < 17) {
|
|
2722
|
+
return 'మధ్యాహ్నం';
|
|
2723
|
+
} else if (hour < 20) {
|
|
2724
|
+
return 'సాయంత్రం';
|
|
2725
|
+
} else {
|
|
2726
|
+
return 'రాత్రి';
|
|
2727
|
+
}
|
|
2728
|
+
},
|
|
2729
|
+
week: {
|
|
2730
|
+
dow: 0,
|
|
2731
|
+
// Sunday is the first day of the week.
|
|
2732
|
+
doy: 6 // The week that contains Jan 6th is the first week of the year.
|
|
2733
|
+
}
|
|
2734
|
+
});
|
|
2735
|
+
return te;
|
|
2736
|
+
});
|
|
2737
|
+
|
|
2738
|
+
/***/ }),
|
|
2739
|
+
|
|
2646
2740
|
/***/ 851:
|
|
2647
2741
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
2648
2742
|
|
|
@@ -17356,100 +17450,6 @@ module.exports = function (key) {
|
|
|
17356
17450
|
|
|
17357
17451
|
/***/ }),
|
|
17358
17452
|
|
|
17359
|
-
/***/ 3196:
|
|
17360
|
-
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
17361
|
-
|
|
17362
|
-
//! moment.js locale configuration
|
|
17363
|
-
//! locale : Telugu [te]
|
|
17364
|
-
//! author : Krishna Chaitanya Thota : https://github.com/kcthota
|
|
17365
|
-
|
|
17366
|
-
;
|
|
17367
|
-
(function (global, factory) {
|
|
17368
|
-
true ? factory(__webpack_require__(9618)) : 0;
|
|
17369
|
-
})(this, function (moment) {
|
|
17370
|
-
'use strict';
|
|
17371
|
-
|
|
17372
|
-
//! moment.js locale configuration
|
|
17373
|
-
var te = moment.defineLocale('te', {
|
|
17374
|
-
months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
|
|
17375
|
-
monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),
|
|
17376
|
-
monthsParseExact: true,
|
|
17377
|
-
weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
|
|
17378
|
-
weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
|
|
17379
|
-
weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
|
|
17380
|
-
longDateFormat: {
|
|
17381
|
-
LT: 'A h:mm',
|
|
17382
|
-
LTS: 'A h:mm:ss',
|
|
17383
|
-
L: 'DD/MM/YYYY',
|
|
17384
|
-
LL: 'D MMMM YYYY',
|
|
17385
|
-
LLL: 'D MMMM YYYY, A h:mm',
|
|
17386
|
-
LLLL: 'dddd, D MMMM YYYY, A h:mm'
|
|
17387
|
-
},
|
|
17388
|
-
calendar: {
|
|
17389
|
-
sameDay: '[నేడు] LT',
|
|
17390
|
-
nextDay: '[రేపు] LT',
|
|
17391
|
-
nextWeek: 'dddd, LT',
|
|
17392
|
-
lastDay: '[నిన్న] LT',
|
|
17393
|
-
lastWeek: '[గత] dddd, LT',
|
|
17394
|
-
sameElse: 'L'
|
|
17395
|
-
},
|
|
17396
|
-
relativeTime: {
|
|
17397
|
-
future: '%s లో',
|
|
17398
|
-
past: '%s క్రితం',
|
|
17399
|
-
s: 'కొన్ని క్షణాలు',
|
|
17400
|
-
ss: '%d సెకన్లు',
|
|
17401
|
-
m: 'ఒక నిమిషం',
|
|
17402
|
-
mm: '%d నిమిషాలు',
|
|
17403
|
-
h: 'ఒక గంట',
|
|
17404
|
-
hh: '%d గంటలు',
|
|
17405
|
-
d: 'ఒక రోజు',
|
|
17406
|
-
dd: '%d రోజులు',
|
|
17407
|
-
M: 'ఒక నెల',
|
|
17408
|
-
MM: '%d నెలలు',
|
|
17409
|
-
y: 'ఒక సంవత్సరం',
|
|
17410
|
-
yy: '%d సంవత్సరాలు'
|
|
17411
|
-
},
|
|
17412
|
-
dayOfMonthOrdinalParse: /\d{1,2}వ/,
|
|
17413
|
-
ordinal: '%dవ',
|
|
17414
|
-
meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
|
|
17415
|
-
meridiemHour: function (hour, meridiem) {
|
|
17416
|
-
if (hour === 12) {
|
|
17417
|
-
hour = 0;
|
|
17418
|
-
}
|
|
17419
|
-
if (meridiem === 'రాత్రి') {
|
|
17420
|
-
return hour < 4 ? hour : hour + 12;
|
|
17421
|
-
} else if (meridiem === 'ఉదయం') {
|
|
17422
|
-
return hour;
|
|
17423
|
-
} else if (meridiem === 'మధ్యాహ్నం') {
|
|
17424
|
-
return hour >= 10 ? hour : hour + 12;
|
|
17425
|
-
} else if (meridiem === 'సాయంత్రం') {
|
|
17426
|
-
return hour + 12;
|
|
17427
|
-
}
|
|
17428
|
-
},
|
|
17429
|
-
meridiem: function (hour, minute, isLower) {
|
|
17430
|
-
if (hour < 4) {
|
|
17431
|
-
return 'రాత్రి';
|
|
17432
|
-
} else if (hour < 10) {
|
|
17433
|
-
return 'ఉదయం';
|
|
17434
|
-
} else if (hour < 17) {
|
|
17435
|
-
return 'మధ్యాహ్నం';
|
|
17436
|
-
} else if (hour < 20) {
|
|
17437
|
-
return 'సాయంత్రం';
|
|
17438
|
-
} else {
|
|
17439
|
-
return 'రాత్రి';
|
|
17440
|
-
}
|
|
17441
|
-
},
|
|
17442
|
-
week: {
|
|
17443
|
-
dow: 0,
|
|
17444
|
-
// Sunday is the first day of the week.
|
|
17445
|
-
doy: 6 // The week that contains Jan 6th is the first week of the year.
|
|
17446
|
-
}
|
|
17447
|
-
});
|
|
17448
|
-
return te;
|
|
17449
|
-
});
|
|
17450
|
-
|
|
17451
|
-
/***/ }),
|
|
17452
|
-
|
|
17453
17453
|
/***/ 3210:
|
|
17454
17454
|
/***/ (function(__unused_webpack_module, exports) {
|
|
17455
17455
|
|
|
@@ -31254,8 +31254,8 @@ var map = {
|
|
|
31254
31254
|
"./sw.js": 4585,
|
|
31255
31255
|
"./ta": 3824,
|
|
31256
31256
|
"./ta.js": 3824,
|
|
31257
|
-
"./te":
|
|
31258
|
-
"./te.js":
|
|
31257
|
+
"./te": 815,
|
|
31258
|
+
"./te.js": 815,
|
|
31259
31259
|
"./tet": 7914,
|
|
31260
31260
|
"./tet.js": 7914,
|
|
31261
31261
|
"./tg": 9430,
|
|
@@ -60516,6 +60516,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
60516
60516
|
ByCommonSelector: function() { return /* reexport */ ByCommonSelector; },
|
|
60517
60517
|
ByCustomDatePicker: function() { return /* reexport */ custom_date_picker; },
|
|
60518
60518
|
ByDatePickerRange: function() { return /* reexport */ date_picker_range; },
|
|
60519
|
+
ByDialog: function() { return /* reexport */ ByDialog; },
|
|
60520
|
+
ByDialogService: function() { return /* reexport */ by_dialog_ByDialogService; },
|
|
60519
60521
|
ByFoldSearch: function() { return /* reexport */ fold_search; },
|
|
60520
60522
|
ByForm: function() { return /* reexport */ form_form; },
|
|
60521
60523
|
ByPageSearch: function() { return /* reexport */ page_search; },
|
|
@@ -76940,6 +76942,181 @@ var ByTreeSearch_component = normalizeComponent(
|
|
|
76940
76942
|
)
|
|
76941
76943
|
|
|
76942
76944
|
/* harmony default export */ var ByTreeSearch = (ByTreeSearch_component.exports);
|
|
76945
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=template&id=626ef2a2
|
|
76946
|
+
var ByDialogvue_type_template_id_626ef2a2_render = function render() {
|
|
76947
|
+
var _vm = this,
|
|
76948
|
+
_c = _vm._self._c;
|
|
76949
|
+
return _c('el-dialog', _vm._g(_vm._b({
|
|
76950
|
+
class: ['by-dialog', _vm.customClass],
|
|
76951
|
+
attrs: {
|
|
76952
|
+
"visible": _vm.visible,
|
|
76953
|
+
"title": _vm.title
|
|
76954
|
+
},
|
|
76955
|
+
on: {
|
|
76956
|
+
"update:visible": function ($event) {
|
|
76957
|
+
_vm.visible = $event;
|
|
76958
|
+
},
|
|
76959
|
+
"close": _vm.handleClose
|
|
76960
|
+
}
|
|
76961
|
+
}, 'el-dialog', _vm.dialogAttrs, false), _vm.$listeners), [_c('div', {
|
|
76962
|
+
staticClass: "by-dialog__body"
|
|
76963
|
+
}, [_vm._t("default", function () {
|
|
76964
|
+
return [_vm.content ? _c('div', {
|
|
76965
|
+
staticClass: "by-dialog__content"
|
|
76966
|
+
}, [_vm._v(_vm._s(_vm.content))]) : _vm._e()];
|
|
76967
|
+
})], 2), _vm.showFooter ? _c('div', {
|
|
76968
|
+
staticClass: "by-dialog__footer"
|
|
76969
|
+
}, [_vm._t("footer", function () {
|
|
76970
|
+
return [_c('div', {
|
|
76971
|
+
staticClass: "by-dialog__buttons"
|
|
76972
|
+
}, _vm._l(_vm.buttons, function (button, index) {
|
|
76973
|
+
return _c('el-button', {
|
|
76974
|
+
key: index,
|
|
76975
|
+
class: button.class,
|
|
76976
|
+
style: button.style,
|
|
76977
|
+
attrs: {
|
|
76978
|
+
"type": button.type || 'default',
|
|
76979
|
+
"size": button.size || 'small',
|
|
76980
|
+
"loading": button.loading,
|
|
76981
|
+
"disabled": button.disabled,
|
|
76982
|
+
"icon": button.icon
|
|
76983
|
+
},
|
|
76984
|
+
on: {
|
|
76985
|
+
"click": function ($event) {
|
|
76986
|
+
return _vm.handleButtonClick(button, index);
|
|
76987
|
+
}
|
|
76988
|
+
}
|
|
76989
|
+
}, [_vm._v(" " + _vm._s(button.text) + " ")]);
|
|
76990
|
+
}), 1)];
|
|
76991
|
+
})], 2) : _vm._e()]);
|
|
76992
|
+
};
|
|
76993
|
+
var ByDialogvue_type_template_id_626ef2a2_staticRenderFns = [];
|
|
76994
|
+
|
|
76995
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=script&lang=js
|
|
76996
|
+
/* harmony default export */ var ByDialogvue_type_script_lang_js = ({
|
|
76997
|
+
name: 'ByDialog',
|
|
76998
|
+
inheritAttrs: false,
|
|
76999
|
+
props: {
|
|
77000
|
+
// 是否显示弹窗
|
|
77001
|
+
visible: {
|
|
77002
|
+
type: Boolean,
|
|
77003
|
+
default: false
|
|
77004
|
+
},
|
|
77005
|
+
width: {
|
|
77006
|
+
type: String,
|
|
77007
|
+
default: '600px'
|
|
77008
|
+
},
|
|
77009
|
+
// 标题
|
|
77010
|
+
title: {
|
|
77011
|
+
type: String,
|
|
77012
|
+
default: ''
|
|
77013
|
+
},
|
|
77014
|
+
// 内容(当没有插槽时使用)
|
|
77015
|
+
content: {
|
|
77016
|
+
type: String,
|
|
77017
|
+
default: ''
|
|
77018
|
+
},
|
|
77019
|
+
// 是否显示底部按钮区域
|
|
77020
|
+
showFooter: {
|
|
77021
|
+
type: Boolean,
|
|
77022
|
+
default: true
|
|
77023
|
+
},
|
|
77024
|
+
// 是否点击模态层关闭弹窗
|
|
77025
|
+
closeOnClickModal: {
|
|
77026
|
+
type: Boolean,
|
|
77027
|
+
default: false
|
|
77028
|
+
},
|
|
77029
|
+
// 按钮配置
|
|
77030
|
+
buttons: {
|
|
77031
|
+
type: Array,
|
|
77032
|
+
default() {
|
|
77033
|
+
return [{
|
|
77034
|
+
text: '取消',
|
|
77035
|
+
type: 'default',
|
|
77036
|
+
action: 'cancel'
|
|
77037
|
+
}, {
|
|
77038
|
+
text: '确定',
|
|
77039
|
+
type: 'primary',
|
|
77040
|
+
action: 'confirm'
|
|
77041
|
+
}];
|
|
77042
|
+
}
|
|
77043
|
+
},
|
|
77044
|
+
// 自定义类名
|
|
77045
|
+
customClass: {
|
|
77046
|
+
type: String,
|
|
77047
|
+
default: ''
|
|
77048
|
+
}
|
|
77049
|
+
},
|
|
77050
|
+
computed: {
|
|
77051
|
+
dialogAttrs() {
|
|
77052
|
+
const {
|
|
77053
|
+
visible,
|
|
77054
|
+
content,
|
|
77055
|
+
showFooter,
|
|
77056
|
+
buttons,
|
|
77057
|
+
customClass,
|
|
77058
|
+
closeOnClickModal,
|
|
77059
|
+
...attrs
|
|
77060
|
+
} = this.$attrs;
|
|
77061
|
+
return {
|
|
77062
|
+
width: this.width,
|
|
77063
|
+
top: '15vh',
|
|
77064
|
+
closeOnClickModal: this.closeOnClickModal,
|
|
77065
|
+
...attrs
|
|
77066
|
+
};
|
|
77067
|
+
}
|
|
77068
|
+
},
|
|
77069
|
+
methods: {
|
|
77070
|
+
handleClose() {
|
|
77071
|
+
this.$emit('close');
|
|
77072
|
+
},
|
|
77073
|
+
handleButtonClick(button, index) {
|
|
77074
|
+
const {
|
|
77075
|
+
action,
|
|
77076
|
+
callback
|
|
77077
|
+
} = button;
|
|
77078
|
+
if (callback && typeof callback === 'function') {
|
|
77079
|
+
const result = callback();
|
|
77080
|
+
if (result === false) {
|
|
77081
|
+
return; // 阻止默认行为
|
|
77082
|
+
}
|
|
77083
|
+
}
|
|
77084
|
+
if (action) {
|
|
77085
|
+
this.$emit(action, button, index);
|
|
77086
|
+
}
|
|
77087
|
+
|
|
77088
|
+
// 如果是确认或取消按钮,默认关闭弹窗
|
|
77089
|
+
if (action === 'confirm' || action === 'cancel') {
|
|
77090
|
+
this.$emit('update:visible', false);
|
|
77091
|
+
}
|
|
77092
|
+
}
|
|
77093
|
+
}
|
|
77094
|
+
});
|
|
77095
|
+
;// ./src/components/by-dialog/ByDialog.vue?vue&type=script&lang=js
|
|
77096
|
+
/* harmony default export */ var by_dialog_ByDialogvue_type_script_lang_js = (ByDialogvue_type_script_lang_js);
|
|
77097
|
+
;// ./src/components/by-dialog/ByDialog.vue
|
|
77098
|
+
|
|
77099
|
+
|
|
77100
|
+
|
|
77101
|
+
|
|
77102
|
+
|
|
77103
|
+
/* normalize component */
|
|
77104
|
+
;
|
|
77105
|
+
var ByDialog_component = normalizeComponent(
|
|
77106
|
+
by_dialog_ByDialogvue_type_script_lang_js,
|
|
77107
|
+
ByDialogvue_type_template_id_626ef2a2_render,
|
|
77108
|
+
ByDialogvue_type_template_id_626ef2a2_staticRenderFns,
|
|
77109
|
+
false,
|
|
77110
|
+
null,
|
|
77111
|
+
null,
|
|
77112
|
+
null
|
|
77113
|
+
|
|
77114
|
+
)
|
|
77115
|
+
|
|
77116
|
+
/* harmony default export */ var ByDialog = (ByDialog_component.exports);
|
|
77117
|
+
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
77118
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(9274);
|
|
77119
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
76943
77120
|
;// ./node_modules/dom-zindex/es/index.esm.js
|
|
76944
77121
|
var winDom = null;
|
|
76945
77122
|
var bodyEl = null;
|
|
@@ -77097,6 +77274,230 @@ var DomZIndex = {
|
|
|
77097
77274
|
};
|
|
77098
77275
|
updateVar();
|
|
77099
77276
|
/* harmony default export */ var index_esm = (DomZIndex);
|
|
77277
|
+
;// ./src/components/by-dialog/ByDialogService.js
|
|
77278
|
+
|
|
77279
|
+
|
|
77280
|
+
/**
|
|
77281
|
+
* @title
|
|
77282
|
+
* @description ByDialogService - 弹窗服务
|
|
77283
|
+
* @date 2025-09-02
|
|
77284
|
+
* @author heqican
|
|
77285
|
+
*
|
|
77286
|
+
* 提供两种使用方式:
|
|
77287
|
+
* 1. 模板中使用 <by-dialog> 组件
|
|
77288
|
+
* 2. JavaScript 中调用 this.$byDialog.xxx() 方法
|
|
77289
|
+
*
|
|
77290
|
+
* 安装:Vue.use(ByComponents) // 会自动安装
|
|
77291
|
+
*
|
|
77292
|
+
* 使用示例:
|
|
77293
|
+
* this.$byDialog.alert('提示内容')
|
|
77294
|
+
* this.$byDialog.confirm('确定要删除吗?')
|
|
77295
|
+
* this.$byDialog.alert('内容', '标题', { width: '500px' })
|
|
77296
|
+
*
|
|
77297
|
+
* API 方法:
|
|
77298
|
+
* - alert(content, title, options) - 警告弹窗
|
|
77299
|
+
* - confirm(content, title, options) - 确认弹窗
|
|
77300
|
+
* - success(content, title, options) - 成功提示弹窗
|
|
77301
|
+
* - error(content, title, options) - 错误提示弹窗
|
|
77302
|
+
* - info(content, title, options) - 信息提示弹窗
|
|
77303
|
+
* - custom(options) - 自定义弹窗
|
|
77304
|
+
*
|
|
77305
|
+
* 注意:所有方法都返回 Promise
|
|
77306
|
+
*
|
|
77307
|
+
*/
|
|
77308
|
+
|
|
77309
|
+
|
|
77310
|
+
|
|
77311
|
+
|
|
77312
|
+
|
|
77313
|
+
// 创建 ByDialog 构造函数
|
|
77314
|
+
const DialogConstructor = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend(ByDialog);
|
|
77315
|
+
const defaultOptions = {
|
|
77316
|
+
title: '',
|
|
77317
|
+
content: '',
|
|
77318
|
+
width: '400px',
|
|
77319
|
+
top: '15vh',
|
|
77320
|
+
modal: true,
|
|
77321
|
+
lockScroll: true,
|
|
77322
|
+
closeOnClickModal: false,
|
|
77323
|
+
closeOnPressEscape: true,
|
|
77324
|
+
showClose: true,
|
|
77325
|
+
center: false,
|
|
77326
|
+
customClass: '',
|
|
77327
|
+
showFooter: true,
|
|
77328
|
+
buttons: []
|
|
77329
|
+
};
|
|
77330
|
+
|
|
77331
|
+
// 创建弹窗实例
|
|
77332
|
+
function createMessageBox(options) {
|
|
77333
|
+
const instance = new DialogConstructor({
|
|
77334
|
+
propsData: {
|
|
77335
|
+
...defaultOptions,
|
|
77336
|
+
...options,
|
|
77337
|
+
visible: true
|
|
77338
|
+
}
|
|
77339
|
+
});
|
|
77340
|
+
|
|
77341
|
+
// 设置 z-index
|
|
77342
|
+
instance.$mount();
|
|
77343
|
+
const zIndex = index_esm.getNext();
|
|
77344
|
+
instance.$el.style.zIndex = zIndex;
|
|
77345
|
+
|
|
77346
|
+
// 添加到 body
|
|
77347
|
+
document.body.appendChild(instance.$el);
|
|
77348
|
+
return instance;
|
|
77349
|
+
}
|
|
77350
|
+
|
|
77351
|
+
// 销毁弹窗实例
|
|
77352
|
+
function destroyMessageBox(instance) {
|
|
77353
|
+
if (instance && instance.$el && instance.$el.parentNode) {
|
|
77354
|
+
instance.$el.parentNode.removeChild(instance.$el);
|
|
77355
|
+
instance.$destroy();
|
|
77356
|
+
}
|
|
77357
|
+
}
|
|
77358
|
+
|
|
77359
|
+
// 通用弹窗方法
|
|
77360
|
+
function showMessageBox(options) {
|
|
77361
|
+
return new Promise((resolve, reject) => {
|
|
77362
|
+
const instance = createMessageBox(options);
|
|
77363
|
+
|
|
77364
|
+
// 监听按钮点击事件
|
|
77365
|
+
instance.$on('confirm', (button, index) => {
|
|
77366
|
+
destroyMessageBox(instance);
|
|
77367
|
+
resolve({
|
|
77368
|
+
action: 'confirm',
|
|
77369
|
+
button,
|
|
77370
|
+
index
|
|
77371
|
+
});
|
|
77372
|
+
});
|
|
77373
|
+
instance.$on('cancel', (button, index) => {
|
|
77374
|
+
destroyMessageBox(instance);
|
|
77375
|
+
resolve({
|
|
77376
|
+
action: 'cancel',
|
|
77377
|
+
button,
|
|
77378
|
+
index
|
|
77379
|
+
});
|
|
77380
|
+
});
|
|
77381
|
+
instance.$on('close', () => {
|
|
77382
|
+
destroyMessageBox(instance);
|
|
77383
|
+
resolve({
|
|
77384
|
+
action: 'close'
|
|
77385
|
+
});
|
|
77386
|
+
});
|
|
77387
|
+
|
|
77388
|
+
// 监听其他自定义按钮事件
|
|
77389
|
+
if (options.buttons) {
|
|
77390
|
+
options.buttons.forEach((button, index) => {
|
|
77391
|
+
if (button.action && button.action !== 'confirm' && button.action !== 'cancel') {
|
|
77392
|
+
instance.$on(button.action, (btn, btnIndex) => {
|
|
77393
|
+
destroyMessageBox(instance);
|
|
77394
|
+
resolve({
|
|
77395
|
+
action: button.action,
|
|
77396
|
+
button: btn,
|
|
77397
|
+
index: btnIndex
|
|
77398
|
+
});
|
|
77399
|
+
});
|
|
77400
|
+
}
|
|
77401
|
+
});
|
|
77402
|
+
}
|
|
77403
|
+
});
|
|
77404
|
+
}
|
|
77405
|
+
|
|
77406
|
+
// 警告弹窗
|
|
77407
|
+
function ByDialogService_alert(content, title = '提示', options = {}) {
|
|
77408
|
+
return showMessageBox({
|
|
77409
|
+
title,
|
|
77410
|
+
content,
|
|
77411
|
+
buttons: [{
|
|
77412
|
+
text: '确定',
|
|
77413
|
+
type: 'primary',
|
|
77414
|
+
action: 'confirm'
|
|
77415
|
+
}],
|
|
77416
|
+
...options
|
|
77417
|
+
});
|
|
77418
|
+
}
|
|
77419
|
+
|
|
77420
|
+
// 确认弹窗
|
|
77421
|
+
function ByDialogService_confirm(content, title = '确认', options = {}) {
|
|
77422
|
+
return showMessageBox({
|
|
77423
|
+
title,
|
|
77424
|
+
content,
|
|
77425
|
+
buttons: [{
|
|
77426
|
+
text: '取消',
|
|
77427
|
+
type: 'default',
|
|
77428
|
+
action: 'cancel'
|
|
77429
|
+
}, {
|
|
77430
|
+
text: '确定',
|
|
77431
|
+
type: 'primary',
|
|
77432
|
+
action: 'confirm'
|
|
77433
|
+
}],
|
|
77434
|
+
...options
|
|
77435
|
+
});
|
|
77436
|
+
}
|
|
77437
|
+
|
|
77438
|
+
// 成功提示弹窗
|
|
77439
|
+
function success(content, title = '成功', options = {}) {
|
|
77440
|
+
return showMessageBox({
|
|
77441
|
+
title,
|
|
77442
|
+
content,
|
|
77443
|
+
buttons: [{
|
|
77444
|
+
text: '确定',
|
|
77445
|
+
type: 'primary',
|
|
77446
|
+
action: 'confirm'
|
|
77447
|
+
}],
|
|
77448
|
+
...options
|
|
77449
|
+
});
|
|
77450
|
+
}
|
|
77451
|
+
|
|
77452
|
+
// 错误提示弹窗
|
|
77453
|
+
function error(content, title = '错误', options = {}) {
|
|
77454
|
+
return showMessageBox({
|
|
77455
|
+
title,
|
|
77456
|
+
content,
|
|
77457
|
+
buttons: [{
|
|
77458
|
+
text: '确定',
|
|
77459
|
+
type: 'primary',
|
|
77460
|
+
action: 'confirm'
|
|
77461
|
+
}],
|
|
77462
|
+
...options
|
|
77463
|
+
});
|
|
77464
|
+
}
|
|
77465
|
+
|
|
77466
|
+
// 信息提示弹窗
|
|
77467
|
+
function info(content, title = '信息', options = {}) {
|
|
77468
|
+
return showMessageBox({
|
|
77469
|
+
title,
|
|
77470
|
+
content,
|
|
77471
|
+
buttons: [{
|
|
77472
|
+
text: '确定',
|
|
77473
|
+
type: 'primary',
|
|
77474
|
+
action: 'confirm'
|
|
77475
|
+
}],
|
|
77476
|
+
...options
|
|
77477
|
+
});
|
|
77478
|
+
}
|
|
77479
|
+
|
|
77480
|
+
// 自定义弹窗
|
|
77481
|
+
function custom(options) {
|
|
77482
|
+
return showMessageBox(options);
|
|
77483
|
+
}
|
|
77484
|
+
|
|
77485
|
+
// 创建 ByDialogService 对象
|
|
77486
|
+
const ByDialogService = {
|
|
77487
|
+
alert: ByDialogService_alert,
|
|
77488
|
+
confirm: ByDialogService_confirm,
|
|
77489
|
+
success,
|
|
77490
|
+
error,
|
|
77491
|
+
info,
|
|
77492
|
+
custom,
|
|
77493
|
+
show: showMessageBox
|
|
77494
|
+
};
|
|
77495
|
+
|
|
77496
|
+
// 原型注入$byDialog,使得能够使用this.$byDialog.xxx()
|
|
77497
|
+
ByDialogService.install = function (Vue) {
|
|
77498
|
+
Vue.prototype.$byDialog = ByDialogService;
|
|
77499
|
+
};
|
|
77500
|
+
/* harmony default export */ var by_dialog_ByDialogService = (ByDialogService);
|
|
77100
77501
|
;// ./src/index.js
|
|
77101
77502
|
|
|
77102
77503
|
|
|
@@ -77114,6 +77515,8 @@ updateVar();
|
|
|
77114
77515
|
|
|
77115
77516
|
|
|
77116
77517
|
|
|
77518
|
+
|
|
77519
|
+
|
|
77117
77520
|
const components = {
|
|
77118
77521
|
ByPager: pager,
|
|
77119
77522
|
ByTable: table,
|
|
@@ -77126,7 +77529,8 @@ const components = {
|
|
|
77126
77529
|
ByToolBar: ByToolBar,
|
|
77127
77530
|
ByCommonSelector: ByCommonSelector,
|
|
77128
77531
|
ByBatchQuerySelector: BatchQuerySelector,
|
|
77129
|
-
ByTreeSearch: ByTreeSearch
|
|
77532
|
+
ByTreeSearch: ByTreeSearch,
|
|
77533
|
+
ByDialog: ByDialog
|
|
77130
77534
|
};
|
|
77131
77535
|
|
|
77132
77536
|
// 设置当前 z-index 起始值
|
|
@@ -77137,6 +77541,9 @@ const install = Vue => {
|
|
|
77137
77541
|
// 同时注册小写版本
|
|
77138
77542
|
Vue.component(name.toLowerCase(), components[name]);
|
|
77139
77543
|
});
|
|
77544
|
+
|
|
77545
|
+
// 安装 ByDialogService 插件
|
|
77546
|
+
Vue.use(by_dialog_ByDialogService);
|
|
77140
77547
|
};
|
|
77141
77548
|
|
|
77142
77549
|
// 支持直接通过 script 标签引入
|