vxe-pc-ui 4.18.22 → 4.19.0
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 +1138 -1062
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/calendar/src/calendar.js +1 -1
- package/es/card/src/card.js +1 -1
- package/es/carousel/src/carousel.js +1 -1
- package/es/countdown/src/countdown.js +1 -1
- package/es/date-picker/src/date-picker.js +3 -3
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +1 -1
- package/es/layout-aside/src/layout-aside.js +22 -10
- package/es/layout-aside/style.css +2 -4
- package/es/layout-aside/style.min.css +1 -1
- package/es/layout-body/src/layout-body.js +19 -12
- package/es/layout-body/style.css +2 -3
- package/es/layout-body/style.min.css +1 -1
- package/es/list/src/list.js +1 -1
- package/es/menu/src/menu.js +10 -4
- package/es/menu/style.css +10 -2
- package/es/menu/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +61 -15
- package/es/scrollbar/style.css +18 -15
- package/es/scrollbar/style.min.css +1 -1
- package/es/select/src/select.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tabs/src/tabs.js +1 -1
- package/es/text-ellipsis/style.css +29 -10
- package/es/text-ellipsis/style.min.css +1 -1
- package/es/ui/index.js +8 -2
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +1 -1
- package/es/upload/style.css +5 -3
- package/es/upload/style.min.css +1 -1
- package/es/vxe-layout-aside/style.css +2 -4
- package/es/vxe-layout-aside/style.min.css +1 -1
- package/es/vxe-layout-body/style.css +2 -3
- package/es/vxe-layout-body/style.min.css +1 -1
- package/es/vxe-menu/style.css +10 -2
- package/es/vxe-menu/style.min.css +1 -1
- package/es/vxe-scrollbar/style.css +18 -15
- package/es/vxe-scrollbar/style.min.css +1 -1
- package/es/vxe-text-ellipsis/style.css +29 -10
- package/es/vxe-text-ellipsis/style.min.css +1 -1
- package/es/vxe-upload/style.css +5 -3
- package/es/vxe-upload/style.min.css +1 -1
- package/lib/calendar/src/calendar.js +1 -1
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/card/src/card.js +1 -1
- package/lib/card/src/card.min.js +1 -1
- package/lib/carousel/src/carousel.js +1 -1
- package/lib/carousel/src/carousel.min.js +1 -1
- package/lib/countdown/src/countdown.js +1 -1
- package/lib/countdown/src/countdown.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +3 -3
- package/lib/date-picker/src/date-picker.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 +1 -1
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/index.umd.js +1059 -952
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +29 -10
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-aside/style/style.css +2 -4
- package/lib/layout-aside/style/style.min.css +1 -1
- package/lib/layout-body/src/layout-body.js +29 -12
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/layout-body/style/style.css +2 -3
- package/lib/layout-body/style/style.min.css +1 -1
- package/lib/list/src/list.js +1 -1
- package/lib/list/src/list.min.js +1 -1
- package/lib/menu/src/menu.js +11 -3
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/menu/style/style.css +10 -2
- package/lib/menu/style/style.min.css +1 -1
- package/lib/scrollbar/src/scrollbar.js +66 -12
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- package/lib/scrollbar/style/style.css +18 -15
- package/lib/scrollbar/style/style.min.css +1 -1
- package/lib/select/src/select.js +2 -2
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tabs/src/tabs.js +1 -1
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/text-ellipsis/style/style.css +29 -10
- package/lib/text-ellipsis/style/style.min.css +1 -1
- package/lib/ui/index.js +8 -2
- 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/upload/src/upload.js +1 -1
- package/lib/upload/src/upload.min.js +1 -1
- package/lib/upload/style/style.css +5 -3
- package/lib/upload/style/style.min.css +1 -1
- package/lib/vxe-layout-aside/style/style.css +2 -4
- package/lib/vxe-layout-aside/style/style.min.css +1 -1
- package/lib/vxe-layout-body/style/style.css +2 -3
- package/lib/vxe-layout-body/style/style.min.css +1 -1
- package/lib/vxe-menu/style/style.css +10 -2
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/lib/vxe-scrollbar/style/style.css +18 -15
- package/lib/vxe-scrollbar/style/style.min.css +1 -1
- package/lib/vxe-text-ellipsis/style/style.css +29 -10
- package/lib/vxe-text-ellipsis/style/style.min.css +1 -1
- package/lib/vxe-upload/style/style.css +5 -3
- package/lib/vxe-upload/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/calendar/src/calendar.ts +1 -1
- package/packages/card/src/card.ts +1 -1
- package/packages/carousel/src/carousel.ts +1 -1
- package/packages/countdown/src/countdown.ts +1 -1
- package/packages/date-picker/src/date-picker.ts +3 -3
- package/packages/icon-picker/src/icon-picker.ts +1 -1
- package/packages/layout-aside/src/layout-aside.ts +23 -10
- package/packages/layout-body/src/layout-body.ts +23 -12
- package/packages/list/src/list.ts +1 -1
- package/packages/menu/src/menu.ts +14 -4
- package/packages/scrollbar/src/scrollbar.ts +63 -11
- package/packages/select/src/select.ts +2 -2
- package/packages/tabs/src/tabs.ts +1 -1
- package/packages/ui/index.ts +8 -3
- package/packages/upload/src/upload.ts +1 -1
- package/styles/components/layout-aside.scss +2 -4
- package/styles/components/layout-body.scss +2 -3
- package/styles/components/menu.scss +11 -2
- package/styles/components/scrollbar.scss +26 -19
- package/styles/components/text-ellipsis.scss +23 -64
- package/styles/components/upload.scss +5 -3
- package/styles/theme/base.scss +2 -0
- package/types/components/layout-aside.d.ts +3 -0
- package/types/components/layout-body.d.ts +3 -1
- package/types/components/menu.d.ts +3 -0
- package/types/components/scrollbar.d.ts +15 -0
- /package/es/icon/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
- /package/es/icon/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
- /package/es/icon/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
- /package/es/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
- /package/es/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
- /package/es/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
- /package/lib/{iconfont.1791471274739.ttf → iconfont.1791539010382.ttf} +0 -0
- /package/lib/{iconfont.1791471274739.woff → iconfont.1791539010382.woff} +0 -0
- /package/lib/{iconfont.1791471274739.woff2 → iconfont.1791539010382.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -101,7 +101,7 @@ function checkDynamic() {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
const { log } = VxeUI;
|
|
104
|
-
const uiVersion = `ui v${"4.
|
|
104
|
+
const uiVersion = `ui v${"4.19.0"}`;
|
|
105
105
|
function createComponentLog(name) {
|
|
106
106
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
107
107
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -115,7 +115,7 @@ function createComponentLog(name) {
|
|
|
115
115
|
const warnLog$i = log.create('warn', uiVersion);
|
|
116
116
|
log.create('error', uiVersion);
|
|
117
117
|
|
|
118
|
-
const version = "4.
|
|
118
|
+
const version = "4.19.0";
|
|
119
119
|
VxeUI.uiVersion = version;
|
|
120
120
|
VxeUI.dynamicApp = dynamicApp;
|
|
121
121
|
function config(options) {
|
|
@@ -326,7 +326,13 @@ setConfig$1({
|
|
|
326
326
|
digits: 2,
|
|
327
327
|
controls: true
|
|
328
328
|
},
|
|
329
|
-
layoutAside: {
|
|
329
|
+
layoutAside: {
|
|
330
|
+
scrollbarConfig: {
|
|
331
|
+
yConfig: {
|
|
332
|
+
autoHide: true
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
330
336
|
layoutBody: {
|
|
331
337
|
backtopConfig: {}
|
|
332
338
|
},
|
|
@@ -6115,7 +6121,7 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
6115
6121
|
class: 'vxe-calendar--type-wrapper'
|
|
6116
6122
|
}, [
|
|
6117
6123
|
datePanelType === 'year'
|
|
6118
|
-
? h(
|
|
6124
|
+
? h(VxeButton, {
|
|
6119
6125
|
class: 'vxe-calendar--date-picker-label',
|
|
6120
6126
|
disabled: datePanelType === 'year',
|
|
6121
6127
|
content: selectDatePanelObj.y
|
|
@@ -6123,13 +6129,13 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
6123
6129
|
: h('span', {
|
|
6124
6130
|
class: 'vxe-calendar--date-picker-btns'
|
|
6125
6131
|
}, [
|
|
6126
|
-
h(
|
|
6132
|
+
h(VxeButton, {
|
|
6127
6133
|
class: 'vxe-calendar--date-picker-btn',
|
|
6128
6134
|
content: selectDatePanelObj.y,
|
|
6129
6135
|
onClick: dateToggleYearTypeEvent
|
|
6130
6136
|
}),
|
|
6131
6137
|
selectDatePanelObj.m
|
|
6132
|
-
? h(
|
|
6138
|
+
? h(VxeButton, {
|
|
6133
6139
|
class: 'vxe-calendar--date-picker-btn',
|
|
6134
6140
|
content: selectDatePanelObj.m,
|
|
6135
6141
|
onClick: dateToggleMonthTypeEvent
|
|
@@ -6140,16 +6146,16 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
6140
6146
|
h('div', {
|
|
6141
6147
|
class: 'vxe-calendar--btn-wrapper'
|
|
6142
6148
|
}, [
|
|
6143
|
-
h(
|
|
6149
|
+
h(VxeButton, {
|
|
6144
6150
|
disabled: isDisabledPrevDateBtn,
|
|
6145
6151
|
icon: 'vxe-icon-caret-left',
|
|
6146
6152
|
onClick: datePrevEvent
|
|
6147
6153
|
}),
|
|
6148
|
-
h(
|
|
6154
|
+
h(VxeButton, {
|
|
6149
6155
|
icon: 'vxe-icon-dot',
|
|
6150
6156
|
onClick: dateTodayMonthEvent
|
|
6151
6157
|
}),
|
|
6152
|
-
h(
|
|
6158
|
+
h(VxeButton, {
|
|
6153
6159
|
disabled: isDisabledNextDateBtn,
|
|
6154
6160
|
icon: 'vxe-icon-caret-right',
|
|
6155
6161
|
onClick: dateNextEvent
|
|
@@ -6370,6 +6376,32 @@ var VxeLoadingComponent = defineVxeComponent({
|
|
|
6370
6376
|
}
|
|
6371
6377
|
});
|
|
6372
6378
|
|
|
6379
|
+
const VxeLoading = Object.assign({}, VxeLoadingComponent, {
|
|
6380
|
+
install(app) {
|
|
6381
|
+
app.component(VxeLoadingComponent.name, VxeLoadingComponent);
|
|
6382
|
+
}
|
|
6383
|
+
});
|
|
6384
|
+
const LoadingController = {
|
|
6385
|
+
open(options) {
|
|
6386
|
+
const opts = Object.assign({}, options);
|
|
6387
|
+
dynamicStore.globalLoading = Object.assign({
|
|
6388
|
+
modelValue: true,
|
|
6389
|
+
text: opts.text,
|
|
6390
|
+
icon: opts.icon
|
|
6391
|
+
}, { key: 'gl' });
|
|
6392
|
+
checkDynamic();
|
|
6393
|
+
return Promise.resolve();
|
|
6394
|
+
},
|
|
6395
|
+
close() {
|
|
6396
|
+
dynamicStore.globalLoading = null;
|
|
6397
|
+
return Promise.resolve();
|
|
6398
|
+
}
|
|
6399
|
+
};
|
|
6400
|
+
dynamicApp.use(VxeLoading);
|
|
6401
|
+
VxeUI.component(VxeLoadingComponent);
|
|
6402
|
+
VxeUI.loading = LoadingController;
|
|
6403
|
+
const Loading = VxeLoading;
|
|
6404
|
+
|
|
6373
6405
|
var VxeCardComponent = defineVxeComponent({
|
|
6374
6406
|
name: 'VxeCard',
|
|
6375
6407
|
props: {
|
|
@@ -6502,7 +6534,7 @@ var VxeCardComponent = defineVxeComponent({
|
|
|
6502
6534
|
/**
|
|
6503
6535
|
* 加载中
|
|
6504
6536
|
*/
|
|
6505
|
-
h(
|
|
6537
|
+
h(VxeLoading, {
|
|
6506
6538
|
class: 'vxe-card--loading',
|
|
6507
6539
|
modelValue: loading
|
|
6508
6540
|
})
|
|
@@ -6848,7 +6880,7 @@ var VxeCarouselComponent = defineVxeComponent({
|
|
|
6848
6880
|
/**
|
|
6849
6881
|
* 加载中
|
|
6850
6882
|
*/
|
|
6851
|
-
h(
|
|
6883
|
+
h(VxeLoading, {
|
|
6852
6884
|
class: 'vxe-carousel--loading',
|
|
6853
6885
|
modelValue: loading
|
|
6854
6886
|
})
|
|
@@ -9038,7 +9070,7 @@ var VxeListComponent = defineVxeComponent({
|
|
|
9038
9070
|
/**
|
|
9039
9071
|
* 加载中
|
|
9040
9072
|
*/
|
|
9041
|
-
h(
|
|
9073
|
+
h(VxeLoading, {
|
|
9042
9074
|
class: 'vxe-list--loading',
|
|
9043
9075
|
modelValue: loading
|
|
9044
9076
|
})
|
|
@@ -18444,6 +18476,15 @@ var VxeTextComponent = defineVxeComponent({
|
|
|
18444
18476
|
}
|
|
18445
18477
|
});
|
|
18446
18478
|
|
|
18479
|
+
const VxeText = Object.assign({}, VxeTextComponent, {
|
|
18480
|
+
install(app) {
|
|
18481
|
+
app.component(VxeTextComponent.name, VxeTextComponent);
|
|
18482
|
+
}
|
|
18483
|
+
});
|
|
18484
|
+
dynamicApp.use(VxeText);
|
|
18485
|
+
VxeUI.component(VxeTextComponent);
|
|
18486
|
+
const Text = VxeText;
|
|
18487
|
+
|
|
18447
18488
|
var VxeCountdownComponent = defineVxeComponent({
|
|
18448
18489
|
name: 'VxeCountdown',
|
|
18449
18490
|
props: {
|
|
@@ -18618,7 +18659,7 @@ var VxeCountdownComponent = defineVxeComponent({
|
|
|
18618
18659
|
}, prefixSlot
|
|
18619
18660
|
? getSlotVNs(prefixSlot({ currentValue: currNum, diffConf }))
|
|
18620
18661
|
: [
|
|
18621
|
-
h(
|
|
18662
|
+
h(VxeText, {
|
|
18622
18663
|
content: prefixOpts.content,
|
|
18623
18664
|
icon: prefixOpts.icon,
|
|
18624
18665
|
status: prefixOpts.status
|
|
@@ -18636,7 +18677,7 @@ var VxeCountdownComponent = defineVxeComponent({
|
|
|
18636
18677
|
}, suffixSlot
|
|
18637
18678
|
? getSlotVNs(suffixSlot({ currentValue: currNum, diffConf }))
|
|
18638
18679
|
: [
|
|
18639
|
-
h(
|
|
18680
|
+
h(VxeText, {
|
|
18640
18681
|
content: suffixOpts.content,
|
|
18641
18682
|
icon: suffixOpts.icon,
|
|
18642
18683
|
status: suffixOpts.status
|
|
@@ -21792,7 +21833,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
21792
21833
|
return h('div', {
|
|
21793
21834
|
class: `vxe-date-picker--layout-${pos}-wrapper`
|
|
21794
21835
|
}, [
|
|
21795
|
-
h(
|
|
21836
|
+
h(VxeButtonGroup, {
|
|
21796
21837
|
options: shortcutList,
|
|
21797
21838
|
mode,
|
|
21798
21839
|
align,
|
|
@@ -21881,7 +21922,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
21881
21922
|
h('div', {
|
|
21882
21923
|
class: 'vxe-date-picker--layout-body-wrapper'
|
|
21883
21924
|
}, [
|
|
21884
|
-
h(
|
|
21925
|
+
h(VxeDatePanel, {
|
|
21885
21926
|
ref: refDatePanel,
|
|
21886
21927
|
modelValue: reactData.inputValue,
|
|
21887
21928
|
type: props.type,
|
|
@@ -21918,7 +21959,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
21918
21959
|
class: 'vxe-date-picker--layout-footer-btns'
|
|
21919
21960
|
}, [
|
|
21920
21961
|
showClearBtn
|
|
21921
|
-
? h(
|
|
21962
|
+
? h(VxeButton, {
|
|
21922
21963
|
size: 'mini',
|
|
21923
21964
|
disabled: inputValue === '' || XEUtils.eqNull(inputValue),
|
|
21924
21965
|
content: getI18n$2('vxe.button.clear'),
|
|
@@ -21926,7 +21967,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
21926
21967
|
})
|
|
21927
21968
|
: renderEmptyElement$1($xeDatePicker),
|
|
21928
21969
|
showConfirmBtn
|
|
21929
|
-
? h(
|
|
21970
|
+
? h(VxeButton, {
|
|
21930
21971
|
size: 'mini',
|
|
21931
21972
|
status: 'primary',
|
|
21932
21973
|
content: getI18n$2('vxe.button.confirm'),
|
|
@@ -23733,32 +23774,6 @@ const Divider = VxeDivider;
|
|
|
23733
23774
|
|
|
23734
23775
|
const allActiveDrawers = [];
|
|
23735
23776
|
|
|
23736
|
-
const VxeLoading = Object.assign({}, VxeLoadingComponent, {
|
|
23737
|
-
install(app) {
|
|
23738
|
-
app.component(VxeLoadingComponent.name, VxeLoadingComponent);
|
|
23739
|
-
}
|
|
23740
|
-
});
|
|
23741
|
-
const LoadingController = {
|
|
23742
|
-
open(options) {
|
|
23743
|
-
const opts = Object.assign({}, options);
|
|
23744
|
-
dynamicStore.globalLoading = Object.assign({
|
|
23745
|
-
modelValue: true,
|
|
23746
|
-
text: opts.text,
|
|
23747
|
-
icon: opts.icon
|
|
23748
|
-
}, { key: 'gl' });
|
|
23749
|
-
checkDynamic();
|
|
23750
|
-
return Promise.resolve();
|
|
23751
|
-
},
|
|
23752
|
-
close() {
|
|
23753
|
-
dynamicStore.globalLoading = null;
|
|
23754
|
-
return Promise.resolve();
|
|
23755
|
-
}
|
|
23756
|
-
};
|
|
23757
|
-
dynamicApp.use(VxeLoading);
|
|
23758
|
-
VxeUI.component(VxeLoadingComponent);
|
|
23759
|
-
VxeUI.loading = LoadingController;
|
|
23760
|
-
const Loading = VxeLoading;
|
|
23761
|
-
|
|
23762
23777
|
var VxeDrawerComponent = defineVxeComponent({
|
|
23763
23778
|
name: 'VxeDrawer',
|
|
23764
23779
|
props: {
|
|
@@ -27595,7 +27610,7 @@ var VxeIconPickerComponent = defineVxeComponent({
|
|
|
27595
27610
|
? h('div', {
|
|
27596
27611
|
class: 'vxe-ico-picker--panel-search'
|
|
27597
27612
|
}, [
|
|
27598
|
-
h(
|
|
27613
|
+
h(VxeInput, {
|
|
27599
27614
|
ref: refInpSearch,
|
|
27600
27615
|
class: 'vxe-ico-picker-search--input',
|
|
27601
27616
|
modelValue: reactData.searchValue,
|
|
@@ -28766,282 +28781,900 @@ dynamicApp.use(VxeImagePreview);
|
|
|
28766
28781
|
VxeUI.component(VxeImagePreviewComponent);
|
|
28767
28782
|
const ImagePreview = VxeImagePreview;
|
|
28768
28783
|
|
|
28769
|
-
|
|
28770
|
-
|
|
28771
|
-
|
|
28772
|
-
|
|
28773
|
-
|
|
28774
|
-
|
|
28775
|
-
loading: Boolean,
|
|
28776
|
-
padding: Boolean,
|
|
28777
|
-
collapseConfig: Object,
|
|
28778
|
-
size: {
|
|
28779
|
-
type: String,
|
|
28780
|
-
default: () => getConfig$4().layoutAside.size || getConfig$4().size
|
|
28781
|
-
}
|
|
28782
|
-
},
|
|
28783
|
-
emits: [],
|
|
28784
|
-
setup(props, context) {
|
|
28785
|
-
const { slots, emit } = context;
|
|
28786
|
-
const xID = XEUtils.uniqueId();
|
|
28787
|
-
const refElem = ref();
|
|
28788
|
-
const { computeSize } = useSize(props);
|
|
28789
|
-
const reactData = reactive({});
|
|
28790
|
-
const refMaps = {
|
|
28791
|
-
refElem
|
|
28792
|
-
};
|
|
28793
|
-
const computeCollapseOpts = computed(() => {
|
|
28794
|
-
return Object.assign({}, getConfig$4().layoutAside.collapseConfig, props.collapseConfig);
|
|
28795
|
-
});
|
|
28796
|
-
const computeVarStyle = computed(() => {
|
|
28797
|
-
const { width, collapseWidth } = props;
|
|
28798
|
-
const stys = {};
|
|
28799
|
-
if (collapseWidth) {
|
|
28800
|
-
stys['--vxe-ui-layout-aside-collapse-width'] = toCssUnit(collapseWidth);
|
|
28801
|
-
}
|
|
28802
|
-
if (width) {
|
|
28803
|
-
stys['--vxe-ui-layout-aside-default-width'] = toCssUnit(width);
|
|
28804
|
-
}
|
|
28805
|
-
return stys;
|
|
28806
|
-
});
|
|
28807
|
-
const computeMaps = {
|
|
28808
|
-
computeSize,
|
|
28809
|
-
computeVarStyle
|
|
28810
|
-
};
|
|
28811
|
-
const $xeLayoutAside = {
|
|
28812
|
-
xID,
|
|
28813
|
-
props,
|
|
28814
|
-
context,
|
|
28815
|
-
reactData,
|
|
28816
|
-
getRefMaps: () => refMaps,
|
|
28817
|
-
getComputeMaps: () => computeMaps
|
|
28818
|
-
};
|
|
28819
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
28820
|
-
emit(type, createEvent$1(evnt, { $layoutAside: $xeLayoutAside }, params));
|
|
28821
|
-
};
|
|
28822
|
-
const layoutAsideMethods = {
|
|
28823
|
-
dispatchEvent
|
|
28824
|
-
};
|
|
28825
|
-
const layoutAsidePrivateMethods = {};
|
|
28826
|
-
Object.assign($xeLayoutAside, layoutAsideMethods, layoutAsidePrivateMethods);
|
|
28827
|
-
const renderVN = () => {
|
|
28828
|
-
const { collapsed, loading, padding } = props;
|
|
28829
|
-
const varStyle = computeVarStyle.value;
|
|
28830
|
-
const vSize = computeSize.value;
|
|
28831
|
-
const collapseOpts = computeCollapseOpts.value;
|
|
28832
|
-
const defaultSlot = slots.default;
|
|
28833
|
-
return h('aside', {
|
|
28834
|
-
ref: refElem,
|
|
28835
|
-
class: ['vxe-layout-aside', {
|
|
28836
|
-
[`size--${vSize}`]: vSize,
|
|
28837
|
-
'is--animat': collapseOpts.animation !== false,
|
|
28838
|
-
'is--padding': padding,
|
|
28839
|
-
'is--collapse': collapsed,
|
|
28840
|
-
'is--loading': loading
|
|
28841
|
-
}],
|
|
28842
|
-
style: varStyle
|
|
28843
|
-
}, [
|
|
28844
|
-
h('div', {
|
|
28845
|
-
class: 'vxe-layout-aside--inner'
|
|
28846
|
-
}, defaultSlot ? defaultSlot({}) : []),
|
|
28847
|
-
/**
|
|
28848
|
-
* 加载中
|
|
28849
|
-
*/
|
|
28850
|
-
h(VxeLoading, {
|
|
28851
|
-
class: 'vxe-list-view--loading',
|
|
28852
|
-
modelValue: loading
|
|
28853
|
-
})
|
|
28854
|
-
]);
|
|
28855
|
-
};
|
|
28856
|
-
provide('$xeLayoutAside', $xeLayoutAside);
|
|
28857
|
-
$xeLayoutAside.renderVN = renderVN;
|
|
28858
|
-
return $xeLayoutAside;
|
|
28859
|
-
},
|
|
28860
|
-
render() {
|
|
28861
|
-
return this.renderVN();
|
|
28784
|
+
/**
|
|
28785
|
+
* 计算滚动条滑块的长度
|
|
28786
|
+
*/
|
|
28787
|
+
function getThumbSize(viewportSize, contentSize, trackSize) {
|
|
28788
|
+
if (contentSize <= viewportSize) {
|
|
28789
|
+
return 0;
|
|
28862
28790
|
}
|
|
28863
|
-
|
|
28864
|
-
|
|
28865
|
-
|
|
28866
|
-
|
|
28867
|
-
|
|
28791
|
+
const ratio = viewportSize / contentSize;
|
|
28792
|
+
const ideal = trackSize * ratio;
|
|
28793
|
+
return Math.max(20, Math.min(ideal, trackSize));
|
|
28794
|
+
}
|
|
28795
|
+
/**
|
|
28796
|
+
* 计算滚动条滑块的偏移位置
|
|
28797
|
+
*/
|
|
28798
|
+
function getThumbOffsetSize(offsetSize, viewportSize, contentSize, trackSize, thumbSize) {
|
|
28799
|
+
const maxScroll = contentSize - viewportSize;
|
|
28800
|
+
if (maxScroll <= 0) {
|
|
28801
|
+
return 0;
|
|
28868
28802
|
}
|
|
28869
|
-
|
|
28870
|
-
|
|
28871
|
-
|
|
28872
|
-
|
|
28873
|
-
|
|
28874
|
-
|
|
28875
|
-
return
|
|
28803
|
+
const maxThumbOffset = trackSize - thumbSize;
|
|
28804
|
+
if (maxThumbOffset <= 0) {
|
|
28805
|
+
return 0;
|
|
28806
|
+
}
|
|
28807
|
+
const clamped = Math.min(Math.max(offsetSize, 0), maxScroll);
|
|
28808
|
+
const ratio = clamped / maxScroll;
|
|
28809
|
+
return ratio * maxThumbOffset;
|
|
28810
|
+
}
|
|
28811
|
+
/**
|
|
28812
|
+
* 根据点击轨道的位置,计算滑块的偏移位置
|
|
28813
|
+
*/
|
|
28814
|
+
function getScrollFromClick(clickPosition, viewportSize, contentSize, trackSize, thumbSize) {
|
|
28815
|
+
const maxThumbOffset = trackSize - thumbSize;
|
|
28816
|
+
const maxScroll = contentSize - viewportSize;
|
|
28817
|
+
if (maxScroll <= 0 || maxThumbOffset <= 0) {
|
|
28818
|
+
return 0;
|
|
28819
|
+
}
|
|
28820
|
+
let thumbOffset = clickPosition - thumbSize / 2;
|
|
28821
|
+
thumbOffset = Math.min(Math.max(thumbOffset, 0), maxThumbOffset);
|
|
28822
|
+
const scrollOffset = (thumbOffset / maxThumbOffset) * maxScroll;
|
|
28823
|
+
return scrollOffset;
|
|
28824
|
+
}
|
|
28825
|
+
/**
|
|
28826
|
+
* 拖拽 thumb 时,根据鼠标位置计算滑块的偏移位置
|
|
28827
|
+
*/
|
|
28828
|
+
function getScrollFromDrag(pointerPosition, dragOffset, viewportSize, contentSize, trackSize, thumbSize) {
|
|
28829
|
+
const maxScroll = contentSize - viewportSize;
|
|
28830
|
+
const maxThumbOffset = trackSize - thumbSize;
|
|
28831
|
+
if (maxScroll <= 0 || maxThumbOffset <= 0) {
|
|
28832
|
+
return 0;
|
|
28833
|
+
}
|
|
28834
|
+
let thumbOffset = pointerPosition - dragOffset;
|
|
28835
|
+
thumbOffset = Math.min(Math.max(thumbOffset, 0), maxThumbOffset);
|
|
28836
|
+
return (thumbOffset / maxThumbOffset) * maxScroll;
|
|
28876
28837
|
}
|
|
28838
|
+
|
|
28839
|
+
const { getConfig: getConfig$2, createEvent, domUtils, globalResize, renderEmptyElement } = VxeUI;
|
|
28877
28840
|
function createReactData$d() {
|
|
28878
|
-
return {
|
|
28841
|
+
return {
|
|
28842
|
+
yThumbHeight: 0,
|
|
28843
|
+
xThumbWidth: 0
|
|
28844
|
+
};
|
|
28879
28845
|
}
|
|
28880
|
-
|
|
28881
|
-
|
|
28846
|
+
function createInternalData$c() {
|
|
28847
|
+
return {
|
|
28848
|
+
// resizeObserver: undefined,
|
|
28849
|
+
// isThumbDrag: false,
|
|
28850
|
+
thumbDragOffset: 0,
|
|
28851
|
+
yThumbTop: 0,
|
|
28852
|
+
xThumbLeft: 0,
|
|
28853
|
+
lastScrollTop: 0,
|
|
28854
|
+
lastScrollLeft: 0
|
|
28855
|
+
};
|
|
28856
|
+
}
|
|
28857
|
+
var VxeScrollbarComponent = defineVxeComponent({
|
|
28858
|
+
name: 'VxeScrollbar',
|
|
28882
28859
|
props: {
|
|
28860
|
+
id: [String, Number],
|
|
28861
|
+
width: [String, Number],
|
|
28862
|
+
height: [String, Number],
|
|
28863
|
+
minWidth: [String, Number],
|
|
28864
|
+
minHeight: [String, Number],
|
|
28865
|
+
maxWidth: [String, Number],
|
|
28866
|
+
maxHeight: [String, Number],
|
|
28883
28867
|
loading: Boolean,
|
|
28884
|
-
|
|
28885
|
-
showBacktop: {
|
|
28868
|
+
native: {
|
|
28886
28869
|
type: Boolean,
|
|
28887
|
-
default: () => getConfig$
|
|
28870
|
+
default: () => getConfig$2().scrollbar.native
|
|
28888
28871
|
},
|
|
28889
|
-
|
|
28890
|
-
|
|
28872
|
+
xConfig: Object,
|
|
28873
|
+
yConfig: Object,
|
|
28874
|
+
className: {
|
|
28891
28875
|
type: String,
|
|
28892
|
-
default: () => getConfig$
|
|
28893
|
-
}
|
|
28876
|
+
default: () => getConfig$2().scrollbar.className
|
|
28877
|
+
},
|
|
28878
|
+
viewAttrs: {
|
|
28879
|
+
type: Object,
|
|
28880
|
+
default: () => getConfig$2().scrollbar.viewAttrs
|
|
28881
|
+
},
|
|
28882
|
+
viewClassName: {
|
|
28883
|
+
type: String,
|
|
28884
|
+
default: () => getConfig$2().scrollbar.viewClassName
|
|
28885
|
+
},
|
|
28886
|
+
viewInnerClassName: {
|
|
28887
|
+
type: String,
|
|
28888
|
+
default: () => getConfig$2().scrollbar.viewInnerClassName
|
|
28889
|
+
},
|
|
28890
|
+
autoResize: {
|
|
28891
|
+
type: Boolean,
|
|
28892
|
+
default: () => getConfig$2().scrollbar.autoResize
|
|
28893
|
+
},
|
|
28894
|
+
syncResize: [Boolean, String, Number]
|
|
28894
28895
|
},
|
|
28895
|
-
emits: [
|
|
28896
|
+
emits: [
|
|
28897
|
+
'scroll',
|
|
28898
|
+
'scroll-boundary'
|
|
28899
|
+
],
|
|
28896
28900
|
setup(props, context) {
|
|
28897
|
-
const {
|
|
28901
|
+
const { emit, slots } = context;
|
|
28898
28902
|
const xID = XEUtils.uniqueId();
|
|
28899
|
-
const backtopId = `vxe_layout_body_backtop_${xID}`;
|
|
28900
28903
|
const refElem = ref();
|
|
28901
|
-
const
|
|
28902
|
-
const
|
|
28904
|
+
const refViewElem = ref();
|
|
28905
|
+
const refViewInnerElem = ref();
|
|
28906
|
+
const refTrackXElem = ref();
|
|
28907
|
+
const refTrackYElem = ref();
|
|
28908
|
+
const refThumbXElem = ref();
|
|
28909
|
+
const refThumbYElem = ref();
|
|
28903
28910
|
const reactData = reactive(createReactData$d());
|
|
28904
|
-
const
|
|
28905
|
-
|
|
28906
|
-
|
|
28907
|
-
|
|
28908
|
-
|
|
28909
|
-
|
|
28910
|
-
|
|
28911
|
-
|
|
28912
|
-
const computeMaps = {
|
|
28913
|
-
computeSize
|
|
28914
|
-
};
|
|
28915
|
-
const $xeLayoutBody = {
|
|
28916
|
-
xID,
|
|
28917
|
-
props,
|
|
28918
|
-
context,
|
|
28919
|
-
internalData,
|
|
28920
|
-
reactData,
|
|
28921
|
-
getRefMaps: () => refMaps,
|
|
28922
|
-
getComputeMaps: () => computeMaps
|
|
28923
|
-
};
|
|
28924
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
28925
|
-
emit(type, createEvent$1(evnt, { $layoutBody: $xeLayoutBody }, params));
|
|
28926
|
-
};
|
|
28927
|
-
const layoutBodyMethods = {
|
|
28928
|
-
dispatchEvent
|
|
28929
|
-
};
|
|
28930
|
-
const layoutBodyPrivateMethods = {};
|
|
28931
|
-
Object.assign($xeLayoutBody, layoutBodyMethods, layoutBodyPrivateMethods);
|
|
28932
|
-
const renderVN = () => {
|
|
28933
|
-
const { loading, padding, showBacktop } = props;
|
|
28934
|
-
const backtopOpts = computeBacktopOpts.value;
|
|
28935
|
-
const vSize = computeSize.value;
|
|
28936
|
-
const defaultSlot = slots.default;
|
|
28937
|
-
const backtopSlot = slots.backtop;
|
|
28938
|
-
const backtopTopSlot = slots.backtopTop || slots['backtop-top'];
|
|
28939
|
-
const backtopBottomSlot = slots.backtopBottom || slots['backtop-bottom'];
|
|
28940
|
-
const backtopScopeSlots = {};
|
|
28941
|
-
if (backtopSlot) {
|
|
28942
|
-
backtopScopeSlots.default = backtopSlot;
|
|
28911
|
+
const internalData = createInternalData$c();
|
|
28912
|
+
const computeWrapperStyle = computed(() => {
|
|
28913
|
+
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props;
|
|
28914
|
+
const xOpts = computeXOpts.value;
|
|
28915
|
+
const yOpts = computeYOpts.value;
|
|
28916
|
+
const stys = {};
|
|
28917
|
+
if (width) {
|
|
28918
|
+
stys.width = toCssUnit(width);
|
|
28943
28919
|
}
|
|
28944
|
-
if (
|
|
28945
|
-
|
|
28920
|
+
if (height) {
|
|
28921
|
+
stys.height = toCssUnit(height);
|
|
28946
28922
|
}
|
|
28947
|
-
if (
|
|
28948
|
-
|
|
28923
|
+
if (minWidth) {
|
|
28924
|
+
stys.minWidth = toCssUnit(minWidth);
|
|
28949
28925
|
}
|
|
28950
|
-
|
|
28951
|
-
|
|
28952
|
-
|
|
28953
|
-
|
|
28954
|
-
|
|
28955
|
-
|
|
28956
|
-
|
|
28957
|
-
|
|
28958
|
-
|
|
28959
|
-
|
|
28960
|
-
|
|
28961
|
-
|
|
28962
|
-
|
|
28963
|
-
|
|
28964
|
-
|
|
28965
|
-
|
|
28966
|
-
|
|
28967
|
-
|
|
28968
|
-
|
|
28969
|
-
|
|
28970
|
-
|
|
28971
|
-
|
|
28972
|
-
|
|
28973
|
-
|
|
28974
|
-
|
|
28926
|
+
if (minHeight) {
|
|
28927
|
+
stys.minHeight = toCssUnit(minHeight);
|
|
28928
|
+
}
|
|
28929
|
+
if (maxWidth) {
|
|
28930
|
+
stys.maxWidth = toCssUnit(maxWidth);
|
|
28931
|
+
}
|
|
28932
|
+
if (maxHeight) {
|
|
28933
|
+
stys.maxHeight = toCssUnit(maxHeight);
|
|
28934
|
+
}
|
|
28935
|
+
if (yOpts.width) {
|
|
28936
|
+
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(yOpts.width);
|
|
28937
|
+
}
|
|
28938
|
+
if (xOpts.height) {
|
|
28939
|
+
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(xOpts.height);
|
|
28940
|
+
}
|
|
28941
|
+
return stys;
|
|
28942
|
+
});
|
|
28943
|
+
const computeWrapperClss = computed(() => {
|
|
28944
|
+
const { native, className } = props;
|
|
28945
|
+
const { yThumbHeight, xThumbWidth } = reactData;
|
|
28946
|
+
const xOpts = computeXOpts.value;
|
|
28947
|
+
const yOpts = computeYOpts.value;
|
|
28948
|
+
return domUtils.buildClass([
|
|
28949
|
+
'vxe-scrollbar',
|
|
28950
|
+
`ov-x--${xOpts.visible || 'visible'}`,
|
|
28951
|
+
`ov-y--${yOpts.visible || 'visible'}`,
|
|
28952
|
+
native ? 'is--native' : 'is--virtual',
|
|
28953
|
+
className
|
|
28954
|
+
], {
|
|
28955
|
+
'ov-x--auto-hide': xOpts.autoHide,
|
|
28956
|
+
'ov-y--auto-hide': yOpts.autoHide,
|
|
28957
|
+
'overflow-y': yThumbHeight,
|
|
28958
|
+
'overflow-x': xThumbWidth
|
|
28959
|
+
});
|
|
28960
|
+
});
|
|
28961
|
+
const computeViewClss = computed(() => {
|
|
28962
|
+
const { viewClassName } = props;
|
|
28963
|
+
return domUtils.buildClass([
|
|
28964
|
+
'vxe-scrollbar--view',
|
|
28965
|
+
viewClassName
|
|
28975
28966
|
]);
|
|
28976
|
-
};
|
|
28977
|
-
|
|
28978
|
-
|
|
28979
|
-
|
|
28980
|
-
|
|
28981
|
-
|
|
28982
|
-
|
|
28983
|
-
});
|
|
28984
|
-
|
|
28985
|
-
|
|
28986
|
-
|
|
28987
|
-
|
|
28988
|
-
|
|
28989
|
-
});
|
|
28990
|
-
dynamicApp.use(VxeLayoutBody);
|
|
28991
|
-
VxeUI.component(VxeLayoutBodyComponent);
|
|
28992
|
-
const LayoutBody = VxeLayoutBody;
|
|
28993
|
-
|
|
28994
|
-
var VxeLayoutContainerComponent = defineVxeComponent({
|
|
28995
|
-
name: 'VxeLayoutContainer',
|
|
28996
|
-
props: {
|
|
28997
|
-
vertical: Boolean,
|
|
28998
|
-
size: {
|
|
28999
|
-
type: String,
|
|
29000
|
-
default: () => getConfig$4().layoutContainer.size || getConfig$4().size
|
|
29001
|
-
}
|
|
29002
|
-
},
|
|
29003
|
-
emits: [],
|
|
29004
|
-
setup(props, context) {
|
|
29005
|
-
const { slots, emit } = context;
|
|
29006
|
-
const xID = XEUtils.uniqueId();
|
|
29007
|
-
const refElem = ref();
|
|
29008
|
-
const { computeSize } = useSize(props);
|
|
29009
|
-
const reactData = reactive({});
|
|
28967
|
+
});
|
|
28968
|
+
const computeViewInnerClss = computed(() => {
|
|
28969
|
+
const { viewInnerClassName } = props;
|
|
28970
|
+
return domUtils.buildClass([
|
|
28971
|
+
'vxe-scrollbar--view-inner',
|
|
28972
|
+
viewInnerClassName
|
|
28973
|
+
]);
|
|
28974
|
+
});
|
|
28975
|
+
const computeXOpts = computed(() => {
|
|
28976
|
+
return Object.assign({}, getConfig$2().scrollbar.xConfig, props.xConfig);
|
|
28977
|
+
});
|
|
28978
|
+
const computeYOpts = computed(() => {
|
|
28979
|
+
return Object.assign({}, getConfig$2().scrollbar.yConfig, props.yConfig);
|
|
28980
|
+
});
|
|
29010
28981
|
const refMaps = {
|
|
29011
28982
|
refElem
|
|
29012
28983
|
};
|
|
29013
|
-
const computeMaps = {
|
|
29014
|
-
|
|
29015
|
-
};
|
|
29016
|
-
const $xeLayoutContainer = {
|
|
28984
|
+
const computeMaps = {};
|
|
28985
|
+
const $xeScrollbar = {
|
|
29017
28986
|
xID,
|
|
29018
28987
|
props,
|
|
29019
28988
|
context,
|
|
29020
28989
|
reactData,
|
|
28990
|
+
internalData,
|
|
29021
28991
|
getRefMaps: () => refMaps,
|
|
29022
28992
|
getComputeMaps: () => computeMaps
|
|
29023
28993
|
};
|
|
29024
28994
|
const dispatchEvent = (type, params, evnt) => {
|
|
29025
|
-
emit(type, createEvent
|
|
28995
|
+
emit(type, createEvent(evnt, { $scrollbar: $xeScrollbar }, params));
|
|
29026
28996
|
};
|
|
29027
|
-
const
|
|
29028
|
-
dispatchEvent
|
|
28997
|
+
const scrollbarMethods = {
|
|
28998
|
+
dispatchEvent,
|
|
28999
|
+
scrollTo(left, top) {
|
|
29000
|
+
const viewEl = refViewElem.value;
|
|
29001
|
+
if (viewEl) {
|
|
29002
|
+
if (XEUtils.isNumber(left)) {
|
|
29003
|
+
viewEl.scrollTo(left, top || 0);
|
|
29004
|
+
}
|
|
29005
|
+
else {
|
|
29006
|
+
viewEl.scrollTo(left);
|
|
29007
|
+
}
|
|
29008
|
+
}
|
|
29009
|
+
},
|
|
29010
|
+
scrollIntoView() {
|
|
29011
|
+
const viewEl = refViewElem.value;
|
|
29012
|
+
if (viewEl) {
|
|
29013
|
+
viewEl.scrollIntoView();
|
|
29014
|
+
}
|
|
29015
|
+
},
|
|
29016
|
+
recalculate() {
|
|
29017
|
+
updateThumbSize();
|
|
29018
|
+
updateThumbOffset();
|
|
29019
|
+
return nextTick();
|
|
29020
|
+
}
|
|
29029
29021
|
};
|
|
29030
|
-
const
|
|
29031
|
-
|
|
29032
|
-
|
|
29033
|
-
|
|
29034
|
-
|
|
29035
|
-
const
|
|
29036
|
-
|
|
29037
|
-
|
|
29038
|
-
|
|
29039
|
-
|
|
29040
|
-
|
|
29041
|
-
|
|
29042
|
-
|
|
29022
|
+
const updateThumbSize = () => {
|
|
29023
|
+
const viewEl = refViewElem.value;
|
|
29024
|
+
if (!viewEl) {
|
|
29025
|
+
return;
|
|
29026
|
+
}
|
|
29027
|
+
const trackXEl = refTrackXElem.value;
|
|
29028
|
+
const xThumbWidth = trackXEl ? getThumbSize(viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth) : 0;
|
|
29029
|
+
const thumbXElem = refThumbXElem.value;
|
|
29030
|
+
if (thumbXElem) {
|
|
29031
|
+
thumbXElem.style.width = xThumbWidth + 'px';
|
|
29032
|
+
}
|
|
29033
|
+
reactData.xThumbWidth = xThumbWidth;
|
|
29034
|
+
const trackYEl = refTrackYElem.value;
|
|
29035
|
+
const yThumbHeight = trackYEl ? getThumbSize(viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight) : 0;
|
|
29036
|
+
const thumbYElem = refThumbYElem.value;
|
|
29037
|
+
if (thumbYElem) {
|
|
29038
|
+
thumbYElem.style.height = yThumbHeight + 'px';
|
|
29039
|
+
}
|
|
29040
|
+
reactData.yThumbHeight = yThumbHeight;
|
|
29043
29041
|
};
|
|
29044
|
-
|
|
29042
|
+
const updateThumbOffset = () => {
|
|
29043
|
+
const viewEl = refViewElem.value;
|
|
29044
|
+
if (!viewEl) {
|
|
29045
|
+
return;
|
|
29046
|
+
}
|
|
29047
|
+
const { xThumbWidth, yThumbHeight } = reactData;
|
|
29048
|
+
const trackXEl = refTrackXElem.value;
|
|
29049
|
+
const thumbXElem = refThumbXElem.value;
|
|
29050
|
+
const xThumbLeft = trackXEl && xThumbWidth ? getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth, xThumbWidth) : 0;
|
|
29051
|
+
internalData.xThumbLeft = xThumbLeft;
|
|
29052
|
+
if (thumbXElem && xThumbWidth) {
|
|
29053
|
+
thumbXElem.style.width = xThumbWidth + 'px';
|
|
29054
|
+
thumbXElem.style.transform = `translateX(${xThumbLeft}px)`;
|
|
29055
|
+
}
|
|
29056
|
+
const trackYEl = refTrackYElem.value;
|
|
29057
|
+
const thumbYElem = refThumbYElem.value;
|
|
29058
|
+
const yThumbTop = trackYEl && yThumbHeight ? getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight, yThumbHeight) : 0;
|
|
29059
|
+
internalData.yThumbTop = yThumbTop;
|
|
29060
|
+
if (thumbYElem && yThumbHeight) {
|
|
29061
|
+
thumbYElem.style.height = yThumbHeight + 'px';
|
|
29062
|
+
thumbYElem.style.transform = `translateY(${yThumbTop}px)`;
|
|
29063
|
+
}
|
|
29064
|
+
};
|
|
29065
|
+
const scrollEvent = (evnt) => {
|
|
29066
|
+
const { xThumbWidth, yThumbHeight } = reactData;
|
|
29067
|
+
const { lastScrollTop, lastScrollLeft } = internalData;
|
|
29068
|
+
const xOpts = computeXOpts.value;
|
|
29069
|
+
const yOpts = computeYOpts.value;
|
|
29070
|
+
const viewEl = evnt.currentTarget;
|
|
29071
|
+
const { scrollTop, scrollLeft, clientWidth, clientHeight, scrollHeight, scrollWidth } = viewEl;
|
|
29072
|
+
let direction = '';
|
|
29073
|
+
let isTopBoundary = false;
|
|
29074
|
+
let isBottomBoundary = false;
|
|
29075
|
+
let isLeftBoundary = false;
|
|
29076
|
+
let isRightBoundary = false;
|
|
29077
|
+
if (lastScrollTop !== scrollTop) {
|
|
29078
|
+
const yThreshold = XEUtils.toNumber(yOpts.threshold) || 1;
|
|
29079
|
+
if (lastScrollTop < scrollTop) {
|
|
29080
|
+
direction = 'bottom';
|
|
29081
|
+
if (yThumbHeight > 0 && scrollTop + clientHeight >= scrollHeight - yThreshold) {
|
|
29082
|
+
isBottomBoundary = true;
|
|
29083
|
+
}
|
|
29084
|
+
}
|
|
29085
|
+
else {
|
|
29086
|
+
direction = 'top';
|
|
29087
|
+
if (yThumbHeight > 0 && scrollTop <= yThreshold) {
|
|
29088
|
+
isTopBoundary = true;
|
|
29089
|
+
}
|
|
29090
|
+
}
|
|
29091
|
+
}
|
|
29092
|
+
if (lastScrollLeft !== scrollLeft) {
|
|
29093
|
+
const xThreshold = XEUtils.toNumber(xOpts.threshold) || 1;
|
|
29094
|
+
if (lastScrollLeft < scrollLeft) {
|
|
29095
|
+
direction = 'right';
|
|
29096
|
+
if (xThumbWidth > 0 && scrollLeft + clientWidth >= scrollWidth - xThreshold) {
|
|
29097
|
+
isRightBoundary = true;
|
|
29098
|
+
}
|
|
29099
|
+
}
|
|
29100
|
+
else {
|
|
29101
|
+
direction = 'left';
|
|
29102
|
+
if (xThumbWidth > 0 && scrollLeft <= xThreshold) {
|
|
29103
|
+
isLeftBoundary = true;
|
|
29104
|
+
}
|
|
29105
|
+
}
|
|
29106
|
+
}
|
|
29107
|
+
updateThumbOffset();
|
|
29108
|
+
internalData.lastScrollTop = scrollTop;
|
|
29109
|
+
internalData.lastScrollLeft = scrollLeft;
|
|
29110
|
+
if (isBottomBoundary || isTopBoundary || isRightBoundary || isLeftBoundary) {
|
|
29111
|
+
dispatchEvent('scroll-boundary', {
|
|
29112
|
+
direction: direction,
|
|
29113
|
+
isTop: isTopBoundary,
|
|
29114
|
+
isBottom: isBottomBoundary,
|
|
29115
|
+
isLeft: isLeftBoundary,
|
|
29116
|
+
isRight: isRightBoundary,
|
|
29117
|
+
scrollTop: scrollTop,
|
|
29118
|
+
scrollLeft: scrollLeft,
|
|
29119
|
+
clientWidth: clientWidth,
|
|
29120
|
+
clientHeight: clientHeight,
|
|
29121
|
+
scrollHeight: scrollHeight,
|
|
29122
|
+
scrollWidth: scrollWidth
|
|
29123
|
+
}, evnt);
|
|
29124
|
+
}
|
|
29125
|
+
dispatchEvent('scroll', {
|
|
29126
|
+
direction: direction,
|
|
29127
|
+
isTop: yThumbHeight > 0 && scrollTop <= 0,
|
|
29128
|
+
isBottom: yThumbHeight > 0 && scrollTop + clientHeight >= scrollHeight,
|
|
29129
|
+
isLeft: xThumbWidth > 0 && scrollLeft <= 0,
|
|
29130
|
+
isRight: xThumbWidth > 0 && scrollLeft + clientWidth >= scrollWidth,
|
|
29131
|
+
scrollTop: scrollTop,
|
|
29132
|
+
scrollLeft: scrollLeft,
|
|
29133
|
+
clientWidth: clientWidth,
|
|
29134
|
+
clientHeight: clientHeight,
|
|
29135
|
+
scrollHeight: scrollHeight,
|
|
29136
|
+
scrollWidth: scrollWidth
|
|
29137
|
+
}, evnt);
|
|
29138
|
+
};
|
|
29139
|
+
const clickTrackXEvent = (evnt) => {
|
|
29140
|
+
const trackEl = evnt.currentTarget;
|
|
29141
|
+
if (trackEl !== evnt.target) {
|
|
29142
|
+
return;
|
|
29143
|
+
}
|
|
29144
|
+
const viewEl = refViewElem.value;
|
|
29145
|
+
if (!viewEl) {
|
|
29146
|
+
return;
|
|
29147
|
+
}
|
|
29148
|
+
const { xThumbWidth } = reactData;
|
|
29149
|
+
const trackRect = trackEl.getBoundingClientRect();
|
|
29150
|
+
viewEl.scrollTo({
|
|
29151
|
+
left: getScrollFromClick(evnt.clientX - trackRect.left, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth),
|
|
29152
|
+
behavior: 'auto'
|
|
29153
|
+
});
|
|
29154
|
+
};
|
|
29155
|
+
const clickTrackYEvent = (evnt) => {
|
|
29156
|
+
const trackEl = evnt.currentTarget;
|
|
29157
|
+
if (trackEl !== evnt.target) {
|
|
29158
|
+
return;
|
|
29159
|
+
}
|
|
29160
|
+
const viewEl = refViewElem.value;
|
|
29161
|
+
if (!viewEl) {
|
|
29162
|
+
return;
|
|
29163
|
+
}
|
|
29164
|
+
const { yThumbHeight } = reactData;
|
|
29165
|
+
const trackRect = trackEl.getBoundingClientRect();
|
|
29166
|
+
viewEl.scrollTo({
|
|
29167
|
+
top: getScrollFromClick(evnt.clientY - trackRect.top, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight),
|
|
29168
|
+
behavior: 'auto'
|
|
29169
|
+
});
|
|
29170
|
+
};
|
|
29171
|
+
const pointerdownThumbXEvent = (evnt) => {
|
|
29172
|
+
const thumbEl = evnt.currentTarget;
|
|
29173
|
+
internalData.isThumbDrag = true;
|
|
29174
|
+
thumbEl.setPointerCapture(evnt.pointerId);
|
|
29175
|
+
const viewEl = refViewElem.value;
|
|
29176
|
+
if (!viewEl) {
|
|
29177
|
+
return;
|
|
29178
|
+
}
|
|
29179
|
+
const { xThumbWidth } = reactData;
|
|
29180
|
+
const trackEl = thumbEl.parentElement;
|
|
29181
|
+
const trackRect = trackEl.getBoundingClientRect();
|
|
29182
|
+
const pointerPosition = evnt.clientX - trackRect.left;
|
|
29183
|
+
// 记录 thumb 的偏移
|
|
29184
|
+
const thumbOffset = getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
29185
|
+
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
29186
|
+
};
|
|
29187
|
+
const pointermoveThumbXEvent = (evnt) => {
|
|
29188
|
+
const thumbEl = evnt.currentTarget;
|
|
29189
|
+
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
29190
|
+
return;
|
|
29191
|
+
}
|
|
29192
|
+
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
29193
|
+
if (isThumbDrag) {
|
|
29194
|
+
const viewEl = refViewElem.value;
|
|
29195
|
+
if (!viewEl) {
|
|
29196
|
+
return;
|
|
29197
|
+
}
|
|
29198
|
+
const { xThumbWidth } = reactData;
|
|
29199
|
+
const thumbEl = evnt.currentTarget;
|
|
29200
|
+
const trackEl = thumbEl.parentElement;
|
|
29201
|
+
const trackRect = trackEl.getBoundingClientRect();
|
|
29202
|
+
// 更新偏移
|
|
29203
|
+
viewEl.scrollLeft = getScrollFromDrag(evnt.clientX - trackRect.left, thumbDragOffset, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
29204
|
+
}
|
|
29205
|
+
};
|
|
29206
|
+
const cleatPointerThumbEvent = (evnt) => {
|
|
29207
|
+
const thumbEl = evnt.currentTarget;
|
|
29208
|
+
thumbEl.releasePointerCapture(evnt.pointerId);
|
|
29209
|
+
internalData.isThumbDrag = false;
|
|
29210
|
+
};
|
|
29211
|
+
const pointerdownThumbYEvent = (evnt) => {
|
|
29212
|
+
const thumbEl = evnt.currentTarget;
|
|
29213
|
+
internalData.isThumbDrag = true;
|
|
29214
|
+
thumbEl.setPointerCapture(evnt.pointerId);
|
|
29215
|
+
const viewEl = refViewElem.value;
|
|
29216
|
+
if (!viewEl) {
|
|
29217
|
+
return;
|
|
29218
|
+
}
|
|
29219
|
+
const { yThumbHeight } = reactData;
|
|
29220
|
+
const trackEl = thumbEl.parentElement;
|
|
29221
|
+
const trackRect = trackEl.getBoundingClientRect();
|
|
29222
|
+
const pointerPosition = evnt.clientY - trackRect.top;
|
|
29223
|
+
// 记录 thumb 的偏移
|
|
29224
|
+
const thumbOffset = getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
29225
|
+
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
29226
|
+
};
|
|
29227
|
+
const pointermoveThumbYEvent = (evnt) => {
|
|
29228
|
+
const thumbEl = evnt.currentTarget;
|
|
29229
|
+
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
29230
|
+
return;
|
|
29231
|
+
}
|
|
29232
|
+
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
29233
|
+
if (isThumbDrag) {
|
|
29234
|
+
const viewEl = refViewElem.value;
|
|
29235
|
+
if (!viewEl) {
|
|
29236
|
+
return;
|
|
29237
|
+
}
|
|
29238
|
+
const { yThumbHeight } = reactData;
|
|
29239
|
+
const thumbEl = evnt.currentTarget;
|
|
29240
|
+
const trackEl = thumbEl.parentElement;
|
|
29241
|
+
const trackRect = trackEl.getBoundingClientRect();
|
|
29242
|
+
// 更新偏移
|
|
29243
|
+
viewEl.scrollTop = getScrollFromDrag(evnt.clientY - trackRect.top, thumbDragOffset, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
29244
|
+
}
|
|
29245
|
+
};
|
|
29246
|
+
const scrollbarPrivateMethods = {};
|
|
29247
|
+
Object.assign($xeScrollbar, scrollbarMethods, scrollbarPrivateMethods);
|
|
29248
|
+
const renderVN = () => {
|
|
29249
|
+
const { id, native, loading, viewAttrs } = props;
|
|
29250
|
+
const wrapperStyle = computeWrapperStyle.value;
|
|
29251
|
+
const wrapperClss = computeWrapperClss.value;
|
|
29252
|
+
const viewClss = computeViewClss.value;
|
|
29253
|
+
const viewInnerClss = computeViewInnerClss.value;
|
|
29254
|
+
const xOpts = computeXOpts.value;
|
|
29255
|
+
const yOpts = computeYOpts.value;
|
|
29256
|
+
const defaultSlot = slots.default;
|
|
29257
|
+
return h('div', {
|
|
29258
|
+
ref: refElem,
|
|
29259
|
+
id: id || null,
|
|
29260
|
+
class: wrapperClss,
|
|
29261
|
+
style: wrapperStyle
|
|
29262
|
+
}, [
|
|
29263
|
+
h('div', Object.assign({ ref: refViewElem, class: viewClss, onScroll: scrollEvent }, viewAttrs), [
|
|
29264
|
+
h('div', {
|
|
29265
|
+
key: 'vi',
|
|
29266
|
+
ref: refViewInnerElem,
|
|
29267
|
+
class: viewInnerClss
|
|
29268
|
+
}, defaultSlot ? defaultSlot({}) : [])
|
|
29269
|
+
]),
|
|
29270
|
+
native || xOpts.visible === 'hidden'
|
|
29271
|
+
? renderEmptyElement($xeScrollbar)
|
|
29272
|
+
: h('div', {
|
|
29273
|
+
ref: refTrackXElem,
|
|
29274
|
+
class: 'vxe-scrollbar--track-x',
|
|
29275
|
+
onClick: clickTrackXEvent
|
|
29276
|
+
}, [
|
|
29277
|
+
h('div', {
|
|
29278
|
+
ref: refThumbXElem,
|
|
29279
|
+
class: 'vxe-scrollbar--thumb-x',
|
|
29280
|
+
onPointerdown: pointerdownThumbXEvent,
|
|
29281
|
+
onPointermove: pointermoveThumbXEvent,
|
|
29282
|
+
onPointerup: cleatPointerThumbEvent,
|
|
29283
|
+
onPointercancel: cleatPointerThumbEvent,
|
|
29284
|
+
onLostpointercapture: cleatPointerThumbEvent
|
|
29285
|
+
})
|
|
29286
|
+
]),
|
|
29287
|
+
native || yOpts.visible === 'hidden'
|
|
29288
|
+
? renderEmptyElement($xeScrollbar)
|
|
29289
|
+
: h('div', {
|
|
29290
|
+
ref: refTrackYElem,
|
|
29291
|
+
class: 'vxe-scrollbar--track-y',
|
|
29292
|
+
onClick: clickTrackYEvent
|
|
29293
|
+
}, [
|
|
29294
|
+
h('div', {
|
|
29295
|
+
ref: refThumbYElem,
|
|
29296
|
+
class: 'vxe-scrollbar--thumb-y',
|
|
29297
|
+
onPointerdown: pointerdownThumbYEvent,
|
|
29298
|
+
onPointermove: pointermoveThumbYEvent,
|
|
29299
|
+
onPointerup: cleatPointerThumbEvent,
|
|
29300
|
+
onPointercancel: cleatPointerThumbEvent,
|
|
29301
|
+
onLostpointercapture: cleatPointerThumbEvent
|
|
29302
|
+
})
|
|
29303
|
+
]),
|
|
29304
|
+
h(VxeLoading, {
|
|
29305
|
+
class: 'vxe-scrollbar--loading',
|
|
29306
|
+
modelValue: loading
|
|
29307
|
+
})
|
|
29308
|
+
]);
|
|
29309
|
+
};
|
|
29310
|
+
const reFlag = ref(0);
|
|
29311
|
+
watch(() => props.height, () => {
|
|
29312
|
+
reFlag.value++;
|
|
29313
|
+
});
|
|
29314
|
+
watch(() => props.width, () => {
|
|
29315
|
+
reFlag.value++;
|
|
29316
|
+
});
|
|
29317
|
+
watch(() => props.minHeight, () => {
|
|
29318
|
+
reFlag.value++;
|
|
29319
|
+
});
|
|
29320
|
+
watch(() => props.minWidth, () => {
|
|
29321
|
+
reFlag.value++;
|
|
29322
|
+
});
|
|
29323
|
+
watch(() => props.maxHeight, () => {
|
|
29324
|
+
reFlag.value++;
|
|
29325
|
+
});
|
|
29326
|
+
watch(() => props.maxWidth, () => {
|
|
29327
|
+
reFlag.value++;
|
|
29328
|
+
});
|
|
29329
|
+
watch(() => props.native, () => {
|
|
29330
|
+
reFlag.value++;
|
|
29331
|
+
});
|
|
29332
|
+
watch(() => props.syncResize, () => {
|
|
29333
|
+
reFlag.value++;
|
|
29334
|
+
});
|
|
29335
|
+
watch(reFlag, () => {
|
|
29336
|
+
$xeScrollbar.recalculate().then(() => {
|
|
29337
|
+
$xeScrollbar.recalculate();
|
|
29338
|
+
});
|
|
29339
|
+
});
|
|
29340
|
+
onMounted(() => {
|
|
29341
|
+
const { autoResize } = props;
|
|
29342
|
+
const viewEl = refViewElem.value;
|
|
29343
|
+
const viewInnerEl = refViewInnerElem.value;
|
|
29344
|
+
if (autoResize) {
|
|
29345
|
+
const resizeObserver = globalResize.create(() => {
|
|
29346
|
+
if (props.autoResize) {
|
|
29347
|
+
reFlag.value++;
|
|
29348
|
+
}
|
|
29349
|
+
});
|
|
29350
|
+
if (viewEl) {
|
|
29351
|
+
resizeObserver.observe(viewEl);
|
|
29352
|
+
}
|
|
29353
|
+
if (viewInnerEl) {
|
|
29354
|
+
resizeObserver.observe(viewInnerEl);
|
|
29355
|
+
}
|
|
29356
|
+
internalData.resizeObserver = resizeObserver;
|
|
29357
|
+
}
|
|
29358
|
+
reFlag.value++;
|
|
29359
|
+
});
|
|
29360
|
+
onBeforeUnmount(() => {
|
|
29361
|
+
const { resizeObserver } = internalData;
|
|
29362
|
+
if (resizeObserver) {
|
|
29363
|
+
resizeObserver.disconnect();
|
|
29364
|
+
}
|
|
29365
|
+
});
|
|
29366
|
+
$xeScrollbar.renderVN = renderVN;
|
|
29367
|
+
return $xeScrollbar;
|
|
29368
|
+
},
|
|
29369
|
+
render() {
|
|
29370
|
+
return this.renderVN();
|
|
29371
|
+
}
|
|
29372
|
+
});
|
|
29373
|
+
|
|
29374
|
+
const VxeScrollbar = Object.assign({}, VxeScrollbarComponent, {
|
|
29375
|
+
install(app) {
|
|
29376
|
+
app.component(VxeScrollbarComponent.name, VxeScrollbarComponent);
|
|
29377
|
+
}
|
|
29378
|
+
});
|
|
29379
|
+
dynamicApp.use(VxeScrollbar);
|
|
29380
|
+
VxeUI.component(VxeScrollbarComponent);
|
|
29381
|
+
const Scrollbar = VxeScrollbar;
|
|
29382
|
+
|
|
29383
|
+
var VxeLayoutAsideComponent = defineVxeComponent({
|
|
29384
|
+
name: 'VxeLayoutAside',
|
|
29385
|
+
props: {
|
|
29386
|
+
width: [String, Number],
|
|
29387
|
+
collapsed: Boolean,
|
|
29388
|
+
collapseWidth: [String, Number],
|
|
29389
|
+
loading: Boolean,
|
|
29390
|
+
padding: Boolean,
|
|
29391
|
+
collapseConfig: Object,
|
|
29392
|
+
scrollbarConfig: Object,
|
|
29393
|
+
size: {
|
|
29394
|
+
type: String,
|
|
29395
|
+
default: () => getConfig$4().layoutAside.size || getConfig$4().size
|
|
29396
|
+
}
|
|
29397
|
+
},
|
|
29398
|
+
emits: [],
|
|
29399
|
+
setup(props, context) {
|
|
29400
|
+
const { slots, emit } = context;
|
|
29401
|
+
const xID = XEUtils.uniqueId();
|
|
29402
|
+
const refElem = ref();
|
|
29403
|
+
const { computeSize } = useSize(props);
|
|
29404
|
+
const reactData = reactive({});
|
|
29405
|
+
const refMaps = {
|
|
29406
|
+
refElem
|
|
29407
|
+
};
|
|
29408
|
+
const computeCollapseOpts = computed(() => {
|
|
29409
|
+
return Object.assign({}, getConfig$4().layoutAside.collapseConfig, props.collapseConfig);
|
|
29410
|
+
});
|
|
29411
|
+
const computeScrollbarOpts = computed(() => {
|
|
29412
|
+
return Object.assign({}, getConfig$4().layoutAside.scrollbarConfig, props.scrollbarConfig);
|
|
29413
|
+
});
|
|
29414
|
+
const computeVarStyle = computed(() => {
|
|
29415
|
+
const { width, collapseWidth } = props;
|
|
29416
|
+
const stys = {};
|
|
29417
|
+
if (collapseWidth) {
|
|
29418
|
+
stys['--vxe-ui-layout-aside-collapse-width'] = toCssUnit(collapseWidth);
|
|
29419
|
+
}
|
|
29420
|
+
if (width) {
|
|
29421
|
+
stys['--vxe-ui-layout-aside-default-width'] = toCssUnit(width);
|
|
29422
|
+
}
|
|
29423
|
+
return stys;
|
|
29424
|
+
});
|
|
29425
|
+
const computeMaps = {
|
|
29426
|
+
computeSize,
|
|
29427
|
+
computeVarStyle
|
|
29428
|
+
};
|
|
29429
|
+
const $xeLayoutAside = {
|
|
29430
|
+
xID,
|
|
29431
|
+
props,
|
|
29432
|
+
context,
|
|
29433
|
+
reactData,
|
|
29434
|
+
getRefMaps: () => refMaps,
|
|
29435
|
+
getComputeMaps: () => computeMaps
|
|
29436
|
+
};
|
|
29437
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
29438
|
+
emit(type, createEvent$1(evnt, { $layoutAside: $xeLayoutAside }, params));
|
|
29439
|
+
};
|
|
29440
|
+
const layoutAsideMethods = {
|
|
29441
|
+
dispatchEvent
|
|
29442
|
+
};
|
|
29443
|
+
const layoutAsidePrivateMethods = {};
|
|
29444
|
+
Object.assign($xeLayoutAside, layoutAsideMethods, layoutAsidePrivateMethods);
|
|
29445
|
+
const renderVN = () => {
|
|
29446
|
+
const { collapsed, loading, padding } = props;
|
|
29447
|
+
const varStyle = computeVarStyle.value;
|
|
29448
|
+
const vSize = computeSize.value;
|
|
29449
|
+
const collapseOpts = computeCollapseOpts.value;
|
|
29450
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
29451
|
+
const { native, yConfig, className, viewAttrs, viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
29452
|
+
const defaultSlot = slots.default;
|
|
29453
|
+
return h('aside', {
|
|
29454
|
+
ref: refElem,
|
|
29455
|
+
class: ['vxe-layout-aside', {
|
|
29456
|
+
[`size--${vSize}`]: vSize,
|
|
29457
|
+
'is--animat': collapseOpts.animation !== false,
|
|
29458
|
+
'is--padding': padding,
|
|
29459
|
+
'is--collapse': collapsed,
|
|
29460
|
+
'is--loading': loading
|
|
29461
|
+
}],
|
|
29462
|
+
style: varStyle
|
|
29463
|
+
}, [
|
|
29464
|
+
h(VxeScrollbar, {
|
|
29465
|
+
loading,
|
|
29466
|
+
native,
|
|
29467
|
+
xConfig: {
|
|
29468
|
+
visible: 'hidden'
|
|
29469
|
+
},
|
|
29470
|
+
yConfig,
|
|
29471
|
+
className: 'vxe-layout-aside--scrollbar' + (className ? (' ' + className) : ''),
|
|
29472
|
+
viewAttrs,
|
|
29473
|
+
viewClassName: 'vxe-layout-aside--view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
29474
|
+
viewInnerClassName: 'vxe-layout-aside--inner' + (viewInnerClassName ? (' ' + viewInnerClassName) : '')
|
|
29475
|
+
}, {
|
|
29476
|
+
default: () => {
|
|
29477
|
+
return defaultSlot ? defaultSlot({}) : [];
|
|
29478
|
+
}
|
|
29479
|
+
})
|
|
29480
|
+
]);
|
|
29481
|
+
};
|
|
29482
|
+
provide('$xeLayoutAside', $xeLayoutAside);
|
|
29483
|
+
$xeLayoutAside.renderVN = renderVN;
|
|
29484
|
+
return $xeLayoutAside;
|
|
29485
|
+
},
|
|
29486
|
+
render() {
|
|
29487
|
+
return this.renderVN();
|
|
29488
|
+
}
|
|
29489
|
+
});
|
|
29490
|
+
|
|
29491
|
+
const VxeLayoutAside = Object.assign({}, VxeLayoutAsideComponent, {
|
|
29492
|
+
install(app) {
|
|
29493
|
+
app.component(VxeLayoutAsideComponent.name, VxeLayoutAsideComponent);
|
|
29494
|
+
}
|
|
29495
|
+
});
|
|
29496
|
+
dynamicApp.use(VxeLayoutAside);
|
|
29497
|
+
VxeUI.component(VxeLayoutAsideComponent);
|
|
29498
|
+
const LayoutAside = VxeLayoutAside;
|
|
29499
|
+
|
|
29500
|
+
function createInternalData$b() {
|
|
29501
|
+
return {};
|
|
29502
|
+
}
|
|
29503
|
+
function createReactData$c() {
|
|
29504
|
+
return {};
|
|
29505
|
+
}
|
|
29506
|
+
var VxeLayoutBodyComponent = defineVxeComponent({
|
|
29507
|
+
name: 'VxeLayoutBody',
|
|
29508
|
+
props: {
|
|
29509
|
+
loading: Boolean,
|
|
29510
|
+
padding: Boolean,
|
|
29511
|
+
showBacktop: {
|
|
29512
|
+
type: Boolean,
|
|
29513
|
+
default: () => getConfig$4().layoutBody.showBacktop
|
|
29514
|
+
},
|
|
29515
|
+
backtopConfig: Object,
|
|
29516
|
+
scrollbarConfig: Object,
|
|
29517
|
+
size: {
|
|
29518
|
+
type: String,
|
|
29519
|
+
default: () => getConfig$4().layoutBody.size || getConfig$4().size
|
|
29520
|
+
}
|
|
29521
|
+
},
|
|
29522
|
+
emits: [],
|
|
29523
|
+
setup(props, context) {
|
|
29524
|
+
const { slots, emit } = context;
|
|
29525
|
+
const xID = XEUtils.uniqueId();
|
|
29526
|
+
const backtopId = `vxe_layout_body_backtop_${xID}`;
|
|
29527
|
+
const refElem = ref();
|
|
29528
|
+
const { computeSize } = useSize(props);
|
|
29529
|
+
const internalData = createInternalData$b();
|
|
29530
|
+
const reactData = reactive(createReactData$c());
|
|
29531
|
+
const refMaps = {
|
|
29532
|
+
refElem
|
|
29533
|
+
};
|
|
29534
|
+
const computeBacktopOpts = computed(() => {
|
|
29535
|
+
return Object.assign({}, getConfig$4().layoutBody.backtopConfig, props.backtopConfig, {
|
|
29536
|
+
target: '#' + backtopId
|
|
29537
|
+
});
|
|
29538
|
+
});
|
|
29539
|
+
const computeScrollbarOpts = computed(() => {
|
|
29540
|
+
return Object.assign({}, getConfig$4().layoutBody.scrollbarConfig, props.scrollbarConfig);
|
|
29541
|
+
});
|
|
29542
|
+
const computeMaps = {
|
|
29543
|
+
computeSize
|
|
29544
|
+
};
|
|
29545
|
+
const $xeLayoutBody = {
|
|
29546
|
+
xID,
|
|
29547
|
+
props,
|
|
29548
|
+
context,
|
|
29549
|
+
internalData,
|
|
29550
|
+
reactData,
|
|
29551
|
+
getRefMaps: () => refMaps,
|
|
29552
|
+
getComputeMaps: () => computeMaps
|
|
29553
|
+
};
|
|
29554
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
29555
|
+
emit(type, createEvent$1(evnt, { $layoutBody: $xeLayoutBody }, params));
|
|
29556
|
+
};
|
|
29557
|
+
const layoutBodyMethods = {
|
|
29558
|
+
dispatchEvent
|
|
29559
|
+
};
|
|
29560
|
+
const layoutBodyPrivateMethods = {};
|
|
29561
|
+
Object.assign($xeLayoutBody, layoutBodyMethods, layoutBodyPrivateMethods);
|
|
29562
|
+
const renderVN = () => {
|
|
29563
|
+
const { loading, padding, showBacktop } = props;
|
|
29564
|
+
const backtopOpts = computeBacktopOpts.value;
|
|
29565
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
29566
|
+
const { native, xConfig, yConfig, className, viewAttrs, viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
29567
|
+
const vSize = computeSize.value;
|
|
29568
|
+
const defaultSlot = slots.default;
|
|
29569
|
+
const backtopSlot = slots.backtop;
|
|
29570
|
+
const backtopTopSlot = slots.backtopTop || slots['backtop-top'];
|
|
29571
|
+
const backtopBottomSlot = slots.backtopBottom || slots['backtop-bottom'];
|
|
29572
|
+
const backtopScopeSlots = {};
|
|
29573
|
+
if (backtopSlot) {
|
|
29574
|
+
backtopScopeSlots.default = backtopSlot;
|
|
29575
|
+
}
|
|
29576
|
+
if (backtopTopSlot) {
|
|
29577
|
+
backtopScopeSlots.top = backtopTopSlot;
|
|
29578
|
+
}
|
|
29579
|
+
if (backtopBottomSlot) {
|
|
29580
|
+
backtopScopeSlots.bottom = backtopBottomSlot;
|
|
29581
|
+
}
|
|
29582
|
+
return h('div', {
|
|
29583
|
+
ref: refElem,
|
|
29584
|
+
class: ['vxe-layout-body', {
|
|
29585
|
+
[`size--${vSize}`]: vSize,
|
|
29586
|
+
'is--loading': loading,
|
|
29587
|
+
'is--padding': padding
|
|
29588
|
+
}]
|
|
29589
|
+
}, [
|
|
29590
|
+
h(VxeScrollbar, {
|
|
29591
|
+
loading,
|
|
29592
|
+
native,
|
|
29593
|
+
xConfig,
|
|
29594
|
+
yConfig,
|
|
29595
|
+
className: 'vxe-layout-body--scrollbar' + (className ? (' ' + className) : ''),
|
|
29596
|
+
viewAttrs: Object.assign(Object.assign({}, viewAttrs), { id: showBacktop ? (backtopId || null) : null }),
|
|
29597
|
+
viewClassName: 'vxe-layout-body--view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
29598
|
+
viewInnerClassName: 'vxe-layout-body--inner' + (viewInnerClassName ? (' ' + viewInnerClassName) : '')
|
|
29599
|
+
}, {
|
|
29600
|
+
default: () => defaultSlot ? defaultSlot({}) : []
|
|
29601
|
+
}),
|
|
29602
|
+
/**
|
|
29603
|
+
* 回到顶部
|
|
29604
|
+
*/
|
|
29605
|
+
showBacktop
|
|
29606
|
+
? h(VxeBacktop, backtopOpts, backtopScopeSlots)
|
|
29607
|
+
: renderEmptyElement$1($xeLayoutBody)
|
|
29608
|
+
]);
|
|
29609
|
+
};
|
|
29610
|
+
$xeLayoutBody.renderVN = renderVN;
|
|
29611
|
+
return $xeLayoutBody;
|
|
29612
|
+
},
|
|
29613
|
+
render() {
|
|
29614
|
+
return this.renderVN();
|
|
29615
|
+
}
|
|
29616
|
+
});
|
|
29617
|
+
|
|
29618
|
+
const VxeLayoutBody = Object.assign({}, VxeLayoutBodyComponent, {
|
|
29619
|
+
install(app) {
|
|
29620
|
+
app.component(VxeLayoutBodyComponent.name, VxeLayoutBodyComponent);
|
|
29621
|
+
}
|
|
29622
|
+
});
|
|
29623
|
+
dynamicApp.use(VxeLayoutBody);
|
|
29624
|
+
VxeUI.component(VxeLayoutBodyComponent);
|
|
29625
|
+
const LayoutBody = VxeLayoutBody;
|
|
29626
|
+
|
|
29627
|
+
var VxeLayoutContainerComponent = defineVxeComponent({
|
|
29628
|
+
name: 'VxeLayoutContainer',
|
|
29629
|
+
props: {
|
|
29630
|
+
vertical: Boolean,
|
|
29631
|
+
size: {
|
|
29632
|
+
type: String,
|
|
29633
|
+
default: () => getConfig$4().layoutContainer.size || getConfig$4().size
|
|
29634
|
+
}
|
|
29635
|
+
},
|
|
29636
|
+
emits: [],
|
|
29637
|
+
setup(props, context) {
|
|
29638
|
+
const { slots, emit } = context;
|
|
29639
|
+
const xID = XEUtils.uniqueId();
|
|
29640
|
+
const refElem = ref();
|
|
29641
|
+
const { computeSize } = useSize(props);
|
|
29642
|
+
const reactData = reactive({});
|
|
29643
|
+
const refMaps = {
|
|
29644
|
+
refElem
|
|
29645
|
+
};
|
|
29646
|
+
const computeMaps = {
|
|
29647
|
+
computeSize
|
|
29648
|
+
};
|
|
29649
|
+
const $xeLayoutContainer = {
|
|
29650
|
+
xID,
|
|
29651
|
+
props,
|
|
29652
|
+
context,
|
|
29653
|
+
reactData,
|
|
29654
|
+
getRefMaps: () => refMaps,
|
|
29655
|
+
getComputeMaps: () => computeMaps
|
|
29656
|
+
};
|
|
29657
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
29658
|
+
emit(type, createEvent$1(evnt, { $layoutContainer: $xeLayoutContainer }, params));
|
|
29659
|
+
};
|
|
29660
|
+
const layoutContainerMethods = {
|
|
29661
|
+
dispatchEvent
|
|
29662
|
+
};
|
|
29663
|
+
const layoutContainerPrivateMethods = {};
|
|
29664
|
+
Object.assign($xeLayoutContainer, layoutContainerMethods, layoutContainerPrivateMethods);
|
|
29665
|
+
const renderVN = () => {
|
|
29666
|
+
const { vertical } = props;
|
|
29667
|
+
const vSize = computeSize.value;
|
|
29668
|
+
const defaultSlot = slots.default;
|
|
29669
|
+
return h('div', {
|
|
29670
|
+
ref: refElem,
|
|
29671
|
+
class: ['vxe-layout-container', {
|
|
29672
|
+
[`size--${vSize}`]: vSize,
|
|
29673
|
+
'is--vertical': vertical
|
|
29674
|
+
}]
|
|
29675
|
+
}, defaultSlot ? defaultSlot({}) : []);
|
|
29676
|
+
};
|
|
29677
|
+
$xeLayoutContainer.renderVN = renderVN;
|
|
29045
29678
|
return $xeLayoutContainer;
|
|
29046
29679
|
},
|
|
29047
29680
|
render() {
|
|
@@ -29316,8 +29949,8 @@ VxeUI.component(VxeLinkComponent);
|
|
|
29316
29949
|
const Link = VxeLink;
|
|
29317
29950
|
|
|
29318
29951
|
const { errLog: errLog$a } = createComponentLog('menu');
|
|
29319
|
-
const { menus: menus$1, getConfig: getConfig$
|
|
29320
|
-
function createInternalData$
|
|
29952
|
+
const { menus: menus$1, getConfig: getConfig$1, getIcon: getIcon$1 } = VxeUI;
|
|
29953
|
+
function createInternalData$a() {
|
|
29321
29954
|
return {
|
|
29322
29955
|
lastActiveTime: 0,
|
|
29323
29956
|
menuInitMaps: {},
|
|
@@ -29326,7 +29959,7 @@ function createInternalData$b() {
|
|
|
29326
29959
|
menuEffectMaps: {}
|
|
29327
29960
|
};
|
|
29328
29961
|
}
|
|
29329
|
-
function createReactData$
|
|
29962
|
+
function createReactData$b() {
|
|
29330
29963
|
return {
|
|
29331
29964
|
initialized: false,
|
|
29332
29965
|
isEnterCollapse: false,
|
|
@@ -29346,15 +29979,15 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29346
29979
|
expandKeys: Array,
|
|
29347
29980
|
accordion: {
|
|
29348
29981
|
type: Boolean,
|
|
29349
|
-
default: () => getConfig$
|
|
29982
|
+
default: () => getConfig$1().menu.accordion
|
|
29350
29983
|
},
|
|
29351
29984
|
border: {
|
|
29352
29985
|
type: [Boolean, String],
|
|
29353
|
-
default: () => getConfig$
|
|
29986
|
+
default: () => getConfig$1().menu.border
|
|
29354
29987
|
},
|
|
29355
29988
|
optionProps: {
|
|
29356
29989
|
type: Object,
|
|
29357
|
-
default: () => getConfig$
|
|
29990
|
+
default: () => getConfig$1().menu.optionProps
|
|
29358
29991
|
},
|
|
29359
29992
|
collapsed: {
|
|
29360
29993
|
type: Boolean,
|
|
@@ -29368,12 +30001,13 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29368
30001
|
},
|
|
29369
30002
|
size: {
|
|
29370
30003
|
type: String,
|
|
29371
|
-
default: () => getConfig$
|
|
30004
|
+
default: () => getConfig$1().menu.size || getConfig$1().size
|
|
29372
30005
|
},
|
|
29373
30006
|
menuConfig: Object,
|
|
30007
|
+
scrollbarConfig: Object,
|
|
29374
30008
|
appendTo: {
|
|
29375
30009
|
type: [String, Function],
|
|
29376
|
-
default: () => getConfig$
|
|
30010
|
+
default: () => getConfig$1().menu.appendTo
|
|
29377
30011
|
}
|
|
29378
30012
|
},
|
|
29379
30013
|
emits: [
|
|
@@ -29389,16 +30023,16 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29389
30023
|
const refElem = ref();
|
|
29390
30024
|
const refCollapseElem = ref();
|
|
29391
30025
|
const { computeSize } = useSize(props);
|
|
29392
|
-
const reactData = reactive(createReactData$
|
|
29393
|
-
const internalData = createInternalData$
|
|
30026
|
+
const reactData = reactive(createReactData$b());
|
|
30027
|
+
const internalData = createInternalData$a();
|
|
29394
30028
|
const refMaps = {
|
|
29395
30029
|
refElem
|
|
29396
30030
|
};
|
|
29397
30031
|
const computeMenuOpts = computed(() => {
|
|
29398
|
-
return Object.assign({}, getConfig$
|
|
30032
|
+
return Object.assign({}, getConfig$1().menu.menuConfig, props.menuConfig);
|
|
29399
30033
|
});
|
|
29400
30034
|
const computePropsOpts = computed(() => {
|
|
29401
|
-
return Object.assign({}, getConfig$
|
|
30035
|
+
return Object.assign({}, getConfig$1().menu.optionProps, props.optionProps);
|
|
29402
30036
|
});
|
|
29403
30037
|
const computeTitleField = computed(() => {
|
|
29404
30038
|
const propsOpts = computePropsOpts.value;
|
|
@@ -29420,6 +30054,9 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29420
30054
|
const propsOpts = computePropsOpts.value;
|
|
29421
30055
|
return propsOpts.routerLink || 'routerLink';
|
|
29422
30056
|
});
|
|
30057
|
+
const computeScrollbarOpts = computed(() => {
|
|
30058
|
+
return Object.assign({}, getConfig$1().menu.scrollbarConfig, props.scrollbarConfig);
|
|
30059
|
+
});
|
|
29423
30060
|
const computeCurrBorder = computed(() => {
|
|
29424
30061
|
const { border } = props;
|
|
29425
30062
|
if (border) {
|
|
@@ -29909,6 +30546,7 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29909
30546
|
const isCollapsed = computeIsCollapsed.value;
|
|
29910
30547
|
const currBorder = computeCurrBorder.value;
|
|
29911
30548
|
const varStyle = computeVarStyle.value;
|
|
30549
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
29912
30550
|
const headerSlot = slots.header;
|
|
29913
30551
|
const footerSlot = slots.footer;
|
|
29914
30552
|
let ons = {};
|
|
@@ -29957,9 +30595,9 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29957
30595
|
class: 'vxe-menu--header'
|
|
29958
30596
|
}, headerSlot(stParams))
|
|
29959
30597
|
: renderEmptyElement$1($xeMenu),
|
|
29960
|
-
h('
|
|
29961
|
-
|
|
29962
|
-
}
|
|
30598
|
+
h(VxeScrollbar, Object.assign({ class: 'vxe-menu--body' }, scrollbarOpts), {
|
|
30599
|
+
default: () => menuList.map(child => renderDefaultChildren(child, menuList))
|
|
30600
|
+
}),
|
|
29963
30601
|
footerSlot
|
|
29964
30602
|
? h('div', {
|
|
29965
30603
|
class: 'vxe-menu--footer'
|
|
@@ -29972,7 +30610,7 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29972
30610
|
* 加载中
|
|
29973
30611
|
*/
|
|
29974
30612
|
h(VxeLoading, {
|
|
29975
|
-
class: 'vxe-
|
|
30613
|
+
class: 'vxe-menu-view--loading',
|
|
29976
30614
|
modelValue: loading
|
|
29977
30615
|
})
|
|
29978
30616
|
]);
|
|
@@ -30014,8 +30652,8 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
30014
30652
|
});
|
|
30015
30653
|
onBeforeUnmount(() => {
|
|
30016
30654
|
globalEvents.off($xeMenu, 'resize');
|
|
30017
|
-
XEUtils.assign(reactData, createReactData$
|
|
30018
|
-
XEUtils.assign(internalData, createInternalData$
|
|
30655
|
+
XEUtils.assign(reactData, createReactData$b());
|
|
30656
|
+
XEUtils.assign(internalData, createInternalData$a());
|
|
30019
30657
|
});
|
|
30020
30658
|
reactData.initialized = !!props.collapsed;
|
|
30021
30659
|
reactData.activeName = props.modelValue;
|
|
@@ -30041,13 +30679,13 @@ const Menu = VxeMenu;
|
|
|
30041
30679
|
const allActiveModals = [];
|
|
30042
30680
|
|
|
30043
30681
|
const { warnLog: warnLog$a, errLog: errLog$9 } = createComponentLog('modal');
|
|
30044
|
-
function createInternalData$
|
|
30682
|
+
function createInternalData$9() {
|
|
30045
30683
|
return {
|
|
30046
30684
|
// msgTimeout: undefined,
|
|
30047
30685
|
isMoveStatus: false
|
|
30048
30686
|
};
|
|
30049
30687
|
}
|
|
30050
|
-
function createReactData$
|
|
30688
|
+
function createReactData$a() {
|
|
30051
30689
|
return {
|
|
30052
30690
|
initialized: false,
|
|
30053
30691
|
visible: false,
|
|
@@ -30279,8 +30917,8 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30279
30917
|
const $xeTable = inject('$xeTable', null);
|
|
30280
30918
|
const $xeForm = inject('$xeForm', null);
|
|
30281
30919
|
const { computeSize } = useSize(props);
|
|
30282
|
-
const reactData = reactive(createReactData$
|
|
30283
|
-
const internalData = createInternalData$
|
|
30920
|
+
const reactData = reactive(createReactData$a());
|
|
30921
|
+
const internalData = createInternalData$9();
|
|
30284
30922
|
const refElem = ref();
|
|
30285
30923
|
const refModalBox = ref();
|
|
30286
30924
|
const refHeaderElem = ref();
|
|
@@ -31548,8 +32186,8 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
31548
32186
|
removeMsgQueue();
|
|
31549
32187
|
removeActiveQueue();
|
|
31550
32188
|
removeBodyLockScroll();
|
|
31551
|
-
XEUtils.assign(reactData, createReactData$
|
|
31552
|
-
XEUtils.assign(internalData, createInternalData$
|
|
32189
|
+
XEUtils.assign(reactData, createReactData$a());
|
|
32190
|
+
XEUtils.assign(internalData, createInternalData$9());
|
|
31553
32191
|
});
|
|
31554
32192
|
provide('$xeModal', $xeModal);
|
|
31555
32193
|
return $xeModal;
|
|
@@ -31988,7 +32626,7 @@ function isOptionVisible(option) {
|
|
|
31988
32626
|
function getOptUniqueId$1() {
|
|
31989
32627
|
return XEUtils.uniqueId('opt_');
|
|
31990
32628
|
}
|
|
31991
|
-
function createReactData$
|
|
32629
|
+
function createReactData$9() {
|
|
31992
32630
|
return {
|
|
31993
32631
|
initialized: false,
|
|
31994
32632
|
scrollYLoad: false,
|
|
@@ -32009,7 +32647,7 @@ function createReactData$a() {
|
|
|
32009
32647
|
isActivated: false
|
|
32010
32648
|
};
|
|
32011
32649
|
}
|
|
32012
|
-
function createInternalData$
|
|
32650
|
+
function createInternalData$8() {
|
|
32013
32651
|
return {
|
|
32014
32652
|
// isLoaded: false,
|
|
32015
32653
|
synchData: [],
|
|
@@ -32190,8 +32828,8 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
32190
32828
|
const refOptionPanel = ref();
|
|
32191
32829
|
const refVirtualBody = ref();
|
|
32192
32830
|
const { computeSize } = useSize(props);
|
|
32193
|
-
const reactData = reactive(createReactData$
|
|
32194
|
-
const internalData = createInternalData$
|
|
32831
|
+
const reactData = reactive(createReactData$9());
|
|
32832
|
+
const internalData = createInternalData$8();
|
|
32195
32833
|
const refMaps = {
|
|
32196
32834
|
refElem
|
|
32197
32835
|
};
|
|
@@ -33534,7 +34172,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33534
34172
|
class: 'vxe-select-slots',
|
|
33535
34173
|
ref: 'hideOption'
|
|
33536
34174
|
}, defaultSlot ? defaultSlot({}) : []),
|
|
33537
|
-
h(
|
|
34175
|
+
h(VxeInput, {
|
|
33538
34176
|
ref: refInput,
|
|
33539
34177
|
clearable: props.clearable,
|
|
33540
34178
|
placeholder: inpPlaceholder,
|
|
@@ -33580,7 +34218,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33580
34218
|
? h('div', {
|
|
33581
34219
|
class: 'vxe-select--panel-search'
|
|
33582
34220
|
}, [
|
|
33583
|
-
h(
|
|
34221
|
+
h(VxeInput, {
|
|
33584
34222
|
ref: refInpSearch,
|
|
33585
34223
|
class: 'vxe-select-search--input',
|
|
33586
34224
|
modelValue: reactData.searchValue,
|
|
@@ -33610,14 +34248,14 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33610
34248
|
class: 'vxe-select--header-btns'
|
|
33611
34249
|
}, [
|
|
33612
34250
|
(showCheckedButton && multiple)
|
|
33613
|
-
? h(
|
|
34251
|
+
? h(VxeButton, {
|
|
33614
34252
|
content: getI18n$2('vxe.select.allChecked'),
|
|
33615
34253
|
mode: 'text',
|
|
33616
34254
|
onClick: allCheckedPanelEvent
|
|
33617
34255
|
})
|
|
33618
34256
|
: renderEmptyElement$1($xeSelect),
|
|
33619
34257
|
showClearButton
|
|
33620
|
-
? h(
|
|
34258
|
+
? h(VxeButton, {
|
|
33621
34259
|
content: getI18n$2('vxe.select.clear'),
|
|
33622
34260
|
mode: 'text',
|
|
33623
34261
|
onClick: clearCheckedPanelEvent
|
|
@@ -33668,7 +34306,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33668
34306
|
? h('div', {
|
|
33669
34307
|
class: 'vxe-select--oper-btns'
|
|
33670
34308
|
}, [
|
|
33671
|
-
h(
|
|
34309
|
+
h(VxeButton, {
|
|
33672
34310
|
content: getI18n$2('vxe.select.close'),
|
|
33673
34311
|
mode: 'text',
|
|
33674
34312
|
onClick: closePanelEvent
|
|
@@ -33715,8 +34353,8 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33715
34353
|
globalEvents.off($xeSelect, 'blur');
|
|
33716
34354
|
globalEvents.off($xeSelect, 'resize');
|
|
33717
34355
|
globalEvents.off($xeSelect, 'scroll');
|
|
33718
|
-
XEUtils.assign(reactData, createReactData$
|
|
33719
|
-
XEUtils.assign(internalData, createInternalData$
|
|
34356
|
+
XEUtils.assign(reactData, createReactData$9());
|
|
34357
|
+
XEUtils.assign(internalData, createInternalData$8());
|
|
33720
34358
|
});
|
|
33721
34359
|
provide('$xeSelect', $xeSelect);
|
|
33722
34360
|
$xeSelect.renderVN = renderVN;
|
|
@@ -36335,10 +36973,10 @@ dynamicApp.use(VxeRadioButton);
|
|
|
36335
36973
|
VxeUI.component(VxeRadioButtonComponent);
|
|
36336
36974
|
const RadioButton = VxeRadioButton;
|
|
36337
36975
|
|
|
36338
|
-
function createReactData$
|
|
36976
|
+
function createReactData$8() {
|
|
36339
36977
|
return {};
|
|
36340
36978
|
}
|
|
36341
|
-
function createInternalData$
|
|
36979
|
+
function createInternalData$7() {
|
|
36342
36980
|
return {
|
|
36343
36981
|
// isLoaded: false
|
|
36344
36982
|
};
|
|
@@ -36383,8 +37021,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
36383
37021
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
36384
37022
|
const xID = XEUtils.uniqueId();
|
|
36385
37023
|
const { computeSize } = useSize(props);
|
|
36386
|
-
const reactData = reactive(createReactData$
|
|
36387
|
-
const internalData = createInternalData$
|
|
37024
|
+
const reactData = reactive(createReactData$8());
|
|
37025
|
+
const internalData = createInternalData$7();
|
|
36388
37026
|
const computeIsReadonly = computed(() => {
|
|
36389
37027
|
const { readonly } = props;
|
|
36390
37028
|
if (readonly === null) {
|
|
@@ -36533,8 +37171,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
36533
37171
|
});
|
|
36534
37172
|
});
|
|
36535
37173
|
onUnmounted(() => {
|
|
36536
|
-
XEUtils.assign(reactData, createReactData$
|
|
36537
|
-
XEUtils.assign(internalData, createInternalData$
|
|
37174
|
+
XEUtils.assign(reactData, createReactData$8());
|
|
37175
|
+
XEUtils.assign(internalData, createInternalData$7());
|
|
36538
37176
|
});
|
|
36539
37177
|
provide('$xeRadioGroup', $xeRadioGroup);
|
|
36540
37178
|
$xeRadioGroup.renderVN = renderVN;
|
|
@@ -36612,765 +37250,212 @@ var VxeRateComponent = defineVxeComponent({
|
|
|
36612
37250
|
const computeNumVal = computed(() => {
|
|
36613
37251
|
const { modelValue } = props;
|
|
36614
37252
|
const { activeValue } = reactData;
|
|
36615
|
-
return XEUtils.toNumber(activeValue === null ? modelValue : activeValue);
|
|
36616
|
-
});
|
|
36617
|
-
const computeItemList = computed(() => {
|
|
36618
|
-
return [1, 2, 3, 4, 5].map(num => {
|
|
36619
|
-
return {
|
|
36620
|
-
value: num,
|
|
36621
|
-
label: num
|
|
36622
|
-
};
|
|
36623
|
-
});
|
|
36624
|
-
});
|
|
36625
|
-
const computeMaps = {};
|
|
36626
|
-
const $xeRate = {
|
|
36627
|
-
xID,
|
|
36628
|
-
props,
|
|
36629
|
-
context,
|
|
36630
|
-
reactData,
|
|
36631
|
-
getRefMaps: () => refMaps,
|
|
36632
|
-
getComputeMaps: () => computeMaps
|
|
36633
|
-
};
|
|
36634
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
36635
|
-
emit(type, createEvent$1(evnt, { $rate: $xeRate }, params));
|
|
36636
|
-
};
|
|
36637
|
-
const rateMethods = {
|
|
36638
|
-
dispatchEvent
|
|
36639
|
-
};
|
|
36640
|
-
const ratePrivateMethods = {};
|
|
36641
|
-
const emitModel = (value) => {
|
|
36642
|
-
emit('update:modelValue', value);
|
|
36643
|
-
};
|
|
36644
|
-
const mouseenterEvent = (evnt, item) => {
|
|
36645
|
-
const isDisabled = computeIsDisabled.value;
|
|
36646
|
-
const isReadonly = computeIsReadonly.value;
|
|
36647
|
-
if (!(isDisabled || isReadonly)) {
|
|
36648
|
-
const value = item.value;
|
|
36649
|
-
reactData.activeValue = value;
|
|
36650
|
-
}
|
|
36651
|
-
};
|
|
36652
|
-
const mouseleaveEvent = () => {
|
|
36653
|
-
reactData.activeValue = null;
|
|
36654
|
-
};
|
|
36655
|
-
const clickEvent = (evnt, item) => {
|
|
36656
|
-
const isDisabled = computeIsDisabled.value;
|
|
36657
|
-
const isReadonly = computeIsReadonly.value;
|
|
36658
|
-
if (!(isDisabled || isReadonly)) {
|
|
36659
|
-
const value = item.value;
|
|
36660
|
-
emitModel(value);
|
|
36661
|
-
dispatchEvent('change', { value }, evnt);
|
|
36662
|
-
// 自动更新校验状态
|
|
36663
|
-
if ($xeForm && formItemInfo) {
|
|
36664
|
-
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
36665
|
-
}
|
|
36666
|
-
}
|
|
36667
|
-
};
|
|
36668
|
-
Object.assign($xeRate, rateMethods, ratePrivateMethods);
|
|
36669
|
-
const renderVN = () => {
|
|
36670
|
-
const { status } = props;
|
|
36671
|
-
const isDisabled = computeIsDisabled.value;
|
|
36672
|
-
const isReadonly = computeIsReadonly.value;
|
|
36673
|
-
const itemList = computeItemList.value;
|
|
36674
|
-
const vSize = computeSize.value;
|
|
36675
|
-
const numVal = computeNumVal.value;
|
|
36676
|
-
return h('div', {
|
|
36677
|
-
ref: refElem,
|
|
36678
|
-
class: ['vxe-rate', {
|
|
36679
|
-
[`size--${vSize}`]: vSize,
|
|
36680
|
-
[`theme--${status}`]: status,
|
|
36681
|
-
'is--disabled': isDisabled,
|
|
36682
|
-
'is--readonly': isReadonly
|
|
36683
|
-
}]
|
|
36684
|
-
}, itemList.map(item => {
|
|
36685
|
-
const isChecked = numVal >= item.value;
|
|
36686
|
-
return h('div', {
|
|
36687
|
-
class: ['vxe-rte--item', {
|
|
36688
|
-
'is--checked': isChecked
|
|
36689
|
-
}],
|
|
36690
|
-
onMouseenter(evnt) {
|
|
36691
|
-
if (!(isDisabled || isReadonly)) {
|
|
36692
|
-
mouseenterEvent(evnt, item);
|
|
36693
|
-
}
|
|
36694
|
-
},
|
|
36695
|
-
onMouseleave: mouseleaveEvent,
|
|
36696
|
-
onClick(evnt) {
|
|
36697
|
-
if (!(isDisabled || isReadonly)) {
|
|
36698
|
-
clickEvent(evnt, item);
|
|
36699
|
-
}
|
|
36700
|
-
}
|
|
36701
|
-
}, [
|
|
36702
|
-
h('i', {
|
|
36703
|
-
class: isChecked ? getIcon$2().RATE_CHECKED : getIcon$2().RATE_UNCHECKED
|
|
36704
|
-
})
|
|
36705
|
-
]);
|
|
36706
|
-
}));
|
|
36707
|
-
};
|
|
36708
|
-
$xeRate.renderVN = renderVN;
|
|
36709
|
-
return $xeRate;
|
|
36710
|
-
},
|
|
36711
|
-
render() {
|
|
36712
|
-
return this.renderVN();
|
|
36713
|
-
}
|
|
36714
|
-
});
|
|
36715
|
-
|
|
36716
|
-
const VxeRate = Object.assign({}, VxeRateComponent, {
|
|
36717
|
-
install(app) {
|
|
36718
|
-
app.component(VxeRateComponent.name, VxeRateComponent);
|
|
36719
|
-
}
|
|
36720
|
-
});
|
|
36721
|
-
dynamicApp.use(VxeRate);
|
|
36722
|
-
VxeUI.component(VxeRateComponent);
|
|
36723
|
-
const Rate = VxeRate;
|
|
36724
|
-
|
|
36725
|
-
var VxeResultComponent = defineVxeComponent({
|
|
36726
|
-
name: 'VxeResult',
|
|
36727
|
-
props: {
|
|
36728
|
-
imageUrl: String,
|
|
36729
|
-
imageStyle: Object,
|
|
36730
|
-
icon: String,
|
|
36731
|
-
type: [String, Number],
|
|
36732
|
-
status: [String, Number],
|
|
36733
|
-
title: [String, Number],
|
|
36734
|
-
content: [String, Number]
|
|
36735
|
-
},
|
|
36736
|
-
emits: [],
|
|
36737
|
-
setup(props, context) {
|
|
36738
|
-
const { emit, slots } = context;
|
|
36739
|
-
const xID = XEUtils.uniqueId();
|
|
36740
|
-
const refElem = ref();
|
|
36741
|
-
const reactData = reactive({});
|
|
36742
|
-
const refMaps = {
|
|
36743
|
-
refElem
|
|
36744
|
-
};
|
|
36745
|
-
const computeMaps = {};
|
|
36746
|
-
const $xeResult = {
|
|
36747
|
-
xID,
|
|
36748
|
-
props,
|
|
36749
|
-
context,
|
|
36750
|
-
reactData,
|
|
36751
|
-
getRefMaps: () => refMaps,
|
|
36752
|
-
getComputeMaps: () => computeMaps
|
|
36753
|
-
};
|
|
36754
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
36755
|
-
emit(type, createEvent$1(evnt, { $result: $xeResult }, params));
|
|
36756
|
-
};
|
|
36757
|
-
const resultMethods = {
|
|
36758
|
-
dispatchEvent
|
|
36759
|
-
};
|
|
36760
|
-
const resultPrivateMethods = {};
|
|
36761
|
-
Object.assign($xeResult, resultMethods, resultPrivateMethods);
|
|
36762
|
-
const renderVN = () => {
|
|
36763
|
-
const { imageUrl, imageStyle, icon, title, type, content } = props;
|
|
36764
|
-
const status = props.status || type;
|
|
36765
|
-
const slotExtra = slots.extra;
|
|
36766
|
-
return h('div', {
|
|
36767
|
-
ref: refElem,
|
|
36768
|
-
class: ['vxe-result', {
|
|
36769
|
-
[`theme--${status}`]: status
|
|
36770
|
-
}]
|
|
36771
|
-
}, [
|
|
36772
|
-
h('div', {
|
|
36773
|
-
class: 'vxe-result--inner'
|
|
36774
|
-
}, [
|
|
36775
|
-
imageUrl
|
|
36776
|
-
? h('div', {
|
|
36777
|
-
class: 'vxe-result--img-wrapper'
|
|
36778
|
-
}, [
|
|
36779
|
-
h('img', {
|
|
36780
|
-
src: imageUrl,
|
|
36781
|
-
style: imageStyle
|
|
36782
|
-
})
|
|
36783
|
-
])
|
|
36784
|
-
: h('div', {
|
|
36785
|
-
class: 'vxe-result--icon-wrapper'
|
|
36786
|
-
}, [
|
|
36787
|
-
h('i', {
|
|
36788
|
-
class: [icon, type ? getIcon$2()[`RESULT_${type}`.toLocaleUpperCase()] : '']
|
|
36789
|
-
})
|
|
36790
|
-
]),
|
|
36791
|
-
h('div', {
|
|
36792
|
-
class: 'vxe-result--title-wrapper'
|
|
36793
|
-
}, `${title || ''}`),
|
|
36794
|
-
h('div', {
|
|
36795
|
-
class: 'vxe-result--content-wrapper'
|
|
36796
|
-
}, `${content || ''}`),
|
|
36797
|
-
slotExtra
|
|
36798
|
-
? h('div', {
|
|
36799
|
-
class: 'vxe-result--extra-wrapper'
|
|
36800
|
-
}, slotExtra({}))
|
|
36801
|
-
: renderEmptyElement$1($xeResult)
|
|
36802
|
-
])
|
|
36803
|
-
]);
|
|
36804
|
-
};
|
|
36805
|
-
$xeResult.renderVN = renderVN;
|
|
36806
|
-
return $xeResult;
|
|
36807
|
-
},
|
|
36808
|
-
render() {
|
|
36809
|
-
return this.renderVN();
|
|
36810
|
-
}
|
|
36811
|
-
});
|
|
36812
|
-
|
|
36813
|
-
const VxeResult = Object.assign({}, VxeResultComponent, {
|
|
36814
|
-
install(app) {
|
|
36815
|
-
app.component(VxeResultComponent.name, VxeResultComponent);
|
|
36816
|
-
}
|
|
36817
|
-
});
|
|
36818
|
-
dynamicApp.use(VxeResult);
|
|
36819
|
-
VxeUI.component(VxeResultComponent);
|
|
36820
|
-
const Result = VxeResult;
|
|
36821
|
-
|
|
36822
|
-
/**
|
|
36823
|
-
* 计算滚动条滑块的长度
|
|
36824
|
-
*/
|
|
36825
|
-
function getThumbSize(viewportSize, contentSize, trackSize) {
|
|
36826
|
-
if (contentSize <= viewportSize) {
|
|
36827
|
-
return 0;
|
|
36828
|
-
}
|
|
36829
|
-
const ratio = viewportSize / contentSize;
|
|
36830
|
-
const ideal = trackSize * ratio;
|
|
36831
|
-
return Math.max(20, Math.min(ideal, trackSize));
|
|
36832
|
-
}
|
|
36833
|
-
/**
|
|
36834
|
-
* 计算滚动条滑块的偏移位置
|
|
36835
|
-
*/
|
|
36836
|
-
function getThumbOffsetSize(offsetSize, viewportSize, contentSize, trackSize, thumbSize) {
|
|
36837
|
-
const maxScroll = contentSize - viewportSize;
|
|
36838
|
-
if (maxScroll <= 0) {
|
|
36839
|
-
return 0;
|
|
36840
|
-
}
|
|
36841
|
-
const maxThumbOffset = trackSize - thumbSize;
|
|
36842
|
-
if (maxThumbOffset <= 0) {
|
|
36843
|
-
return 0;
|
|
36844
|
-
}
|
|
36845
|
-
const clamped = Math.min(Math.max(offsetSize, 0), maxScroll);
|
|
36846
|
-
const ratio = clamped / maxScroll;
|
|
36847
|
-
return ratio * maxThumbOffset;
|
|
36848
|
-
}
|
|
36849
|
-
/**
|
|
36850
|
-
* 根据点击轨道的位置,计算滑块的偏移位置
|
|
36851
|
-
*/
|
|
36852
|
-
function getScrollFromClick(clickPosition, viewportSize, contentSize, trackSize, thumbSize) {
|
|
36853
|
-
const maxThumbOffset = trackSize - thumbSize;
|
|
36854
|
-
const maxScroll = contentSize - viewportSize;
|
|
36855
|
-
if (maxScroll <= 0 || maxThumbOffset <= 0) {
|
|
36856
|
-
return 0;
|
|
36857
|
-
}
|
|
36858
|
-
let thumbOffset = clickPosition - thumbSize / 2;
|
|
36859
|
-
thumbOffset = Math.min(Math.max(thumbOffset, 0), maxThumbOffset);
|
|
36860
|
-
const scrollOffset = (thumbOffset / maxThumbOffset) * maxScroll;
|
|
36861
|
-
return scrollOffset;
|
|
36862
|
-
}
|
|
36863
|
-
/**
|
|
36864
|
-
* 拖拽 thumb 时,根据鼠标位置计算滑块的偏移位置
|
|
36865
|
-
*/
|
|
36866
|
-
function getScrollFromDrag(pointerPosition, dragOffset, viewportSize, contentSize, trackSize, thumbSize) {
|
|
36867
|
-
const maxScroll = contentSize - viewportSize;
|
|
36868
|
-
const maxThumbOffset = trackSize - thumbSize;
|
|
36869
|
-
if (maxScroll <= 0 || maxThumbOffset <= 0) {
|
|
36870
|
-
return 0;
|
|
36871
|
-
}
|
|
36872
|
-
let thumbOffset = pointerPosition - dragOffset;
|
|
36873
|
-
thumbOffset = Math.min(Math.max(thumbOffset, 0), maxThumbOffset);
|
|
36874
|
-
return (thumbOffset / maxThumbOffset) * maxScroll;
|
|
36875
|
-
}
|
|
36876
|
-
|
|
36877
|
-
const { getConfig: getConfig$1, createEvent, domUtils, globalResize, renderEmptyElement } = VxeUI;
|
|
36878
|
-
function createReactData$8() {
|
|
36879
|
-
return {
|
|
36880
|
-
yThumbHeight: 0,
|
|
36881
|
-
xThumbWidth: 0
|
|
36882
|
-
};
|
|
36883
|
-
}
|
|
36884
|
-
function createInternalData$7() {
|
|
36885
|
-
return {
|
|
36886
|
-
// resizeObserver: undefined,
|
|
36887
|
-
// isThumbDrag: false,
|
|
36888
|
-
thumbDragOffset: 0,
|
|
36889
|
-
yThumbTop: 0,
|
|
36890
|
-
xThumbLeft: 0,
|
|
36891
|
-
lastScrollTop: 0,
|
|
36892
|
-
lastScrollLeft: 0
|
|
36893
|
-
};
|
|
36894
|
-
}
|
|
36895
|
-
var VxeScrollbarComponent = defineVxeComponent({
|
|
36896
|
-
name: 'VxeScrollbar',
|
|
36897
|
-
props: {
|
|
36898
|
-
width: [String, Number],
|
|
36899
|
-
height: [String, Number],
|
|
36900
|
-
minWidth: [String, Number],
|
|
36901
|
-
minHeight: [String, Number],
|
|
36902
|
-
maxWidth: [String, Number],
|
|
36903
|
-
maxHeight: [String, Number],
|
|
36904
|
-
loading: Boolean,
|
|
36905
|
-
native: {
|
|
36906
|
-
type: Boolean,
|
|
36907
|
-
default: () => getConfig$1().scrollbar.native
|
|
36908
|
-
},
|
|
36909
|
-
xConfig: Object,
|
|
36910
|
-
yConfig: Object,
|
|
36911
|
-
className: String,
|
|
36912
|
-
viewClassName: String,
|
|
36913
|
-
autoResize: {
|
|
36914
|
-
type: Boolean,
|
|
36915
|
-
default: () => getConfig$1().scrollbar.autoResize
|
|
36916
|
-
},
|
|
36917
|
-
syncResize: [Boolean, String, Number]
|
|
36918
|
-
},
|
|
36919
|
-
emits: [
|
|
36920
|
-
'scroll',
|
|
36921
|
-
'scroll-boundary'
|
|
36922
|
-
],
|
|
36923
|
-
setup(props, context) {
|
|
36924
|
-
const { emit, slots } = context;
|
|
36925
|
-
const xID = XEUtils.uniqueId();
|
|
36926
|
-
const refElem = ref();
|
|
36927
|
-
const refViewElem = ref();
|
|
36928
|
-
const refViewInnerElem = ref();
|
|
36929
|
-
const refTrackXElem = ref();
|
|
36930
|
-
const refTrackYElem = ref();
|
|
36931
|
-
const refThumbXElem = ref();
|
|
36932
|
-
const refThumbYElem = ref();
|
|
36933
|
-
const reactData = reactive(createReactData$8());
|
|
36934
|
-
const internalData = createInternalData$7();
|
|
36935
|
-
const computeWrapperStyle = computed(() => {
|
|
36936
|
-
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props;
|
|
36937
|
-
const xOpts = computeXOpts.value;
|
|
36938
|
-
const yOpts = computeYOpts.value;
|
|
36939
|
-
const stys = {};
|
|
36940
|
-
if (width) {
|
|
36941
|
-
stys.width = toCssUnit(width);
|
|
36942
|
-
}
|
|
36943
|
-
if (height) {
|
|
36944
|
-
stys.height = toCssUnit(height);
|
|
36945
|
-
}
|
|
36946
|
-
if (minWidth) {
|
|
36947
|
-
stys.minWidth = toCssUnit(minWidth);
|
|
36948
|
-
}
|
|
36949
|
-
if (minHeight) {
|
|
36950
|
-
stys.minHeight = toCssUnit(minHeight);
|
|
36951
|
-
}
|
|
36952
|
-
if (maxWidth) {
|
|
36953
|
-
stys.maxWidth = toCssUnit(maxWidth);
|
|
36954
|
-
}
|
|
36955
|
-
if (maxHeight) {
|
|
36956
|
-
stys.maxHeight = toCssUnit(maxHeight);
|
|
36957
|
-
}
|
|
36958
|
-
if (yOpts.width) {
|
|
36959
|
-
stys['--vxe-ui-scrollbar-y-width'] = toCssUnit(yOpts.width);
|
|
36960
|
-
}
|
|
36961
|
-
if (xOpts.height) {
|
|
36962
|
-
stys['--vxe-ui-scrollbar-x-height'] = toCssUnit(xOpts.height);
|
|
36963
|
-
}
|
|
36964
|
-
return stys;
|
|
36965
|
-
});
|
|
36966
|
-
const computeWrapperClss = computed(() => {
|
|
36967
|
-
const { native, className } = props;
|
|
36968
|
-
const xOpts = computeXOpts.value;
|
|
36969
|
-
const yOpts = computeYOpts.value;
|
|
36970
|
-
return domUtils.buildClass([
|
|
36971
|
-
'vxe-scrollbar',
|
|
36972
|
-
`ov-x--${xOpts.visible || 'visible'}`,
|
|
36973
|
-
`ov-y--${yOpts.visible || 'visible'}`,
|
|
36974
|
-
native ? 'is--native' : 'is--virtual',
|
|
36975
|
-
className
|
|
36976
|
-
], {
|
|
36977
|
-
'ov-x--auto-hide': xOpts.autoHide,
|
|
36978
|
-
'ov-y--auto-hide': yOpts.autoHide
|
|
36979
|
-
});
|
|
36980
|
-
});
|
|
36981
|
-
const computeViewClss = computed(() => {
|
|
36982
|
-
const { viewClassName } = props;
|
|
36983
|
-
return domUtils.buildClass([
|
|
36984
|
-
'vxe-scrollbar--view',
|
|
36985
|
-
viewClassName
|
|
36986
|
-
]);
|
|
36987
|
-
});
|
|
36988
|
-
const computeXOpts = computed(() => {
|
|
36989
|
-
return Object.assign({}, getConfig$1().scrollbar.xConfig, props.xConfig);
|
|
37253
|
+
return XEUtils.toNumber(activeValue === null ? modelValue : activeValue);
|
|
36990
37254
|
});
|
|
36991
|
-
const
|
|
36992
|
-
return
|
|
37255
|
+
const computeItemList = computed(() => {
|
|
37256
|
+
return [1, 2, 3, 4, 5].map(num => {
|
|
37257
|
+
return {
|
|
37258
|
+
value: num,
|
|
37259
|
+
label: num
|
|
37260
|
+
};
|
|
37261
|
+
});
|
|
36993
37262
|
});
|
|
36994
|
-
const refMaps = {
|
|
36995
|
-
refElem
|
|
36996
|
-
};
|
|
36997
37263
|
const computeMaps = {};
|
|
36998
|
-
const $
|
|
37264
|
+
const $xeRate = {
|
|
36999
37265
|
xID,
|
|
37000
37266
|
props,
|
|
37001
37267
|
context,
|
|
37002
37268
|
reactData,
|
|
37003
|
-
internalData,
|
|
37004
37269
|
getRefMaps: () => refMaps,
|
|
37005
37270
|
getComputeMaps: () => computeMaps
|
|
37006
37271
|
};
|
|
37007
37272
|
const dispatchEvent = (type, params, evnt) => {
|
|
37008
|
-
emit(type, createEvent(evnt, { $
|
|
37009
|
-
};
|
|
37010
|
-
const scrollbarMethods = {
|
|
37011
|
-
dispatchEvent,
|
|
37012
|
-
scrollTo(left, top) {
|
|
37013
|
-
const viewEl = refViewElem.value;
|
|
37014
|
-
if (viewEl) {
|
|
37015
|
-
if (XEUtils.isNumber(left)) {
|
|
37016
|
-
viewEl.scrollTo(left, top || 0);
|
|
37017
|
-
}
|
|
37018
|
-
else {
|
|
37019
|
-
viewEl.scrollTo(left);
|
|
37020
|
-
}
|
|
37021
|
-
}
|
|
37022
|
-
},
|
|
37023
|
-
scrollIntoView() {
|
|
37024
|
-
const viewEl = refViewElem.value;
|
|
37025
|
-
if (viewEl) {
|
|
37026
|
-
viewEl.scrollIntoView();
|
|
37027
|
-
}
|
|
37028
|
-
},
|
|
37029
|
-
recalculate() {
|
|
37030
|
-
updateThumbSize();
|
|
37031
|
-
updateThumbOffset();
|
|
37032
|
-
return nextTick();
|
|
37033
|
-
}
|
|
37273
|
+
emit(type, createEvent$1(evnt, { $rate: $xeRate }, params));
|
|
37034
37274
|
};
|
|
37035
|
-
const
|
|
37036
|
-
|
|
37037
|
-
if (!viewEl) {
|
|
37038
|
-
return;
|
|
37039
|
-
}
|
|
37040
|
-
const trackXEl = refTrackXElem.value;
|
|
37041
|
-
const xThumbWidth = trackXEl ? getThumbSize(viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth) : 0;
|
|
37042
|
-
const thumbXElem = refThumbXElem.value;
|
|
37043
|
-
if (thumbXElem) {
|
|
37044
|
-
thumbXElem.style.width = xThumbWidth + 'px';
|
|
37045
|
-
}
|
|
37046
|
-
reactData.xThumbWidth = xThumbWidth;
|
|
37047
|
-
const trackYEl = refTrackYElem.value;
|
|
37048
|
-
const yThumbHeight = trackYEl ? getThumbSize(viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight) : 0;
|
|
37049
|
-
const thumbYElem = refThumbYElem.value;
|
|
37050
|
-
if (thumbYElem) {
|
|
37051
|
-
thumbYElem.style.height = yThumbHeight + 'px';
|
|
37052
|
-
}
|
|
37053
|
-
reactData.yThumbHeight = yThumbHeight;
|
|
37275
|
+
const rateMethods = {
|
|
37276
|
+
dispatchEvent
|
|
37054
37277
|
};
|
|
37055
|
-
const
|
|
37056
|
-
|
|
37057
|
-
|
|
37058
|
-
return;
|
|
37059
|
-
}
|
|
37060
|
-
const { xThumbWidth, yThumbHeight } = reactData;
|
|
37061
|
-
const trackXEl = refTrackXElem.value;
|
|
37062
|
-
const thumbXElem = refThumbXElem.value;
|
|
37063
|
-
const xThumbLeft = trackXEl && xThumbWidth ? getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth, xThumbWidth) : 0;
|
|
37064
|
-
internalData.xThumbLeft = xThumbLeft;
|
|
37065
|
-
if (thumbXElem && xThumbWidth) {
|
|
37066
|
-
thumbXElem.style.width = xThumbWidth + 'px';
|
|
37067
|
-
thumbXElem.style.transform = `translateX(${xThumbLeft}px)`;
|
|
37068
|
-
}
|
|
37069
|
-
const trackYEl = refTrackYElem.value;
|
|
37070
|
-
const thumbYElem = refThumbYElem.value;
|
|
37071
|
-
const yThumbTop = trackYEl && yThumbHeight ? getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight, yThumbHeight) : 0;
|
|
37072
|
-
internalData.yThumbTop = yThumbTop;
|
|
37073
|
-
if (thumbYElem && yThumbHeight) {
|
|
37074
|
-
thumbYElem.style.height = yThumbHeight + 'px';
|
|
37075
|
-
thumbYElem.style.transform = `translateY(${yThumbTop}px)`;
|
|
37076
|
-
}
|
|
37278
|
+
const ratePrivateMethods = {};
|
|
37279
|
+
const emitModel = (value) => {
|
|
37280
|
+
emit('update:modelValue', value);
|
|
37077
37281
|
};
|
|
37078
|
-
const
|
|
37079
|
-
const
|
|
37080
|
-
const
|
|
37081
|
-
|
|
37082
|
-
|
|
37083
|
-
|
|
37084
|
-
const { scrollTop, scrollLeft, clientWidth, clientHeight, scrollHeight, scrollWidth } = viewEl;
|
|
37085
|
-
let direction = '';
|
|
37086
|
-
let isTopBoundary = false;
|
|
37087
|
-
let isBottomBoundary = false;
|
|
37088
|
-
let isLeftBoundary = false;
|
|
37089
|
-
let isRightBoundary = false;
|
|
37090
|
-
if (lastScrollTop !== scrollTop) {
|
|
37091
|
-
const yThreshold = XEUtils.toNumber(yOpts.threshold) || 1;
|
|
37092
|
-
if (lastScrollTop < scrollTop) {
|
|
37093
|
-
direction = 'bottom';
|
|
37094
|
-
if (yThumbHeight > 0 && scrollTop + clientHeight >= scrollHeight - yThreshold) {
|
|
37095
|
-
isBottomBoundary = true;
|
|
37096
|
-
}
|
|
37097
|
-
}
|
|
37098
|
-
else {
|
|
37099
|
-
direction = 'top';
|
|
37100
|
-
if (yThumbHeight > 0 && scrollTop <= yThreshold) {
|
|
37101
|
-
isTopBoundary = true;
|
|
37102
|
-
}
|
|
37103
|
-
}
|
|
37104
|
-
}
|
|
37105
|
-
if (lastScrollLeft !== scrollLeft) {
|
|
37106
|
-
const xThreshold = XEUtils.toNumber(xOpts.threshold) || 1;
|
|
37107
|
-
if (lastScrollLeft < scrollLeft) {
|
|
37108
|
-
direction = 'right';
|
|
37109
|
-
if (xThumbWidth > 0 && scrollLeft + clientWidth >= scrollWidth - xThreshold) {
|
|
37110
|
-
isRightBoundary = true;
|
|
37111
|
-
}
|
|
37112
|
-
}
|
|
37113
|
-
else {
|
|
37114
|
-
direction = 'left';
|
|
37115
|
-
if (xThumbWidth > 0 && scrollLeft <= xThreshold) {
|
|
37116
|
-
isLeftBoundary = true;
|
|
37117
|
-
}
|
|
37118
|
-
}
|
|
37119
|
-
}
|
|
37120
|
-
updateThumbOffset();
|
|
37121
|
-
internalData.lastScrollTop = scrollTop;
|
|
37122
|
-
internalData.lastScrollLeft = scrollLeft;
|
|
37123
|
-
if (isBottomBoundary || isTopBoundary || isRightBoundary || isLeftBoundary) {
|
|
37124
|
-
dispatchEvent('scroll-boundary', {
|
|
37125
|
-
direction: direction,
|
|
37126
|
-
isTop: isTopBoundary,
|
|
37127
|
-
isBottom: isBottomBoundary,
|
|
37128
|
-
isLeft: isLeftBoundary,
|
|
37129
|
-
isRight: isRightBoundary,
|
|
37130
|
-
scrollTop: scrollTop,
|
|
37131
|
-
scrollLeft: scrollLeft,
|
|
37132
|
-
clientWidth: clientWidth,
|
|
37133
|
-
clientHeight: clientHeight,
|
|
37134
|
-
scrollHeight: scrollHeight,
|
|
37135
|
-
scrollWidth: scrollWidth
|
|
37136
|
-
}, evnt);
|
|
37282
|
+
const mouseenterEvent = (evnt, item) => {
|
|
37283
|
+
const isDisabled = computeIsDisabled.value;
|
|
37284
|
+
const isReadonly = computeIsReadonly.value;
|
|
37285
|
+
if (!(isDisabled || isReadonly)) {
|
|
37286
|
+
const value = item.value;
|
|
37287
|
+
reactData.activeValue = value;
|
|
37137
37288
|
}
|
|
37138
|
-
dispatchEvent('scroll', {
|
|
37139
|
-
direction: direction,
|
|
37140
|
-
isTop: yThumbHeight > 0 && scrollTop <= 0,
|
|
37141
|
-
isBottom: yThumbHeight > 0 && scrollTop + clientHeight >= scrollHeight,
|
|
37142
|
-
isLeft: xThumbWidth > 0 && scrollLeft <= 0,
|
|
37143
|
-
isRight: xThumbWidth > 0 && scrollLeft + clientWidth >= scrollWidth,
|
|
37144
|
-
scrollTop: scrollTop,
|
|
37145
|
-
scrollLeft: scrollLeft,
|
|
37146
|
-
clientWidth: clientWidth,
|
|
37147
|
-
clientHeight: clientHeight,
|
|
37148
|
-
scrollHeight: scrollHeight,
|
|
37149
|
-
scrollWidth: scrollWidth
|
|
37150
|
-
}, evnt);
|
|
37151
37289
|
};
|
|
37152
|
-
const
|
|
37153
|
-
|
|
37154
|
-
if (trackEl !== evnt.target) {
|
|
37155
|
-
return;
|
|
37156
|
-
}
|
|
37157
|
-
const viewEl = refViewElem.value;
|
|
37158
|
-
if (!viewEl) {
|
|
37159
|
-
return;
|
|
37160
|
-
}
|
|
37161
|
-
const { xThumbWidth } = reactData;
|
|
37162
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
37163
|
-
viewEl.scrollTo({
|
|
37164
|
-
left: getScrollFromClick(evnt.clientX - trackRect.left, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth),
|
|
37165
|
-
behavior: 'auto'
|
|
37166
|
-
});
|
|
37290
|
+
const mouseleaveEvent = () => {
|
|
37291
|
+
reactData.activeValue = null;
|
|
37167
37292
|
};
|
|
37168
|
-
const
|
|
37169
|
-
const
|
|
37170
|
-
|
|
37171
|
-
|
|
37172
|
-
|
|
37173
|
-
|
|
37174
|
-
|
|
37175
|
-
|
|
37293
|
+
const clickEvent = (evnt, item) => {
|
|
37294
|
+
const isDisabled = computeIsDisabled.value;
|
|
37295
|
+
const isReadonly = computeIsReadonly.value;
|
|
37296
|
+
if (!(isDisabled || isReadonly)) {
|
|
37297
|
+
const value = item.value;
|
|
37298
|
+
emitModel(value);
|
|
37299
|
+
dispatchEvent('change', { value }, evnt);
|
|
37300
|
+
// 自动更新校验状态
|
|
37301
|
+
if ($xeForm && formItemInfo) {
|
|
37302
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
37303
|
+
}
|
|
37176
37304
|
}
|
|
37177
|
-
const { yThumbHeight } = reactData;
|
|
37178
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
37179
|
-
viewEl.scrollTo({
|
|
37180
|
-
top: getScrollFromClick(evnt.clientY - trackRect.top, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight),
|
|
37181
|
-
behavior: 'auto'
|
|
37182
|
-
});
|
|
37183
37305
|
};
|
|
37184
|
-
|
|
37185
|
-
|
|
37186
|
-
|
|
37187
|
-
|
|
37188
|
-
const
|
|
37189
|
-
|
|
37190
|
-
|
|
37191
|
-
|
|
37192
|
-
|
|
37193
|
-
|
|
37194
|
-
|
|
37195
|
-
|
|
37196
|
-
|
|
37197
|
-
|
|
37198
|
-
|
|
37306
|
+
Object.assign($xeRate, rateMethods, ratePrivateMethods);
|
|
37307
|
+
const renderVN = () => {
|
|
37308
|
+
const { status } = props;
|
|
37309
|
+
const isDisabled = computeIsDisabled.value;
|
|
37310
|
+
const isReadonly = computeIsReadonly.value;
|
|
37311
|
+
const itemList = computeItemList.value;
|
|
37312
|
+
const vSize = computeSize.value;
|
|
37313
|
+
const numVal = computeNumVal.value;
|
|
37314
|
+
return h('div', {
|
|
37315
|
+
ref: refElem,
|
|
37316
|
+
class: ['vxe-rate', {
|
|
37317
|
+
[`size--${vSize}`]: vSize,
|
|
37318
|
+
[`theme--${status}`]: status,
|
|
37319
|
+
'is--disabled': isDisabled,
|
|
37320
|
+
'is--readonly': isReadonly
|
|
37321
|
+
}]
|
|
37322
|
+
}, itemList.map(item => {
|
|
37323
|
+
const isChecked = numVal >= item.value;
|
|
37324
|
+
return h('div', {
|
|
37325
|
+
class: ['vxe-rte--item', {
|
|
37326
|
+
'is--checked': isChecked
|
|
37327
|
+
}],
|
|
37328
|
+
onMouseenter(evnt) {
|
|
37329
|
+
if (!(isDisabled || isReadonly)) {
|
|
37330
|
+
mouseenterEvent(evnt, item);
|
|
37331
|
+
}
|
|
37332
|
+
},
|
|
37333
|
+
onMouseleave: mouseleaveEvent,
|
|
37334
|
+
onClick(evnt) {
|
|
37335
|
+
if (!(isDisabled || isReadonly)) {
|
|
37336
|
+
clickEvent(evnt, item);
|
|
37337
|
+
}
|
|
37338
|
+
}
|
|
37339
|
+
}, [
|
|
37340
|
+
h('i', {
|
|
37341
|
+
class: isChecked ? getIcon$2().RATE_CHECKED : getIcon$2().RATE_UNCHECKED
|
|
37342
|
+
})
|
|
37343
|
+
]);
|
|
37344
|
+
}));
|
|
37199
37345
|
};
|
|
37200
|
-
|
|
37201
|
-
|
|
37202
|
-
|
|
37203
|
-
|
|
37204
|
-
|
|
37205
|
-
|
|
37206
|
-
|
|
37207
|
-
|
|
37208
|
-
|
|
37209
|
-
|
|
37210
|
-
|
|
37211
|
-
|
|
37212
|
-
|
|
37213
|
-
|
|
37214
|
-
|
|
37215
|
-
|
|
37216
|
-
|
|
37217
|
-
|
|
37346
|
+
$xeRate.renderVN = renderVN;
|
|
37347
|
+
return $xeRate;
|
|
37348
|
+
},
|
|
37349
|
+
render() {
|
|
37350
|
+
return this.renderVN();
|
|
37351
|
+
}
|
|
37352
|
+
});
|
|
37353
|
+
|
|
37354
|
+
const VxeRate = Object.assign({}, VxeRateComponent, {
|
|
37355
|
+
install(app) {
|
|
37356
|
+
app.component(VxeRateComponent.name, VxeRateComponent);
|
|
37357
|
+
}
|
|
37358
|
+
});
|
|
37359
|
+
dynamicApp.use(VxeRate);
|
|
37360
|
+
VxeUI.component(VxeRateComponent);
|
|
37361
|
+
const Rate = VxeRate;
|
|
37362
|
+
|
|
37363
|
+
var VxeResultComponent = defineVxeComponent({
|
|
37364
|
+
name: 'VxeResult',
|
|
37365
|
+
props: {
|
|
37366
|
+
imageUrl: String,
|
|
37367
|
+
imageStyle: Object,
|
|
37368
|
+
icon: String,
|
|
37369
|
+
type: [String, Number],
|
|
37370
|
+
status: [String, Number],
|
|
37371
|
+
title: [String, Number],
|
|
37372
|
+
content: [String, Number]
|
|
37373
|
+
},
|
|
37374
|
+
emits: [],
|
|
37375
|
+
setup(props, context) {
|
|
37376
|
+
const { emit, slots } = context;
|
|
37377
|
+
const xID = XEUtils.uniqueId();
|
|
37378
|
+
const refElem = ref();
|
|
37379
|
+
const reactData = reactive({});
|
|
37380
|
+
const refMaps = {
|
|
37381
|
+
refElem
|
|
37218
37382
|
};
|
|
37219
|
-
const
|
|
37220
|
-
|
|
37221
|
-
|
|
37222
|
-
|
|
37383
|
+
const computeMaps = {};
|
|
37384
|
+
const $xeResult = {
|
|
37385
|
+
xID,
|
|
37386
|
+
props,
|
|
37387
|
+
context,
|
|
37388
|
+
reactData,
|
|
37389
|
+
getRefMaps: () => refMaps,
|
|
37390
|
+
getComputeMaps: () => computeMaps
|
|
37223
37391
|
};
|
|
37224
|
-
const
|
|
37225
|
-
|
|
37226
|
-
internalData.isThumbDrag = true;
|
|
37227
|
-
thumbEl.setPointerCapture(evnt.pointerId);
|
|
37228
|
-
const viewEl = refViewElem.value;
|
|
37229
|
-
if (!viewEl) {
|
|
37230
|
-
return;
|
|
37231
|
-
}
|
|
37232
|
-
const { yThumbHeight } = reactData;
|
|
37233
|
-
const trackEl = thumbEl.parentElement;
|
|
37234
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
37235
|
-
const pointerPosition = evnt.clientY - trackRect.top;
|
|
37236
|
-
// 记录 thumb 的偏移
|
|
37237
|
-
const thumbOffset = getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
37238
|
-
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
37392
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
37393
|
+
emit(type, createEvent$1(evnt, { $result: $xeResult }, params));
|
|
37239
37394
|
};
|
|
37240
|
-
const
|
|
37241
|
-
|
|
37242
|
-
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
37243
|
-
return;
|
|
37244
|
-
}
|
|
37245
|
-
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
37246
|
-
if (isThumbDrag) {
|
|
37247
|
-
const viewEl = refViewElem.value;
|
|
37248
|
-
if (!viewEl) {
|
|
37249
|
-
return;
|
|
37250
|
-
}
|
|
37251
|
-
const { yThumbHeight } = reactData;
|
|
37252
|
-
const thumbEl = evnt.currentTarget;
|
|
37253
|
-
const trackEl = thumbEl.parentElement;
|
|
37254
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
37255
|
-
// 更新偏移
|
|
37256
|
-
viewEl.scrollTop = getScrollFromDrag(evnt.clientY - trackRect.top, thumbDragOffset, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
37257
|
-
}
|
|
37395
|
+
const resultMethods = {
|
|
37396
|
+
dispatchEvent
|
|
37258
37397
|
};
|
|
37259
|
-
const
|
|
37260
|
-
Object.assign($
|
|
37398
|
+
const resultPrivateMethods = {};
|
|
37399
|
+
Object.assign($xeResult, resultMethods, resultPrivateMethods);
|
|
37261
37400
|
const renderVN = () => {
|
|
37262
|
-
const {
|
|
37263
|
-
const
|
|
37264
|
-
const
|
|
37265
|
-
const viewClss = computeViewClss.value;
|
|
37266
|
-
const xOpts = computeXOpts.value;
|
|
37267
|
-
const yOpts = computeYOpts.value;
|
|
37268
|
-
const defaultSlot = slots.default;
|
|
37401
|
+
const { imageUrl, imageStyle, icon, title, type, content } = props;
|
|
37402
|
+
const status = props.status || type;
|
|
37403
|
+
const slotExtra = slots.extra;
|
|
37269
37404
|
return h('div', {
|
|
37270
37405
|
ref: refElem,
|
|
37271
|
-
class:
|
|
37272
|
-
|
|
37406
|
+
class: ['vxe-result', {
|
|
37407
|
+
[`theme--${status}`]: status
|
|
37408
|
+
}]
|
|
37273
37409
|
}, [
|
|
37274
37410
|
h('div', {
|
|
37275
|
-
|
|
37276
|
-
class: viewClss,
|
|
37277
|
-
onScroll: scrollEvent
|
|
37411
|
+
class: 'vxe-result--inner'
|
|
37278
37412
|
}, [
|
|
37413
|
+
imageUrl
|
|
37414
|
+
? h('div', {
|
|
37415
|
+
class: 'vxe-result--img-wrapper'
|
|
37416
|
+
}, [
|
|
37417
|
+
h('img', {
|
|
37418
|
+
src: imageUrl,
|
|
37419
|
+
style: imageStyle
|
|
37420
|
+
})
|
|
37421
|
+
])
|
|
37422
|
+
: h('div', {
|
|
37423
|
+
class: 'vxe-result--icon-wrapper'
|
|
37424
|
+
}, [
|
|
37425
|
+
h('i', {
|
|
37426
|
+
class: [icon, type ? getIcon$2()[`RESULT_${type}`.toLocaleUpperCase()] : '']
|
|
37427
|
+
})
|
|
37428
|
+
]),
|
|
37279
37429
|
h('div', {
|
|
37280
|
-
|
|
37281
|
-
|
|
37282
|
-
|
|
37283
|
-
|
|
37284
|
-
|
|
37285
|
-
|
|
37286
|
-
|
|
37287
|
-
|
|
37288
|
-
|
|
37289
|
-
|
|
37290
|
-
|
|
37291
|
-
h('div', {
|
|
37292
|
-
ref: refThumbXElem,
|
|
37293
|
-
class: 'vxe-scrollbar--thumb-x',
|
|
37294
|
-
onPointerdown: pointerdownThumbXEvent,
|
|
37295
|
-
onPointermove: pointermoveThumbXEvent,
|
|
37296
|
-
onPointerup: cleatPointerThumbEvent,
|
|
37297
|
-
onPointercancel: cleatPointerThumbEvent,
|
|
37298
|
-
onLostpointercapture: cleatPointerThumbEvent
|
|
37299
|
-
})
|
|
37300
|
-
]),
|
|
37301
|
-
native || yOpts.visible === 'hidden'
|
|
37302
|
-
? renderEmptyElement($xeScrollbar)
|
|
37303
|
-
: h('div', {
|
|
37304
|
-
ref: refTrackYElem,
|
|
37305
|
-
class: 'vxe-scrollbar--track-y',
|
|
37306
|
-
onClick: clickTrackYEvent
|
|
37307
|
-
}, [
|
|
37308
|
-
h('div', {
|
|
37309
|
-
ref: refThumbYElem,
|
|
37310
|
-
class: 'vxe-scrollbar--thumb-y',
|
|
37311
|
-
onPointerdown: pointerdownThumbYEvent,
|
|
37312
|
-
onPointermove: pointermoveThumbYEvent,
|
|
37313
|
-
onPointerup: cleatPointerThumbEvent,
|
|
37314
|
-
onPointercancel: cleatPointerThumbEvent,
|
|
37315
|
-
onLostpointercapture: cleatPointerThumbEvent
|
|
37316
|
-
})
|
|
37317
|
-
]),
|
|
37318
|
-
h(VxeLoading, {
|
|
37319
|
-
class: 'vxe-scrollbar--loading',
|
|
37320
|
-
modelValue: loading
|
|
37321
|
-
})
|
|
37430
|
+
class: 'vxe-result--title-wrapper'
|
|
37431
|
+
}, `${title || ''}`),
|
|
37432
|
+
h('div', {
|
|
37433
|
+
class: 'vxe-result--content-wrapper'
|
|
37434
|
+
}, `${content || ''}`),
|
|
37435
|
+
slotExtra
|
|
37436
|
+
? h('div', {
|
|
37437
|
+
class: 'vxe-result--extra-wrapper'
|
|
37438
|
+
}, slotExtra({}))
|
|
37439
|
+
: renderEmptyElement$1($xeResult)
|
|
37440
|
+
])
|
|
37322
37441
|
]);
|
|
37323
37442
|
};
|
|
37324
|
-
|
|
37325
|
-
|
|
37326
|
-
reFlag.value++;
|
|
37327
|
-
});
|
|
37328
|
-
watch(() => props.syncResize, () => {
|
|
37329
|
-
reFlag.value++;
|
|
37330
|
-
});
|
|
37331
|
-
watch(reFlag, () => {
|
|
37332
|
-
$xeScrollbar.recalculate().then(() => {
|
|
37333
|
-
$xeScrollbar.recalculate();
|
|
37334
|
-
});
|
|
37335
|
-
});
|
|
37336
|
-
onMounted(() => {
|
|
37337
|
-
const { autoResize } = props;
|
|
37338
|
-
const viewInnerEl = refViewInnerElem.value;
|
|
37339
|
-
if (autoResize && viewInnerEl) {
|
|
37340
|
-
const resizeObserver = globalResize.create(() => {
|
|
37341
|
-
if (props.autoResize) {
|
|
37342
|
-
reFlag.value++;
|
|
37343
|
-
}
|
|
37344
|
-
});
|
|
37345
|
-
resizeObserver.observe(viewInnerEl);
|
|
37346
|
-
internalData.resizeObserver = resizeObserver;
|
|
37347
|
-
}
|
|
37348
|
-
nextTick(() => {
|
|
37349
|
-
$xeScrollbar.recalculate();
|
|
37350
|
-
});
|
|
37351
|
-
});
|
|
37352
|
-
onBeforeUnmount(() => {
|
|
37353
|
-
const { resizeObserver } = internalData;
|
|
37354
|
-
if (resizeObserver) {
|
|
37355
|
-
resizeObserver.disconnect();
|
|
37356
|
-
}
|
|
37357
|
-
});
|
|
37358
|
-
$xeScrollbar.renderVN = renderVN;
|
|
37359
|
-
return $xeScrollbar;
|
|
37443
|
+
$xeResult.renderVN = renderVN;
|
|
37444
|
+
return $xeResult;
|
|
37360
37445
|
},
|
|
37361
37446
|
render() {
|
|
37362
37447
|
return this.renderVN();
|
|
37363
37448
|
}
|
|
37364
37449
|
});
|
|
37365
37450
|
|
|
37366
|
-
const
|
|
37451
|
+
const VxeResult = Object.assign({}, VxeResultComponent, {
|
|
37367
37452
|
install(app) {
|
|
37368
|
-
app.component(
|
|
37453
|
+
app.component(VxeResultComponent.name, VxeResultComponent);
|
|
37369
37454
|
}
|
|
37370
37455
|
});
|
|
37371
|
-
dynamicApp.use(
|
|
37372
|
-
VxeUI.component(
|
|
37373
|
-
const
|
|
37456
|
+
dynamicApp.use(VxeResult);
|
|
37457
|
+
VxeUI.component(VxeResultComponent);
|
|
37458
|
+
const Result = VxeResult;
|
|
37374
37459
|
|
|
37375
37460
|
var VxeRowComponent = defineVxeComponent({
|
|
37376
37461
|
name: 'VxeRow',
|
|
@@ -41449,7 +41534,7 @@ var VxeTabsComponent = defineVxeComponent({
|
|
|
41449
41534
|
: renderEmptyElement$1($xeTabs),
|
|
41450
41535
|
showLoading && isLoading
|
|
41451
41536
|
? renderEmptyElement$1($xeTabs)
|
|
41452
|
-
: h(
|
|
41537
|
+
: h(VxeLoading, {
|
|
41453
41538
|
class: 'vxe-tabs--loading',
|
|
41454
41539
|
modelValue: isLoading
|
|
41455
41540
|
})
|
|
@@ -41977,15 +42062,6 @@ dynamicApp.use(VxeTextEllipsis);
|
|
|
41977
42062
|
VxeUI.component(VxeTextEllipsisComponent);
|
|
41978
42063
|
const TextEllipsis = VxeTextEllipsis;
|
|
41979
42064
|
|
|
41980
|
-
const VxeText = Object.assign({}, VxeTextComponent, {
|
|
41981
|
-
install(app) {
|
|
41982
|
-
app.component(VxeTextComponent.name, VxeTextComponent);
|
|
41983
|
-
}
|
|
41984
|
-
});
|
|
41985
|
-
dynamicApp.use(VxeText);
|
|
41986
|
-
VxeUI.component(VxeTextComponent);
|
|
41987
|
-
const Text = VxeText;
|
|
41988
|
-
|
|
41989
42065
|
const { warnLog: warnLog$3 } = createComponentLog('textarea');
|
|
41990
42066
|
let autoTxtElem;
|
|
41991
42067
|
var VxeTextareaComponent = defineVxeComponent({
|
|
@@ -48773,7 +48849,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
48773
48849
|
? h('div', {
|
|
48774
48850
|
class: 'vxe-upload--file-item-rebtn'
|
|
48775
48851
|
}, [
|
|
48776
|
-
h(
|
|
48852
|
+
h(VxeButton, {
|
|
48777
48853
|
icon: isError ? getIcon$2().UPLOAD_IMAGE_RE_UPLOAD : getIcon$2().UPLOAD_IMAGE_UPLOAD,
|
|
48778
48854
|
mode: 'text',
|
|
48779
48855
|
status: 'primary',
|
|
@@ -48846,7 +48922,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
48846
48922
|
}, defaultSlot
|
|
48847
48923
|
? getSlotVNs(defaultSlot({ isMoreView, options: fileList, $upload: $xeUpload }))
|
|
48848
48924
|
: [
|
|
48849
|
-
h(
|
|
48925
|
+
h(VxeButton, {
|
|
48850
48926
|
class: 'vxe-upload--file-action-button',
|
|
48851
48927
|
content: (isMoreView || showButtonText) ? (buttonText ? `${XEUtils.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n$2('vxe.upload.fileBtnText')) : '',
|
|
48852
48928
|
icon: showButtonIcon ? (buttonIcon || getIcon$2().UPLOAD_FILE_ADD) : '',
|
|
@@ -48909,7 +48985,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
48909
48985
|
}, moreBtnSlot
|
|
48910
48986
|
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
48911
48987
|
: [
|
|
48912
|
-
h(
|
|
48988
|
+
h(VxeButton, {
|
|
48913
48989
|
mode: 'text',
|
|
48914
48990
|
content: moreButtonText ? (XEUtils.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils.toFormatString(moreButtonText, [fileList.length])) : getI18n$2(isMoreMax && isMiniMore ? 'vxe.upload.moreFileBtnText' : 'vxe.upload.moreBtnText', [fileList.length]),
|
|
48915
48991
|
status: 'primary',
|
|
@@ -49004,7 +49080,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
49004
49080
|
? h('div', {
|
|
49005
49081
|
class: 'vxe-upload--image-item-rebtn'
|
|
49006
49082
|
}, [
|
|
49007
|
-
h(
|
|
49083
|
+
h(VxeButton, {
|
|
49008
49084
|
icon: isError ? getIcon$2().UPLOAD_IMAGE_RE_UPLOAD : getIcon$2().UPLOAD_IMAGE_UPLOAD,
|
|
49009
49085
|
mode: 'text',
|
|
49010
49086
|
status: 'primary',
|
|
@@ -49131,7 +49207,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
49131
49207
|
}, moreBtnSlot
|
|
49132
49208
|
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
49133
49209
|
: [
|
|
49134
|
-
h(
|
|
49210
|
+
h(VxeButton, {
|
|
49135
49211
|
mode: 'text',
|
|
49136
49212
|
content: moreButtonText ? (XEUtils.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils.toFormatString(moreButtonText, [fileList.length])) : getI18n$2(isMoreMax && isMiniMore ? 'vxe.upload.moreImgBtnText' : 'vxe.upload.moreBtnText', [fileList.length]),
|
|
49137
49213
|
status: 'primary',
|
|
@@ -49151,7 +49227,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
49151
49227
|
}, moreBtnSlot
|
|
49152
49228
|
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
49153
49229
|
: [
|
|
49154
|
-
h(
|
|
49230
|
+
h(VxeButton, {
|
|
49155
49231
|
mode: 'text',
|
|
49156
49232
|
content: moreButtonText ? (XEUtils.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils.toFormatString(moreButtonText, [fileList.length])) : getI18n$2(isMoreMax && isMiniMore ? 'vxe.upload.moreImgBtnText' : 'vxe.upload.moreBtnText', [fileList.length]),
|
|
49157
49233
|
status: 'primary',
|