bk-magic-vue 2.4.6 → 2.4.8-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bk-magic-vue.css +113 -90
- package/dist/bk-magic-vue.js +1356 -1251
- package/dist/bk-magic-vue.min.css +1 -1
- package/dist/bk-magic-vue.min.css.gz +0 -0
- package/dist/bk-magic-vue.min.css.map +1 -1
- package/dist/bk-magic-vue.min.js +1 -1
- package/dist/bk-magic-vue.min.js.gz +0 -0
- package/dist/bk-magic-vue.min.js.map +1 -1
- package/lib/button.js +263 -94
- package/lib/cascade.js +2 -1
- package/lib/date-picker.js +31 -4
- package/lib/dialog.js +278 -109
- package/lib/dropdown-menu.js +1936 -1891
- package/lib/info-box.js +277 -108
- package/lib/pagination.js +300 -68
- package/lib/popconfirm.js +2 -1
- package/lib/popover.js +2 -1
- package/lib/select.js +252 -20
- package/lib/table-column.js +5 -2
- package/lib/table-setting-content.js +202 -33
- package/lib/table.js +82 -9
- package/lib/tag-input.js +2 -1
- package/lib/time-picker.js +8 -1
- package/lib/ui/bk-magic-vue.css +113 -90
- package/lib/ui/bk-magic-vue.min.css +1 -1
- package/lib/ui/bk-magic-vue.min.css.gz +0 -0
- package/lib/ui/bk-magic-vue.min.css.map +1 -1
- package/lib/ui/button.css +11 -2
- package/lib/ui/button.min.css +1 -1
- package/lib/ui/button.min.css.map +1 -1
- package/lib/ui/dropdown-menu.css +87 -88
- package/lib/ui/dropdown-menu.min.css +1 -1
- package/lib/ui/dropdown-menu.min.css.map +1 -1
- package/lib/ui/select.css +19 -0
- package/lib/ui/select.min.css +1 -1
- package/lib/ui/select.min.css.map +1 -1
- package/lib/version-detail.js +238 -69
- package/package.json +1 -1
package/lib/button.js
CHANGED
|
@@ -5,105 +5,80 @@
|
|
|
5
5
|
}(this, function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var script = {
|
|
8
|
-
name: 'bk-
|
|
8
|
+
name: 'bk-spin',
|
|
9
9
|
props: {
|
|
10
10
|
theme: {
|
|
11
11
|
type: String,
|
|
12
|
-
default: '
|
|
12
|
+
default: 'primary',
|
|
13
13
|
validator: function validator(value) {
|
|
14
|
-
if (['
|
|
14
|
+
if (!['primary', 'warning', 'success', 'danger', 'info'].includes(value)) {
|
|
15
15
|
console.error("theme property is not valid: '".concat(value, "'"));
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
18
|
return true;
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
hoverTheme: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: '',
|
|
24
|
-
validator: function validator(value) {
|
|
25
|
-
if (['', 'primary', 'warning', 'success', 'danger'].indexOf(value) < 0) {
|
|
26
|
-
console.error("hoverTheme property is not valid: '".concat(value, "'"));
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
21
|
size: {
|
|
33
22
|
type: String,
|
|
34
|
-
default: '
|
|
23
|
+
default: 'small',
|
|
35
24
|
validator: function validator(value) {
|
|
36
|
-
if (['
|
|
25
|
+
if (!['large', 'normal', 'small', 'mini'].includes(value)) {
|
|
37
26
|
console.error("size property is not valid: '".concat(value, "'"));
|
|
38
27
|
return false;
|
|
39
28
|
}
|
|
40
29
|
return true;
|
|
41
30
|
}
|
|
42
31
|
},
|
|
43
|
-
|
|
32
|
+
icon: {
|
|
44
33
|
type: String,
|
|
45
34
|
default: ''
|
|
46
35
|
},
|
|
47
|
-
icon: String,
|
|
48
|
-
iconRight: String,
|
|
49
|
-
disabled: Boolean,
|
|
50
|
-
loading: Boolean,
|
|
51
|
-
outline: Boolean,
|
|
52
|
-
text: Boolean,
|
|
53
|
-
nativeType: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: 'button'
|
|
56
|
-
},
|
|
57
36
|
extCls: {
|
|
58
37
|
type: String,
|
|
59
38
|
default: ''
|
|
39
|
+
},
|
|
40
|
+
placement: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'bottom',
|
|
43
|
+
validator: function validator(value) {
|
|
44
|
+
if (!['bottom', 'right'].includes(value)) {
|
|
45
|
+
console.error("placement property is not valid: '".concat(value, "'"));
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
spinning: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true
|
|
60
54
|
}
|
|
61
55
|
},
|
|
62
56
|
data: function data() {
|
|
63
|
-
return {
|
|
64
|
-
showSlot: true
|
|
65
|
-
};
|
|
57
|
+
return {};
|
|
66
58
|
},
|
|
67
59
|
computed: {
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
return icon;
|
|
60
|
+
dotClass: function dotClass() {
|
|
61
|
+
var dotClass = ["bk-spin-rotation", "bk-spin-rotation-".concat(this.size), "bk-spin-rotation-".concat(this.theme)];
|
|
62
|
+
!this.spinning && dotClass.push("bk-spin-rotation-".concat(this.theme, "-wait"));
|
|
63
|
+
this.placement === 'right' && dotClass.push("bk-spin-rotation-flex");
|
|
64
|
+
this.placement === 'bottom' && dotClass.push("bk-spin-rotation-margin");
|
|
65
|
+
return dotClass;
|
|
76
66
|
},
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
iconRight = iconRight.replace(/^(icon-)/, '');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return iconRight;
|
|
67
|
+
slotTypeClass: function slotTypeClass() {
|
|
68
|
+
var slotType = ["rotate"];
|
|
69
|
+
this.$slots.default && this.placement === 'right' && slotType.push("slots-".concat(this.placement, "-rotate"));
|
|
70
|
+
return slotType;
|
|
85
71
|
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
return this.theme;
|
|
72
|
+
iconClass: function iconClass() {
|
|
73
|
+
var iconClass = ["bk-spin-icon", "bk-spin-icon-".concat(this.size), "bk-spin-icon-".concat(this.theme)];
|
|
74
|
+
!this.spinning && iconClass.push("bk-spin-icon-wait");
|
|
75
|
+
this.placement === 'right' && iconClass.push("bk-display-flex");
|
|
76
|
+
return iconClass;
|
|
93
77
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
mounted: function mounted() {
|
|
99
|
-
this.showSlot = this.$slots.default !== undefined;
|
|
100
|
-
},
|
|
101
|
-
methods: {
|
|
102
|
-
handleClick: function handleClick(e) {
|
|
103
|
-
if (!this.disabled && !this.loading) {
|
|
104
|
-
this.$emit('click', e);
|
|
105
|
-
this.$el.blur();
|
|
106
|
-
}
|
|
78
|
+
slotClass: function slotClass() {
|
|
79
|
+
var slotClass = ["bk-spin-title", "bk-spin-title-".concat(this.placement)];
|
|
80
|
+
this.placement === 'right' && slotClass.push("bk-spin-title-".concat(this.size), "bk-display-flex");
|
|
81
|
+
return slotClass;
|
|
107
82
|
}
|
|
108
83
|
}
|
|
109
84
|
};
|
|
@@ -178,39 +153,49 @@
|
|
|
178
153
|
|
|
179
154
|
var _c = _vm._self._c || _h;
|
|
180
155
|
|
|
181
|
-
return _c('
|
|
182
|
-
class: [_vm.buttonCls, _vm.extCls],
|
|
156
|
+
return _c('transition', {
|
|
183
157
|
attrs: {
|
|
184
|
-
"
|
|
185
|
-
"disabled": _vm.disabled,
|
|
186
|
-
"type": _vm.nativeType
|
|
187
|
-
},
|
|
188
|
-
on: {
|
|
189
|
-
"click": _vm.handleClick
|
|
158
|
+
"name": "fade"
|
|
190
159
|
}
|
|
191
|
-
}, 'button', _vm.$attrs, false), [_vm.loading ? _c('div', {
|
|
192
|
-
staticClass: "bk-button-loading"
|
|
193
160
|
}, [_c('div', {
|
|
194
|
-
|
|
161
|
+
class: ['bk-spin', _vm.extCls]
|
|
162
|
+
}, [_c('div', {
|
|
163
|
+
style: {
|
|
164
|
+
display: _vm.placement === 'right' ? 'flex' : ''
|
|
165
|
+
}
|
|
166
|
+
}, [!_vm.icon ? _c('div', {
|
|
167
|
+
class: [_vm.dotClass]
|
|
168
|
+
}, [_c('div', {
|
|
169
|
+
staticClass: "rotate1",
|
|
170
|
+
class: _vm.slotTypeClass
|
|
195
171
|
}), _c('div', {
|
|
196
|
-
staticClass: "
|
|
172
|
+
staticClass: "rotate2",
|
|
173
|
+
class: _vm.slotTypeClass
|
|
197
174
|
}), _c('div', {
|
|
198
|
-
staticClass: "
|
|
175
|
+
staticClass: "rotate3",
|
|
176
|
+
class: _vm.slotTypeClass
|
|
199
177
|
}), _c('div', {
|
|
200
|
-
staticClass: "
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
})
|
|
209
|
-
staticClass: "
|
|
210
|
-
class:
|
|
211
|
-
},
|
|
212
|
-
staticClass: "
|
|
213
|
-
|
|
178
|
+
staticClass: "rotate4",
|
|
179
|
+
class: _vm.slotTypeClass
|
|
180
|
+
}), _c('div', {
|
|
181
|
+
staticClass: "rotate5",
|
|
182
|
+
class: _vm.slotTypeClass
|
|
183
|
+
}), _c('div', {
|
|
184
|
+
staticClass: "rotate6",
|
|
185
|
+
class: _vm.slotTypeClass
|
|
186
|
+
}), _c('div', {
|
|
187
|
+
staticClass: "rotate7",
|
|
188
|
+
class: _vm.slotTypeClass
|
|
189
|
+
}), _c('div', {
|
|
190
|
+
staticClass: "rotate8",
|
|
191
|
+
class: _vm.slotTypeClass
|
|
192
|
+
})]) : _vm._e(), _vm.icon ? _c('div', {
|
|
193
|
+
class: [_vm.iconClass]
|
|
194
|
+
}, [_c('i', {
|
|
195
|
+
class: ['bk-icon', 'icon-' + _vm.icon]
|
|
196
|
+
})]) : _vm._e(), _vm.$slots.default ? _c('div', {
|
|
197
|
+
class: [_vm.slotClass]
|
|
198
|
+
}, [_vm._t("default")], 2) : _vm._e()])])]);
|
|
214
199
|
};
|
|
215
200
|
|
|
216
201
|
var __vue_staticRenderFns__ = [];
|
|
@@ -544,7 +529,191 @@
|
|
|
544
529
|
|
|
545
530
|
setInstaller(__vue_component__);
|
|
546
531
|
|
|
547
|
-
|
|
532
|
+
var script$1 = {
|
|
533
|
+
name: 'bk-button',
|
|
534
|
+
components: {
|
|
535
|
+
BkSpin: __vue_component__
|
|
536
|
+
},
|
|
537
|
+
props: {
|
|
538
|
+
theme: {
|
|
539
|
+
type: String,
|
|
540
|
+
default: 'default',
|
|
541
|
+
validator: function validator(value) {
|
|
542
|
+
if (['default', 'primary', 'warning', 'success', 'danger'].indexOf(value) < 0) {
|
|
543
|
+
console.error("theme property is not valid: '".concat(value, "'"));
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
546
|
+
return true;
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
hoverTheme: {
|
|
550
|
+
type: String,
|
|
551
|
+
default: '',
|
|
552
|
+
validator: function validator(value) {
|
|
553
|
+
if (['', 'primary', 'warning', 'success', 'danger'].indexOf(value) < 0) {
|
|
554
|
+
console.error("hoverTheme property is not valid: '".concat(value, "'"));
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
return true;
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
size: {
|
|
561
|
+
type: String,
|
|
562
|
+
default: 'normal',
|
|
563
|
+
validator: function validator(value) {
|
|
564
|
+
if (['small', 'normal', 'large'].indexOf(value) < 0) {
|
|
565
|
+
console.error("size property is not valid: '".concat(value, "'"));
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
568
|
+
return true;
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
title: {
|
|
572
|
+
type: String,
|
|
573
|
+
default: ''
|
|
574
|
+
},
|
|
575
|
+
icon: String,
|
|
576
|
+
iconRight: String,
|
|
577
|
+
disabled: Boolean,
|
|
578
|
+
loading: Boolean,
|
|
579
|
+
outline: Boolean,
|
|
580
|
+
text: Boolean,
|
|
581
|
+
nativeType: {
|
|
582
|
+
type: String,
|
|
583
|
+
default: 'button'
|
|
584
|
+
},
|
|
585
|
+
extCls: {
|
|
586
|
+
type: String,
|
|
587
|
+
default: ''
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
data: function data() {
|
|
591
|
+
return {
|
|
592
|
+
showSlot: true
|
|
593
|
+
};
|
|
594
|
+
},
|
|
595
|
+
computed: {
|
|
596
|
+
iconType: function iconType() {
|
|
597
|
+
var icon = this.icon || '';
|
|
598
|
+
if (icon) {
|
|
599
|
+
if (icon.indexOf('icon') === 0) {
|
|
600
|
+
icon = icon.replace(/^(icon-)/, '');
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return icon;
|
|
604
|
+
},
|
|
605
|
+
iconRightType: function iconRightType() {
|
|
606
|
+
var iconRight = this.iconRight || '';
|
|
607
|
+
if (iconRight) {
|
|
608
|
+
if (iconRight.indexOf('icon') === 0) {
|
|
609
|
+
iconRight = iconRight.replace(/^(icon-)/, '');
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
return iconRight;
|
|
613
|
+
},
|
|
614
|
+
themeType: function themeType() {
|
|
615
|
+
if (this.text) {
|
|
616
|
+
if (this.theme === 'default') {
|
|
617
|
+
return 'primary';
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return this.theme;
|
|
621
|
+
},
|
|
622
|
+
buttonCls: function buttonCls() {
|
|
623
|
+
return ["bk-".concat(this.themeType), "bk-button-".concat(this.size), this.hoverTheme ? "bk-button-hover bk-".concat(this.hoverTheme) : this.text ? 'bk-button-text' : 'bk-button', this.disabled ? 'is-disabled' : '', this.loading ? 'is-loading' : '', this.outline ? 'is-outline' : '', !this.showSlot ? 'no-slot' : ''];
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
mounted: function mounted() {
|
|
627
|
+
this.showSlot = this.$slots.default !== undefined;
|
|
628
|
+
},
|
|
629
|
+
methods: {
|
|
630
|
+
handleClick: function handleClick(e) {
|
|
631
|
+
if (!this.disabled && !this.loading) {
|
|
632
|
+
this.$emit('click', e);
|
|
633
|
+
this.$el.blur();
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
/* script */
|
|
640
|
+
var __vue_script__$1 = script$1;
|
|
641
|
+
/* template */
|
|
642
|
+
|
|
643
|
+
var __vue_render__$1 = function __vue_render__() {
|
|
644
|
+
var _vm = this;
|
|
645
|
+
|
|
646
|
+
var _h = _vm.$createElement;
|
|
647
|
+
|
|
648
|
+
var _c = _vm._self._c || _h;
|
|
649
|
+
|
|
650
|
+
return _c('button', _vm._b({
|
|
651
|
+
class: [_vm.buttonCls, _vm.extCls],
|
|
652
|
+
attrs: {
|
|
653
|
+
"title": _vm.title,
|
|
654
|
+
"disabled": _vm.disabled,
|
|
655
|
+
"type": _vm.nativeType
|
|
656
|
+
},
|
|
657
|
+
on: {
|
|
658
|
+
"click": _vm.handleClick
|
|
659
|
+
}
|
|
660
|
+
}, 'button', _vm.$attrs, false), [_vm.loading ? _c('div', {
|
|
661
|
+
staticClass: "bk-button-loading"
|
|
662
|
+
}, [!_vm.text ? [_c('div', {
|
|
663
|
+
staticClass: "bounce bounce1"
|
|
664
|
+
}), _c('div', {
|
|
665
|
+
staticClass: "bounce bounce2"
|
|
666
|
+
}), _c('div', {
|
|
667
|
+
staticClass: "bounce bounce3"
|
|
668
|
+
}), _c('div', {
|
|
669
|
+
staticClass: "bounce bounce4"
|
|
670
|
+
})] : [_c('bk-spin', {
|
|
671
|
+
attrs: {
|
|
672
|
+
"size": "mini",
|
|
673
|
+
"theme": _vm.theme
|
|
674
|
+
}
|
|
675
|
+
})]], 2) : _vm._e(), _c('div', {
|
|
676
|
+
class: _vm.loading ? 'bk-loading-wrapper' : ''
|
|
677
|
+
}, [_vm.iconType ? _c('i', {
|
|
678
|
+
staticClass: "bk-icon left-icon",
|
|
679
|
+
class: ['icon-' + _vm.iconType, _vm.iconType === 'loading' ? 'bk-button-icon-loading' : '']
|
|
680
|
+
}, [_vm.iconType === 'loading' ? [_c('span', {
|
|
681
|
+
staticClass: "loading"
|
|
682
|
+
})] : _vm._e()], 2) : _vm._e(), _c('span', [_vm._t("default")], 2), _vm.iconRightType ? _c('i', {
|
|
683
|
+
staticClass: "bk-icon right-icon",
|
|
684
|
+
class: ['icon-' + _vm.iconRightType, _vm.iconRightType === 'loading' ? 'bk-button-icon-loading' : '']
|
|
685
|
+
}, [_vm.iconRightType === 'loading' ? [_c('span', {
|
|
686
|
+
staticClass: "loading"
|
|
687
|
+
})] : _vm._e()], 2) : _vm._e()])]);
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
var __vue_staticRenderFns__$1 = [];
|
|
691
|
+
/* style */
|
|
692
|
+
|
|
693
|
+
var __vue_inject_styles__$1 = undefined;
|
|
694
|
+
/* scoped */
|
|
695
|
+
|
|
696
|
+
var __vue_scope_id__$1 = undefined;
|
|
697
|
+
/* module identifier */
|
|
698
|
+
|
|
699
|
+
var __vue_module_identifier__$1 = undefined;
|
|
700
|
+
/* functional template */
|
|
701
|
+
|
|
702
|
+
var __vue_is_functional_template__$1 = false;
|
|
703
|
+
/* style inject */
|
|
704
|
+
|
|
705
|
+
/* style inject SSR */
|
|
706
|
+
|
|
707
|
+
/* style inject shadow dom */
|
|
708
|
+
|
|
709
|
+
var __vue_component__$1 = /*#__PURE__*/normalizeComponent_1({
|
|
710
|
+
render: __vue_render__$1,
|
|
711
|
+
staticRenderFns: __vue_staticRenderFns__$1
|
|
712
|
+
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
|
|
713
|
+
|
|
714
|
+
setInstaller(__vue_component__$1);
|
|
715
|
+
|
|
716
|
+
exports.default = __vue_component__$1;
|
|
548
717
|
|
|
549
718
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
550
719
|
|
package/lib/cascade.js
CHANGED
|
@@ -3470,9 +3470,10 @@
|
|
|
3470
3470
|
}, this.$props, this.tippyOptions));
|
|
3471
3471
|
var onShow = options.onShow;
|
|
3472
3472
|
var onHide = options.onHide;
|
|
3473
|
+
var zIndex = typeof options.zIndex === 'number' ? options.zIndex : null;
|
|
3473
3474
|
options.onShow = function (tip) {
|
|
3474
3475
|
tip.set({
|
|
3475
|
-
zIndex: _this.getLocalZIndex(_this.zIndex)
|
|
3476
|
+
zIndex: _this.getLocalZIndex(zIndex || _this.zIndex)
|
|
3476
3477
|
});
|
|
3477
3478
|
onShow && onShow(tip);
|
|
3478
3479
|
_this.$emit('show');
|
package/lib/date-picker.js
CHANGED
|
@@ -2824,6 +2824,12 @@
|
|
|
2824
2824
|
validate: function validate(v) {
|
|
2825
2825
|
return ['simplicity', 'normal'].indexOf(v) > -1;
|
|
2826
2826
|
}
|
|
2827
|
+
},
|
|
2828
|
+
cellClass: {
|
|
2829
|
+
type: Function,
|
|
2830
|
+
default: function _default() {
|
|
2831
|
+
return '';
|
|
2832
|
+
}
|
|
2827
2833
|
}
|
|
2828
2834
|
},
|
|
2829
2835
|
data: function data() {
|
|
@@ -3553,7 +3559,8 @@
|
|
|
3553
3559
|
"time-picker-options": _vm.timePickerOptions,
|
|
3554
3560
|
"shortcut-close": _vm.shortcutClose,
|
|
3555
3561
|
"up-to-now": _vm.upToNow,
|
|
3556
|
-
"allow-cross-day": _vm.allowCrossDayProp
|
|
3562
|
+
"allow-cross-day": _vm.allowCrossDayProp,
|
|
3563
|
+
"cell-class": _vm.cellClass
|
|
3557
3564
|
},
|
|
3558
3565
|
on: {
|
|
3559
3566
|
"pick": _vm.onPick,
|
|
@@ -3852,6 +3859,12 @@
|
|
|
3852
3859
|
focusedDate: {
|
|
3853
3860
|
type: Date,
|
|
3854
3861
|
required: true
|
|
3862
|
+
},
|
|
3863
|
+
cellClass: {
|
|
3864
|
+
type: Function,
|
|
3865
|
+
default: function _default() {
|
|
3866
|
+
return '';
|
|
3867
|
+
}
|
|
3855
3868
|
}
|
|
3856
3869
|
},
|
|
3857
3870
|
computed: {
|
|
@@ -3932,9 +3945,15 @@
|
|
|
3932
3945
|
}
|
|
3933
3946
|
},
|
|
3934
3947
|
methods: {
|
|
3948
|
+
getExternalCellClass: function getExternalCellClass(cell) {
|
|
3949
|
+
if (typeof this.cellClass === 'function') {
|
|
3950
|
+
return this.cellClass(cell);
|
|
3951
|
+
}
|
|
3952
|
+
return '';
|
|
3953
|
+
},
|
|
3935
3954
|
getCellCls: function getCellCls(cell) {
|
|
3936
3955
|
var _ref;
|
|
3937
|
-
return ['bk-date-picker-cells-cell', (_ref = {}, _defineProperty(_ref, "bk-date-picker-cells-cell-selected", cell.selected || cell.start || cell.end), _defineProperty(_ref, "bk-date-picker-cells-cell-disabled", cell.disabled), _defineProperty(_ref, "bk-date-picker-cells-cell-today", cell.type === 'today'), _defineProperty(_ref, "bk-date-picker-cells-cell-prev-month", cell.type === 'prevMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-next-month", cell.type === 'nextMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-week-label", cell.type === 'weekLabel'), _defineProperty(_ref, "bk-date-picker-cells-cell-range", cell.range && !cell.start && !cell.end), _ref)];
|
|
3956
|
+
return ['bk-date-picker-cells-cell', (_ref = {}, _defineProperty(_ref, "bk-date-picker-cells-cell-selected", cell.selected || cell.start || cell.end), _defineProperty(_ref, "bk-date-picker-cells-cell-disabled", cell.disabled), _defineProperty(_ref, "bk-date-picker-cells-cell-today", cell.type === 'today'), _defineProperty(_ref, "bk-date-picker-cells-cell-prev-month", cell.type === 'prevMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-next-month", cell.type === 'nextMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-week-label", cell.type === 'weekLabel'), _defineProperty(_ref, "bk-date-picker-cells-cell-range", cell.range && !cell.start && !cell.end), _ref), this.getExternalCellClass(cell)];
|
|
3938
3957
|
}
|
|
3939
3958
|
}
|
|
3940
3959
|
};
|
|
@@ -5291,6 +5310,12 @@
|
|
|
5291
5310
|
upToNow: {
|
|
5292
5311
|
type: Boolean,
|
|
5293
5312
|
default: false
|
|
5313
|
+
},
|
|
5314
|
+
cellClass: {
|
|
5315
|
+
type: Function,
|
|
5316
|
+
default: function _default() {
|
|
5317
|
+
return '';
|
|
5318
|
+
}
|
|
5294
5319
|
}
|
|
5295
5320
|
},
|
|
5296
5321
|
computed: {
|
|
@@ -5554,7 +5579,8 @@
|
|
|
5554
5579
|
"value": _vm.dates,
|
|
5555
5580
|
"selection-mode": _vm.selectionMode,
|
|
5556
5581
|
"disabled-date": _vm.disabledDate,
|
|
5557
|
-
"focused-date": _vm.focusedDate
|
|
5582
|
+
"focused-date": _vm.focusedDate,
|
|
5583
|
+
"cell-class": _vm.cellClass
|
|
5558
5584
|
},
|
|
5559
5585
|
on: {
|
|
5560
5586
|
"pick": _vm.panelPickerHandlers,
|
|
@@ -6286,7 +6312,8 @@
|
|
|
6286
6312
|
"range-state": _vm.rangeState,
|
|
6287
6313
|
"disabled-date": _vm.disabledDate,
|
|
6288
6314
|
"value": _vm.preSelecting.right ? [_vm.dates[_vm.dates.length - 1]] : _vm.dates,
|
|
6289
|
-
"focused-date": _vm.focusedDate
|
|
6315
|
+
"focused-date": _vm.focusedDate,
|
|
6316
|
+
"cell-class": _vm.cellClass
|
|
6290
6317
|
},
|
|
6291
6318
|
on: {
|
|
6292
6319
|
"change-range": _vm.handleChangeRange,
|