bkui-vue 1.0.3-beta.65.dialog.1 → 1.0.3-beta.66.dialog.1
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/index.cjs.js +33 -33
- package/dist/index.esm.js +10103 -10078
- package/dist/index.umd.js +31 -31
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/checkbox/index.js +4 -4
- package/lib/dialog/dialog.css +1 -12
- package/lib/dialog/dialog.d.ts +1 -22
- package/lib/dialog/dialog.less +2 -14
- package/lib/dialog/dialog.variable.css +1 -12
- package/lib/dialog/index.d.ts +3 -66
- package/lib/dialog/index.js +152 -158
- package/lib/form/index.js +3 -1
- package/lib/modal/hooks.d.ts +1 -1
- package/lib/modal/index.d.ts +3 -57
- package/lib/modal/index.js +66 -79
- package/lib/modal/modal.css +1 -2
- package/lib/modal/modal.d.ts +1 -19
- package/lib/modal/modal.less +1 -2
- package/lib/modal/modal.variable.css +1 -2
- package/lib/radio/index.js +5 -5
- package/lib/scrollbar/index.d.ts +2 -1
- package/lib/scrollbar/index.js +28 -12
- package/lib/scrollbar/scrollbar-core/index.d.ts +6 -2
- package/lib/search-select/index.d.ts +54 -10
- package/lib/search-select/index.js +119 -63
- package/lib/search-select/input.d.ts +8 -4
- package/lib/search-select/search-select.d.ts +22 -5
- package/lib/search-select/selected.d.ts +11 -3
- package/lib/search-select/utils.d.ts +7 -6
- package/lib/select/index.d.ts +33 -0
- package/lib/select/index.js +5 -2
- package/lib/select/select.css +19 -5
- package/lib/select/select.d.ts +11 -0
- package/lib/select/select.less +26 -6
- package/lib/select/select.variable.css +19 -5
- package/lib/select/selectTagInput.d.ts +7 -0
- package/lib/sideslider/index.js +22 -11
- package/lib/sideslider/sideslider.css +13 -44
- package/lib/sideslider/sideslider.less +14 -49
- package/lib/sideslider/sideslider.variable.css +13 -44
- package/lib/table/index.js +11 -5
- package/lib/virtual-render/index.js +24 -16
- package/lib/virtual-render/use-scrollbar.d.ts +1 -0
- package/package.json +1 -1
package/lib/checkbox/index.js
CHANGED
@@ -340,10 +340,10 @@ var useCheckbox = function useCheckbox() {
|
|
340
340
|
|
341
341
|
|
342
342
|
var checkboxProps = {
|
343
|
-
modelValue: shared_namespaceObject.PropTypes.oneOfType([
|
344
|
-
label: shared_namespaceObject.PropTypes.oneOfType([
|
345
|
-
trueLabel: shared_namespaceObject.PropTypes.oneOfType([
|
346
|
-
falseLabel: shared_namespaceObject.PropTypes.oneOfType([
|
343
|
+
modelValue: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]),
|
344
|
+
label: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]),
|
345
|
+
trueLabel: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def(true),
|
346
|
+
falseLabel: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def(false),
|
347
347
|
disabled: shared_namespaceObject.PropTypes.bool.def(false),
|
348
348
|
checked: shared_namespaceObject.PropTypes.bool.def(false),
|
349
349
|
indeterminate: shared_namespaceObject.PropTypes.bool,
|
package/lib/dialog/dialog.css
CHANGED
@@ -67,7 +67,7 @@
|
|
67
67
|
.bk-infobox-footer .bk-button ~ .bk-button {
|
68
68
|
margin-left: 8px;
|
69
69
|
}
|
70
|
-
.bk-modal-
|
70
|
+
.bk-modal-mask {
|
71
71
|
position: fixed;
|
72
72
|
top: 0;
|
73
73
|
left: 0;
|
@@ -77,7 +77,6 @@
|
|
77
77
|
}
|
78
78
|
.bk-modal-wrapper {
|
79
79
|
position: fixed;
|
80
|
-
border-radius: 2px;
|
81
80
|
}
|
82
81
|
.bk-modal-body {
|
83
82
|
height: 100%;
|
@@ -194,15 +193,11 @@
|
|
194
193
|
.bk-dialog-header {
|
195
194
|
padding: 16px 24px 0;
|
196
195
|
font-size: 20px;
|
197
|
-
line-height: 1;
|
198
196
|
}
|
199
197
|
.bk-dialog-title {
|
200
198
|
display: inline-block;
|
201
199
|
width: 100%;
|
202
|
-
overflow: hidden;
|
203
200
|
color: #313238;
|
204
|
-
text-overflow: ellipsis;
|
205
|
-
white-space: nowrap;
|
206
201
|
}
|
207
202
|
.bk-dialog-tool {
|
208
203
|
position: absolute;
|
@@ -210,16 +205,10 @@
|
|
210
205
|
right: 0;
|
211
206
|
left: 0;
|
212
207
|
height: 18px;
|
213
|
-
}
|
214
|
-
.bk-dialog-tool.is-draggable {
|
215
208
|
cursor: move;
|
216
209
|
user-select: none;
|
217
210
|
}
|
218
|
-
.bk-dialog-tool.is-dragging {
|
219
|
-
user-select: none;
|
220
|
-
}
|
221
211
|
.bk-dialog-content {
|
222
|
-
max-height: calc(100vh - 300px);
|
223
212
|
padding: 0 24px;
|
224
213
|
margin-top: 16px;
|
225
214
|
margin-bottom: 24px;
|
package/lib/dialog/dialog.d.ts
CHANGED
@@ -94,28 +94,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
94
94
|
top: import("vue-types").VueTypeValidableDef<string> & {
|
95
95
|
default: string;
|
96
96
|
};
|
97
|
-
}, {
|
98
|
-
data: {
|
99
|
-
positionX: number;
|
100
|
-
positionY: number;
|
101
|
-
moveStyle: {
|
102
|
-
top: string;
|
103
|
-
left: string;
|
104
|
-
};
|
105
|
-
};
|
106
|
-
localConfirmText: import("vue").ComputedRef<string>;
|
107
|
-
localCancelText: import("vue").ComputedRef<string>;
|
108
|
-
localPrevText: import("vue").ComputedRef<string>;
|
109
|
-
localNextText: import("vue").ComputedRef<string>;
|
110
|
-
resolveClassName: (cls: string) => string;
|
111
|
-
handleHidden: () => void;
|
112
|
-
handleShown: () => void;
|
113
|
-
handleClose: () => Promise<void>;
|
114
|
-
handleConfirm: () => void;
|
115
|
-
handleMousedown: (e: any) => boolean;
|
116
|
-
handlePrevStep: () => void;
|
117
|
-
handleNextStep: () => void;
|
118
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
97
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
119
98
|
closed: () => true;
|
120
99
|
shown: () => true;
|
121
100
|
hidden: () => true;
|
package/lib/dialog/dialog.less
CHANGED
@@ -25,16 +25,12 @@
|
|
25
25
|
.@{bk-prefix}-dialog-header {
|
26
26
|
padding: 16px 24px 0;
|
27
27
|
font-size: 20px;
|
28
|
-
line-height: 1;
|
29
28
|
}
|
30
29
|
|
31
30
|
.@{bk-prefix}-dialog-title {
|
32
31
|
display: inline-block;
|
33
32
|
width: 100%;
|
34
|
-
overflow: hidden;
|
35
33
|
color: @table-head-font-color;
|
36
|
-
text-overflow: ellipsis;
|
37
|
-
white-space: nowrap;
|
38
34
|
}
|
39
35
|
|
40
36
|
.@{bk-prefix}-dialog-tool {
|
@@ -43,19 +39,11 @@
|
|
43
39
|
right: 0;
|
44
40
|
left: 0;
|
45
41
|
height: 18px;
|
46
|
-
|
47
|
-
|
48
|
-
cursor: move;
|
49
|
-
user-select: none;
|
50
|
-
}
|
51
|
-
|
52
|
-
&.is-dragging {
|
53
|
-
user-select: none;
|
54
|
-
}
|
42
|
+
cursor: move;
|
43
|
+
user-select: none;
|
55
44
|
}
|
56
45
|
|
57
46
|
.@{bk-prefix}-dialog-content {
|
58
|
-
max-height: calc(100vh - 300px);
|
59
47
|
padding: 0 24px;
|
60
48
|
margin-top: 16px;
|
61
49
|
margin-bottom: 24px;
|
@@ -196,7 +196,7 @@
|
|
196
196
|
.bk-infobox-footer .bk-button ~ .bk-button {
|
197
197
|
margin-left: 8px;
|
198
198
|
}
|
199
|
-
.bk-modal-
|
199
|
+
.bk-modal-mask {
|
200
200
|
position: fixed;
|
201
201
|
top: 0;
|
202
202
|
left: 0;
|
@@ -206,7 +206,6 @@
|
|
206
206
|
}
|
207
207
|
.bk-modal-wrapper {
|
208
208
|
position: fixed;
|
209
|
-
border-radius: 2px;
|
210
209
|
}
|
211
210
|
.bk-modal-body {
|
212
211
|
height: 100%;
|
@@ -323,15 +322,11 @@
|
|
323
322
|
.bk-dialog-header {
|
324
323
|
padding: 16px 24px 0;
|
325
324
|
font-size: 20px;
|
326
|
-
line-height: 1;
|
327
325
|
}
|
328
326
|
.bk-dialog-title {
|
329
327
|
display: inline-block;
|
330
328
|
width: 100%;
|
331
|
-
overflow: hidden;
|
332
329
|
color: #313238;
|
333
|
-
text-overflow: ellipsis;
|
334
|
-
white-space: nowrap;
|
335
330
|
}
|
336
331
|
.bk-dialog-tool {
|
337
332
|
position: absolute;
|
@@ -339,16 +334,10 @@
|
|
339
334
|
right: 0;
|
340
335
|
left: 0;
|
341
336
|
height: 18px;
|
342
|
-
}
|
343
|
-
.bk-dialog-tool.is-draggable {
|
344
337
|
cursor: move;
|
345
338
|
user-select: none;
|
346
339
|
}
|
347
|
-
.bk-dialog-tool.is-dragging {
|
348
|
-
user-select: none;
|
349
|
-
}
|
350
340
|
.bk-dialog-content {
|
351
|
-
max-height: calc(100vh - 300px);
|
352
341
|
padding: 0 24px;
|
353
342
|
margin-top: 16px;
|
354
343
|
margin-bottom: 24px;
|
package/lib/dialog/index.d.ts
CHANGED
@@ -103,28 +103,7 @@ declare const BkDialog: {
|
|
103
103
|
onNext?: () => any;
|
104
104
|
onClosed?: () => any;
|
105
105
|
"onUpdate:isShow"?: (value: boolean) => any;
|
106
|
-
}, {
|
107
|
-
data: {
|
108
|
-
positionX: number;
|
109
|
-
positionY: number;
|
110
|
-
moveStyle: {
|
111
|
-
top: string;
|
112
|
-
left: string;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
localConfirmText: import("vue").ComputedRef<string>;
|
116
|
-
localCancelText: import("vue").ComputedRef<string>;
|
117
|
-
localPrevText: import("vue").ComputedRef<string>;
|
118
|
-
localNextText: import("vue").ComputedRef<string>;
|
119
|
-
resolveClassName: (cls: string) => string;
|
120
|
-
handleHidden: () => void;
|
121
|
-
handleShown: () => void;
|
122
|
-
handleClose: () => Promise<void>;
|
123
|
-
handleConfirm: () => void;
|
124
|
-
handleMousedown: (e: any) => boolean;
|
125
|
-
handlePrevStep: () => void;
|
126
|
-
handleNextStep: () => void;
|
127
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
106
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
128
107
|
closed: () => true;
|
129
108
|
shown: () => true;
|
130
109
|
hidden: () => true;
|
@@ -371,28 +350,7 @@ declare const BkDialog: {
|
|
371
350
|
onNext?: () => any;
|
372
351
|
onClosed?: () => any;
|
373
352
|
"onUpdate:isShow"?: (value: boolean) => any;
|
374
|
-
}, {
|
375
|
-
data: {
|
376
|
-
positionX: number;
|
377
|
-
positionY: number;
|
378
|
-
moveStyle: {
|
379
|
-
top: string;
|
380
|
-
left: string;
|
381
|
-
};
|
382
|
-
};
|
383
|
-
localConfirmText: import("vue").ComputedRef<string>;
|
384
|
-
localCancelText: import("vue").ComputedRef<string>;
|
385
|
-
localPrevText: import("vue").ComputedRef<string>;
|
386
|
-
localNextText: import("vue").ComputedRef<string>;
|
387
|
-
resolveClassName: (cls: string) => string;
|
388
|
-
handleHidden: () => void;
|
389
|
-
handleShown: () => void;
|
390
|
-
handleClose: () => Promise<void>;
|
391
|
-
handleConfirm: () => void;
|
392
|
-
handleMousedown: (e: any) => boolean;
|
393
|
-
handlePrevStep: () => void;
|
394
|
-
handleNextStep: () => void;
|
395
|
-
}, {}, {}, {}, {
|
353
|
+
}, () => JSX.Element, {}, {}, {}, {
|
396
354
|
title: string;
|
397
355
|
top: string;
|
398
356
|
left: string;
|
@@ -524,28 +482,7 @@ declare const BkDialog: {
|
|
524
482
|
onNext?: () => any;
|
525
483
|
onClosed?: () => any;
|
526
484
|
"onUpdate:isShow"?: (value: boolean) => any;
|
527
|
-
}, {
|
528
|
-
data: {
|
529
|
-
positionX: number;
|
530
|
-
positionY: number;
|
531
|
-
moveStyle: {
|
532
|
-
top: string;
|
533
|
-
left: string;
|
534
|
-
};
|
535
|
-
};
|
536
|
-
localConfirmText: import("vue").ComputedRef<string>;
|
537
|
-
localCancelText: import("vue").ComputedRef<string>;
|
538
|
-
localPrevText: import("vue").ComputedRef<string>;
|
539
|
-
localNextText: import("vue").ComputedRef<string>;
|
540
|
-
resolveClassName: (cls: string) => string;
|
541
|
-
handleHidden: () => void;
|
542
|
-
handleShown: () => void;
|
543
|
-
handleClose: () => Promise<void>;
|
544
|
-
handleConfirm: () => void;
|
545
|
-
handleMousedown: (e: any) => boolean;
|
546
|
-
handlePrevStep: () => void;
|
547
|
-
handleNextStep: () => void;
|
548
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
485
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
549
486
|
closed: () => true;
|
550
487
|
shown: () => true;
|
551
488
|
hidden: () => true;
|
package/lib/dialog/index.js
CHANGED
@@ -508,7 +508,7 @@ function _asyncToGenerator(fn) {
|
|
508
508
|
;// CONCATENATED MODULE: external "vue"
|
509
509
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
510
510
|
var external_vue_y = x => () => x
|
511
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref });
|
511
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["useAttrs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useAttrs, ["useSlots"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.useSlots });
|
512
512
|
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
|
513
513
|
var regenerator = __webpack_require__(2841);
|
514
514
|
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
@@ -576,7 +576,7 @@ var dialogProps = (0,cloneDeep_namespaceObject["default"])(modal_namespaceObject
|
|
576
576
|
dialogProps.width["default"] = '400';
|
577
577
|
var props = _objectSpread(_objectSpread({}, dialogProps), {}, {
|
578
578
|
// 是否可拖拽
|
579
|
-
draggable: shared_namespaceObject.PropTypes.bool.def(
|
579
|
+
draggable: shared_namespaceObject.PropTypes.bool.def(false),
|
580
580
|
// 确认按钮文字
|
581
581
|
// confirmText: PropTypes.string.def('确定'),
|
582
582
|
confirmText: shared_namespaceObject.PropTypes.string,
|
@@ -610,6 +610,8 @@ var props = _objectSpread(_objectSpread({}, dialogProps), {}, {
|
|
610
610
|
|
611
611
|
|
612
612
|
|
613
|
+
function dialog_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; }
|
614
|
+
function dialog_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? dialog_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : dialog_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
613
615
|
|
614
616
|
/*
|
615
617
|
* Tencent is pleased to support the open source community by making
|
@@ -649,6 +651,7 @@ function _isSlot(s) {
|
|
649
651
|
}
|
650
652
|
/* harmony default export */ const dialog = ((0,external_vue_namespaceObject.defineComponent)({
|
651
653
|
name: 'Dialog',
|
654
|
+
inheritAttrs: false,
|
652
655
|
props: src_props,
|
653
656
|
emits: {
|
654
657
|
closed: function closed() {
|
@@ -676,10 +679,13 @@ function _isSlot(s) {
|
|
676
679
|
setup: function setup(props, _ref) {
|
677
680
|
var emit = _ref.emit;
|
678
681
|
var t = (0,config_provider_namespaceObject.useLocale)('dialog');
|
682
|
+
var attrs = (0,external_vue_namespaceObject.useAttrs)();
|
683
|
+
var slots = (0,external_vue_namespaceObject.useSlots)();
|
679
684
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
680
685
|
resolveClassName = _usePrefix.resolveClassName;
|
686
|
+
var instance = (0,external_vue_namespaceObject.getCurrentInstance)();
|
681
687
|
var isMoveing = (0,external_vue_namespaceObject.ref)(false);
|
682
|
-
var
|
688
|
+
var positionData = (0,external_vue_namespaceObject.reactive)({
|
683
689
|
positionX: 0,
|
684
690
|
positionY: 0,
|
685
691
|
moveStyle: {
|
@@ -773,9 +779,9 @@ function _isSlot(s) {
|
|
773
779
|
var parentWidth = e.currentTarget.parentNode.parentNode.offsetWidth;
|
774
780
|
var disX;
|
775
781
|
var disY;
|
776
|
-
if (
|
777
|
-
disX = e.clientX -
|
778
|
-
disY = e.clientY -
|
782
|
+
if (positionData.positionX !== 0 && positionData.positionY !== 0) {
|
783
|
+
disX = e.clientX - positionData.positionX;
|
784
|
+
disY = e.clientY - positionData.positionY;
|
779
785
|
} else {
|
780
786
|
disX = e.clientX - odiv.offsetLeft;
|
781
787
|
disY = e.clientY - odiv.offsetTop;
|
@@ -796,10 +802,10 @@ function _isSlot(s) {
|
|
796
802
|
} else if (boxTop / 2 + top <= 0) {
|
797
803
|
top = -boxTop / 2;
|
798
804
|
}
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
805
|
+
positionData.positionX = left;
|
806
|
+
positionData.positionY = top;
|
807
|
+
positionData.moveStyle.left = "calc(50% + ".concat(left, "px)");
|
808
|
+
positionData.moveStyle.top = "calc(50% + ".concat(top, "px)");
|
803
809
|
};
|
804
810
|
document.onmouseup = function () {
|
805
811
|
document.onmousemove = null;
|
@@ -807,159 +813,147 @@ function _isSlot(s) {
|
|
807
813
|
isMoveing.value = false;
|
808
814
|
};
|
809
815
|
};
|
810
|
-
return {
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
},
|
826
|
-
render: function render() {
|
827
|
-
var _this = this;
|
828
|
-
var dialogSlot = {
|
829
|
-
header: function header() {
|
830
|
-
var _this$$slots$tools, _this$$slots, _this$$slots$header, _this$$slots$header2, _this$$slots2;
|
831
|
-
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
832
|
-
"class": _defineProperty(_defineProperty(_defineProperty({}, _this.resolveClassName('dialog-tool'), true), 'is-draggable', !_this.fullscreen && _this.draggable), 'is-dragging', _this.draggable),
|
833
|
-
"onMousedown": _this.handleMousedown
|
834
|
-
}, [(_this$$slots$tools = (_this$$slots = _this.$slots).tools) === null || _this$$slots$tools === void 0 ? void 0 : _this$$slots$tools.call(_this$$slots)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
835
|
-
"class": _this.resolveClassName('dialog-header')
|
836
|
-
}, [(0,external_vue_namespaceObject.createVNode)("span", {
|
837
|
-
"class": _this.resolveClassName('dialog-title'),
|
838
|
-
"style": "text-align: ".concat(_this.headerAlign)
|
839
|
-
}, [(_this$$slots$header = (_this$$slots$header2 = (_this$$slots2 = _this.$slots).header) === null || _this$$slots$header2 === void 0 ? void 0 : _this$$slots$header2.call(_this$$slots2)) !== null && _this$$slots$header !== void 0 ? _this$$slots$header : _this.title])])];
|
840
|
-
},
|
841
|
-
"default": function _default() {
|
842
|
-
return (0,external_vue_namespaceObject.createVNode)("div", {
|
843
|
-
"class": _this.resolveClassName('dialog-content')
|
844
|
-
}, [_this.$slots["default"]()]);
|
845
|
-
},
|
846
|
-
footer: function footer() {
|
847
|
-
if (_this.$slots.footer) {
|
816
|
+
return function () {
|
817
|
+
var dialogSlot = {
|
818
|
+
header: function header() {
|
819
|
+
var _slots$tools, _slots$header, _slots$header2;
|
820
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!props.fullscreen && props.draggable && (0,external_vue_namespaceObject.createVNode)("div", {
|
821
|
+
"class": resolveClassName('dialog-tool'),
|
822
|
+
"onMousedown": handleMousedown
|
823
|
+
}, [(_slots$tools = slots.tools) === null || _slots$tools === void 0 ? void 0 : _slots$tools.call(slots)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
824
|
+
"class": resolveClassName('dialog-header')
|
825
|
+
}, [(0,external_vue_namespaceObject.createVNode)("span", {
|
826
|
+
"class": resolveClassName('dialog-title'),
|
827
|
+
"style": "text-align: ".concat(props.headerAlign)
|
828
|
+
}, [(_slots$header = (_slots$header2 = slots.header) === null || _slots$header2 === void 0 ? void 0 : _slots$header2.call(slots)) !== null && _slots$header !== void 0 ? _slots$header : props.title])])]);
|
829
|
+
},
|
830
|
+
"default": function _default() {
|
848
831
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
849
|
-
"class":
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
859
|
-
"onClick": _this.handleConfirm,
|
860
|
-
"theme": _this.confirmButtonTheme,
|
861
|
-
"loading": _this.isLoading
|
862
|
-
}, {
|
863
|
-
"default": function _default() {
|
864
|
-
return [_this.localConfirmText];
|
865
|
-
}
|
866
|
-
}), (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
867
|
-
"class": _this.resolveClassName('dialog-cancel'),
|
868
|
-
"onClick": _this.handleClose,
|
869
|
-
"disabled": _this.isLoading
|
870
|
-
}, {
|
871
|
-
"default": function _default() {
|
872
|
-
return [_this.localCancelText];
|
873
|
-
}
|
874
|
-
})]);
|
832
|
+
"class": resolveClassName('dialog-content')
|
833
|
+
}, [slots["default"]()]);
|
834
|
+
},
|
835
|
+
footer: function footer() {
|
836
|
+
if (slots.footer) {
|
837
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
838
|
+
"class": resolveClassName('dialog-footer'),
|
839
|
+
"style": "text-align: ".concat(props.footerAlign)
|
840
|
+
}, [slots.footer()]);
|
875
841
|
}
|
876
|
-
if (
|
877
|
-
return
|
878
|
-
"onClick": _this.handleConfirm,
|
879
|
-
"theme": _this.confirmButtonTheme,
|
880
|
-
"loading": _this.isLoading
|
881
|
-
}, {
|
882
|
-
"default": function _default() {
|
883
|
-
return [_this.localConfirmText];
|
884
|
-
}
|
885
|
-
});
|
842
|
+
if (!['process', 'operation', 'confirm'].includes(props.dialogType)) {
|
843
|
+
return null;
|
886
844
|
}
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
845
|
+
var renderFooterAction = function renderFooterAction() {
|
846
|
+
if (props.dialogType === 'operation') {
|
847
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
848
|
+
"onClick": handleConfirm,
|
849
|
+
"theme": props.confirmButtonTheme,
|
850
|
+
"loading": props.isLoading
|
851
|
+
}, {
|
852
|
+
"default": function _default() {
|
853
|
+
return [localConfirmText.value];
|
854
|
+
}
|
855
|
+
}), (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
856
|
+
"class": resolveClassName('dialog-cancel'),
|
857
|
+
"onClick": handleClose,
|
858
|
+
"disabled": props.isLoading
|
859
|
+
}, {
|
860
|
+
"default": function _default() {
|
861
|
+
return [localCancelText.value];
|
862
|
+
}
|
863
|
+
})]);
|
864
|
+
}
|
865
|
+
if (props.dialogType === 'confirm') {
|
866
|
+
return (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
867
|
+
"onClick": handleConfirm,
|
868
|
+
"theme": props.confirmButtonTheme,
|
869
|
+
"loading": props.isLoading
|
870
|
+
}, {
|
871
|
+
"default": function _default() {
|
872
|
+
return [localConfirmText.value];
|
873
|
+
}
|
874
|
+
});
|
875
|
+
}
|
876
|
+
if (props.dialogType === 'process') {
|
877
|
+
var renderFirstStepBtn = function renderFirstStepBtn() {
|
878
|
+
if (props.current === 1) {
|
879
|
+
return (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
880
|
+
"class": resolveClassName('dialog-perv'),
|
881
|
+
"onClick": handlePrevStep
|
882
|
+
}, {
|
883
|
+
"default": function _default() {
|
884
|
+
return [localPrevText.value];
|
885
|
+
}
|
886
|
+
});
|
887
|
+
}
|
888
|
+
};
|
889
|
+
var renderStepBtn = function renderStepBtn() {
|
890
|
+
if (props.current === props.totalStep) {
|
891
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
892
|
+
"class": resolveClassName('dialog-next'),
|
893
|
+
"onClick": handleNextStep
|
894
|
+
}, {
|
895
|
+
"default": function _default() {
|
896
|
+
return [localNextText.value];
|
897
|
+
}
|
898
|
+
}), (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
899
|
+
"onClick": handleConfirm,
|
900
|
+
"theme": props.confirmButtonTheme,
|
901
|
+
"loading": props.isLoading
|
902
|
+
}, {
|
903
|
+
"default": function _default() {
|
904
|
+
return [localConfirmText.value];
|
905
|
+
}
|
906
|
+
})]);
|
907
|
+
}
|
908
|
+
};
|
909
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [renderFirstStepBtn(), renderStepBtn(), (0,external_vue_namespaceObject.createVNode)(button_namespaceObject["default"], {
|
910
|
+
"class": resolveClassName('dialog-cancel'),
|
911
|
+
"onClick": handleClose,
|
912
|
+
"disabled": props.isLoading
|
913
|
+
}, {
|
914
|
+
"default": function _default() {
|
915
|
+
return [localCancelText.value];
|
916
|
+
}
|
917
|
+
})]);
|
918
|
+
}
|
919
|
+
};
|
920
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
921
|
+
"class": resolveClassName('dialog-footer'),
|
922
|
+
"style": "text-align: ".concat(props.footerAlign)
|
923
|
+
}, [renderFooterAction()]);
|
924
|
+
},
|
925
|
+
close: function close() {
|
926
|
+
return (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Error, null, null);
|
927
|
+
}
|
928
|
+
};
|
929
|
+
var inheritAttrs = dialog_objectSpread({}, attrs);
|
930
|
+
if (instance.vnode.scopeId) {
|
931
|
+
inheritAttrs[instance.vnode.scopeId] = '';
|
938
932
|
}
|
933
|
+
return (0,external_vue_namespaceObject.createVNode)(modal_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)(inheritAttrs, {
|
934
|
+
"class": _defineProperty(_defineProperty({}, resolveClassName('dialog'), true), 'is-fullscreen', props.fullscreen),
|
935
|
+
"isShow": props.isShow,
|
936
|
+
"fullscreen": props.fullscreen,
|
937
|
+
"width": props.fullscreen ? 'auto' : props.width,
|
938
|
+
"animateType": "fadein",
|
939
|
+
"beforeClose": props.beforeClose,
|
940
|
+
"closeIcon": props.closeIcon,
|
941
|
+
"escClose": props.escClose,
|
942
|
+
"quickClose": props.quickClose,
|
943
|
+
"showMask": props.showMask,
|
944
|
+
"transfer": props.transfer,
|
945
|
+
"left": props.fullscreen ? '0px' : positionData.moveStyle.left,
|
946
|
+
"top": props.fullscreen ? '0px' : positionData.moveStyle.top,
|
947
|
+
"zIndex": props.zIndex,
|
948
|
+
"onClose": handleClose,
|
949
|
+
"onHidden": handleHidden,
|
950
|
+
"onShown": handleShown
|
951
|
+
}), _isSlot(dialogSlot) ? dialogSlot : {
|
952
|
+
"default": function _default() {
|
953
|
+
return [dialogSlot];
|
954
|
+
}
|
955
|
+
});
|
939
956
|
};
|
940
|
-
return (0,external_vue_namespaceObject.createVNode)(modal_namespaceObject["default"], {
|
941
|
-
"class": _defineProperty(_defineProperty(_defineProperty({}, this.resolveClassName('dialog'), true), this.resolveClassName('dialog-wrapper'), true), 'is-fullscreen', this.fullscreen),
|
942
|
-
"isShow": this.isShow,
|
943
|
-
"fullscreen": this.fullscreen,
|
944
|
-
"width": this.fullscreen ? 'auto' : this.width,
|
945
|
-
"animateType": "fadein",
|
946
|
-
"beforeClose": this.beforeClose,
|
947
|
-
"closeIcon": this.closeIcon,
|
948
|
-
"escClose": this.escClose,
|
949
|
-
"quickClose": this.quickClose,
|
950
|
-
"showMask": this.showMask,
|
951
|
-
"transfer": this.transfer,
|
952
|
-
"left": this.fullscreen ? '0px' : this.data.moveStyle.left,
|
953
|
-
"top": this.fullscreen ? '0px' : this.data.moveStyle.top,
|
954
|
-
"zIndex": this.zIndex,
|
955
|
-
"onClose": this.handleClose,
|
956
|
-
"onHidden": this.handleHidden,
|
957
|
-
"onShown": this.handleShown
|
958
|
-
}, _isSlot(dialogSlot) ? dialogSlot : {
|
959
|
-
"default": function _default() {
|
960
|
-
return [dialogSlot];
|
961
|
-
}
|
962
|
-
});
|
963
957
|
}
|
964
958
|
}));
|
965
959
|
;// CONCATENATED MODULE: ../../packages/dialog/src/index.ts
|
package/lib/form/index.js
CHANGED
@@ -524,7 +524,9 @@ const isEmpty_namespaceObject = isEmpty_x({ ["default"]: () => __WEBPACK_EXTERNA
|
|
524
524
|
return value.length <= _maxlength;
|
525
525
|
},
|
526
526
|
pattern: function pattern(value, _pattern) {
|
527
|
-
|
527
|
+
var result = _pattern.test(value);
|
528
|
+
_pattern.lastIndex = 0;
|
529
|
+
return result;
|
528
530
|
}
|
529
531
|
});
|
530
532
|
;// CONCATENATED MODULE: ../../packages/form/src/form-item.tsx
|