vxe-pc-ui 4.18.23 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +1076 -989
- 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 +31 -6
- package/es/layout-aside/style.css +5 -0
- package/es/layout-aside/style.min.css +1 -1
- package/es/layout-body/src/layout-body.js +29 -6
- package/es/layout-body/style.css +5 -1
- package/es/layout-body/style.min.css +1 -1
- package/es/list/src/list.js +1 -1
- package/es/menu/src/menu.js +20 -5
- package/es/menu/style.css +14 -2
- package/es/menu/style.min.css +1 -1
- package/es/scrollbar/src/scrollbar.js +38 -17
- package/es/scrollbar/style.css +16 -13
- 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/vxe-layout-aside/style.css +5 -0
- package/es/vxe-layout-aside/style.min.css +1 -1
- package/es/vxe-layout-body/style.css +5 -1
- package/es/vxe-layout-body/style.min.css +1 -1
- package/es/vxe-menu/style.css +14 -2
- package/es/vxe-menu/style.min.css +1 -1
- package/es/vxe-scrollbar/style.css +16 -13
- 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/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 +1456 -1333
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +35 -4
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-aside/style/style.css +5 -0
- package/lib/layout-aside/style/style.min.css +1 -1
- package/lib/layout-body/src/layout-body.js +35 -3
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/layout-body/style/style.css +5 -1
- 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 +25 -3
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/menu/style/style.css +14 -2
- package/lib/menu/style/style.min.css +1 -1
- package/lib/scrollbar/src/scrollbar.js +38 -8
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- package/lib/scrollbar/style/style.css +16 -13
- 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/vxe-layout-aside/style/style.css +5 -0
- package/lib/vxe-layout-aside/style/style.min.css +1 -1
- package/lib/vxe-layout-body/style/style.css +5 -1
- package/lib/vxe-layout-body/style/style.min.css +1 -1
- package/lib/vxe-menu/style/style.css +14 -2
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/lib/vxe-scrollbar/style/style.css +16 -13
- 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/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 +32 -6
- package/packages/layout-body/src/layout-body.ts +33 -6
- package/packages/list/src/list.ts +1 -1
- package/packages/menu/src/menu.ts +26 -5
- package/packages/scrollbar/src/scrollbar.ts +41 -14
- 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 +5 -0
- package/styles/components/layout-body.scss +4 -1
- package/styles/components/menu.scss +15 -2
- package/styles/components/scrollbar.scss +24 -17
- package/styles/components/text-ellipsis.scss +23 -64
- package/styles/theme/base.scss +2 -0
- package/types/components/layout-aside.d.ts +5 -0
- package/types/components/layout-body.d.ts +5 -1
- package/types/components/menu.d.ts +5 -0
- package/types/components/scrollbar.d.ts +15 -0
- /package/es/icon/{iconfont.1791517860186.ttf → iconfont.1791542939851.ttf} +0 -0
- /package/es/icon/{iconfont.1791517860186.woff → iconfont.1791542939851.woff} +0 -0
- /package/es/icon/{iconfont.1791517860186.woff2 → iconfont.1791542939851.woff2} +0 -0
- /package/es/{iconfont.1791517860186.ttf → iconfont.1791542939851.ttf} +0 -0
- /package/es/{iconfont.1791517860186.woff → iconfont.1791542939851.woff} +0 -0
- /package/es/{iconfont.1791517860186.woff2 → iconfont.1791542939851.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1791517860186.ttf → iconfont.1791542939851.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1791517860186.woff → iconfont.1791542939851.woff} +0 -0
- /package/lib/icon/style/{iconfont.1791517860186.woff2 → iconfont.1791542939851.woff2} +0 -0
- /package/lib/{iconfont.1791517860186.ttf → iconfont.1791542939851.ttf} +0 -0
- /package/lib/{iconfont.1791517860186.woff → iconfont.1791542939851.woff} +0 -0
- /package/lib/{iconfont.1791517860186.woff2 → iconfont.1791542939851.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.1"}`;
|
|
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.1";
|
|
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,927 @@ 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
|
+
useScrollbar: {
|
|
29393
|
+
type: Boolean,
|
|
29394
|
+
default: () => getConfig$4().layoutAside.useScrollbar
|
|
29395
|
+
},
|
|
29396
|
+
scrollbarConfig: Object,
|
|
29397
|
+
size: {
|
|
29398
|
+
type: String,
|
|
29399
|
+
default: () => getConfig$4().layoutAside.size || getConfig$4().size
|
|
29400
|
+
}
|
|
29401
|
+
},
|
|
29402
|
+
emits: [],
|
|
29403
|
+
setup(props, context) {
|
|
29404
|
+
const { slots, emit } = context;
|
|
29405
|
+
const xID = XEUtils.uniqueId();
|
|
29406
|
+
const refElem = ref();
|
|
29407
|
+
const { computeSize } = useSize(props);
|
|
29408
|
+
const reactData = reactive({});
|
|
29409
|
+
const refMaps = {
|
|
29410
|
+
refElem
|
|
29411
|
+
};
|
|
29412
|
+
const computeCollapseOpts = computed(() => {
|
|
29413
|
+
return Object.assign({}, getConfig$4().layoutAside.collapseConfig, props.collapseConfig);
|
|
29414
|
+
});
|
|
29415
|
+
const computeScrollbarOpts = computed(() => {
|
|
29416
|
+
return Object.assign({}, getConfig$4().layoutAside.scrollbarConfig, props.scrollbarConfig);
|
|
29417
|
+
});
|
|
29418
|
+
const computeVarStyle = computed(() => {
|
|
29419
|
+
const { width, collapseWidth } = props;
|
|
29420
|
+
const stys = {};
|
|
29421
|
+
if (collapseWidth) {
|
|
29422
|
+
stys['--vxe-ui-layout-aside-collapse-width'] = toCssUnit(collapseWidth);
|
|
29423
|
+
}
|
|
29424
|
+
if (width) {
|
|
29425
|
+
stys['--vxe-ui-layout-aside-default-width'] = toCssUnit(width);
|
|
29426
|
+
}
|
|
29427
|
+
return stys;
|
|
29428
|
+
});
|
|
29429
|
+
const computeMaps = {
|
|
29430
|
+
computeSize,
|
|
29431
|
+
computeVarStyle
|
|
29432
|
+
};
|
|
29433
|
+
const $xeLayoutAside = {
|
|
29434
|
+
xID,
|
|
29435
|
+
props,
|
|
29436
|
+
context,
|
|
29437
|
+
reactData,
|
|
29438
|
+
getRefMaps: () => refMaps,
|
|
29439
|
+
getComputeMaps: () => computeMaps
|
|
29440
|
+
};
|
|
29441
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
29442
|
+
emit(type, createEvent$1(evnt, { $layoutAside: $xeLayoutAside }, params));
|
|
29443
|
+
};
|
|
29444
|
+
const layoutAsideMethods = {
|
|
29445
|
+
dispatchEvent
|
|
29446
|
+
};
|
|
29447
|
+
const layoutAsidePrivateMethods = {};
|
|
29448
|
+
Object.assign($xeLayoutAside, layoutAsideMethods, layoutAsidePrivateMethods);
|
|
29449
|
+
const renderVN = () => {
|
|
29450
|
+
const { collapsed, loading, padding, useScrollbar } = props;
|
|
29451
|
+
const varStyle = computeVarStyle.value;
|
|
29452
|
+
const vSize = computeSize.value;
|
|
29453
|
+
const collapseOpts = computeCollapseOpts.value;
|
|
29454
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
29455
|
+
const { native, yConfig, className, viewAttrs, viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
29456
|
+
const defaultSlot = slots.default;
|
|
29457
|
+
return h('aside', {
|
|
29458
|
+
ref: refElem,
|
|
29459
|
+
class: ['vxe-layout-aside', {
|
|
29460
|
+
[`size--${vSize}`]: vSize,
|
|
29461
|
+
'is--animat': collapseOpts.animation !== false,
|
|
29462
|
+
'is--padding': padding,
|
|
29463
|
+
'is--collapse': collapsed,
|
|
29464
|
+
'is--loading': loading
|
|
29465
|
+
}],
|
|
29466
|
+
style: varStyle
|
|
29467
|
+
}, [
|
|
29468
|
+
useScrollbar
|
|
29469
|
+
? h(VxeScrollbar, {
|
|
29470
|
+
native,
|
|
29471
|
+
xConfig: {
|
|
29472
|
+
visible: 'hidden'
|
|
29473
|
+
},
|
|
29474
|
+
yConfig,
|
|
29475
|
+
className: 'vxe-layout-aside--scrollbar' + (className ? (' ' + className) : ''),
|
|
29476
|
+
viewAttrs,
|
|
29477
|
+
viewClassName: 'vxe-layout-aside--scrollbar-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
29478
|
+
viewInnerClassName: 'vxe-layout-aside--scrollbar-inner' + (viewInnerClassName ? (' ' + viewInnerClassName) : '')
|
|
29479
|
+
}, {
|
|
29480
|
+
default: () => defaultSlot ? defaultSlot({}) : []
|
|
29481
|
+
})
|
|
29482
|
+
: h('div', {
|
|
29483
|
+
class: 'vxe-layout-aside--inner'
|
|
29484
|
+
}, defaultSlot ? defaultSlot({}) : []),
|
|
29485
|
+
/**
|
|
29486
|
+
* 加载中
|
|
29487
|
+
*/
|
|
29488
|
+
h(VxeLoading, {
|
|
29489
|
+
class: 'vxe-layout-aside--loading',
|
|
29490
|
+
modelValue: loading
|
|
29491
|
+
})
|
|
29492
|
+
]);
|
|
29493
|
+
};
|
|
29494
|
+
provide('$xeLayoutAside', $xeLayoutAside);
|
|
29495
|
+
$xeLayoutAside.renderVN = renderVN;
|
|
29496
|
+
return $xeLayoutAside;
|
|
29497
|
+
},
|
|
29498
|
+
render() {
|
|
29499
|
+
return this.renderVN();
|
|
29500
|
+
}
|
|
29501
|
+
});
|
|
29502
|
+
|
|
29503
|
+
const VxeLayoutAside = Object.assign({}, VxeLayoutAsideComponent, {
|
|
29504
|
+
install(app) {
|
|
29505
|
+
app.component(VxeLayoutAsideComponent.name, VxeLayoutAsideComponent);
|
|
29506
|
+
}
|
|
29507
|
+
});
|
|
29508
|
+
dynamicApp.use(VxeLayoutAside);
|
|
29509
|
+
VxeUI.component(VxeLayoutAsideComponent);
|
|
29510
|
+
const LayoutAside = VxeLayoutAside;
|
|
29511
|
+
|
|
29512
|
+
function createInternalData$b() {
|
|
29513
|
+
return {};
|
|
29514
|
+
}
|
|
29515
|
+
function createReactData$c() {
|
|
29516
|
+
return {};
|
|
29517
|
+
}
|
|
29518
|
+
var VxeLayoutBodyComponent = defineVxeComponent({
|
|
29519
|
+
name: 'VxeLayoutBody',
|
|
29520
|
+
props: {
|
|
29521
|
+
loading: Boolean,
|
|
29522
|
+
padding: Boolean,
|
|
29523
|
+
showBacktop: {
|
|
29524
|
+
type: Boolean,
|
|
29525
|
+
default: () => getConfig$4().layoutBody.showBacktop
|
|
29526
|
+
},
|
|
29527
|
+
backtopConfig: Object,
|
|
29528
|
+
useScrollbar: {
|
|
29529
|
+
type: Boolean,
|
|
29530
|
+
default: () => getConfig$4().layoutBody.useScrollbar
|
|
29531
|
+
},
|
|
29532
|
+
scrollbarConfig: Object,
|
|
29533
|
+
size: {
|
|
29534
|
+
type: String,
|
|
29535
|
+
default: () => getConfig$4().layoutBody.size || getConfig$4().size
|
|
29536
|
+
}
|
|
29537
|
+
},
|
|
29538
|
+
emits: [],
|
|
29539
|
+
setup(props, context) {
|
|
29540
|
+
const { slots, emit } = context;
|
|
29541
|
+
const xID = XEUtils.uniqueId();
|
|
29542
|
+
const backtopId = `vxe_layout_body_backtop_${xID}`;
|
|
29543
|
+
const refElem = ref();
|
|
29544
|
+
const { computeSize } = useSize(props);
|
|
29545
|
+
const internalData = createInternalData$b();
|
|
29546
|
+
const reactData = reactive(createReactData$c());
|
|
29547
|
+
const refMaps = {
|
|
29548
|
+
refElem
|
|
29549
|
+
};
|
|
29550
|
+
const computeBacktopOpts = computed(() => {
|
|
29551
|
+
return Object.assign({}, getConfig$4().layoutBody.backtopConfig, props.backtopConfig, {
|
|
29552
|
+
target: '#' + backtopId
|
|
29553
|
+
});
|
|
29554
|
+
});
|
|
29555
|
+
const computeScrollbarOpts = computed(() => {
|
|
29556
|
+
return Object.assign({}, getConfig$4().layoutBody.scrollbarConfig, props.scrollbarConfig);
|
|
29557
|
+
});
|
|
29558
|
+
const computeMaps = {
|
|
29559
|
+
computeSize
|
|
29560
|
+
};
|
|
29561
|
+
const $xeLayoutBody = {
|
|
29562
|
+
xID,
|
|
29563
|
+
props,
|
|
29564
|
+
context,
|
|
29565
|
+
internalData,
|
|
29566
|
+
reactData,
|
|
29567
|
+
getRefMaps: () => refMaps,
|
|
29568
|
+
getComputeMaps: () => computeMaps
|
|
29569
|
+
};
|
|
29570
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
29571
|
+
emit(type, createEvent$1(evnt, { $layoutBody: $xeLayoutBody }, params));
|
|
29572
|
+
};
|
|
29573
|
+
const layoutBodyMethods = {
|
|
29574
|
+
dispatchEvent
|
|
29575
|
+
};
|
|
29576
|
+
const layoutBodyPrivateMethods = {};
|
|
29577
|
+
Object.assign($xeLayoutBody, layoutBodyMethods, layoutBodyPrivateMethods);
|
|
29578
|
+
const renderVN = () => {
|
|
29579
|
+
const { loading, padding, showBacktop, useScrollbar } = props;
|
|
29580
|
+
const backtopOpts = computeBacktopOpts.value;
|
|
29581
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
29582
|
+
const { native, xConfig, yConfig, className, viewAttrs, viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
29583
|
+
const vSize = computeSize.value;
|
|
29584
|
+
const defaultSlot = slots.default;
|
|
29585
|
+
const backtopSlot = slots.backtop;
|
|
29586
|
+
const backtopTopSlot = slots.backtopTop || slots['backtop-top'];
|
|
29587
|
+
const backtopBottomSlot = slots.backtopBottom || slots['backtop-bottom'];
|
|
29588
|
+
const backtopScopeSlots = {};
|
|
29589
|
+
if (backtopSlot) {
|
|
29590
|
+
backtopScopeSlots.default = backtopSlot;
|
|
29591
|
+
}
|
|
29592
|
+
if (backtopTopSlot) {
|
|
29593
|
+
backtopScopeSlots.top = backtopTopSlot;
|
|
29594
|
+
}
|
|
29595
|
+
if (backtopBottomSlot) {
|
|
29596
|
+
backtopScopeSlots.bottom = backtopBottomSlot;
|
|
29597
|
+
}
|
|
29598
|
+
return h('div', {
|
|
29599
|
+
ref: refElem,
|
|
29600
|
+
class: ['vxe-layout-body', {
|
|
29601
|
+
[`size--${vSize}`]: vSize,
|
|
29602
|
+
'is--loading': loading,
|
|
29603
|
+
'is--padding': padding
|
|
29604
|
+
}]
|
|
29605
|
+
}, [
|
|
29606
|
+
useScrollbar
|
|
29607
|
+
? h(VxeScrollbar, {
|
|
29608
|
+
native,
|
|
29609
|
+
xConfig,
|
|
29610
|
+
yConfig,
|
|
29611
|
+
className: 'vxe-layout-body--scrollbar' + (className ? (' ' + className) : ''),
|
|
29612
|
+
viewAttrs: Object.assign(Object.assign({}, viewAttrs), { id: showBacktop ? (backtopId || null) : null }),
|
|
29613
|
+
viewClassName: 'vxe-layout-body--scrollbar-view' + (viewClassName ? (' ' + viewClassName) : ''),
|
|
29614
|
+
viewInnerClassName: 'vxe-layout-body--scrollbar-inner' + (viewInnerClassName ? (' ' + viewInnerClassName) : '')
|
|
29615
|
+
}, {
|
|
29616
|
+
default: () => defaultSlot ? defaultSlot({}) : []
|
|
29617
|
+
})
|
|
29618
|
+
: h('div', {
|
|
29619
|
+
id: showBacktop ? backtopId : '',
|
|
29620
|
+
class: 'vxe-layout-body--inner'
|
|
29621
|
+
}, defaultSlot ? defaultSlot({}) : []),
|
|
29622
|
+
/**
|
|
29623
|
+
* 加载中
|
|
29624
|
+
*/
|
|
29625
|
+
h(VxeLoading, {
|
|
29626
|
+
class: 'vxe-list-view--loading',
|
|
29627
|
+
modelValue: loading
|
|
29628
|
+
}),
|
|
29629
|
+
/**
|
|
29630
|
+
* 回到顶部
|
|
29631
|
+
*/
|
|
29632
|
+
showBacktop
|
|
29633
|
+
? h(VxeBacktop, backtopOpts, backtopScopeSlots)
|
|
29634
|
+
: renderEmptyElement$1($xeLayoutBody)
|
|
29635
|
+
]);
|
|
29636
|
+
};
|
|
29637
|
+
$xeLayoutBody.renderVN = renderVN;
|
|
29638
|
+
return $xeLayoutBody;
|
|
29639
|
+
},
|
|
29640
|
+
render() {
|
|
29641
|
+
return this.renderVN();
|
|
29642
|
+
}
|
|
29643
|
+
});
|
|
29644
|
+
|
|
29645
|
+
const VxeLayoutBody = Object.assign({}, VxeLayoutBodyComponent, {
|
|
29646
|
+
install(app) {
|
|
29647
|
+
app.component(VxeLayoutBodyComponent.name, VxeLayoutBodyComponent);
|
|
29648
|
+
}
|
|
29649
|
+
});
|
|
29650
|
+
dynamicApp.use(VxeLayoutBody);
|
|
29651
|
+
VxeUI.component(VxeLayoutBodyComponent);
|
|
29652
|
+
const LayoutBody = VxeLayoutBody;
|
|
29653
|
+
|
|
29654
|
+
var VxeLayoutContainerComponent = defineVxeComponent({
|
|
29655
|
+
name: 'VxeLayoutContainer',
|
|
29656
|
+
props: {
|
|
29657
|
+
vertical: Boolean,
|
|
29658
|
+
size: {
|
|
29659
|
+
type: String,
|
|
29660
|
+
default: () => getConfig$4().layoutContainer.size || getConfig$4().size
|
|
29661
|
+
}
|
|
29662
|
+
},
|
|
29663
|
+
emits: [],
|
|
29664
|
+
setup(props, context) {
|
|
29665
|
+
const { slots, emit } = context;
|
|
29666
|
+
const xID = XEUtils.uniqueId();
|
|
29667
|
+
const refElem = ref();
|
|
29668
|
+
const { computeSize } = useSize(props);
|
|
29669
|
+
const reactData = reactive({});
|
|
29670
|
+
const refMaps = {
|
|
29671
|
+
refElem
|
|
29672
|
+
};
|
|
29673
|
+
const computeMaps = {
|
|
29674
|
+
computeSize
|
|
29675
|
+
};
|
|
29676
|
+
const $xeLayoutContainer = {
|
|
29677
|
+
xID,
|
|
29678
|
+
props,
|
|
29679
|
+
context,
|
|
29680
|
+
reactData,
|
|
29681
|
+
getRefMaps: () => refMaps,
|
|
29682
|
+
getComputeMaps: () => computeMaps
|
|
29683
|
+
};
|
|
29684
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
29685
|
+
emit(type, createEvent$1(evnt, { $layoutContainer: $xeLayoutContainer }, params));
|
|
29686
|
+
};
|
|
29687
|
+
const layoutContainerMethods = {
|
|
29688
|
+
dispatchEvent
|
|
29689
|
+
};
|
|
29690
|
+
const layoutContainerPrivateMethods = {};
|
|
29691
|
+
Object.assign($xeLayoutContainer, layoutContainerMethods, layoutContainerPrivateMethods);
|
|
29692
|
+
const renderVN = () => {
|
|
29693
|
+
const { vertical } = props;
|
|
29694
|
+
const vSize = computeSize.value;
|
|
29695
|
+
const defaultSlot = slots.default;
|
|
29696
|
+
return h('div', {
|
|
29697
|
+
ref: refElem,
|
|
29698
|
+
class: ['vxe-layout-container', {
|
|
29699
|
+
[`size--${vSize}`]: vSize,
|
|
29700
|
+
'is--vertical': vertical
|
|
29701
|
+
}]
|
|
29702
|
+
}, defaultSlot ? defaultSlot({}) : []);
|
|
29703
|
+
};
|
|
29704
|
+
$xeLayoutContainer.renderVN = renderVN;
|
|
29045
29705
|
return $xeLayoutContainer;
|
|
29046
29706
|
},
|
|
29047
29707
|
render() {
|
|
@@ -29316,8 +29976,8 @@ VxeUI.component(VxeLinkComponent);
|
|
|
29316
29976
|
const Link = VxeLink;
|
|
29317
29977
|
|
|
29318
29978
|
const { errLog: errLog$a } = createComponentLog('menu');
|
|
29319
|
-
const { menus: menus$1, getConfig: getConfig$
|
|
29320
|
-
function createInternalData$
|
|
29979
|
+
const { menus: menus$1, getConfig: getConfig$1, getIcon: getIcon$1 } = VxeUI;
|
|
29980
|
+
function createInternalData$a() {
|
|
29321
29981
|
return {
|
|
29322
29982
|
lastActiveTime: 0,
|
|
29323
29983
|
menuInitMaps: {},
|
|
@@ -29326,7 +29986,7 @@ function createInternalData$b() {
|
|
|
29326
29986
|
menuEffectMaps: {}
|
|
29327
29987
|
};
|
|
29328
29988
|
}
|
|
29329
|
-
function createReactData$
|
|
29989
|
+
function createReactData$b() {
|
|
29330
29990
|
return {
|
|
29331
29991
|
initialized: false,
|
|
29332
29992
|
isEnterCollapse: false,
|
|
@@ -29346,15 +30006,15 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29346
30006
|
expandKeys: Array,
|
|
29347
30007
|
accordion: {
|
|
29348
30008
|
type: Boolean,
|
|
29349
|
-
default: () => getConfig$
|
|
30009
|
+
default: () => getConfig$1().menu.accordion
|
|
29350
30010
|
},
|
|
29351
30011
|
border: {
|
|
29352
30012
|
type: [Boolean, String],
|
|
29353
|
-
default: () => getConfig$
|
|
30013
|
+
default: () => getConfig$1().menu.border
|
|
29354
30014
|
},
|
|
29355
30015
|
optionProps: {
|
|
29356
30016
|
type: Object,
|
|
29357
|
-
default: () => getConfig$
|
|
30017
|
+
default: () => getConfig$1().menu.optionProps
|
|
29358
30018
|
},
|
|
29359
30019
|
collapsed: {
|
|
29360
30020
|
type: Boolean,
|
|
@@ -29368,12 +30028,17 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29368
30028
|
},
|
|
29369
30029
|
size: {
|
|
29370
30030
|
type: String,
|
|
29371
|
-
default: () => getConfig$
|
|
30031
|
+
default: () => getConfig$1().menu.size || getConfig$1().size
|
|
29372
30032
|
},
|
|
29373
30033
|
menuConfig: Object,
|
|
30034
|
+
useScrollbar: {
|
|
30035
|
+
type: Boolean,
|
|
30036
|
+
default: () => getConfig$1().menu.useScrollbar
|
|
30037
|
+
},
|
|
30038
|
+
scrollbarConfig: Object,
|
|
29374
30039
|
appendTo: {
|
|
29375
30040
|
type: [String, Function],
|
|
29376
|
-
default: () => getConfig$
|
|
30041
|
+
default: () => getConfig$1().menu.appendTo
|
|
29377
30042
|
}
|
|
29378
30043
|
},
|
|
29379
30044
|
emits: [
|
|
@@ -29389,16 +30054,16 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29389
30054
|
const refElem = ref();
|
|
29390
30055
|
const refCollapseElem = ref();
|
|
29391
30056
|
const { computeSize } = useSize(props);
|
|
29392
|
-
const reactData = reactive(createReactData$
|
|
29393
|
-
const internalData = createInternalData$
|
|
30057
|
+
const reactData = reactive(createReactData$b());
|
|
30058
|
+
const internalData = createInternalData$a();
|
|
29394
30059
|
const refMaps = {
|
|
29395
30060
|
refElem
|
|
29396
30061
|
};
|
|
29397
30062
|
const computeMenuOpts = computed(() => {
|
|
29398
|
-
return Object.assign({}, getConfig$
|
|
30063
|
+
return Object.assign({}, getConfig$1().menu.menuConfig, props.menuConfig);
|
|
29399
30064
|
});
|
|
29400
30065
|
const computePropsOpts = computed(() => {
|
|
29401
|
-
return Object.assign({}, getConfig$
|
|
30066
|
+
return Object.assign({}, getConfig$1().menu.optionProps, props.optionProps);
|
|
29402
30067
|
});
|
|
29403
30068
|
const computeTitleField = computed(() => {
|
|
29404
30069
|
const propsOpts = computePropsOpts.value;
|
|
@@ -29420,6 +30085,9 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29420
30085
|
const propsOpts = computePropsOpts.value;
|
|
29421
30086
|
return propsOpts.routerLink || 'routerLink';
|
|
29422
30087
|
});
|
|
30088
|
+
const computeScrollbarOpts = computed(() => {
|
|
30089
|
+
return Object.assign({}, getConfig$1().menu.scrollbarConfig, props.scrollbarConfig);
|
|
30090
|
+
});
|
|
29423
30091
|
const computeCurrBorder = computed(() => {
|
|
29424
30092
|
const { border } = props;
|
|
29425
30093
|
if (border) {
|
|
@@ -29903,12 +30571,14 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29903
30571
|
]);
|
|
29904
30572
|
};
|
|
29905
30573
|
const renderVN = () => {
|
|
29906
|
-
const { loading, collapseFixed, appendTo } = props;
|
|
30574
|
+
const { loading, collapseFixed, appendTo, useScrollbar } = props;
|
|
29907
30575
|
const { initialized, menuList, collapseStyle, isEnterCollapse } = reactData;
|
|
29908
30576
|
const vSize = computeSize.value;
|
|
29909
30577
|
const isCollapsed = computeIsCollapsed.value;
|
|
29910
30578
|
const currBorder = computeCurrBorder.value;
|
|
29911
30579
|
const varStyle = computeVarStyle.value;
|
|
30580
|
+
const scrollbarOpts = computeScrollbarOpts.value;
|
|
30581
|
+
const { viewClassName, viewInnerClassName } = scrollbarOpts;
|
|
29912
30582
|
const headerSlot = slots.header;
|
|
29913
30583
|
const footerSlot = slots.footer;
|
|
29914
30584
|
let ons = {};
|
|
@@ -29957,9 +30627,13 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29957
30627
|
class: 'vxe-menu--header'
|
|
29958
30628
|
}, headerSlot(stParams))
|
|
29959
30629
|
: renderEmptyElement$1($xeMenu),
|
|
29960
|
-
|
|
29961
|
-
class: 'vxe-menu--body'
|
|
29962
|
-
|
|
30630
|
+
useScrollbar
|
|
30631
|
+
? h(VxeScrollbar, Object.assign(Object.assign({ class: 'vxe-menu--scrollbar-body' }, scrollbarOpts), { viewClassName: 'vxe-menu--body-view' + (viewClassName ? (' ' + viewClassName) : ''), viewInnerClassName: 'vxe-menu--body-inner' + (viewClassName ? (' ' + viewInnerClassName) : '') }), {
|
|
30632
|
+
default: () => menuList.map(child => renderDefaultChildren(child, menuList))
|
|
30633
|
+
})
|
|
30634
|
+
: h('div', {
|
|
30635
|
+
class: 'vxe-menu--body'
|
|
30636
|
+
}, menuList.map(child => renderDefaultChildren(child, menuList))),
|
|
29963
30637
|
footerSlot
|
|
29964
30638
|
? h('div', {
|
|
29965
30639
|
class: 'vxe-menu--footer'
|
|
@@ -29972,7 +30646,7 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
29972
30646
|
* 加载中
|
|
29973
30647
|
*/
|
|
29974
30648
|
h(VxeLoading, {
|
|
29975
|
-
class: 'vxe-
|
|
30649
|
+
class: 'vxe-menu-view--loading',
|
|
29976
30650
|
modelValue: loading
|
|
29977
30651
|
})
|
|
29978
30652
|
]);
|
|
@@ -30014,8 +30688,8 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
30014
30688
|
});
|
|
30015
30689
|
onBeforeUnmount(() => {
|
|
30016
30690
|
globalEvents.off($xeMenu, 'resize');
|
|
30017
|
-
XEUtils.assign(reactData, createReactData$
|
|
30018
|
-
XEUtils.assign(internalData, createInternalData$
|
|
30691
|
+
XEUtils.assign(reactData, createReactData$b());
|
|
30692
|
+
XEUtils.assign(internalData, createInternalData$a());
|
|
30019
30693
|
});
|
|
30020
30694
|
reactData.initialized = !!props.collapsed;
|
|
30021
30695
|
reactData.activeName = props.modelValue;
|
|
@@ -30041,13 +30715,13 @@ const Menu = VxeMenu;
|
|
|
30041
30715
|
const allActiveModals = [];
|
|
30042
30716
|
|
|
30043
30717
|
const { warnLog: warnLog$a, errLog: errLog$9 } = createComponentLog('modal');
|
|
30044
|
-
function createInternalData$
|
|
30718
|
+
function createInternalData$9() {
|
|
30045
30719
|
return {
|
|
30046
30720
|
// msgTimeout: undefined,
|
|
30047
30721
|
isMoveStatus: false
|
|
30048
30722
|
};
|
|
30049
30723
|
}
|
|
30050
|
-
function createReactData$
|
|
30724
|
+
function createReactData$a() {
|
|
30051
30725
|
return {
|
|
30052
30726
|
initialized: false,
|
|
30053
30727
|
visible: false,
|
|
@@ -30279,8 +30953,8 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
30279
30953
|
const $xeTable = inject('$xeTable', null);
|
|
30280
30954
|
const $xeForm = inject('$xeForm', null);
|
|
30281
30955
|
const { computeSize } = useSize(props);
|
|
30282
|
-
const reactData = reactive(createReactData$
|
|
30283
|
-
const internalData = createInternalData$
|
|
30956
|
+
const reactData = reactive(createReactData$a());
|
|
30957
|
+
const internalData = createInternalData$9();
|
|
30284
30958
|
const refElem = ref();
|
|
30285
30959
|
const refModalBox = ref();
|
|
30286
30960
|
const refHeaderElem = ref();
|
|
@@ -31548,8 +32222,8 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
31548
32222
|
removeMsgQueue();
|
|
31549
32223
|
removeActiveQueue();
|
|
31550
32224
|
removeBodyLockScroll();
|
|
31551
|
-
XEUtils.assign(reactData, createReactData$
|
|
31552
|
-
XEUtils.assign(internalData, createInternalData$
|
|
32225
|
+
XEUtils.assign(reactData, createReactData$a());
|
|
32226
|
+
XEUtils.assign(internalData, createInternalData$9());
|
|
31553
32227
|
});
|
|
31554
32228
|
provide('$xeModal', $xeModal);
|
|
31555
32229
|
return $xeModal;
|
|
@@ -31988,7 +32662,7 @@ function isOptionVisible(option) {
|
|
|
31988
32662
|
function getOptUniqueId$1() {
|
|
31989
32663
|
return XEUtils.uniqueId('opt_');
|
|
31990
32664
|
}
|
|
31991
|
-
function createReactData$
|
|
32665
|
+
function createReactData$9() {
|
|
31992
32666
|
return {
|
|
31993
32667
|
initialized: false,
|
|
31994
32668
|
scrollYLoad: false,
|
|
@@ -32009,7 +32683,7 @@ function createReactData$a() {
|
|
|
32009
32683
|
isActivated: false
|
|
32010
32684
|
};
|
|
32011
32685
|
}
|
|
32012
|
-
function createInternalData$
|
|
32686
|
+
function createInternalData$8() {
|
|
32013
32687
|
return {
|
|
32014
32688
|
// isLoaded: false,
|
|
32015
32689
|
synchData: [],
|
|
@@ -32190,8 +32864,8 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
32190
32864
|
const refOptionPanel = ref();
|
|
32191
32865
|
const refVirtualBody = ref();
|
|
32192
32866
|
const { computeSize } = useSize(props);
|
|
32193
|
-
const reactData = reactive(createReactData$
|
|
32194
|
-
const internalData = createInternalData$
|
|
32867
|
+
const reactData = reactive(createReactData$9());
|
|
32868
|
+
const internalData = createInternalData$8();
|
|
32195
32869
|
const refMaps = {
|
|
32196
32870
|
refElem
|
|
32197
32871
|
};
|
|
@@ -33534,7 +34208,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33534
34208
|
class: 'vxe-select-slots',
|
|
33535
34209
|
ref: 'hideOption'
|
|
33536
34210
|
}, defaultSlot ? defaultSlot({}) : []),
|
|
33537
|
-
h(
|
|
34211
|
+
h(VxeInput, {
|
|
33538
34212
|
ref: refInput,
|
|
33539
34213
|
clearable: props.clearable,
|
|
33540
34214
|
placeholder: inpPlaceholder,
|
|
@@ -33580,7 +34254,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33580
34254
|
? h('div', {
|
|
33581
34255
|
class: 'vxe-select--panel-search'
|
|
33582
34256
|
}, [
|
|
33583
|
-
h(
|
|
34257
|
+
h(VxeInput, {
|
|
33584
34258
|
ref: refInpSearch,
|
|
33585
34259
|
class: 'vxe-select-search--input',
|
|
33586
34260
|
modelValue: reactData.searchValue,
|
|
@@ -33610,14 +34284,14 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33610
34284
|
class: 'vxe-select--header-btns'
|
|
33611
34285
|
}, [
|
|
33612
34286
|
(showCheckedButton && multiple)
|
|
33613
|
-
? h(
|
|
34287
|
+
? h(VxeButton, {
|
|
33614
34288
|
content: getI18n$2('vxe.select.allChecked'),
|
|
33615
34289
|
mode: 'text',
|
|
33616
34290
|
onClick: allCheckedPanelEvent
|
|
33617
34291
|
})
|
|
33618
34292
|
: renderEmptyElement$1($xeSelect),
|
|
33619
34293
|
showClearButton
|
|
33620
|
-
? h(
|
|
34294
|
+
? h(VxeButton, {
|
|
33621
34295
|
content: getI18n$2('vxe.select.clear'),
|
|
33622
34296
|
mode: 'text',
|
|
33623
34297
|
onClick: clearCheckedPanelEvent
|
|
@@ -33668,7 +34342,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33668
34342
|
? h('div', {
|
|
33669
34343
|
class: 'vxe-select--oper-btns'
|
|
33670
34344
|
}, [
|
|
33671
|
-
h(
|
|
34345
|
+
h(VxeButton, {
|
|
33672
34346
|
content: getI18n$2('vxe.select.close'),
|
|
33673
34347
|
mode: 'text',
|
|
33674
34348
|
onClick: closePanelEvent
|
|
@@ -33715,8 +34389,8 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
33715
34389
|
globalEvents.off($xeSelect, 'blur');
|
|
33716
34390
|
globalEvents.off($xeSelect, 'resize');
|
|
33717
34391
|
globalEvents.off($xeSelect, 'scroll');
|
|
33718
|
-
XEUtils.assign(reactData, createReactData$
|
|
33719
|
-
XEUtils.assign(internalData, createInternalData$
|
|
34392
|
+
XEUtils.assign(reactData, createReactData$9());
|
|
34393
|
+
XEUtils.assign(internalData, createInternalData$8());
|
|
33720
34394
|
});
|
|
33721
34395
|
provide('$xeSelect', $xeSelect);
|
|
33722
34396
|
$xeSelect.renderVN = renderVN;
|
|
@@ -36335,10 +37009,10 @@ dynamicApp.use(VxeRadioButton);
|
|
|
36335
37009
|
VxeUI.component(VxeRadioButtonComponent);
|
|
36336
37010
|
const RadioButton = VxeRadioButton;
|
|
36337
37011
|
|
|
36338
|
-
function createReactData$
|
|
37012
|
+
function createReactData$8() {
|
|
36339
37013
|
return {};
|
|
36340
37014
|
}
|
|
36341
|
-
function createInternalData$
|
|
37015
|
+
function createInternalData$7() {
|
|
36342
37016
|
return {
|
|
36343
37017
|
// isLoaded: false
|
|
36344
37018
|
};
|
|
@@ -36383,8 +37057,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
36383
37057
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
36384
37058
|
const xID = XEUtils.uniqueId();
|
|
36385
37059
|
const { computeSize } = useSize(props);
|
|
36386
|
-
const reactData = reactive(createReactData$
|
|
36387
|
-
const internalData = createInternalData$
|
|
37060
|
+
const reactData = reactive(createReactData$8());
|
|
37061
|
+
const internalData = createInternalData$7();
|
|
36388
37062
|
const computeIsReadonly = computed(() => {
|
|
36389
37063
|
const { readonly } = props;
|
|
36390
37064
|
if (readonly === null) {
|
|
@@ -36533,8 +37207,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
36533
37207
|
});
|
|
36534
37208
|
});
|
|
36535
37209
|
onUnmounted(() => {
|
|
36536
|
-
XEUtils.assign(reactData, createReactData$
|
|
36537
|
-
XEUtils.assign(internalData, createInternalData$
|
|
37210
|
+
XEUtils.assign(reactData, createReactData$8());
|
|
37211
|
+
XEUtils.assign(internalData, createInternalData$7());
|
|
36538
37212
|
});
|
|
36539
37213
|
provide('$xeRadioGroup', $xeRadioGroup);
|
|
36540
37214
|
$xeRadioGroup.renderVN = renderVN;
|
|
@@ -36718,684 +37392,106 @@ const VxeRate = Object.assign({}, VxeRateComponent, {
|
|
|
36718
37392
|
app.component(VxeRateComponent.name, VxeRateComponent);
|
|
36719
37393
|
}
|
|
36720
37394
|
});
|
|
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]
|
|
37395
|
+
dynamicApp.use(VxeRate);
|
|
37396
|
+
VxeUI.component(VxeRateComponent);
|
|
37397
|
+
const Rate = VxeRate;
|
|
37398
|
+
|
|
37399
|
+
var VxeResultComponent = defineVxeComponent({
|
|
37400
|
+
name: 'VxeResult',
|
|
37401
|
+
props: {
|
|
37402
|
+
imageUrl: String,
|
|
37403
|
+
imageStyle: Object,
|
|
37404
|
+
icon: String,
|
|
37405
|
+
type: [String, Number],
|
|
37406
|
+
status: [String, Number],
|
|
37407
|
+
title: [String, Number],
|
|
37408
|
+
content: [String, Number]
|
|
36918
37409
|
},
|
|
36919
|
-
emits: [
|
|
36920
|
-
'scroll',
|
|
36921
|
-
'scroll-boundary'
|
|
36922
|
-
],
|
|
37410
|
+
emits: [],
|
|
36923
37411
|
setup(props, context) {
|
|
36924
37412
|
const { emit, slots } = context;
|
|
36925
37413
|
const xID = XEUtils.uniqueId();
|
|
36926
37414
|
const refElem = ref();
|
|
36927
|
-
const
|
|
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);
|
|
36990
|
-
});
|
|
36991
|
-
const computeYOpts = computed(() => {
|
|
36992
|
-
return Object.assign({}, getConfig$1().scrollbar.yConfig, props.yConfig);
|
|
36993
|
-
});
|
|
37415
|
+
const reactData = reactive({});
|
|
36994
37416
|
const refMaps = {
|
|
36995
37417
|
refElem
|
|
36996
37418
|
};
|
|
36997
37419
|
const computeMaps = {};
|
|
36998
|
-
const $
|
|
37420
|
+
const $xeResult = {
|
|
36999
37421
|
xID,
|
|
37000
37422
|
props,
|
|
37001
37423
|
context,
|
|
37002
37424
|
reactData,
|
|
37003
|
-
internalData,
|
|
37004
37425
|
getRefMaps: () => refMaps,
|
|
37005
37426
|
getComputeMaps: () => computeMaps
|
|
37006
37427
|
};
|
|
37007
37428
|
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
|
-
}
|
|
37034
|
-
};
|
|
37035
|
-
const updateThumbSize = () => {
|
|
37036
|
-
const viewEl = refViewElem.value;
|
|
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;
|
|
37054
|
-
};
|
|
37055
|
-
const updateThumbOffset = () => {
|
|
37056
|
-
const viewEl = refViewElem.value;
|
|
37057
|
-
if (!viewEl) {
|
|
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
|
-
}
|
|
37077
|
-
};
|
|
37078
|
-
const scrollEvent = (evnt) => {
|
|
37079
|
-
const { xThumbWidth, yThumbHeight } = reactData;
|
|
37080
|
-
const { lastScrollTop, lastScrollLeft } = internalData;
|
|
37081
|
-
const xOpts = computeXOpts.value;
|
|
37082
|
-
const yOpts = computeYOpts.value;
|
|
37083
|
-
const viewEl = evnt.currentTarget;
|
|
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);
|
|
37137
|
-
}
|
|
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
|
-
};
|
|
37152
|
-
const clickTrackXEvent = (evnt) => {
|
|
37153
|
-
const trackEl = evnt.currentTarget;
|
|
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
|
-
});
|
|
37167
|
-
};
|
|
37168
|
-
const clickTrackYEvent = (evnt) => {
|
|
37169
|
-
const trackEl = evnt.currentTarget;
|
|
37170
|
-
if (trackEl !== evnt.target) {
|
|
37171
|
-
return;
|
|
37172
|
-
}
|
|
37173
|
-
const viewEl = refViewElem.value;
|
|
37174
|
-
if (!viewEl) {
|
|
37175
|
-
return;
|
|
37176
|
-
}
|
|
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
|
-
};
|
|
37184
|
-
const pointerdownThumbXEvent = (evnt) => {
|
|
37185
|
-
const thumbEl = evnt.currentTarget;
|
|
37186
|
-
internalData.isThumbDrag = true;
|
|
37187
|
-
thumbEl.setPointerCapture(evnt.pointerId);
|
|
37188
|
-
const viewEl = refViewElem.value;
|
|
37189
|
-
if (!viewEl) {
|
|
37190
|
-
return;
|
|
37191
|
-
}
|
|
37192
|
-
const { xThumbWidth } = reactData;
|
|
37193
|
-
const trackEl = thumbEl.parentElement;
|
|
37194
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
37195
|
-
const pointerPosition = evnt.clientX - trackRect.left;
|
|
37196
|
-
// 记录 thumb 的偏移
|
|
37197
|
-
const thumbOffset = getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
37198
|
-
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
37199
|
-
};
|
|
37200
|
-
const pointermoveThumbXEvent = (evnt) => {
|
|
37201
|
-
const thumbEl = evnt.currentTarget;
|
|
37202
|
-
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
37203
|
-
return;
|
|
37204
|
-
}
|
|
37205
|
-
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
37206
|
-
if (isThumbDrag) {
|
|
37207
|
-
const viewEl = refViewElem.value;
|
|
37208
|
-
if (!viewEl) {
|
|
37209
|
-
return;
|
|
37210
|
-
}
|
|
37211
|
-
const { xThumbWidth } = reactData;
|
|
37212
|
-
const thumbEl = evnt.currentTarget;
|
|
37213
|
-
const trackEl = thumbEl.parentElement;
|
|
37214
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
37215
|
-
// 更新偏移
|
|
37216
|
-
viewEl.scrollLeft = getScrollFromDrag(evnt.clientX - trackRect.left, thumbDragOffset, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
37217
|
-
}
|
|
37218
|
-
};
|
|
37219
|
-
const cleatPointerThumbEvent = (evnt) => {
|
|
37220
|
-
const thumbEl = evnt.currentTarget;
|
|
37221
|
-
thumbEl.releasePointerCapture(evnt.pointerId);
|
|
37222
|
-
internalData.isThumbDrag = false;
|
|
37223
|
-
};
|
|
37224
|
-
const pointerdownThumbYEvent = (evnt) => {
|
|
37225
|
-
const thumbEl = evnt.currentTarget;
|
|
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;
|
|
37429
|
+
emit(type, createEvent$1(evnt, { $result: $xeResult }, params));
|
|
37239
37430
|
};
|
|
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
|
-
}
|
|
37431
|
+
const resultMethods = {
|
|
37432
|
+
dispatchEvent
|
|
37258
37433
|
};
|
|
37259
|
-
const
|
|
37260
|
-
Object.assign($
|
|
37434
|
+
const resultPrivateMethods = {};
|
|
37435
|
+
Object.assign($xeResult, resultMethods, resultPrivateMethods);
|
|
37261
37436
|
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;
|
|
37437
|
+
const { imageUrl, imageStyle, icon, title, type, content } = props;
|
|
37438
|
+
const status = props.status || type;
|
|
37439
|
+
const slotExtra = slots.extra;
|
|
37269
37440
|
return h('div', {
|
|
37270
37441
|
ref: refElem,
|
|
37271
|
-
class:
|
|
37272
|
-
|
|
37442
|
+
class: ['vxe-result', {
|
|
37443
|
+
[`theme--${status}`]: status
|
|
37444
|
+
}]
|
|
37273
37445
|
}, [
|
|
37274
37446
|
h('div', {
|
|
37275
|
-
|
|
37276
|
-
|
|
37277
|
-
|
|
37278
|
-
|
|
37279
|
-
|
|
37280
|
-
|
|
37281
|
-
|
|
37282
|
-
|
|
37283
|
-
|
|
37284
|
-
|
|
37285
|
-
|
|
37286
|
-
|
|
37287
|
-
|
|
37288
|
-
|
|
37289
|
-
|
|
37290
|
-
|
|
37291
|
-
|
|
37292
|
-
|
|
37293
|
-
|
|
37294
|
-
|
|
37295
|
-
|
|
37296
|
-
|
|
37297
|
-
|
|
37298
|
-
|
|
37299
|
-
|
|
37300
|
-
|
|
37301
|
-
|
|
37302
|
-
})
|
|
37303
|
-
|
|
37304
|
-
|
|
37305
|
-
? renderEmptyElement($xeScrollbar)
|
|
37306
|
-
: h('div', {
|
|
37307
|
-
ref: refTrackYElem,
|
|
37308
|
-
class: 'vxe-scrollbar--track-y',
|
|
37309
|
-
onClick: clickTrackYEvent
|
|
37310
|
-
}, [
|
|
37311
|
-
h('div', {
|
|
37312
|
-
ref: refThumbYElem,
|
|
37313
|
-
class: 'vxe-scrollbar--thumb-y',
|
|
37314
|
-
onPointerdown: pointerdownThumbYEvent,
|
|
37315
|
-
onPointermove: pointermoveThumbYEvent,
|
|
37316
|
-
onPointerup: cleatPointerThumbEvent,
|
|
37317
|
-
onPointercancel: cleatPointerThumbEvent,
|
|
37318
|
-
onLostpointercapture: cleatPointerThumbEvent
|
|
37319
|
-
})
|
|
37320
|
-
]),
|
|
37321
|
-
h(VxeLoading, {
|
|
37322
|
-
class: 'vxe-scrollbar--loading',
|
|
37323
|
-
modelValue: loading
|
|
37324
|
-
})
|
|
37447
|
+
class: 'vxe-result--inner'
|
|
37448
|
+
}, [
|
|
37449
|
+
imageUrl
|
|
37450
|
+
? h('div', {
|
|
37451
|
+
class: 'vxe-result--img-wrapper'
|
|
37452
|
+
}, [
|
|
37453
|
+
h('img', {
|
|
37454
|
+
src: imageUrl,
|
|
37455
|
+
style: imageStyle
|
|
37456
|
+
})
|
|
37457
|
+
])
|
|
37458
|
+
: h('div', {
|
|
37459
|
+
class: 'vxe-result--icon-wrapper'
|
|
37460
|
+
}, [
|
|
37461
|
+
h('i', {
|
|
37462
|
+
class: [icon, type ? getIcon$2()[`RESULT_${type}`.toLocaleUpperCase()] : '']
|
|
37463
|
+
})
|
|
37464
|
+
]),
|
|
37465
|
+
h('div', {
|
|
37466
|
+
class: 'vxe-result--title-wrapper'
|
|
37467
|
+
}, `${title || ''}`),
|
|
37468
|
+
h('div', {
|
|
37469
|
+
class: 'vxe-result--content-wrapper'
|
|
37470
|
+
}, `${content || ''}`),
|
|
37471
|
+
slotExtra
|
|
37472
|
+
? h('div', {
|
|
37473
|
+
class: 'vxe-result--extra-wrapper'
|
|
37474
|
+
}, slotExtra({}))
|
|
37475
|
+
: renderEmptyElement$1($xeResult)
|
|
37476
|
+
])
|
|
37325
37477
|
]);
|
|
37326
37478
|
};
|
|
37327
|
-
|
|
37328
|
-
|
|
37329
|
-
reFlag.value++;
|
|
37330
|
-
});
|
|
37331
|
-
watch(() => props.width, () => {
|
|
37332
|
-
reFlag.value++;
|
|
37333
|
-
});
|
|
37334
|
-
watch(() => props.minHeight, () => {
|
|
37335
|
-
reFlag.value++;
|
|
37336
|
-
});
|
|
37337
|
-
watch(() => props.minWidth, () => {
|
|
37338
|
-
reFlag.value++;
|
|
37339
|
-
});
|
|
37340
|
-
watch(() => props.maxHeight, () => {
|
|
37341
|
-
reFlag.value++;
|
|
37342
|
-
});
|
|
37343
|
-
watch(() => props.maxWidth, () => {
|
|
37344
|
-
reFlag.value++;
|
|
37345
|
-
});
|
|
37346
|
-
watch(() => props.native, () => {
|
|
37347
|
-
reFlag.value++;
|
|
37348
|
-
});
|
|
37349
|
-
watch(() => props.syncResize, () => {
|
|
37350
|
-
reFlag.value++;
|
|
37351
|
-
});
|
|
37352
|
-
watch(reFlag, () => {
|
|
37353
|
-
$xeScrollbar.recalculate().then(() => {
|
|
37354
|
-
$xeScrollbar.recalculate();
|
|
37355
|
-
});
|
|
37356
|
-
});
|
|
37357
|
-
onMounted(() => {
|
|
37358
|
-
const { autoResize } = props;
|
|
37359
|
-
const viewEl = refViewElem.value;
|
|
37360
|
-
const viewInnerEl = refViewInnerElem.value;
|
|
37361
|
-
if (autoResize) {
|
|
37362
|
-
const resizeObserver = globalResize.create(() => {
|
|
37363
|
-
if (props.autoResize) {
|
|
37364
|
-
reFlag.value++;
|
|
37365
|
-
}
|
|
37366
|
-
});
|
|
37367
|
-
if (viewEl) {
|
|
37368
|
-
resizeObserver.observe(viewEl);
|
|
37369
|
-
}
|
|
37370
|
-
if (viewInnerEl) {
|
|
37371
|
-
resizeObserver.observe(viewInnerEl);
|
|
37372
|
-
}
|
|
37373
|
-
internalData.resizeObserver = resizeObserver;
|
|
37374
|
-
}
|
|
37375
|
-
reFlag.value++;
|
|
37376
|
-
});
|
|
37377
|
-
onBeforeUnmount(() => {
|
|
37378
|
-
const { resizeObserver } = internalData;
|
|
37379
|
-
if (resizeObserver) {
|
|
37380
|
-
resizeObserver.disconnect();
|
|
37381
|
-
}
|
|
37382
|
-
});
|
|
37383
|
-
$xeScrollbar.renderVN = renderVN;
|
|
37384
|
-
return $xeScrollbar;
|
|
37479
|
+
$xeResult.renderVN = renderVN;
|
|
37480
|
+
return $xeResult;
|
|
37385
37481
|
},
|
|
37386
37482
|
render() {
|
|
37387
37483
|
return this.renderVN();
|
|
37388
37484
|
}
|
|
37389
37485
|
});
|
|
37390
37486
|
|
|
37391
|
-
const
|
|
37487
|
+
const VxeResult = Object.assign({}, VxeResultComponent, {
|
|
37392
37488
|
install(app) {
|
|
37393
|
-
app.component(
|
|
37489
|
+
app.component(VxeResultComponent.name, VxeResultComponent);
|
|
37394
37490
|
}
|
|
37395
37491
|
});
|
|
37396
|
-
dynamicApp.use(
|
|
37397
|
-
VxeUI.component(
|
|
37398
|
-
const
|
|
37492
|
+
dynamicApp.use(VxeResult);
|
|
37493
|
+
VxeUI.component(VxeResultComponent);
|
|
37494
|
+
const Result = VxeResult;
|
|
37399
37495
|
|
|
37400
37496
|
var VxeRowComponent = defineVxeComponent({
|
|
37401
37497
|
name: 'VxeRow',
|
|
@@ -41474,7 +41570,7 @@ var VxeTabsComponent = defineVxeComponent({
|
|
|
41474
41570
|
: renderEmptyElement$1($xeTabs),
|
|
41475
41571
|
showLoading && isLoading
|
|
41476
41572
|
? renderEmptyElement$1($xeTabs)
|
|
41477
|
-
: h(
|
|
41573
|
+
: h(VxeLoading, {
|
|
41478
41574
|
class: 'vxe-tabs--loading',
|
|
41479
41575
|
modelValue: isLoading
|
|
41480
41576
|
})
|
|
@@ -42002,15 +42098,6 @@ dynamicApp.use(VxeTextEllipsis);
|
|
|
42002
42098
|
VxeUI.component(VxeTextEllipsisComponent);
|
|
42003
42099
|
const TextEllipsis = VxeTextEllipsis;
|
|
42004
42100
|
|
|
42005
|
-
const VxeText = Object.assign({}, VxeTextComponent, {
|
|
42006
|
-
install(app) {
|
|
42007
|
-
app.component(VxeTextComponent.name, VxeTextComponent);
|
|
42008
|
-
}
|
|
42009
|
-
});
|
|
42010
|
-
dynamicApp.use(VxeText);
|
|
42011
|
-
VxeUI.component(VxeTextComponent);
|
|
42012
|
-
const Text = VxeText;
|
|
42013
|
-
|
|
42014
42101
|
const { warnLog: warnLog$3 } = createComponentLog('textarea');
|
|
42015
42102
|
let autoTxtElem;
|
|
42016
42103
|
var VxeTextareaComponent = defineVxeComponent({
|
|
@@ -48798,7 +48885,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
48798
48885
|
? h('div', {
|
|
48799
48886
|
class: 'vxe-upload--file-item-rebtn'
|
|
48800
48887
|
}, [
|
|
48801
|
-
h(
|
|
48888
|
+
h(VxeButton, {
|
|
48802
48889
|
icon: isError ? getIcon$2().UPLOAD_IMAGE_RE_UPLOAD : getIcon$2().UPLOAD_IMAGE_UPLOAD,
|
|
48803
48890
|
mode: 'text',
|
|
48804
48891
|
status: 'primary',
|
|
@@ -48871,7 +48958,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
48871
48958
|
}, defaultSlot
|
|
48872
48959
|
? getSlotVNs(defaultSlot({ isMoreView, options: fileList, $upload: $xeUpload }))
|
|
48873
48960
|
: [
|
|
48874
|
-
h(
|
|
48961
|
+
h(VxeButton, {
|
|
48875
48962
|
class: 'vxe-upload--file-action-button',
|
|
48876
48963
|
content: (isMoreView || showButtonText) ? (buttonText ? `${XEUtils.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n$2('vxe.upload.fileBtnText')) : '',
|
|
48877
48964
|
icon: showButtonIcon ? (buttonIcon || getIcon$2().UPLOAD_FILE_ADD) : '',
|
|
@@ -48934,7 +49021,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
48934
49021
|
}, moreBtnSlot
|
|
48935
49022
|
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
48936
49023
|
: [
|
|
48937
|
-
h(
|
|
49024
|
+
h(VxeButton, {
|
|
48938
49025
|
mode: 'text',
|
|
48939
49026
|
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]),
|
|
48940
49027
|
status: 'primary',
|
|
@@ -49029,7 +49116,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
49029
49116
|
? h('div', {
|
|
49030
49117
|
class: 'vxe-upload--image-item-rebtn'
|
|
49031
49118
|
}, [
|
|
49032
|
-
h(
|
|
49119
|
+
h(VxeButton, {
|
|
49033
49120
|
icon: isError ? getIcon$2().UPLOAD_IMAGE_RE_UPLOAD : getIcon$2().UPLOAD_IMAGE_UPLOAD,
|
|
49034
49121
|
mode: 'text',
|
|
49035
49122
|
status: 'primary',
|
|
@@ -49156,7 +49243,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
49156
49243
|
}, moreBtnSlot
|
|
49157
49244
|
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
49158
49245
|
: [
|
|
49159
|
-
h(
|
|
49246
|
+
h(VxeButton, {
|
|
49160
49247
|
mode: 'text',
|
|
49161
49248
|
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]),
|
|
49162
49249
|
status: 'primary',
|
|
@@ -49176,7 +49263,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
49176
49263
|
}, moreBtnSlot
|
|
49177
49264
|
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
49178
49265
|
: [
|
|
49179
|
-
h(
|
|
49266
|
+
h(VxeButton, {
|
|
49180
49267
|
mode: 'text',
|
|
49181
49268
|
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]),
|
|
49182
49269
|
status: 'primary',
|