vxe-pc-ui 4.17.30 → 4.18.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/all.esm.js +209 -194
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/button/src/button.js +10 -9
- package/es/cascader/src/cascader.js +8 -17
- package/es/color-picker/src/color-picker.js +8 -17
- package/es/components.js +3 -0
- package/es/date-picker/src/date-picker.js +8 -17
- package/es/date-range-picker/src/date-range-picker.js +9 -18
- package/es/divider/index.js +12 -0
- package/es/divider/src/divider.js +73 -0
- package/es/divider/style.css +83 -0
- package/es/divider/style.min.css +1 -0
- package/es/empty/src/empty.js +5 -2
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +16 -16
- package/es/pulldown/src/pulldown.js +30 -44
- package/es/select/src/select.js +8 -17
- package/es/slider/src/slider.js +6 -1
- package/es/slider/style.css +52 -6
- package/es/slider/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +8 -17
- package/es/tree-select/src/tree-select.js +8 -17
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-divider/index.js +3 -0
- package/es/vxe-divider/style.css +83 -0
- package/es/vxe-divider/style.min.css +1 -0
- package/es/vxe-slider/style.css +52 -6
- package/es/vxe-slider/style.min.css +1 -1
- package/lib/button/src/button.js +12 -9
- package/lib/button/src/button.min.js +1 -1
- package/lib/cascader/src/cascader.js +10 -18
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/color-picker/src/color-picker.js +10 -18
- package/lib/color-picker/src/color-picker.min.js +1 -1
- package/lib/components.js +13 -1
- package/lib/components.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +10 -18
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +11 -19
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/divider/index.js +19 -0
- package/lib/divider/index.min.js +1 -0
- package/lib/divider/src/divider.js +87 -0
- package/lib/divider/src/divider.min.js +1 -0
- package/lib/divider/style/index.js +1 -0
- package/lib/divider/style/style.css +83 -0
- package/lib/divider/style/style.min.css +1 -0
- package/lib/empty/src/empty.js +4 -1
- package/lib/empty/src/empty.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +20 -17
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/index.umd.js +248 -204
- package/lib/index.umd.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +31 -47
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/select/src/select.js +10 -18
- package/lib/select/src/select.min.js +1 -1
- package/lib/slider/src/slider.js +6 -0
- package/lib/slider/src/slider.min.js +1 -1
- package/lib/slider/style/style.css +52 -6
- package/lib/slider/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +10 -18
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +10 -18
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +2 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-divider/index.js +21 -0
- package/lib/vxe-divider/index.min.js +1 -0
- package/lib/vxe-divider/style/index.js +1 -0
- package/lib/vxe-divider/style/style.css +83 -0
- package/lib/vxe-divider/style/style.min.css +1 -0
- package/lib/vxe-slider/style/style.css +52 -6
- package/lib/vxe-slider/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.ts +12 -10
- package/packages/cascader/src/cascader.ts +9 -17
- package/packages/color-picker/src/color-picker.ts +9 -17
- package/packages/components.ts +3 -0
- package/packages/date-picker/src/date-picker.ts +9 -17
- package/packages/date-range-picker/src/date-range-picker.ts +10 -18
- package/packages/divider/index.ts +16 -0
- package/packages/divider/src/divider.ts +93 -0
- package/packages/empty/src/empty.ts +5 -2
- package/packages/icon-picker/src/icon-picker.ts +18 -16
- package/packages/pulldown/src/pulldown.ts +33 -46
- package/packages/select/src/select.ts +9 -17
- package/packages/slider/src/slider.ts +6 -1
- package/packages/table-select/src/table-select.ts +9 -17
- package/packages/tree-select/src/tree-select.ts +9 -17
- package/packages/ui/index.ts +1 -0
- package/styles/all.scss +1 -0
- package/styles/components/divider.scss +92 -0
- package/styles/components/slider.scss +14 -1
- package/styles/theme/base.scss +15 -0
- package/types/all.d.ts +6 -0
- package/types/components/divider.d.ts +75 -0
- package/types/ui/global-config.d.ts +2 -0
- /package/es/icon/{iconfont.1788500786360.ttf → iconfont.1788592140906.ttf} +0 -0
- /package/es/icon/{iconfont.1788500786360.woff → iconfont.1788592140906.woff} +0 -0
- /package/es/icon/{iconfont.1788500786360.woff2 → iconfont.1788592140906.woff2} +0 -0
- /package/es/{iconfont.1788500786360.ttf → iconfont.1788592140906.ttf} +0 -0
- /package/es/{iconfont.1788500786360.woff → iconfont.1788592140906.woff} +0 -0
- /package/es/{iconfont.1788500786360.woff2 → iconfont.1788592140906.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1788500786360.ttf → iconfont.1788592140906.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1788500786360.woff → iconfont.1788592140906.woff} +0 -0
- /package/lib/icon/style/{iconfont.1788500786360.woff2 → iconfont.1788592140906.woff2} +0 -0
- /package/lib/{iconfont.1788500786360.ttf → iconfont.1788592140906.ttf} +0 -0
- /package/lib/{iconfont.1788500786360.woff → iconfont.1788592140906.woff} +0 -0
- /package/lib/{iconfont.1788500786360.woff2 → iconfont.1788592140906.woff2} +0 -0
package/es/button/src/button.js
CHANGED
|
@@ -123,6 +123,7 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
123
123
|
const { slots, emit } = context;
|
|
124
124
|
const $xeModal = inject('$xeModal', null);
|
|
125
125
|
const $xeDrawer = inject('$xeDrawer', null);
|
|
126
|
+
const $xeGrid = inject('$xeGrid', null);
|
|
126
127
|
const $xeTable = inject('$xeTable', null);
|
|
127
128
|
const $xeTree = inject('$xeTree', null);
|
|
128
129
|
const $xeForm = inject('$xeForm', null);
|
|
@@ -169,7 +170,7 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
169
170
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
170
171
|
return globalTransfer;
|
|
171
172
|
}
|
|
172
|
-
if ($xeTable || $xeTree || $xeModal || $xeDrawer || $xeForm) {
|
|
173
|
+
if ($xeGrid || $xeTable || $xeTree || $xeModal || $xeDrawer || $xeForm) {
|
|
173
174
|
return true;
|
|
174
175
|
}
|
|
175
176
|
}
|
|
@@ -525,12 +526,6 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
525
526
|
return nextTick();
|
|
526
527
|
}
|
|
527
528
|
};
|
|
528
|
-
const handleGlobalMousewheelEvent = (evnt) => {
|
|
529
|
-
const panelElem = refBtnPanel.value;
|
|
530
|
-
if (reactData.visiblePanel && !getEventTargetNode(evnt, panelElem).flag) {
|
|
531
|
-
hidePanel();
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
529
|
const handleGlobalMousedownEvent = (evnt) => {
|
|
535
530
|
const btnDisabled = computeBtnDisabled.value;
|
|
536
531
|
const { visiblePanel } = reactData;
|
|
@@ -549,6 +544,12 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
549
544
|
updatePlacement();
|
|
550
545
|
}
|
|
551
546
|
};
|
|
547
|
+
const handleGlobalScrollEvent = () => {
|
|
548
|
+
const { visiblePanel } = reactData;
|
|
549
|
+
if (visiblePanel) {
|
|
550
|
+
updatePlacement();
|
|
551
|
+
}
|
|
552
|
+
};
|
|
552
553
|
Object.assign($xeButton, buttonMethods);
|
|
553
554
|
const renderVN = () => {
|
|
554
555
|
const { className, trigger, title, routerLink, type, destroyOnClose, name, loading, shadow, showDropdownIcon } = props;
|
|
@@ -729,14 +730,14 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
729
730
|
if (props.type === 'text') {
|
|
730
731
|
warnLog('vxe.error.delProp', ['type=text', 'mode=text']);
|
|
731
732
|
}
|
|
732
|
-
globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
|
|
733
733
|
globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
|
|
734
734
|
globalEvents.on($xeButton, 'resize', handleGlobalResizeEvent);
|
|
735
|
+
globalEvents.on($xeButton, 'scroll', handleGlobalScrollEvent);
|
|
735
736
|
});
|
|
736
737
|
onUnmounted(() => {
|
|
737
|
-
globalEvents.off($xeButton, 'mousewheel');
|
|
738
738
|
globalEvents.off($xeButton, 'mousedown');
|
|
739
739
|
globalEvents.off($xeButton, 'resize');
|
|
740
|
+
globalEvents.off($xeButton, 'scroll');
|
|
740
741
|
});
|
|
741
742
|
return $xeButton;
|
|
742
743
|
},
|
|
@@ -891,21 +891,6 @@ export default defineVxeComponent({
|
|
|
891
891
|
const { $event } = params;
|
|
892
892
|
hideOptionPanel($event);
|
|
893
893
|
};
|
|
894
|
-
const handleGlobalMousewheelEvent = (evnt) => {
|
|
895
|
-
const { visiblePanel } = reactData;
|
|
896
|
-
const isDisabled = computeIsDisabled.value;
|
|
897
|
-
if (!isDisabled) {
|
|
898
|
-
if (visiblePanel) {
|
|
899
|
-
const panelElem = refOptionPanel.value;
|
|
900
|
-
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
901
|
-
updatePlacement();
|
|
902
|
-
}
|
|
903
|
-
else {
|
|
904
|
-
hideOptionPanel(evnt);
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
};
|
|
909
894
|
const handleGlobalMousedownEvent = (evnt) => {
|
|
910
895
|
const { visiblePanel } = reactData;
|
|
911
896
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -939,6 +924,12 @@ export default defineVxeComponent({
|
|
|
939
924
|
updatePlacement();
|
|
940
925
|
}
|
|
941
926
|
};
|
|
927
|
+
const handleGlobalScrollEvent = () => {
|
|
928
|
+
const { visiblePanel } = reactData;
|
|
929
|
+
if (visiblePanel) {
|
|
930
|
+
updatePlacement();
|
|
931
|
+
}
|
|
932
|
+
};
|
|
942
933
|
const handleFocusSearch = () => {
|
|
943
934
|
if (props.filterable) {
|
|
944
935
|
nextTick(() => {
|
|
@@ -1782,16 +1773,16 @@ export default defineVxeComponent({
|
|
|
1782
1773
|
});
|
|
1783
1774
|
loadData(props.options || []);
|
|
1784
1775
|
onMounted(() => {
|
|
1785
|
-
globalEvents.on($xeCascader, 'mousewheel', handleGlobalMousewheelEvent);
|
|
1786
1776
|
globalEvents.on($xeCascader, 'mousedown', handleGlobalMousedownEvent);
|
|
1787
1777
|
globalEvents.on($xeCascader, 'blur', handleGlobalBlurEvent);
|
|
1788
1778
|
globalEvents.on($xeCascader, 'resize', handleGlobalResizeEvent);
|
|
1779
|
+
globalEvents.on($xeCascader, 'scroll', handleGlobalScrollEvent);
|
|
1789
1780
|
});
|
|
1790
1781
|
onUnmounted(() => {
|
|
1791
|
-
globalEvents.off($xeCascader, 'mousewheel');
|
|
1792
1782
|
globalEvents.off($xeCascader, 'mousedown');
|
|
1793
1783
|
globalEvents.off($xeCascader, 'blur');
|
|
1794
1784
|
globalEvents.off($xeCascader, 'resize');
|
|
1785
|
+
globalEvents.off($xeCascader, 'scroll');
|
|
1795
1786
|
XEUtils.assign(reactData, createReactData());
|
|
1796
1787
|
XEUtils.assign(internalData, createInternalData());
|
|
1797
1788
|
});
|
|
@@ -588,21 +588,6 @@ export default defineVxeComponent({
|
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
|
-
const handleGlobalMousewheelEvent = (evnt) => {
|
|
592
|
-
const { visiblePanel } = reactData;
|
|
593
|
-
const isDisabled = computeIsDisabled.value;
|
|
594
|
-
if (!isDisabled) {
|
|
595
|
-
if (visiblePanel) {
|
|
596
|
-
const panelElem = refOptionPanel.value;
|
|
597
|
-
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
598
|
-
updatePlacement();
|
|
599
|
-
}
|
|
600
|
-
else {
|
|
601
|
-
hideOptionPanel();
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
591
|
const handleGlobalMousedownEvent = (evnt) => {
|
|
607
592
|
const { visiblePanel } = reactData;
|
|
608
593
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -636,6 +621,12 @@ export default defineVxeComponent({
|
|
|
636
621
|
updatePlacement();
|
|
637
622
|
}
|
|
638
623
|
};
|
|
624
|
+
const handleGlobalScrollEvent = () => {
|
|
625
|
+
const { visiblePanel } = reactData;
|
|
626
|
+
if (visiblePanel) {
|
|
627
|
+
updatePlacement();
|
|
628
|
+
}
|
|
629
|
+
};
|
|
639
630
|
const dispatchEvent = (type, params, evnt) => {
|
|
640
631
|
emit(type, createEvent(evnt, { $colorPicker: $xeColorPicker }, params));
|
|
641
632
|
};
|
|
@@ -1039,16 +1030,16 @@ export default defineVxeComponent({
|
|
|
1039
1030
|
updateType();
|
|
1040
1031
|
});
|
|
1041
1032
|
onMounted(() => {
|
|
1042
|
-
globalEvents.on($xeColorPicker, 'mousewheel', handleGlobalMousewheelEvent);
|
|
1043
1033
|
globalEvents.on($xeColorPicker, 'mousedown', handleGlobalMousedownEvent);
|
|
1044
1034
|
globalEvents.on($xeColorPicker, 'blur', handleGlobalBlurEvent);
|
|
1045
1035
|
globalEvents.on($xeColorPicker, 'resize', handleGlobalResizeEvent);
|
|
1036
|
+
globalEvents.on($xeColorPicker, 'scroll', handleGlobalScrollEvent);
|
|
1046
1037
|
});
|
|
1047
1038
|
onUnmounted(() => {
|
|
1048
|
-
globalEvents.off($xeColorPicker, 'mousewheel');
|
|
1049
1039
|
globalEvents.off($xeColorPicker, 'mousedown');
|
|
1050
1040
|
globalEvents.off($xeColorPicker, 'blur');
|
|
1051
1041
|
globalEvents.off($xeColorPicker, 'resize');
|
|
1042
|
+
globalEvents.off($xeColorPicker, 'scroll');
|
|
1052
1043
|
});
|
|
1053
1044
|
updateType();
|
|
1054
1045
|
provide('$xeColorPicker', $xeColorPicker);
|
package/es/components.js
CHANGED
|
@@ -27,6 +27,7 @@ import VxeCountdown from './countdown';
|
|
|
27
27
|
import VxeDatePanel from './date-panel';
|
|
28
28
|
import VxeDatePicker from './date-picker';
|
|
29
29
|
import VxeDateRangePicker from './date-range-picker';
|
|
30
|
+
import VxeDivider from './divider';
|
|
30
31
|
import VxeDrawer, { DrawerController } from './drawer';
|
|
31
32
|
import VxeEmpty from './empty';
|
|
32
33
|
import VxeForm from './form';
|
|
@@ -123,6 +124,7 @@ const components = [
|
|
|
123
124
|
VxeDatePanel,
|
|
124
125
|
VxeDatePicker,
|
|
125
126
|
VxeDateRangePicker,
|
|
127
|
+
VxeDivider,
|
|
126
128
|
VxeDrawer,
|
|
127
129
|
VxeEmpty,
|
|
128
130
|
VxeForm,
|
|
@@ -262,6 +264,7 @@ export * from './countdown';
|
|
|
262
264
|
export * from './date-panel';
|
|
263
265
|
export * from './date-picker';
|
|
264
266
|
export * from './date-range-picker';
|
|
267
|
+
export * from './divider';
|
|
265
268
|
export * from './drawer';
|
|
266
269
|
export * from './empty';
|
|
267
270
|
export * from './form';
|
|
@@ -1080,21 +1080,6 @@ export default defineVxeComponent({
|
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
|
-
const handleGlobalMousewheelEvent = (evnt) => {
|
|
1084
|
-
const { visiblePanel } = reactData;
|
|
1085
|
-
const isDisabled = computeIsDisabled.value;
|
|
1086
|
-
if (!isDisabled) {
|
|
1087
|
-
if (visiblePanel) {
|
|
1088
|
-
const panelWrapperElem = refPanelWrapper.value;
|
|
1089
|
-
if (getEventTargetNode(evnt, panelWrapperElem).flag) {
|
|
1090
|
-
updatePlacement();
|
|
1091
|
-
}
|
|
1092
|
-
else {
|
|
1093
|
-
hidePanel();
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
};
|
|
1098
1083
|
const handleGlobalBlurEvent = () => {
|
|
1099
1084
|
const { isActivated, visiblePanel } = reactData;
|
|
1100
1085
|
if (visiblePanel) {
|
|
@@ -1117,6 +1102,12 @@ export default defineVxeComponent({
|
|
|
1117
1102
|
updatePlacement();
|
|
1118
1103
|
}
|
|
1119
1104
|
};
|
|
1105
|
+
const handleGlobalScrollEvent = () => {
|
|
1106
|
+
const { visiblePanel } = reactData;
|
|
1107
|
+
if (visiblePanel) {
|
|
1108
|
+
updatePlacement();
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1120
1111
|
// 弹出面板
|
|
1121
1112
|
const updateZindex = () => {
|
|
1122
1113
|
const popupOpts = computePopupOpts.value;
|
|
@@ -1590,11 +1581,11 @@ export default defineVxeComponent({
|
|
|
1590
1581
|
});
|
|
1591
1582
|
updateModelValue();
|
|
1592
1583
|
nextTick(() => {
|
|
1593
|
-
globalEvents.on($xeDatePicker, 'mousewheel', handleGlobalMousewheelEvent);
|
|
1594
1584
|
globalEvents.on($xeDatePicker, 'mousedown', handleGlobalMousedownEvent);
|
|
1595
1585
|
globalEvents.on($xeDatePicker, 'keydown', handleGlobalKeydownEvent);
|
|
1596
1586
|
globalEvents.on($xeDatePicker, 'blur', handleGlobalBlurEvent);
|
|
1597
1587
|
globalEvents.on($xeDatePicker, 'resize', handleGlobalResizeEvent);
|
|
1588
|
+
globalEvents.on($xeDatePicker, 'scroll', handleGlobalScrollEvent);
|
|
1598
1589
|
});
|
|
1599
1590
|
onMounted(() => {
|
|
1600
1591
|
const { type, multiple, maskedConfig } = props;
|
|
@@ -1608,11 +1599,11 @@ export default defineVxeComponent({
|
|
|
1608
1599
|
}
|
|
1609
1600
|
});
|
|
1610
1601
|
onUnmounted(() => {
|
|
1611
|
-
globalEvents.off($xeDatePicker, 'mousewheel');
|
|
1612
1602
|
globalEvents.off($xeDatePicker, 'mousedown');
|
|
1613
1603
|
globalEvents.off($xeDatePicker, 'keydown');
|
|
1614
1604
|
globalEvents.off($xeDatePicker, 'blur');
|
|
1615
1605
|
globalEvents.off($xeDatePicker, 'resize');
|
|
1606
|
+
globalEvents.off($xeDatePicker, 'scroll');
|
|
1616
1607
|
XEUtils.assign(reactData, createReactData());
|
|
1617
1608
|
XEUtils.assign(internalData, createInternalData());
|
|
1618
1609
|
});
|
|
@@ -918,22 +918,6 @@ export default defineVxeComponent({
|
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
};
|
|
921
|
-
const handleGlobalMousewheelEvent = (evnt) => {
|
|
922
|
-
const { visiblePanel } = reactData;
|
|
923
|
-
const isDisabled = computeIsDisabled.value;
|
|
924
|
-
if (!isDisabled) {
|
|
925
|
-
if (visiblePanel) {
|
|
926
|
-
const panelWrapperElem = refPanelWrapper.value;
|
|
927
|
-
if (getEventTargetNode(evnt, panelWrapperElem).flag) {
|
|
928
|
-
updatePlacement();
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
checkValue();
|
|
932
|
-
hidePanel();
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
921
|
const handleGlobalBlurEvent = () => {
|
|
938
922
|
const { visiblePanel, isActivated } = reactData;
|
|
939
923
|
if (visiblePanel) {
|
|
@@ -956,6 +940,12 @@ export default defineVxeComponent({
|
|
|
956
940
|
updatePlacement();
|
|
957
941
|
}
|
|
958
942
|
};
|
|
943
|
+
const handleGlobalScrollEvent = () => {
|
|
944
|
+
const { visiblePanel } = reactData;
|
|
945
|
+
if (visiblePanel) {
|
|
946
|
+
updatePlacement();
|
|
947
|
+
}
|
|
948
|
+
};
|
|
959
949
|
// 弹出面板
|
|
960
950
|
const updateZindex = () => {
|
|
961
951
|
const popupOpts = computePopupOpts.value;
|
|
@@ -1483,11 +1473,11 @@ export default defineVxeComponent({
|
|
|
1483
1473
|
});
|
|
1484
1474
|
updateModelValue(true);
|
|
1485
1475
|
nextTick(() => {
|
|
1486
|
-
globalEvents.on($xeDateRangePicker, 'mousewheel', handleGlobalMousewheelEvent);
|
|
1487
1476
|
globalEvents.on($xeDateRangePicker, 'mousedown', handleGlobalMousedownEvent);
|
|
1488
1477
|
globalEvents.on($xeDateRangePicker, 'keydown', handleGlobalKeydownEvent);
|
|
1489
1478
|
globalEvents.on($xeDateRangePicker, 'blur', handleGlobalBlurEvent);
|
|
1490
1479
|
globalEvents.on($xeDateRangePicker, 'resize', handleGlobalResizeEvent);
|
|
1480
|
+
globalEvents.on($xeDateRangePicker, 'scroll', handleGlobalScrollEvent);
|
|
1491
1481
|
});
|
|
1492
1482
|
onDeactivated(() => {
|
|
1493
1483
|
checkValue();
|
|
@@ -1496,10 +1486,11 @@ export default defineVxeComponent({
|
|
|
1496
1486
|
checkValue();
|
|
1497
1487
|
});
|
|
1498
1488
|
onUnmounted(() => {
|
|
1499
|
-
globalEvents.off($xeDateRangePicker, 'mousewheel');
|
|
1500
1489
|
globalEvents.off($xeDateRangePicker, 'mousedown');
|
|
1490
|
+
globalEvents.off($xeDateRangePicker, 'keydown');
|
|
1501
1491
|
globalEvents.off($xeDateRangePicker, 'blur');
|
|
1502
1492
|
globalEvents.off($xeDateRangePicker, 'resize');
|
|
1493
|
+
globalEvents.off($xeDateRangePicker, 'scroll');
|
|
1503
1494
|
XEUtils.assign(reactData, createReactData());
|
|
1504
1495
|
XEUtils.assign(internalData, createInternalData());
|
|
1505
1496
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VxeUI } from '@vxe-ui/core';
|
|
2
|
+
import VxeDividerComponent from './src/divider';
|
|
3
|
+
import { dynamicApp } from '../dynamics';
|
|
4
|
+
export const VxeDivider = Object.assign({}, VxeDividerComponent, {
|
|
5
|
+
install(app) {
|
|
6
|
+
app.component(VxeDividerComponent.name, VxeDividerComponent);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
dynamicApp.use(VxeDivider);
|
|
10
|
+
VxeUI.component(VxeDividerComponent);
|
|
11
|
+
export const Divider = VxeDivider;
|
|
12
|
+
export default VxeDivider;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ref, h } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
|
+
import XEUtils from 'xe-utils';
|
|
4
|
+
import { getConfig, createEvent, useSize } from '../../ui';
|
|
5
|
+
export default defineVxeComponent({
|
|
6
|
+
name: 'VxeDivider',
|
|
7
|
+
props: {
|
|
8
|
+
vertical: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: () => getConfig().divider.vertical
|
|
11
|
+
},
|
|
12
|
+
titleContent: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: () => getConfig().divider.titleContent
|
|
15
|
+
},
|
|
16
|
+
titleAlign: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: () => getConfig().divider.titleAlign
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: () => getConfig().divider.size || getConfig().size
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
emits: [],
|
|
26
|
+
setup(props, context) {
|
|
27
|
+
const { emit, slots } = context;
|
|
28
|
+
const xID = XEUtils.uniqueId();
|
|
29
|
+
const refElem = ref();
|
|
30
|
+
const { computeSize } = useSize(props);
|
|
31
|
+
const refMaps = {
|
|
32
|
+
refElem
|
|
33
|
+
};
|
|
34
|
+
const computeMaps = {};
|
|
35
|
+
const $xeDivider = {
|
|
36
|
+
xID,
|
|
37
|
+
props,
|
|
38
|
+
context,
|
|
39
|
+
getRefMaps: () => refMaps,
|
|
40
|
+
getComputeMaps: () => computeMaps
|
|
41
|
+
};
|
|
42
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
43
|
+
emit(type, createEvent(evnt, { $divider: $xeDivider }, params));
|
|
44
|
+
};
|
|
45
|
+
const dividerMethods = {
|
|
46
|
+
dispatchEvent
|
|
47
|
+
};
|
|
48
|
+
const dividerPrivateMethods = {};
|
|
49
|
+
Object.assign($xeDivider, dividerMethods, dividerPrivateMethods);
|
|
50
|
+
const renderVN = () => {
|
|
51
|
+
const { vertical, titleContent, titleAlign } = props;
|
|
52
|
+
const vSize = computeSize.value;
|
|
53
|
+
const titleSlot = slots.title;
|
|
54
|
+
return h('div', {
|
|
55
|
+
ref: refElem,
|
|
56
|
+
class: ['vxe-divider', vertical ? 'is--vertical' : 'is--horizontal', `t--align-${titleAlign || 'center'}`, {
|
|
57
|
+
[`size--${vSize}`]: vSize
|
|
58
|
+
}]
|
|
59
|
+
}, (titleContent || titleSlot) && !vertical
|
|
60
|
+
? [
|
|
61
|
+
h('span', {
|
|
62
|
+
class: 'vxe-divider--content'
|
|
63
|
+
}, titleSlot ? titleSlot({}) : titleContent)
|
|
64
|
+
]
|
|
65
|
+
: []);
|
|
66
|
+
};
|
|
67
|
+
$xeDivider.renderVN = renderVN;
|
|
68
|
+
return $xeDivider;
|
|
69
|
+
},
|
|
70
|
+
render() {
|
|
71
|
+
return this.renderVN();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.vxe-divider {
|
|
2
|
+
--vxe-ui-divider-current-font-size: inherit;
|
|
3
|
+
--vxe-ui-divider-padding: var(--vxe-ui-layout-padding-default);
|
|
4
|
+
--vxe-ui-divider-current-horizontal-margin: var(--vxe-ui-divider-horizontal-margin-default);
|
|
5
|
+
--vxe-ui-divider-current-vertical-margin: var(--vxe-ui-divider-vertical-margin-default);
|
|
6
|
+
}
|
|
7
|
+
.vxe-divider.size--xlarge {
|
|
8
|
+
--vxe-ui-divider-current-font-size: var(--vxe-ui-font-size-xlarge);
|
|
9
|
+
--vxe-ui-divider-padding: var(--vxe-ui-layout-padding-xlarge);
|
|
10
|
+
--vxe-ui-divider-current-horizontal-margin: var(--vxe-ui-divider-horizontal-margin-xlarge);
|
|
11
|
+
--vxe-ui-divider-current-vertical-margin: var(--vxe-ui-divider-vertical-margin-xlarge);
|
|
12
|
+
}
|
|
13
|
+
.vxe-divider.size--large {
|
|
14
|
+
--vxe-ui-divider-current-font-size: var(--vxe-ui-font-size-large);
|
|
15
|
+
--vxe-ui-divider-padding: var(--vxe-ui-layout-padding-large);
|
|
16
|
+
--vxe-ui-divider-current-horizontal-margin: var(--vxe-ui-divider-horizontal-margin-large);
|
|
17
|
+
--vxe-ui-divider-current-vertical-margin: var(--vxe-ui-divider-vertical-margin-large);
|
|
18
|
+
}
|
|
19
|
+
.vxe-divider.size--medium {
|
|
20
|
+
--vxe-ui-divider-current-font-size: var(--vxe-ui-font-size-medium);
|
|
21
|
+
--vxe-ui-divider-padding: var(--vxe-ui-layout-padding-medium);
|
|
22
|
+
--vxe-ui-divider-current-horizontal-margin: var(--vxe-ui-divider-horizontal-margin-medium);
|
|
23
|
+
--vxe-ui-divider-current-vertical-margin: var(--vxe-ui-divider-vertical-margin-medium);
|
|
24
|
+
}
|
|
25
|
+
.vxe-divider.size--small {
|
|
26
|
+
--vxe-ui-divider-current-font-size: var(--vxe-ui-font-size-small);
|
|
27
|
+
--vxe-ui-divider-padding: var(--vxe-ui-layout-padding-small);
|
|
28
|
+
--vxe-ui-divider-current-horizontal-margin: var(--vxe-ui-divider-horizontal-margin-small);
|
|
29
|
+
--vxe-ui-divider-current-vertical-margin: var(--vxe-ui-divider-vertical-margin-small);
|
|
30
|
+
}
|
|
31
|
+
.vxe-divider.size--mini {
|
|
32
|
+
--vxe-ui-divider-current-font-size: var(--vxe-ui-font-size-mini);
|
|
33
|
+
--vxe-ui-divider-padding: var(--vxe-ui-layout-padding-mini);
|
|
34
|
+
--vxe-ui-divider-current-horizontal-margin: var(--vxe-ui-divider-horizontal-margin-mini);
|
|
35
|
+
--vxe-ui-divider-current-vertical-margin: var(--vxe-ui-divider-vertical-margin-mini);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.vxe-divider {
|
|
39
|
+
color: var(--vxe-ui-font-color);
|
|
40
|
+
font-size: var(--vxe-ui-divider-current-font-size);
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
}
|
|
43
|
+
.vxe-divider.is--horizontal {
|
|
44
|
+
width: 100%;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: row;
|
|
47
|
+
align-items: center;
|
|
48
|
+
margin: var(--vxe-ui-divider-current-horizontal-margin) 0;
|
|
49
|
+
}
|
|
50
|
+
.vxe-divider.is--horizontal::after, .vxe-divider.is--horizontal::before {
|
|
51
|
+
content: "";
|
|
52
|
+
display: block;
|
|
53
|
+
height: 1px;
|
|
54
|
+
border-top: var(--vxe-ui-divider-border-width) solid var(--vxe-ui-input-border-color);
|
|
55
|
+
}
|
|
56
|
+
.vxe-divider.is--horizontal.t--align-left::after {
|
|
57
|
+
flex-grow: 1;
|
|
58
|
+
}
|
|
59
|
+
.vxe-divider.is--horizontal.t--align-left::before {
|
|
60
|
+
width: 1.2em;
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
}
|
|
63
|
+
.vxe-divider.is--horizontal.t--align-center::after, .vxe-divider.is--horizontal.t--align-center::before {
|
|
64
|
+
flex-grow: 1;
|
|
65
|
+
}
|
|
66
|
+
.vxe-divider.is--horizontal.t--align-right::after {
|
|
67
|
+
width: 1.2em;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
}
|
|
70
|
+
.vxe-divider.is--horizontal.t--align-right::before {
|
|
71
|
+
flex-grow: 1;
|
|
72
|
+
}
|
|
73
|
+
.vxe-divider.is--horizontal .vxe-divider--content {
|
|
74
|
+
padding: 0 var(--vxe-ui-divider-padding);
|
|
75
|
+
}
|
|
76
|
+
.vxe-divider.is--vertical {
|
|
77
|
+
display: inline-block;
|
|
78
|
+
width: 1px;
|
|
79
|
+
height: 1em;
|
|
80
|
+
vertical-align: middle;
|
|
81
|
+
margin: 0 var(--vxe-ui-divider-current-vertical-margin);
|
|
82
|
+
border-left: var(--vxe-ui-divider-border-width) solid var(--vxe-ui-input-border-color);
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vxe-divider{--vxe-ui-divider-current-font-size:inherit;--vxe-ui-divider-padding:var(--vxe-ui-layout-padding-default);--vxe-ui-divider-current-horizontal-margin:var(--vxe-ui-divider-horizontal-margin-default);--vxe-ui-divider-current-vertical-margin:var(--vxe-ui-divider-vertical-margin-default)}.vxe-divider.size--xlarge{--vxe-ui-divider-current-font-size:var(--vxe-ui-font-size-xlarge);--vxe-ui-divider-padding:var(--vxe-ui-layout-padding-xlarge);--vxe-ui-divider-current-horizontal-margin:var(--vxe-ui-divider-horizontal-margin-xlarge);--vxe-ui-divider-current-vertical-margin:var(--vxe-ui-divider-vertical-margin-xlarge)}.vxe-divider.size--large{--vxe-ui-divider-current-font-size:var(--vxe-ui-font-size-large);--vxe-ui-divider-padding:var(--vxe-ui-layout-padding-large);--vxe-ui-divider-current-horizontal-margin:var(--vxe-ui-divider-horizontal-margin-large);--vxe-ui-divider-current-vertical-margin:var(--vxe-ui-divider-vertical-margin-large)}.vxe-divider.size--medium{--vxe-ui-divider-current-font-size:var(--vxe-ui-font-size-medium);--vxe-ui-divider-padding:var(--vxe-ui-layout-padding-medium);--vxe-ui-divider-current-horizontal-margin:var(--vxe-ui-divider-horizontal-margin-medium);--vxe-ui-divider-current-vertical-margin:var(--vxe-ui-divider-vertical-margin-medium)}.vxe-divider.size--small{--vxe-ui-divider-current-font-size:var(--vxe-ui-font-size-small);--vxe-ui-divider-padding:var(--vxe-ui-layout-padding-small);--vxe-ui-divider-current-horizontal-margin:var(--vxe-ui-divider-horizontal-margin-small);--vxe-ui-divider-current-vertical-margin:var(--vxe-ui-divider-vertical-margin-small)}.vxe-divider.size--mini{--vxe-ui-divider-current-font-size:var(--vxe-ui-font-size-mini);--vxe-ui-divider-padding:var(--vxe-ui-layout-padding-mini);--vxe-ui-divider-current-horizontal-margin:var(--vxe-ui-divider-horizontal-margin-mini);--vxe-ui-divider-current-vertical-margin:var(--vxe-ui-divider-vertical-margin-mini)}.vxe-divider{color:var(--vxe-ui-font-color);font-size:var(--vxe-ui-divider-current-font-size);white-space:nowrap}.vxe-divider.is--horizontal{width:100%;display:flex;flex-direction:row;align-items:center;margin:var(--vxe-ui-divider-current-horizontal-margin) 0}.vxe-divider.is--horizontal::after,.vxe-divider.is--horizontal::before{content:"";display:block;height:1px;border-top:var(--vxe-ui-divider-border-width) solid var(--vxe-ui-input-border-color)}.vxe-divider.is--horizontal.t--align-left::after{flex-grow:1}.vxe-divider.is--horizontal.t--align-left::before{width:1.2em;flex-shrink:0}.vxe-divider.is--horizontal.t--align-center::after,.vxe-divider.is--horizontal.t--align-center::before{flex-grow:1}.vxe-divider.is--horizontal.t--align-right::after{width:1.2em;flex-shrink:0}.vxe-divider.is--horizontal.t--align-right::before{flex-grow:1}.vxe-divider.is--horizontal .vxe-divider--content{padding:0 var(--vxe-ui-divider-padding)}.vxe-divider.is--vertical{display:inline-block;width:1px;height:1em;vertical-align:middle;margin:0 var(--vxe-ui-divider-current-vertical-margin);border-left:var(--vxe-ui-divider-border-width) solid var(--vxe-ui-input-border-color)}
|
package/es/empty/src/empty.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { ref, h, reactive } from 'vue';
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
|
-
import { getI18n, getIcon, createEvent } from '../../ui';
|
|
4
|
+
import { getConfig, getI18n, getIcon, createEvent } from '../../ui';
|
|
5
5
|
export default defineVxeComponent({
|
|
6
6
|
name: 'VxeEmpty',
|
|
7
7
|
props: {
|
|
8
8
|
imageUrl: String,
|
|
9
9
|
imageStyle: Object,
|
|
10
10
|
icon: String,
|
|
11
|
-
status:
|
|
11
|
+
status: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: () => getConfig().empty.status
|
|
14
|
+
},
|
|
12
15
|
content: [String, Number]
|
|
13
16
|
},
|
|
14
17
|
emits: [],
|