dashboard-shell-shell 1.0.111 → 1.0.113
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/.DS_Store +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/iconfont.css +200 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.json +296 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +19 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +63 -0
- package/assets/styles/app.scss +2 -0
- package/assets/styles/base/_basic.scss +8 -2
- package/assets/styles/base/_helpers.scss +4 -0
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +10 -2
- package/assets/styles/global/_button.scss +37 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -13
- package/assets/styles/global/_labeled-input.scss +50 -25
- package/assets/styles/global/_layout.scss +9 -3
- package/assets/styles/global/_select.scss +20 -13
- package/assets/styles/global/_table.scss +1 -1
- package/assets/styles/global/_tooltip.scss +47 -6
- package/assets/styles/themes/_dark.scss +1 -0
- package/assets/styles/themes/_light.scss +59 -46
- package/assets/styles/themes/_suse.scss +1 -0
- package/assets/styles/vendor/vue-select.scss +18 -7
- package/assets/translations/en-us.yaml +93 -12
- package/assets/translations/zh-hans.yaml +278 -141
- package/components/ActionDropdown.vue +1 -1
- package/components/ActionDropdownShell.vue +71 -0
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +1 -0
- package/components/AppModal.vue +78 -6
- package/components/AssignTo.vue +25 -11
- package/components/AsyncButton.vue +24 -7
- package/components/BannerGraphic.vue +1 -0
- package/components/ButtonDropdown.vue +26 -4
- package/components/ButtonGroup.vue +4 -0
- package/components/ButtonMultiAction.vue +1 -0
- package/components/CommunityLinks.vue +3 -3
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboardText.vue +2 -1
- package/components/CruResource.vue +12 -7
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +21 -15
- package/components/DetailText.vue +5 -0
- package/components/DisableAuthProviderModal.vue +1 -0
- package/components/DotState.vue +84 -0
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +56 -14
- package/components/FixedBanner.vue +19 -12
- package/components/GlobalRoleBindings.vue +5 -1
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +4 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +16 -1
- package/components/LandingPagePreference.vue +5 -3
- package/components/LocaleSelector.vue +39 -93
- package/components/ModalManager.vue +55 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +1 -0
- package/components/PromptChangePassword.vue +1 -1
- package/components/PromptModal.vue +15 -2
- package/components/PromptRemove.vue +28 -8
- package/components/PromptRestore.vue +1 -0
- package/components/ResourceCancelModal.vue +1 -0
- package/components/ResourceDetail/Masthead.vue +188 -43
- package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
- package/components/ResourceDetail/index.vue +49 -14
- package/components/ResourceList/Masthead.vue +80 -18
- package/components/ResourceTable.vue +60 -19
- package/components/SideNav.vue +32 -12
- package/components/SlideInPanelManager.vue +126 -0
- package/components/SortableTable/THead.vue +34 -5
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +649 -142
- package/components/SortableTable/paging.js +36 -28
- package/components/SortableTable/selection.js +0 -11
- package/components/StatusBadge.vue +77 -0
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +44 -26
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/__tests__/ModalManager.spec.ts +176 -0
- package/components/__tests__/SlideInPanelManager.spec.ts +166 -0
- package/components/auth/Principal.vue +10 -3
- package/components/auth/__tests__/RoleDetailEdit.test.ts +3 -2
- package/components/form/ArrayList.vue +123 -85
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/Command.vue +6 -15
- package/components/form/EnvVars.vue +16 -8
- package/components/form/Footer.vue +8 -5
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +11 -16
- package/components/form/KeyValue.vue +16 -7
- package/components/form/LabeledSelect.vue +59 -76
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +35 -12
- package/components/form/NameNsDescription.vue +147 -115
- package/components/form/Networking.vue +20 -12
- package/components/form/NodeAffinity.vue +31 -23
- package/components/form/NodeScheduling.vue +13 -3
- package/components/form/Password.vue +11 -5
- package/components/form/PodAffinity.vue +43 -44
- package/components/form/Probe.vue +68 -66
- package/components/form/ResourceQuota/Project.vue +5 -1
- package/components/form/ResourceSelector.vue +7 -9
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +6 -3
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +12 -1
- package/components/form/SSHKnownHosts/index.vue +16 -2
- package/components/form/Security.vue +54 -56
- package/components/form/Select.vue +41 -7
- package/components/form/ShellInput.vue +5 -1
- package/components/form/Tolerations.vue +5 -1
- package/components/form/UnitInput.vue +2 -2
- package/components/form/ValueFromResource.vue +134 -121
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +5 -2
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +115 -14
- package/components/form/__tests__/Probe.test.ts +12 -8
- package/components/form/__tests__/SSHKnownHosts.test.ts +11 -0
- package/components/form/__tests__/Select.test.ts +37 -0
- package/components/form/__tests__/UnitInput.test.ts +4 -5
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/InternalExternalIP.vue +2 -0
- package/components/formatter/SecretData.vue +20 -7
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +60 -27
- package/components/nav/Header.vue +39 -13
- package/components/nav/Jump.vue +7 -0
- package/components/nav/NamespaceFilter.vue +14 -8
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.vue +5 -17
- package/components/nav/Type.vue +32 -35
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
- package/components/templates/blank.vue +4 -1
- package/components/templates/default.vue +8 -0
- package/components/templates/home.vue +10 -1
- package/components/templates/plain.vue +10 -1
- package/package.json +1 -1
- package/rancher-components/Banner/Banner.vue +6 -4
- package/rancher-components/Card/Card.vue +6 -4
- package/rancher-components/Form/Checkbox/Checkbox.vue +20 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +46 -5
- package/rancher-components/Form/Radio/RadioButton.vue +32 -8
- package/rancher-components/Form/Radio/RadioGroup.vue +31 -24
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +17 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +8 -3
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +15 -3
- package/rancher-components/RcButton/RcButton.vue +1 -0
- package/rancher-components/RcButton/types.ts +1 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +54 -15
- package/rancher-components/RcDropdown/RcDropdownItem.vue +5 -4
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +11 -7
- package/rancher-components/RcDropdown/RcDropdownTrigger.vue +12 -2
- package/rancher-components/RcDropdown/useDropdownCollection.ts +8 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +9 -3
- package/rancher-components/StringList/StringList.vue +1 -1
- package/store/type-map.js +29 -2
- package/utils/error.js +30 -8
- package/utils/errorTranslate.json +916 -0
- package/vue.config.js +1 -1
- package/components/formatter/ExtensionCache.vue +0 -74
- package/components/formatter/Port.vue +0 -24
- package/components/formatter/SecretType.vue +0 -41
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { mapGetters } from 'vuex';
|
|
3
|
-
import { defineAsyncComponent,
|
|
2
|
+
import { mapGetters, useStore } from 'vuex';
|
|
3
|
+
import { defineAsyncComponent, ref, onMounted, onBeforeUnmount } from 'vue';
|
|
4
4
|
import day from 'dayjs';
|
|
5
5
|
import isEmpty from 'lodash/isEmpty';
|
|
6
6
|
import { dasherize, ucFirst } from '@shell/utils/string';
|
|
@@ -8,6 +8,7 @@ import { get, clone } from '@shell/utils/object';
|
|
|
8
8
|
import { removeObject } from '@shell/utils/array';
|
|
9
9
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
10
10
|
import AsyncButton, { ASYNC_BUTTON_STATES } from '@shell/components/AsyncButton';
|
|
11
|
+
import Select from '@shell/components/form/Select';
|
|
11
12
|
import ActionDropdown from '@shell/components/ActionDropdown';
|
|
12
13
|
import throttle from 'lodash/throttle';
|
|
13
14
|
import debounce from 'lodash/debounce';
|
|
@@ -24,6 +25,9 @@ import { getParent } from '@shell/utils/dom';
|
|
|
24
25
|
import { FORMATTERS } from '@shell/components/SortableTable/sortable-config';
|
|
25
26
|
import ButtonMultiAction from '@shell/components/ButtonMultiAction.vue';
|
|
26
27
|
import ActionMenu from '@shell/components/ActionMenuShell.vue';
|
|
28
|
+
import { useRuntimeFlag } from '@shell/composables/useRuntimeFlag';
|
|
29
|
+
import ActionDropdownShell from '@shell/components/ActionDropdownShell.vue';
|
|
30
|
+
|
|
27
31
|
|
|
28
32
|
// Uncomment for table performance debugging
|
|
29
33
|
// import tableDebug from './debug';
|
|
@@ -56,10 +60,12 @@ export default {
|
|
|
56
60
|
THead,
|
|
57
61
|
Checkbox,
|
|
58
62
|
AsyncButton,
|
|
63
|
+
Select,
|
|
59
64
|
ActionDropdown,
|
|
60
65
|
LabeledSelect,
|
|
61
66
|
ButtonMultiAction,
|
|
62
67
|
ActionMenu,
|
|
68
|
+
ActionDropdownShell,
|
|
63
69
|
},
|
|
64
70
|
mixins: [
|
|
65
71
|
filtering,
|
|
@@ -375,6 +381,19 @@ export default {
|
|
|
375
381
|
manualRefreshButtonSize: {
|
|
376
382
|
type: String,
|
|
377
383
|
default: ''
|
|
384
|
+
},
|
|
385
|
+
isBanner: {
|
|
386
|
+
// Show isBanner input to filter rows
|
|
387
|
+
type: Boolean,
|
|
388
|
+
default: false
|
|
389
|
+
},
|
|
390
|
+
marginTopValue: {
|
|
391
|
+
type: Number,
|
|
392
|
+
default: 0
|
|
393
|
+
},
|
|
394
|
+
isFilterLabel: {
|
|
395
|
+
type: Boolean,
|
|
396
|
+
default: false
|
|
378
397
|
}
|
|
379
398
|
|
|
380
399
|
},
|
|
@@ -391,11 +410,19 @@ export default {
|
|
|
391
410
|
|
|
392
411
|
const isLoading = this.loading || false;
|
|
393
412
|
|
|
413
|
+
let isCreatable = false;
|
|
414
|
+
const lastPath = this.$route.path.split('/').pop();
|
|
415
|
+
|
|
416
|
+
if (lastPath.includes('.')) {
|
|
417
|
+
isCreatable = this.$store.getters['type-map/optionsFor'](lastPath).isCreatable;
|
|
418
|
+
}
|
|
419
|
+
|
|
394
420
|
return {
|
|
395
421
|
refreshButtonPhase: isLoading ? ASYNC_BUTTON_STATES.WAITING : ASYNC_BUTTON_STATES.ACTION,
|
|
396
422
|
expanded: {},
|
|
397
423
|
searchQuery,
|
|
398
424
|
eventualSearchQuery,
|
|
425
|
+
isCreatable,
|
|
399
426
|
subMatches: null,
|
|
400
427
|
actionOfInterest: null,
|
|
401
428
|
loadingDelay: false,
|
|
@@ -403,7 +430,28 @@ export default {
|
|
|
403
430
|
/**
|
|
404
431
|
* The is the bool the DOM uses to show loading state. it's proxied from `loading` to avoid blipping the indicator (see usages)
|
|
405
432
|
*/
|
|
406
|
-
isLoading
|
|
433
|
+
isLoading,
|
|
434
|
+
isMuchSelected: false,
|
|
435
|
+
inputPerPage: '10',
|
|
436
|
+
inputPage: '', // 输入的要跳至的页码
|
|
437
|
+
perPageOptions: [
|
|
438
|
+
{
|
|
439
|
+
label: '10条/页',
|
|
440
|
+
value: '10',
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
label: '25条/页',
|
|
444
|
+
value: '25',
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
label: '50条/页',
|
|
448
|
+
value: '50',
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
label: '100条/页',
|
|
452
|
+
value: '100',
|
|
453
|
+
}
|
|
454
|
+
]
|
|
407
455
|
};
|
|
408
456
|
},
|
|
409
457
|
|
|
@@ -418,6 +466,13 @@ export default {
|
|
|
418
466
|
this._onScroll = this.onScroll.bind(this);
|
|
419
467
|
$main?.addEventListener('scroll', this._onScroll);
|
|
420
468
|
|
|
469
|
+
const tables = document.querySelectorAll('.sort-table-div');
|
|
470
|
+
|
|
471
|
+
tables.forEach((table) => {
|
|
472
|
+
this._onTableScroll = this.onTableScroll.bind(this, table);
|
|
473
|
+
table.addEventListener('scroll', this._onTableScroll.bind(this, table));
|
|
474
|
+
});
|
|
475
|
+
|
|
421
476
|
this.debouncedPaginationChanged();
|
|
422
477
|
},
|
|
423
478
|
|
|
@@ -432,6 +487,12 @@ export default {
|
|
|
432
487
|
const $main = document.querySelector('main');
|
|
433
488
|
|
|
434
489
|
$main?.removeEventListener('scroll', this._onScroll);
|
|
490
|
+
// 移除所有表格容器的滚动事件监听器
|
|
491
|
+
const tables = document.querySelectorAll('.sort-table-div');
|
|
492
|
+
|
|
493
|
+
tables.forEach((table) => {
|
|
494
|
+
table.removeEventListener('scroll', this._onTableScroll);
|
|
495
|
+
});
|
|
435
496
|
},
|
|
436
497
|
|
|
437
498
|
watch: {
|
|
@@ -481,6 +542,14 @@ export default {
|
|
|
481
542
|
this.watcherUpdateLiveAndDelayed(neu, old);
|
|
482
543
|
},
|
|
483
544
|
|
|
545
|
+
selectedRowsText(neu, old) {
|
|
546
|
+
if (neu) {
|
|
547
|
+
this.isMuchSelected = true;
|
|
548
|
+
} else {
|
|
549
|
+
this.isMuchSelected = false;
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
|
|
484
553
|
// Ensure we update live and delayed columns on first load
|
|
485
554
|
initalLoad: {
|
|
486
555
|
handler(neu) {
|
|
@@ -528,7 +597,7 @@ export default {
|
|
|
528
597
|
},
|
|
529
598
|
},
|
|
530
599
|
setup(_props, { emit }) {
|
|
531
|
-
const table =
|
|
600
|
+
const table = ref(null);
|
|
532
601
|
|
|
533
602
|
const handleEnterKey = (event) => {
|
|
534
603
|
if (event.key === 'Enter' && !event.target?.classList?.contains('checkbox-custom')) {
|
|
@@ -543,6 +612,14 @@ export default {
|
|
|
543
612
|
onBeforeUnmount(() => {
|
|
544
613
|
table.value.removeEventListener('keyup', handleEnterKey);
|
|
545
614
|
});
|
|
615
|
+
|
|
616
|
+
const store = useStore();
|
|
617
|
+
const { featureDropdownMenu } = useRuntimeFlag(store);
|
|
618
|
+
|
|
619
|
+
return {
|
|
620
|
+
table,
|
|
621
|
+
featureDropdownMenu,
|
|
622
|
+
};
|
|
546
623
|
},
|
|
547
624
|
|
|
548
625
|
created() {
|
|
@@ -763,15 +840,100 @@ export default {
|
|
|
763
840
|
});
|
|
764
841
|
|
|
765
842
|
return rows;
|
|
766
|
-
}
|
|
843
|
+
},
|
|
767
844
|
},
|
|
768
845
|
|
|
769
846
|
methods: {
|
|
847
|
+
onTableScroll(table, e) {
|
|
848
|
+
// 记录最后滚动的距离
|
|
849
|
+
let lastScrollTop = 0;
|
|
850
|
+
let lastScrollLeft = 0;
|
|
851
|
+
|
|
852
|
+
// 监听容器滚动
|
|
853
|
+
table.addEventListener('scroll', (e) => {
|
|
854
|
+
// 如果当前垂直滚动距离不等于上次
|
|
855
|
+
if (e.target.scrollTop !== lastScrollTop) {
|
|
856
|
+
// 更新最后距离
|
|
857
|
+
lastScrollTop = e.target.scrollTop;
|
|
858
|
+
|
|
859
|
+
// 移除左右阴影样式
|
|
860
|
+
table.classList.remove('shadow-left');
|
|
861
|
+
table.classList.remove('shadow-right');
|
|
862
|
+
|
|
863
|
+
// 如果滚动到顶部,移除顶部阴影样式
|
|
864
|
+
// if (lastScrollTop === 0) {
|
|
865
|
+
// table.classList.remove('shadow-top');
|
|
866
|
+
// }
|
|
867
|
+
// // 否则添加顶部阴影样式
|
|
868
|
+
// else {
|
|
869
|
+
// table.classList.add('shadow-top');
|
|
870
|
+
// }
|
|
871
|
+
|
|
872
|
+
// 如果滚动到底部,移除底部阴影样式
|
|
873
|
+
// if (lastScrollTop + table.clientHeight === table.scrollHeight) {
|
|
874
|
+
// table.classList.remove('shadow-bottom');
|
|
875
|
+
// }
|
|
876
|
+
// // 否则添加底部阴影样式
|
|
877
|
+
// else {
|
|
878
|
+
// table.classList.add('shadow-bottom');
|
|
879
|
+
// }
|
|
880
|
+
|
|
881
|
+
// 阴影效果修正
|
|
882
|
+
table.classList.remove('shadow-x');
|
|
883
|
+
table.classList.add('shadow-y');
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// 如果当前水平滚动距离不等于上次
|
|
887
|
+
else if (e.target.scrollLeft !== lastScrollLeft) {
|
|
888
|
+
// 更新最后距离
|
|
889
|
+
lastScrollLeft = e.target.scrollLeft;
|
|
890
|
+
|
|
891
|
+
// 移除上下阴影样式
|
|
892
|
+
// table.classList.remove('shadow-top');
|
|
893
|
+
// table.classList.remove('shadow-bottom');
|
|
894
|
+
|
|
895
|
+
// 如果滚动到左边,移除左边阴影样式
|
|
896
|
+
if (lastScrollLeft === 0) {
|
|
897
|
+
table.classList.remove('shadow-left');
|
|
898
|
+
}
|
|
899
|
+
// 否则添加左边阴影样式
|
|
900
|
+
else {
|
|
901
|
+
table.classList.add('shadow-left');
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// 如果滚动到右边,移除右边阴影样式
|
|
905
|
+
if (lastScrollLeft + table.clientWidth === table.scrollWidth) {
|
|
906
|
+
table.classList.remove('shadow-right');
|
|
907
|
+
}
|
|
908
|
+
// 否则添加右边阴影样式
|
|
909
|
+
else {
|
|
910
|
+
table.classList.add('shadow-right');
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
// 阴影效果修正
|
|
914
|
+
table.classList.remove('shadow-y');
|
|
915
|
+
table.classList.add('shadow-x');
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
},
|
|
919
|
+
changePerPage(value) {
|
|
920
|
+
this.inputPerPage = value;
|
|
921
|
+
this.setgetPerPage(value);
|
|
922
|
+
},
|
|
923
|
+
handleToPage() {
|
|
924
|
+
this.setPage(parseInt(this.inputPage, 10));
|
|
925
|
+
},
|
|
770
926
|
refreshTableData() {
|
|
771
927
|
this.$store.dispatch('resource-fetch/doManualRefresh');
|
|
772
928
|
},
|
|
773
929
|
get,
|
|
774
930
|
dasherize,
|
|
931
|
+
muchSelect(value) {
|
|
932
|
+
console.log(value);
|
|
933
|
+
|
|
934
|
+
this.isMuchSelected = !this.isMuchSelected;
|
|
935
|
+
this.onToggleAll(value);
|
|
936
|
+
},
|
|
775
937
|
|
|
776
938
|
onScroll() {
|
|
777
939
|
if (this.hasLiveColumns || this.hasDelayedColumns) {
|
|
@@ -1056,96 +1218,27 @@ export default {
|
|
|
1056
1218
|
:data-testid="componentTestid + '-list-container'"
|
|
1057
1219
|
>
|
|
1058
1220
|
<div
|
|
1059
|
-
:class="{'titled': $slots.title && $slots.title.length}"
|
|
1060
|
-
class="sortable-table-header"
|
|
1221
|
+
:class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel}"
|
|
1222
|
+
class="sortable-table-header mb-20"
|
|
1223
|
+
:style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable ? '100px' : '-10px',maxHeight: '32px'}"
|
|
1061
1224
|
>
|
|
1062
1225
|
<slot name="title" />
|
|
1063
1226
|
<div
|
|
1064
1227
|
v-if="showHeaderRow"
|
|
1065
1228
|
class="fixed-header-actions"
|
|
1066
|
-
:class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering}"
|
|
1229
|
+
:class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering, }"
|
|
1230
|
+
style="display: flex;"
|
|
1067
1231
|
>
|
|
1068
|
-
<div
|
|
1232
|
+
<!-- <div
|
|
1069
1233
|
:class="bulkActionsClass"
|
|
1070
1234
|
class="bulk"
|
|
1071
1235
|
>
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
<button
|
|
1075
|
-
v-for="(act) in availableActions"
|
|
1076
|
-
:id="act.action"
|
|
1077
|
-
:key="act.action"
|
|
1078
|
-
v-clean-tooltip="actionTooltip"
|
|
1079
|
-
type="button"
|
|
1080
|
-
class="btn role-primary"
|
|
1081
|
-
:class="{[bulkActionClass]:true}"
|
|
1082
|
-
:disabled="!act.enabled"
|
|
1083
|
-
:data-testid="componentTestid + '-' + act.action"
|
|
1084
|
-
@click="applyTableAction(act, null, $event)"
|
|
1085
|
-
@keydown.enter.stop
|
|
1086
|
-
@mouseover="setBulkActionOfInterest(act)"
|
|
1087
|
-
@mouseleave="setBulkActionOfInterest(null)"
|
|
1088
|
-
>
|
|
1089
|
-
<i
|
|
1090
|
-
v-if="act.icon"
|
|
1091
|
-
:class="act.icon"
|
|
1092
|
-
/>
|
|
1093
|
-
<span v-clean-html="act.label" />
|
|
1094
|
-
</button>
|
|
1095
|
-
<ActionDropdown
|
|
1096
|
-
:class="bulkActionsDropdownClass"
|
|
1097
|
-
class="bulk-actions-dropdown"
|
|
1098
|
-
:disable-button="!selectedRows.length"
|
|
1099
|
-
size="sm"
|
|
1100
|
-
>
|
|
1101
|
-
<template #button-content>
|
|
1102
|
-
<button
|
|
1103
|
-
ref="actionDropDown"
|
|
1104
|
-
class="btn bg-primary mr-0"
|
|
1105
|
-
:disabled="!selectedRows.length"
|
|
1106
|
-
>
|
|
1107
|
-
<i class="icon icon-gear" />
|
|
1108
|
-
<span>{{ t('sortableTable.bulkActions.collapsed.label') }}</span>
|
|
1109
|
-
<i class="ml-10 icon icon-chevron-down" />
|
|
1110
|
-
</button>
|
|
1111
|
-
</template>
|
|
1112
|
-
<template #popover-content>
|
|
1113
|
-
<ul class="list-unstyled menu">
|
|
1114
|
-
<li
|
|
1115
|
-
v-for="(act, i) in hiddenActions"
|
|
1116
|
-
:key="i"
|
|
1117
|
-
v-close-popper
|
|
1118
|
-
v-clean-tooltip="{
|
|
1119
|
-
content: actionTooltip,
|
|
1120
|
-
placement: 'right'
|
|
1121
|
-
}"
|
|
1122
|
-
:class="{ disabled: !act.enabled }"
|
|
1123
|
-
@click="applyTableAction(act, null, $event)"
|
|
1124
|
-
@mouseover="setBulkActionOfInterest(act)"
|
|
1125
|
-
@mouseleave="setBulkActionOfInterest(null)"
|
|
1126
|
-
>
|
|
1127
|
-
<i
|
|
1128
|
-
v-if="act.icon"
|
|
1129
|
-
:class="act.icon"
|
|
1130
|
-
/>
|
|
1131
|
-
<span v-clean-html="act.label" />
|
|
1132
|
-
</li>
|
|
1133
|
-
</ul>
|
|
1134
|
-
</template>
|
|
1135
|
-
</ActionDropdown>
|
|
1136
|
-
<label
|
|
1137
|
-
v-if="selectedRowsText"
|
|
1138
|
-
:class="bulkActionAvailabilityClass"
|
|
1139
|
-
class="action-availability"
|
|
1140
|
-
>
|
|
1141
|
-
{{ selectedRowsText }}
|
|
1142
|
-
</label>
|
|
1143
|
-
</template>
|
|
1144
|
-
</slot>
|
|
1145
|
-
</div>
|
|
1236
|
+
|
|
1237
|
+
</div> -->
|
|
1146
1238
|
<div
|
|
1147
1239
|
v-if="!hasAdvancedFiltering && $slots['header-middle']"
|
|
1148
1240
|
class="middle"
|
|
1241
|
+
style="margin-left: 10px;margin-right: -10px;"
|
|
1149
1242
|
>
|
|
1150
1243
|
<slot name="header-middle" />
|
|
1151
1244
|
</div>
|
|
@@ -1154,6 +1247,7 @@ export default {
|
|
|
1154
1247
|
v-if="search || hasAdvancedFiltering || isTooManyItemsToAutoUpdate || $slots['header-right']"
|
|
1155
1248
|
class="search row"
|
|
1156
1249
|
data-testid="search-box-filter-row"
|
|
1250
|
+
style="max-height: 32px;display: contents;"
|
|
1157
1251
|
>
|
|
1158
1252
|
<ul
|
|
1159
1253
|
v-if="hasAdvancedFiltering"
|
|
@@ -1234,19 +1328,32 @@ export default {
|
|
|
1234
1328
|
</div>
|
|
1235
1329
|
</div>
|
|
1236
1330
|
</div>
|
|
1237
|
-
<
|
|
1331
|
+
<p
|
|
1238
1332
|
v-else-if="search"
|
|
1333
|
+
id="describe-filter-sortable-table"
|
|
1334
|
+
hidden
|
|
1335
|
+
>
|
|
1336
|
+
{{ t('sortableTable.filteringDescription') }}
|
|
1337
|
+
</p>
|
|
1338
|
+
<slot name="header-button" />
|
|
1339
|
+
<input
|
|
1340
|
+
v-if="search"
|
|
1239
1341
|
ref="searchQuery"
|
|
1240
1342
|
v-model="eventualSearchQuery"
|
|
1241
1343
|
type="search"
|
|
1242
1344
|
class="input-sm search-box"
|
|
1243
1345
|
:aria-label="t('sortableTable.searchLabel')"
|
|
1346
|
+
aria-describedby="describe-filter-sortable-table"
|
|
1244
1347
|
:placeholder="t('sortableTable.search')"
|
|
1245
1348
|
>
|
|
1246
|
-
|
|
1349
|
+
|
|
1247
1350
|
</div>
|
|
1248
1351
|
</div>
|
|
1249
1352
|
</div>
|
|
1353
|
+
<div v-if="$slots['banner']">
|
|
1354
|
+
<slot name="banner"></slot>
|
|
1355
|
+
</div>
|
|
1356
|
+
<div class="sort-table-div">
|
|
1250
1357
|
<table
|
|
1251
1358
|
ref="table"
|
|
1252
1359
|
class="sortable-table"
|
|
@@ -1437,9 +1544,9 @@ export default {
|
|
|
1437
1544
|
:value="col.value"
|
|
1438
1545
|
:row="row.row"
|
|
1439
1546
|
:col="col.col"
|
|
1547
|
+
:get-custom-detail-link="getCustomDetailLink"
|
|
1440
1548
|
v-bind="col.col.formatterOpts"
|
|
1441
1549
|
:row-key="row.key"
|
|
1442
|
-
:get-custom-detail-link="getCustomDetailLink"
|
|
1443
1550
|
/>
|
|
1444
1551
|
<component
|
|
1445
1552
|
:is="col.component"
|
|
@@ -1471,23 +1578,43 @@ export default {
|
|
|
1471
1578
|
</template>
|
|
1472
1579
|
<td
|
|
1473
1580
|
v-if="rowActions"
|
|
1581
|
+
:align="'left'"
|
|
1582
|
+
style="height:60px"
|
|
1474
1583
|
>
|
|
1584
|
+
<div style="display: flex;align-items: center;">
|
|
1475
1585
|
<slot
|
|
1476
1586
|
name="row-actions"
|
|
1477
1587
|
:row="row.row"
|
|
1478
1588
|
:index="i"
|
|
1479
1589
|
>
|
|
1480
|
-
<ActionMenu
|
|
1481
|
-
:resource="row.row"
|
|
1482
|
-
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1483
|
-
:button-aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1484
|
-
/>
|
|
1485
1590
|
</slot>
|
|
1591
|
+
<template v-if="featureDropdownMenu">
|
|
1592
|
+
<ActionMenu
|
|
1593
|
+
:resource="row.row"
|
|
1594
|
+
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1595
|
+
:button-aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1596
|
+
/>
|
|
1597
|
+
</template>
|
|
1598
|
+
<template v-else>
|
|
1599
|
+
<ButtonMultiAction
|
|
1600
|
+
:id="`actionButton+${i}+${(row.row && row.row.name) ? row.row.name : ''}`"
|
|
1601
|
+
:ref="`actionButton${i}`"
|
|
1602
|
+
aria-haspopup="true"
|
|
1603
|
+
aria-expanded="false"
|
|
1604
|
+
:aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1605
|
+
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1606
|
+
:borderless="true"
|
|
1607
|
+
@click="handleActionButtonClick(i, $event)"
|
|
1608
|
+
@keyup.enter="handleActionButtonClick(i, $event)"
|
|
1609
|
+
@keyup.space="handleActionButtonClick(i, $event)"
|
|
1610
|
+
/>
|
|
1611
|
+
</template>
|
|
1612
|
+
</div>
|
|
1486
1613
|
</td>
|
|
1487
1614
|
</tr>
|
|
1488
1615
|
</slot>
|
|
1489
1616
|
</slot>
|
|
1490
|
-
<slot
|
|
1617
|
+
<!-- <slot
|
|
1491
1618
|
v-if="row.showSubRow"
|
|
1492
1619
|
name="sub-row"
|
|
1493
1620
|
:full-colspan="fullColspan"
|
|
@@ -1519,53 +1646,270 @@ export default {
|
|
|
1519
1646
|
{{ row.row.stateDescription }}
|
|
1520
1647
|
</td>
|
|
1521
1648
|
</tr>
|
|
1522
|
-
</slot>
|
|
1649
|
+
</slot> -->
|
|
1523
1650
|
</template>
|
|
1524
1651
|
</tbody>
|
|
1525
1652
|
</table>
|
|
1653
|
+
</div>
|
|
1526
1654
|
<div
|
|
1527
|
-
|
|
1528
|
-
class="
|
|
1655
|
+
v-if="!noRows && !noResults"
|
|
1656
|
+
:class="$route.path=== '/account'? 'chebox-padding':''"
|
|
1657
|
+
style="display: flex;justify-content: flex-start;align-content: center;height: 62px;position: sticky;bottom: 0;background-color: var(--header-bg);padding: 15px 20px 0 30px;margin: 0 -20px 0 -20px;z-index:20"
|
|
1529
1658
|
>
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1659
|
+
<div style="display: flex;justify-content: center;height: 32px;">
|
|
1660
|
+
<Checkbox
|
|
1661
|
+
v-if="tableActions&&availableActions.some(item => item.action != 'download')"
|
|
1662
|
+
:value="isMuchSelected"
|
|
1663
|
+
class="check"
|
|
1664
|
+
data-testid="sortable-table_check_select_all"
|
|
1665
|
+
:disabled="noRows || noResults"
|
|
1666
|
+
style="display: flex;justify-content: center;align-content: center;"
|
|
1667
|
+
@update:value = "muchSelect"
|
|
1668
|
+
/>
|
|
1669
|
+
</div>
|
|
1670
|
+
<div
|
|
1671
|
+
:class="{'titled': $slots.title && $slots.title.length}"
|
|
1672
|
+
class="sortable-table-header"
|
|
1673
|
+
style="margin-left: 10px;min-width: 55%;"
|
|
1545
1674
|
>
|
|
1546
|
-
<
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1675
|
+
<slot name="title" />
|
|
1676
|
+
<div
|
|
1677
|
+
v-if="showHeaderRow"
|
|
1678
|
+
class="fixed-header-actions"
|
|
1679
|
+
:class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering,}"
|
|
1680
|
+
>
|
|
1681
|
+
<div
|
|
1682
|
+
:class="bulkActionsClass"
|
|
1683
|
+
class="bulk"
|
|
1684
|
+
>
|
|
1685
|
+
<slot name="header-left">
|
|
1686
|
+
<template v-if="tableActions">
|
|
1687
|
+
<button
|
|
1688
|
+
v-for="(act) in availableActions"
|
|
1689
|
+
:id="act.action"
|
|
1690
|
+
:key="act.action"
|
|
1691
|
+
v-clean-tooltip="actionTooltip"
|
|
1692
|
+
type="button"
|
|
1693
|
+
class="btn role-primary"
|
|
1694
|
+
:class="{[bulkActionClass]:true}"
|
|
1695
|
+
:disabled="!act.enabled"
|
|
1696
|
+
:data-testid="componentTestid + '-' + act.action"
|
|
1697
|
+
role="button"
|
|
1698
|
+
:aria-label="act.label"
|
|
1699
|
+
@click="applyTableAction(act, null, $event)"
|
|
1700
|
+
@keydown.enter.stop
|
|
1701
|
+
@mouseover="setBulkActionOfInterest(act)"
|
|
1702
|
+
@mouseleave="setBulkActionOfInterest(null)"
|
|
1703
|
+
>
|
|
1704
|
+
<i
|
|
1705
|
+
v-if="act.icon"
|
|
1706
|
+
:class="act.icon"
|
|
1707
|
+
/>
|
|
1708
|
+
<span v-clean-html="act.label" />
|
|
1709
|
+
</button>
|
|
1710
|
+
<template v-if="featureDropdownMenu">
|
|
1711
|
+
<ActionDropdownShell
|
|
1712
|
+
:disabled="!selectedRows.length"
|
|
1713
|
+
:hidden-actions="hiddenActions"
|
|
1714
|
+
:action-tooltip="actionTooltip"
|
|
1715
|
+
@click="applyTableAction"
|
|
1716
|
+
@mouseover="setBulkActionOfInterest"
|
|
1717
|
+
@mouseleave="setBulkActionOfInterest"
|
|
1718
|
+
/>
|
|
1719
|
+
</template>
|
|
1720
|
+
<template v-else>
|
|
1721
|
+
<ActionDropdown
|
|
1722
|
+
:class="bulkActionsDropdownClass"
|
|
1723
|
+
class="bulk-actions-dropdown"
|
|
1724
|
+
:disable-button="!selectedRows.length"
|
|
1725
|
+
size="sm"
|
|
1726
|
+
>
|
|
1727
|
+
<template #button-content>
|
|
1728
|
+
<button
|
|
1729
|
+
ref="actionDropDown"
|
|
1730
|
+
class="btn bg-primary mr-0"
|
|
1731
|
+
:disabled="!selectedRows.length"
|
|
1732
|
+
>
|
|
1733
|
+
<i class="icon icon-gear" />
|
|
1734
|
+
<span>{{ t('sortableTable.bulkActions.collapsed.label') }}</span>
|
|
1735
|
+
<i class="ml-10 icon icon-chevron-down" />
|
|
1736
|
+
</button>
|
|
1737
|
+
</template>
|
|
1738
|
+
<template #popover-content>
|
|
1739
|
+
<ul class="list-unstyled menu">
|
|
1740
|
+
<li
|
|
1741
|
+
v-for="(act, i) in hiddenActions"
|
|
1742
|
+
:key="i"
|
|
1743
|
+
v-close-popper
|
|
1744
|
+
v-clean-tooltip="{
|
|
1745
|
+
content: actionTooltip,
|
|
1746
|
+
placement: 'right'
|
|
1747
|
+
}"
|
|
1748
|
+
:class="{ disabled: !act.enabled }"
|
|
1749
|
+
@click="applyTableAction(act, null, $event)"
|
|
1750
|
+
@mouseover="setBulkActionOfInterest(act)"
|
|
1751
|
+
@mouseleave="setBulkActionOfInterest(null)"
|
|
1752
|
+
>
|
|
1753
|
+
<i
|
|
1754
|
+
v-if="act.icon"
|
|
1755
|
+
:class="act.icon"
|
|
1756
|
+
/>
|
|
1757
|
+
<span v-clean-html="act.label" />
|
|
1758
|
+
</li>
|
|
1759
|
+
</ul>
|
|
1760
|
+
</template>
|
|
1761
|
+
</ActionDropdown>
|
|
1762
|
+
</template>
|
|
1763
|
+
<label
|
|
1764
|
+
v-if="selectedRowsText"
|
|
1765
|
+
:class="bulkActionAvailabilityClass"
|
|
1766
|
+
class="action-availability"
|
|
1767
|
+
>
|
|
1768
|
+
{{ selectedRowsText }}
|
|
1769
|
+
</label>
|
|
1770
|
+
</template>
|
|
1771
|
+
</slot>
|
|
1772
|
+
</div>
|
|
1773
|
+
</div>
|
|
1774
|
+
</div>
|
|
1775
|
+
|
|
1776
|
+
<!-- 分页 -->
|
|
1777
|
+
<div
|
|
1778
|
+
v-if="showPaging"
|
|
1779
|
+
class="paging"
|
|
1557
1780
|
>
|
|
1558
|
-
<
|
|
1559
|
-
|
|
1560
|
-
|
|
1781
|
+
<div style="height: 100%; align-content: center;">
|
|
1782
|
+
共 {{ filteredRows.length }} 条
|
|
1783
|
+
</div>
|
|
1784
|
+
|
|
1785
|
+
<button
|
|
1786
|
+
type="button"
|
|
1787
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1788
|
+
:disabled="page == 1"
|
|
1789
|
+
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1790
|
+
@click="goToPage('prev')"
|
|
1791
|
+
>
|
|
1792
|
+
<!-- <i class="icon icon-chevron-left" /> -->
|
|
1793
|
+
<
|
|
1794
|
+
</button>
|
|
1795
|
+
<button
|
|
1796
|
+
type="button"
|
|
1797
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1798
|
+
:style="{ color: (page == 1) ? `var(--primary)`:`var(--default-text) !important`,border: (page == 1) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1799
|
+
@click="goToPage('first')"
|
|
1800
|
+
>
|
|
1801
|
+
<!-- <i class="icon icon-chevron-beginning" /> -->
|
|
1802
|
+
{{ 1 }}
|
|
1803
|
+
</button>
|
|
1804
|
+
<template v-if="totalPages > 2">
|
|
1805
|
+
<div style="display: flex;flex-direction: row;gap: 10px;">
|
|
1806
|
+
<button
|
|
1807
|
+
v-if="page - 2 > 1 && page <= totalPages "
|
|
1808
|
+
type="button"
|
|
1809
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1810
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1811
|
+
>
|
|
1812
|
+
...
|
|
1813
|
+
</button>
|
|
1814
|
+
<button
|
|
1815
|
+
v-if="page - 1 > 1 && page <= totalPages "
|
|
1816
|
+
type="button"
|
|
1817
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1818
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1819
|
+
@click="setPage(page-1)"
|
|
1820
|
+
>
|
|
1821
|
+
{{ page-1 }}
|
|
1822
|
+
</button>
|
|
1823
|
+
<button
|
|
1824
|
+
v-if="page > 1 && page < totalPages"
|
|
1825
|
+
type="button"
|
|
1826
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1827
|
+
:style="{ color: `var(--default-text)`,border: `solid thin var(--primary)`}"
|
|
1828
|
+
@click="setPage(page)"
|
|
1829
|
+
>
|
|
1830
|
+
{{ page }}
|
|
1831
|
+
</button>
|
|
1832
|
+
<button
|
|
1833
|
+
v-if="page + 1 < totalPages "
|
|
1834
|
+
type="button"
|
|
1835
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1836
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1837
|
+
@click="setPage(page+1)"
|
|
1838
|
+
>
|
|
1839
|
+
{{ page+1 }}
|
|
1840
|
+
</button>
|
|
1841
|
+
<button
|
|
1842
|
+
v-if="page +2 < totalPages "
|
|
1843
|
+
type="button"
|
|
1844
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1845
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1846
|
+
>
|
|
1847
|
+
...
|
|
1848
|
+
</button>
|
|
1849
|
+
</div>
|
|
1850
|
+
</template>
|
|
1851
|
+
<!-- <button
|
|
1852
|
+
type="button"
|
|
1853
|
+
class="btn btn-sm role-multi-action"
|
|
1854
|
+
style="padding: 0;max-width: 32px;background-color: white !important;"
|
|
1855
|
+
>
|
|
1856
|
+
{{ page }}
|
|
1857
|
+
</button> -->
|
|
1858
|
+
<button
|
|
1859
|
+
v-if="totalPages > 1"
|
|
1860
|
+
type="button"
|
|
1861
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1862
|
+
:style="{ color: (page == totalPages) ? `var(--primary)`:`var(--default-text) !important`,border: (page == totalPages) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1863
|
+
@click="goToPage('last')"
|
|
1864
|
+
>
|
|
1865
|
+
<!-- <i class="icon icon-chevron-end" /> -->
|
|
1866
|
+
{{ totalPages }}
|
|
1867
|
+
</button>
|
|
1868
|
+
<button
|
|
1869
|
+
type="button"
|
|
1870
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1871
|
+
:disabled="page == totalPages"
|
|
1872
|
+
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1873
|
+
@click="goToPage('next')"
|
|
1874
|
+
>
|
|
1875
|
+
<!-- <i class="icon icon-chevron-right" /> -->
|
|
1876
|
+
>
|
|
1877
|
+
</button>
|
|
1878
|
+
|
|
1879
|
+
<!-- 分页页码切换 -->
|
|
1880
|
+
<Select
|
|
1881
|
+
:mode="inputPerPage"
|
|
1882
|
+
:searchable="false"
|
|
1883
|
+
:clearable="false"
|
|
1884
|
+
:options="perPageOptions"
|
|
1885
|
+
v-model:value="inputPerPage"
|
|
1886
|
+
class="pageSelect"
|
|
1887
|
+
@update:value="changePerPage"
|
|
1888
|
+
/>
|
|
1889
|
+
|
|
1890
|
+
<div style="height: 100%; align-content: center;">
|
|
1891
|
+
跳至
|
|
1892
|
+
</div>
|
|
1893
|
+
<input
|
|
1894
|
+
v-model="inputPage"
|
|
1895
|
+
type="number"
|
|
1896
|
+
min="1"
|
|
1897
|
+
step="1"
|
|
1898
|
+
style="padding: 0px 10px;"
|
|
1899
|
+
@keyup.enter="handleToPage"
|
|
1900
|
+
>
|
|
1901
|
+
<div style="height: 100%; align-content: center;">
|
|
1902
|
+
页
|
|
1903
|
+
</div>
|
|
1904
|
+
<!-- <button
|
|
1561
1905
|
type="button"
|
|
1562
1906
|
class="btn btn-sm role-multi-action"
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
@click="goToPage('last')"
|
|
1907
|
+
style="padding: 0;max-width: 80px;background-color: white !important;"
|
|
1908
|
+
@click="setPage(inputPage)"
|
|
1566
1909
|
>
|
|
1567
|
-
|
|
1568
|
-
</button>
|
|
1910
|
+
|
|
1911
|
+
</button> -->
|
|
1912
|
+
</div>
|
|
1569
1913
|
</div>
|
|
1570
1914
|
<button
|
|
1571
1915
|
v-if="search"
|
|
@@ -1749,9 +2093,12 @@ export default {
|
|
|
1749
2093
|
}
|
|
1750
2094
|
|
|
1751
2095
|
.search-box {
|
|
1752
|
-
height:
|
|
1753
|
-
margin-left:
|
|
1754
|
-
min-width: 180px;
|
|
2096
|
+
height: 32px;
|
|
2097
|
+
margin-left: 0px;
|
|
2098
|
+
/* min-width: 180px; */
|
|
2099
|
+
min-width: 280px;
|
|
2100
|
+
width: 280px !important;
|
|
2101
|
+
border: 1px solid rgb(217, 217, 217);
|
|
1755
2102
|
}
|
|
1756
2103
|
</style>
|
|
1757
2104
|
|
|
@@ -1777,7 +2124,8 @@ export default {
|
|
|
1777
2124
|
border-collapse: collapse;
|
|
1778
2125
|
min-width: 400px;
|
|
1779
2126
|
border-radius: 5px 5px 0 0;
|
|
1780
|
-
|
|
2127
|
+
border-bottom: 1px solid var(--border);
|
|
2128
|
+
/* outline: 1px solid var(--border); */
|
|
1781
2129
|
background: var(--sortable-table-bg);
|
|
1782
2130
|
border-radius: 4px;
|
|
1783
2131
|
|
|
@@ -1791,32 +2139,77 @@ export default {
|
|
|
1791
2139
|
td {
|
|
1792
2140
|
padding: 8px 5px;
|
|
1793
2141
|
border: 0;
|
|
2142
|
+
background: var(--sortable-table-row-bg);
|
|
1794
2143
|
|
|
1795
2144
|
&:first-child {
|
|
1796
2145
|
padding-left: 10px;
|
|
2146
|
+
position: sticky;
|
|
2147
|
+
left: 0;
|
|
2148
|
+
z-index: 2;
|
|
2149
|
+
}
|
|
2150
|
+
&:nth-child(2) {
|
|
2151
|
+
padding-left: 10px;
|
|
2152
|
+
position: sticky;
|
|
2153
|
+
left: 29px;
|
|
2154
|
+
z-index: 2;
|
|
1797
2155
|
}
|
|
1798
2156
|
|
|
1799
2157
|
&:last-child {
|
|
1800
2158
|
padding-right: 10px;
|
|
2159
|
+
position: sticky;
|
|
2160
|
+
right: 0;
|
|
2161
|
+
z-index: 2;
|
|
2162
|
+
/* padding-left: 10px; */
|
|
1801
2163
|
}
|
|
1802
2164
|
|
|
1803
2165
|
&.row-check {
|
|
1804
2166
|
padding-top: 12px;
|
|
2167
|
+
right: 0;
|
|
2168
|
+
position: sticky;
|
|
1805
2169
|
}
|
|
1806
2170
|
}
|
|
2171
|
+
th {
|
|
2172
|
+
padding: 13px 5px;
|
|
2173
|
+
border: 0;
|
|
2174
|
+
/* height: 50.84px; */
|
|
2175
|
+
box-sizing: border-box;
|
|
2176
|
+
background: var(--sortable-table-header-bg);
|
|
2177
|
+
|
|
2178
|
+
&:first-child {
|
|
2179
|
+
padding-left: 10px;
|
|
2180
|
+
position: sticky;
|
|
2181
|
+
left: 0;
|
|
2182
|
+
z-index: 2;
|
|
2183
|
+
}
|
|
2184
|
+
&:nth-child(2) {
|
|
2185
|
+
padding-left: 10px;
|
|
2186
|
+
position: sticky;
|
|
2187
|
+
left: 29px;
|
|
2188
|
+
z-index: 2;
|
|
2189
|
+
}
|
|
1807
2190
|
|
|
2191
|
+
&:last-child {
|
|
2192
|
+
padding-left: 10px;
|
|
2193
|
+
padding-right: 10px;
|
|
2194
|
+
position: sticky;
|
|
2195
|
+
right: 0;
|
|
2196
|
+
z-index: 2;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
}
|
|
1808
2200
|
tbody {
|
|
1809
2201
|
tr {
|
|
1810
2202
|
border-bottom: 1px solid var(--sortable-table-top-divider);
|
|
1811
2203
|
background-color: var(--sortable-table-row-bg);
|
|
2204
|
+
height: 60px;
|
|
1812
2205
|
|
|
1813
2206
|
&.main-row.has-sub-row {
|
|
1814
|
-
border-bottom: 0;
|
|
2207
|
+
/* border-bottom: 0; */
|
|
1815
2208
|
}
|
|
1816
2209
|
|
|
1817
2210
|
// if a main-row is hovered also hover it's sibling sub row. note - the reverse is handled in selection.js
|
|
1818
2211
|
&.main-row:not(.row-selected):hover + .sub-row {
|
|
1819
|
-
background-color: var(--sortable-table-hover-bg);
|
|
2212
|
+
/* background-color: var(--sortable-table-hover-bg); */
|
|
1820
2213
|
}
|
|
1821
2214
|
|
|
1822
2215
|
&:last-of-type {
|
|
@@ -1824,7 +2217,7 @@ export default {
|
|
|
1824
2217
|
}
|
|
1825
2218
|
|
|
1826
2219
|
&:hover, &.sub-row-hovered {
|
|
1827
|
-
background-color: var(--sortable-table-hover-bg);
|
|
2220
|
+
/* background-color: var(--sortable-table-hover-bg); */
|
|
1828
2221
|
}
|
|
1829
2222
|
|
|
1830
2223
|
&.state-description > td {
|
|
@@ -1839,7 +2232,7 @@ export default {
|
|
|
1839
2232
|
}
|
|
1840
2233
|
|
|
1841
2234
|
tr.row-selected {
|
|
1842
|
-
background: var(--sortable-table-selected-bg);
|
|
2235
|
+
/* background: var(--sortable-table-selected-bg); */
|
|
1843
2236
|
}
|
|
1844
2237
|
|
|
1845
2238
|
.no-rows {
|
|
@@ -1854,18 +2247,22 @@ export default {
|
|
|
1854
2247
|
background-color: var(--body-bg);
|
|
1855
2248
|
}
|
|
1856
2249
|
}
|
|
2250
|
+
.no-results{
|
|
2251
|
+
height: 60px;
|
|
2252
|
+
}
|
|
1857
2253
|
|
|
1858
2254
|
&.group {
|
|
1859
2255
|
&:before {
|
|
1860
2256
|
content: "";
|
|
1861
2257
|
display: block;
|
|
1862
|
-
height:
|
|
2258
|
+
height: 0px;
|
|
1863
2259
|
background-color: transparent;
|
|
1864
2260
|
}
|
|
1865
2261
|
}
|
|
1866
2262
|
|
|
1867
2263
|
tr.group-row {
|
|
1868
2264
|
background-color: initial;
|
|
2265
|
+
height: 40px;
|
|
1869
2266
|
|
|
1870
2267
|
&:first-child {
|
|
1871
2268
|
border-bottom: 2px solid var(--sortable-table-row-bg);
|
|
@@ -1962,7 +2359,7 @@ export default {
|
|
|
1962
2359
|
}
|
|
1963
2360
|
|
|
1964
2361
|
.fixed-header-actions {
|
|
1965
|
-
padding: 0 0 20px 0;
|
|
2362
|
+
/* padding: 0 0 20px 0; */
|
|
1966
2363
|
width: 100%;
|
|
1967
2364
|
z-index: z-index('fixedTableHeader');
|
|
1968
2365
|
background: transparent;
|
|
@@ -2078,12 +2475,122 @@ export default {
|
|
|
2078
2475
|
}
|
|
2079
2476
|
|
|
2080
2477
|
.paging {
|
|
2081
|
-
|
|
2478
|
+
//text-align: center;
|
|
2479
|
+
display: flex;
|
|
2480
|
+
justify-content: flex-end;
|
|
2481
|
+
gap: 0 10px;
|
|
2082
2482
|
text-align: center;
|
|
2083
|
-
|
|
2483
|
+
max-height: 32px;
|
|
2484
|
+
background-color: transparent;
|
|
2485
|
+
flex: 1;
|
|
2084
2486
|
SPAN {
|
|
2085
2487
|
display: inline-block;
|
|
2086
|
-
min-width: 200px;
|
|
2488
|
+
//min-width: 200px;
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
/* 针对Webkit浏览器(如Chrome, Safari) */
|
|
2492
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
2493
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
2494
|
+
-webkit-appearance: none;
|
|
2495
|
+
margin: 0;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
/* 针对Firefox */
|
|
2499
|
+
input[type="number"] {
|
|
2500
|
+
-moz-appearance: textfield;
|
|
2501
|
+
// background-color: var(--disabled-bg) !important;
|
|
2502
|
+
border: 1px var(--border) solid;
|
|
2503
|
+
border-radius: 2px;
|
|
2504
|
+
width: 50px;
|
|
2505
|
+
height: 100%;
|
|
2087
2506
|
}
|
|
2088
2507
|
}
|
|
2508
|
+
|
|
2089
2509
|
</style>
|
|
2510
|
+
<style scoped lang="scss">
|
|
2511
|
+
:deep() .role-link{
|
|
2512
|
+
min-width: unset !important;
|
|
2513
|
+
width: 38px;
|
|
2514
|
+
min-height: 20px !important;
|
|
2515
|
+
height: 20px !important;
|
|
2516
|
+
line-height: 20px !important;
|
|
2517
|
+
&:hover{
|
|
2518
|
+
background-color: unset !important;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
:deep() .checkbox-outer-container-extra{
|
|
2522
|
+
margin-top: 0px !important;
|
|
2523
|
+
}
|
|
2524
|
+
.pageSelect {
|
|
2525
|
+
max-width: 100px;
|
|
2526
|
+
}
|
|
2527
|
+
.page-btn-normal {
|
|
2528
|
+
padding: 0;
|
|
2529
|
+
max-width: 32px;
|
|
2530
|
+
background-color:white !important;
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
.pageSelect{
|
|
2534
|
+
&:deep() .vs__actions:after{
|
|
2535
|
+
padding-top: 10px;
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
.sort-table-div{
|
|
2539
|
+
width:100%;
|
|
2540
|
+
white-space:nowrap;
|
|
2541
|
+
overflow-x: auto;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
/* 滚动阴影左边 */
|
|
2545
|
+
.shadow-left td:nth-child(2)::after{
|
|
2546
|
+
content: "";
|
|
2547
|
+
position: absolute;
|
|
2548
|
+
top: 0;
|
|
2549
|
+
width: 10px;
|
|
2550
|
+
height: 100%;
|
|
2551
|
+
right: -10px;
|
|
2552
|
+
background: linear-gradient(to right, rgba(5, 5, 5, 0.06), transparent);
|
|
2553
|
+
}
|
|
2554
|
+
.shadow-left{
|
|
2555
|
+
&:deep() th:nth-child(2)::after{
|
|
2556
|
+
content: "";
|
|
2557
|
+
position: absolute;
|
|
2558
|
+
top: 0;
|
|
2559
|
+
width: 10px;
|
|
2560
|
+
height: 100%;
|
|
2561
|
+
right: -10px;
|
|
2562
|
+
background: linear-gradient(to right, rgba(5, 5, 5, 0.06), transparent);
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
/* 滚动阴影右边 */
|
|
2567
|
+
.shadow-right td:nth-last-child(1)::after{
|
|
2568
|
+
content: "";
|
|
2569
|
+
position: absolute;
|
|
2570
|
+
top: 0;
|
|
2571
|
+
width: 10px;
|
|
2572
|
+
height: 100%;
|
|
2573
|
+
left: -10px;
|
|
2574
|
+
background: linear-gradient(to left, rgba(5, 5, 5, 0.06), transparent);
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
.shadow-right{
|
|
2578
|
+
&:deep() th:nth-last-child(1)::after {
|
|
2579
|
+
content: "";
|
|
2580
|
+
position: absolute;
|
|
2581
|
+
top: 0;
|
|
2582
|
+
width: 10px;
|
|
2583
|
+
height: 100%;
|
|
2584
|
+
left: -10px;
|
|
2585
|
+
background: linear-gradient(to left, rgba(5, 5, 5, 0.06), transparent);
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
/* 滚动阴影垂直修正 */
|
|
2590
|
+
.shadow-y td:nth-child(-n + 2), /* 前两列 */
|
|
2591
|
+
.shadow-y td:nth-last-child(1) /* 后一列 */
|
|
2592
|
+
{
|
|
2593
|
+
z-index: 3;
|
|
2594
|
+
}
|
|
2595
|
+
</style>
|
|
2596
|
+
|