dashboard-shell-shell 1.0.122 → 1.0.1000000082
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/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/icons/iconfont.css +19 -3
- package/assets/icons/iconfont.js +1 -1
- package/assets/icons/iconfont.json +28 -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/pl/half-logo.svg +2 -23
- package/assets/styles/base/_functions.scss +0 -0
- package/assets/styles/base/_mixins.scss +0 -0
- package/assets/styles/base/_variables.scss +1 -1
- package/assets/styles/global/_labeled-input.scss +0 -1
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/styles/global/_select.scss +4 -2
- package/assets/styles/global/_table.scss +5 -0
- package/assets/styles/vendor/vue-select.scss +2 -1
- package/assets/translations/en-us.yaml +1 -1
- package/assets/translations/zh-hans.yaml +25 -15
- package/chart/monitoring/index.vue +3 -1
- package/chart/monitoring/prometheus/index.vue +13 -10
- package/cloud-credential/aws.vue +2 -0
- package/components/ActionDropdown.vue +1 -1
- package/components/ActionDropdownShell.vue +71 -0
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +3 -0
- package/components/AppModal.vue +84 -8
- 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/CodeMirror.vue +19 -6
- package/components/CommunityLinks.vue +3 -3
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboardText.vue +2 -1
- package/components/CruResource.vue +13 -7
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- 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 +88 -16
- 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 +20 -1
- package/components/LandingPagePreference.vue +5 -3
- package/components/LocaleSelector.vue +39 -93
- package/components/ModalManager.vue +55 -0
- package/components/ModalWithCard.vue +13 -3
- package/components/MoveModal.vue +1 -0
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptChangePassword.vue +1 -1
- package/components/PromptModal.vue +16 -3
- package/components/PromptRemove.vue +29 -9
- package/components/PromptRestore.vue +1 -0
- package/components/ResourceCancelModal.vue +1 -0
- package/components/ResourceDetail/Masthead.vue +52 -17
- package/components/ResourceDetail/__tests__/Masthead.test.ts +5 -1
- package/components/ResourceDetail/index.vue +54 -16
- package/components/ResourceList/Masthead.vue +26 -4
- package/components/ResourceList/index.vue +4 -3
- package/components/ResourceTable.vue +1 -0
- package/components/SideNav.vue +20 -15
- package/components/SlideInPanelManager.vue +126 -0
- package/components/SortableTable/THead.vue +10 -4
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +542 -553
- package/components/SortableTable/selection.js +2 -13
- package/components/StatusBadge.vue +77 -0
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +47 -29
- package/components/Wizard.vue +2 -2
- package/components/YamlEditor.vue +1 -1
- 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/RoleDetailEdit.vue +1 -1
- 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/ArrayListSelect.vue +1 -1
- package/components/form/Command.vue +6 -15
- package/components/form/EnvVars.vue +16 -8
- package/components/form/Footer.vue +10 -7
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +11 -16
- package/components/form/InputWithSelect.vue +6 -5
- package/components/form/KeyValue.vue +39 -10
- package/components/form/LabeledSelect.vue +73 -77
- package/components/form/Labels.vue +6 -3
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +42 -17
- package/components/form/NameNsDescription.vue +163 -116
- 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 +47 -48
- package/components/form/Probe.vue +68 -66
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +5 -7
- package/components/form/ResourceQuota/Project.vue +9 -5
- package/components/form/ResourceQuota/ProjectRow.vue +4 -6
- 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 +44 -7
- package/components/form/ShellInput.vue +5 -1
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Tolerations.vue +5 -1
- package/components/form/UnitInput.vue +10 -5
- 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/LiveDate.vue +3 -3
- package/components/formatter/SecretData.vue +20 -7
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +18 -4
- package/components/nav/Header.vue +39 -13
- package/components/nav/Jump.vue +7 -0
- package/components/nav/NamespaceFilter.vue +21 -11
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.vue +5 -17
- package/components/nav/Type.vue +30 -33
- package/components/nav/__tests__/TopLevelMenu.test.ts +0 -40
- package/components/rancherResourceDetail/Masthead.vue +769 -0
- package/components/rancherResourceDetail/__tests__/Masthead.test.ts +65 -0
- package/components/rancherResourceDetail/index.vue +591 -0
- package/components/rancherResourceList/Masthead-btn.vue +225 -0
- package/components/rancherResourceList/Masthead.vue +375 -0
- package/components/rancherResourceList/ResourceLoadingIndicator.vue +140 -0
- package/components/rancherResourceList/index.vue +307 -0
- package/components/rancherResourceList/resource-list.config.js +7 -0
- package/components/rancherResourceTable.vue +783 -0
- package/components/rancherSortableTable/THead.vue +561 -0
- package/components/rancherSortableTable/actions.js +153 -0
- package/components/rancherSortableTable/advanced-filtering.js +272 -0
- package/components/rancherSortableTable/debug.js +117 -0
- package/components/rancherSortableTable/filtering.js +290 -0
- package/components/rancherSortableTable/grouping.js +48 -0
- package/components/rancherSortableTable/index.vue +2712 -0
- package/components/rancherSortableTable/paging.js +155 -0
- package/components/rancherSortableTable/selection.js +629 -0
- package/components/rancherSortableTable/sortable-config.ts +4 -0
- package/components/rancherSortableTable/sorting.js +129 -0
- 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/composables/focusTrap.ts +11 -3
- package/composables/useRuntimeFlag.ts +29 -0
- package/config/private-label.js +15 -10
- package/config/router/routes.js +21 -13
- package/config/store.js +4 -0
- package/config/table-headers.js +3 -2
- package/config/uiplugins.js +5 -1
- package/core/plugin-routes.ts +5 -115
- package/core/plugins.js +1 -1
- package/core/types.ts +23 -2
- package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +84 -23
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +13 -3
- package/detail/provisioning.cattle.io.cluster.vue +72 -6
- package/dialog/AddCustomBadgeDialog.vue +1 -0
- package/dialog/DeactivateDriverDialog.vue +5 -4
- package/dialog/ForceMachineRemoveDialog.vue +6 -3
- package/dialog/GitRepoForceUpdateDialog.vue +1 -1
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +16 -3
- package/edit/auth/__tests__/oidc.test.ts +162 -88
- package/edit/auth/azuread.vue +2 -1
- package/edit/auth/github.vue +1 -1
- package/edit/auth/googleoauth.vue +5 -1
- package/edit/auth/ldap/__tests__/config.test.ts +0 -14
- package/edit/auth/ldap/config.vue +0 -24
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +39 -6
- package/edit/auth/saml.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +5 -2
- package/edit/cloudcredential.vue +24 -9
- package/edit/fleet.cattle.io.clustergroup.vue +5 -3
- package/edit/fleet.cattle.io.gitrepo.vue +2 -0
- package/edit/logging-flow/Match.vue +1 -1
- package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +40 -9
- package/edit/management.cattle.io.user.vue +28 -3
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/auth.vue +29 -29
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +1 -2
- package/edit/networking.k8s.io.ingress/IngressClass.vue +7 -3
- package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
- package/edit/networking.k8s.io.ingress/__tests__/IngressClass.test.ts +58 -0
- package/edit/persistentvolume/__tests__/persistentvolume.test.ts +14 -2
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +4 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +26 -9
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +8 -10
- package/edit/provisioning.cattle.io.cluster/rke2.vue +31 -40
- package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +5 -2
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +6 -1
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +33 -2
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +3 -3
- package/edit/service.vue +0 -3
- package/edit/token.vue +32 -11
- package/edit/workload/Job.vue +6 -6
- package/edit/workload/__tests__/Job.test.ts +0 -1
- package/edit/workload/index.vue +1 -0
- package/edit/workload/mixins/workload.js +3 -3
- package/initialize/install-plugins.js +2 -1
- package/list/harvesterhci.io.management.cluster.vue +4 -1
- package/list/management.cattle.io.feature.vue +1 -0
- package/list/namespace.vue +3 -1
- package/list/provisioning.cattle.io.cluster.vue +20 -12
- package/list/workload.vue +7 -6
- package/machine-config/__tests__/vmwarevsphere.test.ts +48 -3
- package/machine-config/azure.vue +16 -4
- package/machine-config/vmwarevsphere.vue +16 -0
- package/mixins/resource-fetch.js +2 -1
- package/models/__tests__/logging.banzaicloud.io.flow.test.ts +88 -0
- package/models/__tests__/namespace.test.ts +25 -1
- package/models/cloudcredential.js +5 -0
- package/models/kontainerdriver.js +6 -3
- package/models/logging.banzaicloud.io.flow.js +2 -1
- package/models/management.cattle.io.node.js +3 -3
- package/models/management.cattle.io.setting.js +2 -1
- package/models/namespace.js +4 -5
- package/models/nodedriver.js +6 -3
- package/models/storage.k8s.io.storageclass.js +2 -2
- package/models/workload.js +4 -1
- package/package.json +1 -1
- package/pages/about.vue +16 -8
- package/pages/account/index.vue +80 -24
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +195 -44
- package/pages/auth/logout.vue +4 -1
- package/pages/auth/setup.vue +144 -19
- package/pages/auth/verify.vue +13 -8
- package/pages/auth copy/login.vue +595 -0
- package/pages/auth copy/logout.vue +47 -0
- package/pages/auth copy/setup.vue +523 -0
- package/pages/auth copy/verify.vue +203 -0
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/apps/charts/chart.vue +1 -1
- package/pages/c/_cluster/apps/charts/install.vue +26 -26
- package/pages/c/_cluster/auth/config/index.vue +10 -12
- package/pages/c/_cluster/explorer/EventsTable.vue +38 -33
- package/pages/c/_cluster/explorer/index.vue +17 -15
- package/pages/c/_cluster/istio/index.vue +2 -2
- package/pages/c/_cluster/longhorn/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +1 -1
- package/pages/c/_cluster/monitoring/monitor/_namespace/_id.vue +4 -2
- package/pages/c/_cluster/monitoring/monitor/create.vue +4 -2
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/monitoring/route-receiver/_id.vue +4 -2
- package/pages/c/_cluster/monitoring/route-receiver/create.vue +5 -2
- package/pages/c/_cluster/neuvector/index.vue +1 -1
- package/pages/c/_cluster/settings/brand.vue +3 -3
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +8 -10
- package/pages/diagnostic.vue +59 -11
- package/pages/fail-whale.vue +14 -8
- package/pages/home.vue +24 -18
- package/pages/prefs.vue +9 -7
- package/pages/support/index.vue +4 -1
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/normalize.js +3 -1
- package/plugins/dashboard-store/resource-class.js +31 -29
- package/plugins/internal-api/index.ts +37 -0
- package/plugins/internal-api/shared/base-api.ts +13 -0
- package/plugins/internal-api/shell/shell.api.ts +108 -0
- package/promptRemove/management.cattle.io.fleetworkspace.vue +1 -1
- package/promptRemove/management.cattle.io.globalrole.vue +1 -1
- package/promptRemove/management.cattle.io.project.vue +2 -2
- package/promptRemove/management.cattle.io.roletemplate.vue +1 -1
- package/promptRemove/pod.vue +1 -1
- package/public/index.html +2 -1
- package/rancher-components/BadgeState/BadgeState.vue +5 -1
- package/rancher-components/Banner/Banner.vue +8 -2
- package/rancher-components/Card/Card.vue +3 -6
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +5 -2
- package/rancher-components/Form/Radio/RadioButton.vue +3 -3
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +1 -5
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
- package/rancher-components/RcDropdown/RcDropdownItem.vue +1 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +7 -3
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/scripts/clean +0 -0
- package/scripts/extension/bundle +20 -0
- package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +2 -2
- package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +2 -1
- package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +2 -0
- package/scripts/extension/helm/scripts/package +0 -0
- package/scripts/extension/helm/scripts/patch +0 -0
- package/scripts/extension/helm/scripts/version +0 -0
- package/scripts/extension/helmpatch +44 -31
- package/scripts/extension/parse-tag-name +0 -0
- package/scripts/extension/publish +12 -12
- package/scripts/publish-shell.sh +18 -23
- package/scripts/serve-pkgs +0 -0
- package/scripts/sync-shell-deps +0 -0
- package/scripts/test-plugins-build.sh +4 -6
- package/scripts/typegen.sh +28 -46
- package/server/har-file.js +25 -3
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +2 -2
- package/store/aws.js +9 -2
- package/store/features.js +2 -1
- package/store/i18n.js +3 -3
- package/store/modal.ts +71 -0
- package/store/slideInPanel.ts +47 -0
- package/store/type-map.js +9 -1
- package/types/cloud-shell/index.d.ts +11020 -0
- package/types/global-vue.d.ts +5 -0
- package/types/internal-api/shell/growl.d.ts +25 -0
- package/types/internal-api/shell/modal.d.ts +77 -0
- package/types/internal-api/shell/slideIn.d.ts +15 -0
- package/types/shell/index.d.ts +118 -128
- package/types/vue-shim.d.ts +4 -1
- package/utils/__tests__/object.test.ts +38 -4
- package/utils/__tests__/string.test.ts +2 -2
- package/utils/auth.js +1 -0
- package/utils/banners.js +0 -45
- package/utils/cluster.js +35 -0
- package/utils/color.js +9 -8
- package/utils/error.js +61 -3
- package/utils/errorTranslate.json +450 -30
- package/utils/object.js +46 -6
- package/utils/router.js +22 -1
- package/utils/select.js +26 -3
- package/utils/string.js +9 -8
- package/utils/title.ts +1 -1
- package/utils/validators/machine-pool.ts +20 -0
- package/vue.config.js +7 -2
- package/components/formatter/ExtensionCache.vue +0 -74
- package/components/formatter/Port.vue +0 -24
- package/components/formatter/SecretType.vue +0 -41
- package/types/resources/fleet.d.ts +0 -57
- package/types/resources/pod-security-admission.ts +0 -36
- package/types/resources/settings.d.ts +0 -93
- package/types/resources/userPreferences.d.ts +0 -13
- package/types/vue-shim.d +0 -20
|
@@ -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';
|
|
@@ -25,6 +25,9 @@ import { getParent } from '@shell/utils/dom';
|
|
|
25
25
|
import { FORMATTERS } from '@shell/components/SortableTable/sortable-config';
|
|
26
26
|
import ButtonMultiAction from '@shell/components/ButtonMultiAction.vue';
|
|
27
27
|
import ActionMenu from '@shell/components/ActionMenuShell.vue';
|
|
28
|
+
import { useRuntimeFlag } from '@shell/composables/useRuntimeFlag';
|
|
29
|
+
import ActionDropdownShell from '@shell/components/ActionDropdownShell.vue';
|
|
30
|
+
import { harvesterhci2cloud, cloud2harvesterhci } from '@shell/utils/router'
|
|
28
31
|
|
|
29
32
|
// Uncomment for table performance debugging
|
|
30
33
|
// import tableDebug from './debug';
|
|
@@ -56,12 +59,13 @@ export default {
|
|
|
56
59
|
components: {
|
|
57
60
|
THead,
|
|
58
61
|
Checkbox,
|
|
59
|
-
Select,
|
|
60
62
|
AsyncButton,
|
|
63
|
+
Select,
|
|
61
64
|
ActionDropdown,
|
|
62
65
|
LabeledSelect,
|
|
63
66
|
ButtonMultiAction,
|
|
64
67
|
ActionMenu,
|
|
68
|
+
ActionDropdownShell,
|
|
65
69
|
},
|
|
66
70
|
mixins: [
|
|
67
71
|
filtering,
|
|
@@ -412,10 +416,12 @@ export default {
|
|
|
412
416
|
const isLoading = this.loading || false;
|
|
413
417
|
|
|
414
418
|
let isCreatable = false;
|
|
415
|
-
const lastPath = this.$route.path.split('/').pop();
|
|
419
|
+
const lastPath = cloud2harvesterhci(this.$route.path.split('/').pop());
|
|
416
420
|
|
|
417
421
|
if (lastPath.includes('.')) {
|
|
418
422
|
isCreatable = this.$store.getters['type-map/optionsFor'](lastPath).isCreatable;
|
|
423
|
+
} else if (lastPath === 'namespace') {
|
|
424
|
+
isCreatable = this.$store.getters['type-map/optionsFor'](this.$route.name).isCreatable;
|
|
419
425
|
}
|
|
420
426
|
|
|
421
427
|
return {
|
|
@@ -423,6 +429,7 @@ export default {
|
|
|
423
429
|
expanded: {},
|
|
424
430
|
searchQuery,
|
|
425
431
|
eventualSearchQuery,
|
|
432
|
+
isCreatable,
|
|
426
433
|
subMatches: null,
|
|
427
434
|
actionOfInterest: null,
|
|
428
435
|
loadingDelay: false,
|
|
@@ -487,8 +494,8 @@ export default {
|
|
|
487
494
|
const $main = document.querySelector('main');
|
|
488
495
|
|
|
489
496
|
$main?.removeEventListener('scroll', this._onScroll);
|
|
490
|
-
|
|
491
|
-
|
|
497
|
+
// 移除所有表格容器的滚动事件监听器
|
|
498
|
+
const tables = document.querySelectorAll('.sort-table-div');
|
|
492
499
|
|
|
493
500
|
tables.forEach((table) => {
|
|
494
501
|
table.removeEventListener('scroll', this._onTableScroll);
|
|
@@ -541,6 +548,7 @@ export default {
|
|
|
541
548
|
forceUpdateLiveAndDelayed(neu, old) {
|
|
542
549
|
this.watcherUpdateLiveAndDelayed(neu, old);
|
|
543
550
|
},
|
|
551
|
+
|
|
544
552
|
selectedRowsText(neu, old) {
|
|
545
553
|
if (neu) {
|
|
546
554
|
this.isMuchSelected = true;
|
|
@@ -596,7 +604,7 @@ export default {
|
|
|
596
604
|
},
|
|
597
605
|
},
|
|
598
606
|
setup(_props, { emit }) {
|
|
599
|
-
const table =
|
|
607
|
+
const table = ref(null);
|
|
600
608
|
|
|
601
609
|
const handleEnterKey = (event) => {
|
|
602
610
|
if (event.key === 'Enter' && !event.target?.classList?.contains('checkbox-custom')) {
|
|
@@ -611,6 +619,14 @@ export default {
|
|
|
611
619
|
onBeforeUnmount(() => {
|
|
612
620
|
table.value.removeEventListener('keyup', handleEnterKey);
|
|
613
621
|
});
|
|
622
|
+
|
|
623
|
+
const store = useStore();
|
|
624
|
+
const { featureDropdownMenu } = useRuntimeFlag(store);
|
|
625
|
+
|
|
626
|
+
return {
|
|
627
|
+
table,
|
|
628
|
+
featureDropdownMenu,
|
|
629
|
+
};
|
|
614
630
|
},
|
|
615
631
|
|
|
616
632
|
created() {
|
|
@@ -621,6 +637,7 @@ export default {
|
|
|
621
637
|
computed: {
|
|
622
638
|
...mapGetters({ isTooManyItemsToAutoUpdate: 'resource-fetch/isTooManyItemsToAutoUpdate' }),
|
|
623
639
|
...mapGetters({ isManualRefreshLoading: 'resource-fetch/manualRefreshIsLoading' }),
|
|
640
|
+
...mapGetters('type-map', ['mastheadCreatable']),
|
|
624
641
|
namespaces() {
|
|
625
642
|
return this.$store.getters['activeNamespaceCache'];
|
|
626
643
|
},
|
|
@@ -831,7 +848,7 @@ export default {
|
|
|
831
848
|
});
|
|
832
849
|
|
|
833
850
|
return rows;
|
|
834
|
-
}
|
|
851
|
+
},
|
|
835
852
|
},
|
|
836
853
|
|
|
837
854
|
methods: {
|
|
@@ -919,13 +936,13 @@ export default {
|
|
|
919
936
|
},
|
|
920
937
|
get,
|
|
921
938
|
dasherize,
|
|
922
|
-
|
|
923
939
|
muchSelect(value) {
|
|
924
940
|
console.log(value);
|
|
925
941
|
|
|
926
942
|
this.isMuchSelected = !this.isMuchSelected;
|
|
927
943
|
this.onToggleAll(value);
|
|
928
944
|
},
|
|
945
|
+
|
|
929
946
|
onScroll() {
|
|
930
947
|
if (this.hasLiveColumns || this.hasDelayedColumns) {
|
|
931
948
|
clearTimeout(this._liveColumnsTimer);
|
|
@@ -1208,99 +1225,29 @@ export default {
|
|
|
1208
1225
|
ref="container"
|
|
1209
1226
|
:data-testid="componentTestid + '-list-container'"
|
|
1210
1227
|
>
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
class="
|
|
1214
|
-
|
|
1228
|
+
{{ mastheadCreatable }}
|
|
1229
|
+
<div
|
|
1230
|
+
:class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel, 'mb-20': search || isCreatable}"
|
|
1231
|
+
class="sortable-table-header "
|
|
1232
|
+
:style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable && mastheadCreatable ? '100px' : '-10px',maxHeight: '32px'}"
|
|
1215
1233
|
>
|
|
1216
1234
|
<slot name="title" />
|
|
1217
1235
|
<div
|
|
1218
1236
|
v-if="showHeaderRow"
|
|
1219
1237
|
class="fixed-header-actions"
|
|
1220
|
-
:class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering}"
|
|
1238
|
+
:class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering, }"
|
|
1221
1239
|
style="display: flex;"
|
|
1222
1240
|
>
|
|
1223
1241
|
<!-- <div
|
|
1224
1242
|
:class="bulkActionsClass"
|
|
1225
1243
|
class="bulk"
|
|
1226
1244
|
>
|
|
1227
|
-
|
|
1228
|
-
<template v-if="tableActions">
|
|
1229
|
-
<button
|
|
1230
|
-
v-for="(act) in availableActions"
|
|
1231
|
-
:id="act.action"
|
|
1232
|
-
:key="act.action"
|
|
1233
|
-
v-clean-tooltip="actionTooltip"
|
|
1234
|
-
type="button"
|
|
1235
|
-
class="btn role-primary"
|
|
1236
|
-
:class="{[bulkActionClass]:true}"
|
|
1237
|
-
:disabled="!act.enabled"
|
|
1238
|
-
:data-testid="componentTestid + '-' + act.action"
|
|
1239
|
-
@click="applyTableAction(act, null, $event)"
|
|
1240
|
-
@keydown.enter.stop
|
|
1241
|
-
@mouseover="setBulkActionOfInterest(act)"
|
|
1242
|
-
@mouseleave="setBulkActionOfInterest(null)"
|
|
1243
|
-
>
|
|
1244
|
-
<i
|
|
1245
|
-
v-if="act.icon"
|
|
1246
|
-
:class="act.icon"
|
|
1247
|
-
/>
|
|
1248
|
-
<span v-clean-html="act.label" />
|
|
1249
|
-
</button>
|
|
1250
|
-
<ActionDropdown
|
|
1251
|
-
:class="bulkActionsDropdownClass"
|
|
1252
|
-
class="bulk-actions-dropdown"
|
|
1253
|
-
:disable-button="!selectedRows.length"
|
|
1254
|
-
size="sm"
|
|
1255
|
-
>
|
|
1256
|
-
<template #button-content>
|
|
1257
|
-
<button
|
|
1258
|
-
ref="actionDropDown"
|
|
1259
|
-
class="btn bg-primary mr-0"
|
|
1260
|
-
:disabled="!selectedRows.length"
|
|
1261
|
-
>
|
|
1262
|
-
<i class="icon icon-gear" />
|
|
1263
|
-
<span>{{ t('sortableTable.bulkActions.collapsed.label') }}</span>
|
|
1264
|
-
<i class="ml-10 icon icon-chevron-down" />
|
|
1265
|
-
</button>
|
|
1266
|
-
</template>
|
|
1267
|
-
<template #popover-content>
|
|
1268
|
-
<ul class="list-unstyled menu">
|
|
1269
|
-
<li
|
|
1270
|
-
v-for="(act, i) in hiddenActions"
|
|
1271
|
-
:key="i"
|
|
1272
|
-
v-close-popper
|
|
1273
|
-
v-clean-tooltip="{
|
|
1274
|
-
content: actionTooltip,
|
|
1275
|
-
placement: 'right'
|
|
1276
|
-
}"
|
|
1277
|
-
:class="{ disabled: !act.enabled }"
|
|
1278
|
-
@click="applyTableAction(act, null, $event)"
|
|
1279
|
-
@mouseover="setBulkActionOfInterest(act)"
|
|
1280
|
-
@mouseleave="setBulkActionOfInterest(null)"
|
|
1281
|
-
>
|
|
1282
|
-
<i
|
|
1283
|
-
v-if="act.icon"
|
|
1284
|
-
:class="act.icon"
|
|
1285
|
-
/>
|
|
1286
|
-
<span v-clean-html="act.label" />
|
|
1287
|
-
</li>
|
|
1288
|
-
</ul>
|
|
1289
|
-
</template>
|
|
1290
|
-
</ActionDropdown>
|
|
1291
|
-
<label
|
|
1292
|
-
v-if="selectedRowsText"
|
|
1293
|
-
:class="bulkActionAvailabilityClass"
|
|
1294
|
-
class="action-availability"
|
|
1295
|
-
>
|
|
1296
|
-
{{ selectedRowsText }}
|
|
1297
|
-
</label>
|
|
1298
|
-
</template>
|
|
1299
|
-
</slot>
|
|
1245
|
+
|
|
1300
1246
|
</div> -->
|
|
1301
1247
|
<div
|
|
1302
1248
|
v-if="!hasAdvancedFiltering && $slots['header-middle']"
|
|
1303
1249
|
class="middle"
|
|
1250
|
+
style="margin-left: 10px;margin-right: -10px;"
|
|
1304
1251
|
>
|
|
1305
1252
|
<slot name="header-middle" />
|
|
1306
1253
|
</div>
|
|
@@ -1309,6 +1256,7 @@ export default {
|
|
|
1309
1256
|
v-if="search || hasAdvancedFiltering || isTooManyItemsToAutoUpdate || $slots['header-right']"
|
|
1310
1257
|
class="search row"
|
|
1311
1258
|
data-testid="search-box-filter-row"
|
|
1259
|
+
style="max-height: 32px;display: contents;"
|
|
1312
1260
|
>
|
|
1313
1261
|
<ul
|
|
1314
1262
|
v-if="hasAdvancedFiltering"
|
|
@@ -1389,7 +1337,14 @@ export default {
|
|
|
1389
1337
|
</div>
|
|
1390
1338
|
</div>
|
|
1391
1339
|
</div>
|
|
1392
|
-
<
|
|
1340
|
+
<p
|
|
1341
|
+
v-else-if="search"
|
|
1342
|
+
id="describe-filter-sortable-table"
|
|
1343
|
+
hidden
|
|
1344
|
+
>
|
|
1345
|
+
{{ t('sortableTable.filteringDescription') }}
|
|
1346
|
+
</p>
|
|
1347
|
+
<slot name="header-button" />
|
|
1393
1348
|
<input
|
|
1394
1349
|
v-if="search"
|
|
1395
1350
|
ref="searchQuery"
|
|
@@ -1397,300 +1352,320 @@ export default {
|
|
|
1397
1352
|
type="search"
|
|
1398
1353
|
class="input-sm search-box"
|
|
1399
1354
|
:aria-label="t('sortableTable.searchLabel')"
|
|
1355
|
+
aria-describedby="describe-filter-sortable-table"
|
|
1400
1356
|
:placeholder="t('sortableTable.search')+searchPlaceholder"
|
|
1401
1357
|
>
|
|
1402
1358
|
|
|
1403
1359
|
</div>
|
|
1404
1360
|
</div>
|
|
1405
1361
|
</div>
|
|
1362
|
+
<div v-if="$slots['banner']">
|
|
1363
|
+
<slot name="banner"></slot>
|
|
1364
|
+
</div>
|
|
1406
1365
|
<div class="sort-table-div">
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1366
|
+
<table
|
|
1367
|
+
ref="table"
|
|
1368
|
+
class="sortable-table"
|
|
1369
|
+
:class="classObject"
|
|
1370
|
+
width="100%"
|
|
1371
|
+
role="table"
|
|
1372
|
+
>
|
|
1373
|
+
<THead
|
|
1374
|
+
v-if="showHeaders"
|
|
1375
|
+
:label-for="labelFor"
|
|
1376
|
+
:columns="columns"
|
|
1377
|
+
:group="group"
|
|
1378
|
+
:group-options="advGroupOptions"
|
|
1379
|
+
:has-advanced-filtering="hasAdvancedFiltering"
|
|
1380
|
+
:adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
|
|
1381
|
+
:table-actions="tableActions"
|
|
1382
|
+
:table-cols-options="columnOptions"
|
|
1383
|
+
:row-actions="rowActions"
|
|
1384
|
+
:sub-expand-column="subExpandColumn"
|
|
1385
|
+
:row-actions-width="rowActionsWidth"
|
|
1386
|
+
:how-much-selected="howMuchSelected"
|
|
1387
|
+
:sort-by="sortBy"
|
|
1388
|
+
:default-sort-by="_defaultSortBy"
|
|
1389
|
+
:descending="descending"
|
|
1390
|
+
:no-rows="noRows"
|
|
1391
|
+
:loading="isLoading && !loadingDelay"
|
|
1392
|
+
:no-results="noResults"
|
|
1393
|
+
@on-toggle-all="onToggleAll"
|
|
1394
|
+
@on-sort-change="changeSort"
|
|
1395
|
+
@col-visibility-change="changeColVisibility"
|
|
1396
|
+
@group-value-change="(val) => $emit('group-value-change', val)"
|
|
1397
|
+
@update-cols-options="updateColsOptions"
|
|
1398
|
+
/>
|
|
1440
1399
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
<t
|
|
1451
|
-
k="generic.loading"
|
|
1452
|
-
:raw="true"
|
|
1453
|
-
/>
|
|
1454
|
-
</div>
|
|
1455
|
-
</td>
|
|
1456
|
-
</tr>
|
|
1457
|
-
</slot>
|
|
1458
|
-
</tbody>
|
|
1459
|
-
<tbody v-else-if="noRows">
|
|
1460
|
-
<slot name="no-rows">
|
|
1461
|
-
<tr class="no-rows">
|
|
1462
|
-
<td :colspan="fullColspan">
|
|
1400
|
+
<!-- Don't display anything if we're loading and the delay has yet to pass -->
|
|
1401
|
+
<div v-if="isLoading && !loadingDelay" />
|
|
1402
|
+
|
|
1403
|
+
<tbody v-else-if="isLoading && !altLoading">
|
|
1404
|
+
<slot name="loading">
|
|
1405
|
+
<tr>
|
|
1406
|
+
<td :colspan="fullColspan">
|
|
1407
|
+
<div class="data-loading">
|
|
1408
|
+
<i class="icon-spin icon icon-spinner" />
|
|
1463
1409
|
<t
|
|
1464
|
-
|
|
1465
|
-
:
|
|
1410
|
+
k="generic.loading"
|
|
1411
|
+
:raw="true"
|
|
1466
1412
|
/>
|
|
1467
|
-
</
|
|
1468
|
-
</
|
|
1469
|
-
</
|
|
1470
|
-
</
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1413
|
+
</div>
|
|
1414
|
+
</td>
|
|
1415
|
+
</tr>
|
|
1416
|
+
</slot>
|
|
1417
|
+
</tbody>
|
|
1418
|
+
<tbody v-else-if="noRows">
|
|
1419
|
+
<slot name="no-rows">
|
|
1420
|
+
<tr class="no-rows">
|
|
1421
|
+
<td :colspan="fullColspan">
|
|
1422
|
+
<t
|
|
1423
|
+
v-if="showNoRows"
|
|
1424
|
+
:k="noRowsKey"
|
|
1425
|
+
/>
|
|
1426
|
+
</td>
|
|
1427
|
+
</tr>
|
|
1428
|
+
</slot>
|
|
1429
|
+
</tbody>
|
|
1430
|
+
<tbody v-else-if="noResults">
|
|
1431
|
+
<slot name="no-results">
|
|
1432
|
+
<tr class="no-results">
|
|
1433
|
+
<td
|
|
1434
|
+
:colspan="fullColspan"
|
|
1435
|
+
class="text-center"
|
|
1436
|
+
>
|
|
1437
|
+
<t :k="noDataKey" />
|
|
1438
|
+
</td>
|
|
1439
|
+
</tr>
|
|
1440
|
+
</slot>
|
|
1441
|
+
</tbody>
|
|
1442
|
+
<tbody
|
|
1443
|
+
v-for="(groupedRows) in displayRows"
|
|
1444
|
+
v-else
|
|
1445
|
+
:key="groupedRows.key"
|
|
1446
|
+
tabindex="-1"
|
|
1447
|
+
:class="{ group: groupBy }"
|
|
1448
|
+
>
|
|
1449
|
+
<slot
|
|
1450
|
+
v-if="groupBy"
|
|
1451
|
+
name="group-row"
|
|
1452
|
+
:group="groupedRows"
|
|
1453
|
+
:fullColspan="fullColspan"
|
|
1454
|
+
>
|
|
1455
|
+
<tr class="group-row">
|
|
1456
|
+
<td :colspan="fullColspan">
|
|
1457
|
+
<slot
|
|
1458
|
+
name="group-by"
|
|
1459
|
+
:group="groupedRows.grp"
|
|
1477
1460
|
>
|
|
1478
|
-
<
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1461
|
+
<div
|
|
1462
|
+
v-trim-whitespace
|
|
1463
|
+
class="group-tab"
|
|
1464
|
+
>
|
|
1465
|
+
{{ groupedRows.ref }}
|
|
1466
|
+
</div>
|
|
1467
|
+
</slot>
|
|
1468
|
+
</td>
|
|
1469
|
+
</tr>
|
|
1470
|
+
</slot>
|
|
1471
|
+
<template
|
|
1472
|
+
v-for="(row, i) in groupedRows.rows"
|
|
1473
|
+
:key="i"
|
|
1489
1474
|
>
|
|
1490
1475
|
<slot
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
:group="groupedRows"
|
|
1494
|
-
:fullColspan="fullColspan"
|
|
1495
|
-
>
|
|
1496
|
-
<tr class="group-row">
|
|
1497
|
-
<td :colspan="fullColspan">
|
|
1498
|
-
<slot
|
|
1499
|
-
name="group-by"
|
|
1500
|
-
:group="groupedRows.grp"
|
|
1501
|
-
>
|
|
1502
|
-
<div
|
|
1503
|
-
v-trim-whitespace
|
|
1504
|
-
class="group-tab"
|
|
1505
|
-
>
|
|
1506
|
-
{{ groupedRows.ref }}
|
|
1507
|
-
</div>
|
|
1508
|
-
</slot>
|
|
1509
|
-
</td>
|
|
1510
|
-
</tr>
|
|
1511
|
-
</slot>
|
|
1512
|
-
<template
|
|
1513
|
-
v-for="(row, i) in groupedRows.rows"
|
|
1514
|
-
:key="i"
|
|
1476
|
+
name="main-row"
|
|
1477
|
+
:row="row.row"
|
|
1515
1478
|
>
|
|
1516
1479
|
<slot
|
|
1517
|
-
name="main-row"
|
|
1518
|
-
:
|
|
1480
|
+
:name="'main-row:' + (row.row.mainRowKey || i)"
|
|
1481
|
+
:full-colspan="fullColspan"
|
|
1519
1482
|
>
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
:
|
|
1483
|
+
<!-- The data-cant-run-bulk-action-of-interest attribute is being used instead of :class because
|
|
1484
|
+
because our selection.js invokes toggleClass and :class clobbers what was added by toggleClass if
|
|
1485
|
+
the value of :class changes. -->
|
|
1486
|
+
<tr
|
|
1487
|
+
class="main-row"
|
|
1488
|
+
:data-testid="componentTestid + '-' + i + '-row'"
|
|
1489
|
+
:class="{ 'has-sub-row': row.showSubRow}"
|
|
1490
|
+
:data-node-id="row.key"
|
|
1491
|
+
:data-cant-run-bulk-action-of-interest="actionOfInterest && !row.canRunBulkActionOfInterest"
|
|
1523
1492
|
>
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
class="main-row"
|
|
1529
|
-
:data-testid="componentTestid + '-' + i + '-row'"
|
|
1530
|
-
:class="{ 'has-sub-row': row.showSubRow}"
|
|
1531
|
-
:data-node-id="row.key"
|
|
1532
|
-
:data-cant-run-bulk-action-of-interest="actionOfInterest && !row.canRunBulkActionOfInterest"
|
|
1493
|
+
<td
|
|
1494
|
+
v-if="tableActions"
|
|
1495
|
+
class="row-check"
|
|
1496
|
+
align="middle"
|
|
1533
1497
|
>
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
class="
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
<
|
|
1549
|
-
|
|
1550
|
-
class="
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
:
|
|
1498
|
+
{{ row.mainRowKey }}
|
|
1499
|
+
<Checkbox
|
|
1500
|
+
class="selection-checkbox"
|
|
1501
|
+
:data-node-id="row.key"
|
|
1502
|
+
:data-testid="componentTestid + '-' + i + '-checkbox'"
|
|
1503
|
+
:value="selectedRows.includes(row.row)"
|
|
1504
|
+
:alternate-label="t('sortableTable.genericRowCheckbox', { item: row && row.row ? row.row.id : '' })"
|
|
1505
|
+
/>
|
|
1506
|
+
</td>
|
|
1507
|
+
<td
|
|
1508
|
+
v-if="subExpandColumn"
|
|
1509
|
+
class="row-expand"
|
|
1510
|
+
align="middle"
|
|
1511
|
+
>
|
|
1512
|
+
<i
|
|
1513
|
+
data-title="Toggle Expand"
|
|
1514
|
+
:class="{
|
|
1515
|
+
icon: true,
|
|
1516
|
+
'icon-chevron-right': !expanded[row.row[keyField]],
|
|
1517
|
+
'icon-chevron-down': !!expanded[row.row[keyField]]
|
|
1518
|
+
}"
|
|
1519
|
+
@click.stop="toggleExpand(row.row)"
|
|
1520
|
+
/>
|
|
1521
|
+
</td>
|
|
1522
|
+
<template
|
|
1523
|
+
v-for="(col, j) in row.columns"
|
|
1524
|
+
:key="j"
|
|
1525
|
+
>
|
|
1526
|
+
<slot
|
|
1527
|
+
:name="'col:' + col.col.name"
|
|
1528
|
+
:row="row.row"
|
|
1529
|
+
:col="col.col"
|
|
1530
|
+
:dt="dt"
|
|
1531
|
+
:expanded="expanded"
|
|
1532
|
+
:rowKey="row.key"
|
|
1566
1533
|
>
|
|
1567
|
-
<
|
|
1568
|
-
|
|
1569
|
-
:
|
|
1570
|
-
:
|
|
1571
|
-
:
|
|
1572
|
-
:
|
|
1573
|
-
:
|
|
1534
|
+
<td
|
|
1535
|
+
v-show="!hasAdvancedFiltering || (hasAdvancedFiltering && col.col.isColVisible)"
|
|
1536
|
+
:key="col.col.name"
|
|
1537
|
+
:data-title="col.col.label"
|
|
1538
|
+
:data-testid="`sortable-cell-${ i }-${ j }`"
|
|
1539
|
+
:align="col.col.align || 'left'"
|
|
1540
|
+
:class="{['col-'+col.dasherize]: !!col.col.formatter, [col.col.breakpoint]: !!col.col.breakpoint, ['skip-select']: col.col.skipSelect}"
|
|
1541
|
+
:width="col.col.width"
|
|
1574
1542
|
>
|
|
1575
|
-
<
|
|
1576
|
-
|
|
1577
|
-
:
|
|
1578
|
-
:
|
|
1579
|
-
:
|
|
1580
|
-
:align="col.col.align || 'left'"
|
|
1581
|
-
:class="{['col-'+col.dasherize]: !!col.col.formatter, [col.col.breakpoint]: !!col.col.breakpoint, ['skip-select']: col.col.skipSelect}"
|
|
1582
|
-
:width="col.col.width"
|
|
1543
|
+
<slot
|
|
1544
|
+
:name="'cell:' + col.col.name"
|
|
1545
|
+
:row="row.row"
|
|
1546
|
+
:col="col.col"
|
|
1547
|
+
:value="col.value"
|
|
1583
1548
|
>
|
|
1584
|
-
<
|
|
1585
|
-
:
|
|
1549
|
+
<component
|
|
1550
|
+
:is="col.component"
|
|
1551
|
+
v-if="col.component && col.needRef"
|
|
1552
|
+
ref="column"
|
|
1553
|
+
:value="col.value"
|
|
1586
1554
|
:row="row.row"
|
|
1587
1555
|
:col="col.col"
|
|
1556
|
+
:get-custom-detail-link="getCustomDetailLink"
|
|
1557
|
+
v-bind="col.col.formatterOpts"
|
|
1558
|
+
:row-key="row.key"
|
|
1559
|
+
/>
|
|
1560
|
+
<component
|
|
1561
|
+
:is="col.component"
|
|
1562
|
+
v-else-if="col.component"
|
|
1588
1563
|
:value="col.value"
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
<span class="text-muted">—</span>
|
|
1624
|
-
</template>
|
|
1625
|
-
</slot>
|
|
1626
|
-
</td>
|
|
1627
|
-
</slot>
|
|
1628
|
-
</template>
|
|
1629
|
-
<td
|
|
1630
|
-
v-if="rowActions"
|
|
1631
|
-
:align="'left'"
|
|
1632
|
-
style="height:60px"
|
|
1564
|
+
:row="row.row"
|
|
1565
|
+
:col="col.col"
|
|
1566
|
+
v-bind="col.col.formatterOpts"
|
|
1567
|
+
:row-key="row.key"
|
|
1568
|
+
/>
|
|
1569
|
+
<component
|
|
1570
|
+
:is="col.col.formatter"
|
|
1571
|
+
v-else-if="col.col.formatter"
|
|
1572
|
+
:value="col.value"
|
|
1573
|
+
:row="row.row"
|
|
1574
|
+
:col="col.col"
|
|
1575
|
+
v-bind="col.col.formatterOpts"
|
|
1576
|
+
:row-key="row.key"
|
|
1577
|
+
/>
|
|
1578
|
+
<template v-else-if="col.value !== ''">
|
|
1579
|
+
{{ col.formatted }}
|
|
1580
|
+
</template>
|
|
1581
|
+
<template v-else-if="col.col.dashIfEmpty">
|
|
1582
|
+
<span class="text-muted">—</span>
|
|
1583
|
+
</template>
|
|
1584
|
+
</slot>
|
|
1585
|
+
</td>
|
|
1586
|
+
</slot>
|
|
1587
|
+
</template>
|
|
1588
|
+
<td
|
|
1589
|
+
v-if="rowActions"
|
|
1590
|
+
:align="'left'"
|
|
1591
|
+
style="height:60px"
|
|
1592
|
+
>
|
|
1593
|
+
<div style="display: flex;align-items: center;">
|
|
1594
|
+
<slot
|
|
1595
|
+
name="row-actions"
|
|
1596
|
+
:row="row.row"
|
|
1597
|
+
:index="i"
|
|
1633
1598
|
>
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
:row="row.row"
|
|
1638
|
-
:index="i"
|
|
1639
|
-
>
|
|
1640
|
-
</slot>
|
|
1641
|
-
<ActionMenu
|
|
1599
|
+
</slot>
|
|
1600
|
+
<template v-if="featureDropdownMenu">
|
|
1601
|
+
<ActionMenu
|
|
1642
1602
|
:resource="row.row"
|
|
1643
1603
|
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1644
1604
|
:button-aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1605
|
+
/>
|
|
1606
|
+
</template>
|
|
1607
|
+
<template v-else>
|
|
1608
|
+
<ButtonMultiAction
|
|
1609
|
+
:id="`actionButton+${i}+${(row.row && row.row.name) ? row.row.name : ''}`"
|
|
1610
|
+
:ref="`actionButton${i}`"
|
|
1611
|
+
aria-haspopup="true"
|
|
1612
|
+
aria-expanded="false"
|
|
1613
|
+
:aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1614
|
+
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1615
|
+
:borderless="true"
|
|
1616
|
+
@click="handleActionButtonClick(i, $event)"
|
|
1617
|
+
@keyup.enter="handleActionButtonClick(i, $event)"
|
|
1618
|
+
@keyup.space="handleActionButtonClick(i, $event)"
|
|
1619
|
+
/>
|
|
1620
|
+
</template>
|
|
1621
|
+
</div>
|
|
1622
|
+
</td>
|
|
1623
|
+
</tr>
|
|
1650
1624
|
</slot>
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1625
|
+
</slot>
|
|
1626
|
+
<!-- <slot
|
|
1627
|
+
v-if="row.showSubRow"
|
|
1628
|
+
name="sub-row"
|
|
1629
|
+
:full-colspan="fullColspan"
|
|
1630
|
+
:row="row.row"
|
|
1631
|
+
:sub-matches="subMatches"
|
|
1632
|
+
:keyField="keyField"
|
|
1633
|
+
:componentTestid="componentTestid"
|
|
1634
|
+
:i="i"
|
|
1635
|
+
:onRowMouseEnter="onRowMouseEnter"
|
|
1636
|
+
:onRowMouseLeave="onRowMouseLeave"
|
|
1637
|
+
>
|
|
1638
|
+
<tr
|
|
1639
|
+
v-if="row.row.stateDescription"
|
|
1640
|
+
:key="row.row[keyField] + '-description'"
|
|
1641
|
+
:data-testid="componentTestid + '-' + i + '-row-description'"
|
|
1642
|
+
class="state-description sub-row"
|
|
1643
|
+
@mouseenter="onRowMouseEnter"
|
|
1644
|
+
@mouseleave="onRowMouseLeave"
|
|
1662
1645
|
>
|
|
1663
|
-
<
|
|
1664
|
-
v-if="
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1646
|
+
<td
|
|
1647
|
+
v-if="tableActions"
|
|
1648
|
+
class="row-check"
|
|
1649
|
+
align="middle"
|
|
1650
|
+
/>
|
|
1651
|
+
<td
|
|
1652
|
+
:colspan="fullColspan - (tableActions ? 1: 0)"
|
|
1653
|
+
:class="{ 'text-error' : row.row.stateObj.error }"
|
|
1670
1654
|
>
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
>
|
|
1680
|
-
{{ row.row.stateDescription }}
|
|
1681
|
-
</td>
|
|
1682
|
-
</tr>
|
|
1683
|
-
</slot> -->
|
|
1684
|
-
</template>
|
|
1685
|
-
</tbody>
|
|
1686
|
-
</table>
|
|
1687
|
-
</div>
|
|
1655
|
+
{{ row.row.stateDescription }}
|
|
1656
|
+
</td>
|
|
1657
|
+
</tr>
|
|
1658
|
+
</slot> -->
|
|
1659
|
+
</template>
|
|
1660
|
+
</tbody>
|
|
1661
|
+
</table>
|
|
1662
|
+
</div>
|
|
1688
1663
|
<div
|
|
1689
1664
|
v-if="!noRows && !noResults"
|
|
1690
1665
|
:class="$route.path=== '/account'? 'chebox-padding':''"
|
|
1691
1666
|
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"
|
|
1692
1667
|
>
|
|
1693
|
-
|
|
1668
|
+
<div style="display: flex;justify-content: center;height: 32px;">
|
|
1694
1669
|
<Checkbox
|
|
1695
1670
|
v-if="tableActions&&availableActions.some(item => item.action != 'download')"
|
|
1696
1671
|
:value="isMuchSelected"
|
|
@@ -1713,9 +1688,9 @@ export default {
|
|
|
1713
1688
|
:class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering,}"
|
|
1714
1689
|
>
|
|
1715
1690
|
<div
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1691
|
+
:class="bulkActionsClass"
|
|
1692
|
+
class="bulk"
|
|
1693
|
+
>
|
|
1719
1694
|
<slot name="header-left">
|
|
1720
1695
|
<template v-if="tableActions">
|
|
1721
1696
|
<button
|
|
@@ -1728,6 +1703,8 @@ export default {
|
|
|
1728
1703
|
:class="{[bulkActionClass]:true}"
|
|
1729
1704
|
:disabled="!act.enabled"
|
|
1730
1705
|
:data-testid="componentTestid + '-' + act.action"
|
|
1706
|
+
role="button"
|
|
1707
|
+
:aria-label="act.label"
|
|
1731
1708
|
@click="applyTableAction(act, null, $event)"
|
|
1732
1709
|
@keydown.enter.stop
|
|
1733
1710
|
@mouseover="setBulkActionOfInterest(act)"
|
|
@@ -1739,229 +1716,240 @@ export default {
|
|
|
1739
1716
|
/>
|
|
1740
1717
|
<span v-clean-html="act.label" />
|
|
1741
1718
|
</button>
|
|
1742
|
-
<
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
:
|
|
1764
|
-
v-close-popper
|
|
1765
|
-
v-clean-tooltip="{
|
|
1766
|
-
content: actionTooltip,
|
|
1767
|
-
placement: 'right'
|
|
1768
|
-
}"
|
|
1769
|
-
:class="{ disabled: !act.enabled }"
|
|
1770
|
-
@click="applyTableAction(act, null, $event)"
|
|
1771
|
-
@mouseover="setBulkActionOfInterest(act)"
|
|
1772
|
-
@mouseleave="setBulkActionOfInterest(null)"
|
|
1719
|
+
<template v-if="featureDropdownMenu">
|
|
1720
|
+
<ActionDropdownShell
|
|
1721
|
+
:disabled="!selectedRows.length"
|
|
1722
|
+
:hidden-actions="hiddenActions"
|
|
1723
|
+
:action-tooltip="actionTooltip"
|
|
1724
|
+
@click="applyTableAction"
|
|
1725
|
+
@mouseover="setBulkActionOfInterest"
|
|
1726
|
+
@mouseleave="setBulkActionOfInterest"
|
|
1727
|
+
/>
|
|
1728
|
+
</template>
|
|
1729
|
+
<template v-else>
|
|
1730
|
+
<ActionDropdown
|
|
1731
|
+
:class="bulkActionsDropdownClass"
|
|
1732
|
+
class="bulk-actions-dropdown"
|
|
1733
|
+
:disable-button="!selectedRows.length"
|
|
1734
|
+
size="sm"
|
|
1735
|
+
>
|
|
1736
|
+
<template #button-content>
|
|
1737
|
+
<button
|
|
1738
|
+
ref="actionDropDown"
|
|
1739
|
+
class="btn bg-primary mr-0"
|
|
1740
|
+
:disabled="!selectedRows.length"
|
|
1773
1741
|
>
|
|
1774
|
-
<i
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1742
|
+
<i class="icon icon-gear" />
|
|
1743
|
+
<span>{{ t('sortableTable.bulkActions.collapsed.label') }}</span>
|
|
1744
|
+
<i class="ml-10 icon icon-chevron-down" />
|
|
1745
|
+
</button>
|
|
1746
|
+
</template>
|
|
1747
|
+
<template #popover-content>
|
|
1748
|
+
<ul class="list-unstyled menu">
|
|
1749
|
+
<li
|
|
1750
|
+
v-for="(act, i) in hiddenActions"
|
|
1751
|
+
:key="i"
|
|
1752
|
+
v-close-popper
|
|
1753
|
+
v-clean-tooltip="{
|
|
1754
|
+
content: actionTooltip,
|
|
1755
|
+
placement: 'right'
|
|
1756
|
+
}"
|
|
1757
|
+
:class="{ disabled: !act.enabled }"
|
|
1758
|
+
@click="applyTableAction(act, null, $event)"
|
|
1759
|
+
@mouseover="setBulkActionOfInterest(act)"
|
|
1760
|
+
@mouseleave="setBulkActionOfInterest(null)"
|
|
1761
|
+
>
|
|
1762
|
+
<i
|
|
1763
|
+
v-if="act.icon"
|
|
1764
|
+
:class="act.icon"
|
|
1765
|
+
/>
|
|
1766
|
+
<span v-clean-html="act.label" />
|
|
1767
|
+
</li>
|
|
1768
|
+
</ul>
|
|
1769
|
+
</template>
|
|
1770
|
+
</ActionDropdown>
|
|
1771
|
+
</template>
|
|
1772
|
+
<label
|
|
1773
|
+
v-if="selectedRowsText"
|
|
1774
|
+
:class="bulkActionAvailabilityClass"
|
|
1775
|
+
class="action-availability"
|
|
1776
|
+
>
|
|
1777
|
+
{{ tableActions&&availableActions.some(item => item.action != 'download') ?selectedRowsText: '' }}
|
|
1778
|
+
</label>
|
|
1779
|
+
|
|
1790
1780
|
</template>
|
|
1791
1781
|
</slot>
|
|
1792
1782
|
</div>
|
|
1793
1783
|
</div>
|
|
1794
1784
|
</div>
|
|
1795
1785
|
|
|
1786
|
+
<!-- 分页 -->
|
|
1787
|
+
<div
|
|
1788
|
+
v-if="showPaging"
|
|
1789
|
+
class="paging"
|
|
1790
|
+
>
|
|
1791
|
+
<div style="height: 100%; align-content: center;">
|
|
1792
|
+
共 {{ filteredRows.length }} 条
|
|
1793
|
+
</div>
|
|
1796
1794
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1795
|
+
<button
|
|
1796
|
+
type="button"
|
|
1797
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1798
|
+
:disabled="page == 1"
|
|
1799
|
+
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1800
|
+
@click="goToPage('prev')"
|
|
1801
1801
|
>
|
|
1802
|
-
<
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
>
|
|
1822
|
-
<!-- <i class="icon icon-chevron-beginning" /> -->
|
|
1823
|
-
{{ 1 }}
|
|
1824
|
-
</button>
|
|
1825
|
-
<template v-if="totalPages > 2">
|
|
1826
|
-
<div style="display: flex;flex-direction: row;gap: 10px;">
|
|
1827
|
-
<button
|
|
1828
|
-
v-if="page - 2 > 1 && page <= totalPages "
|
|
1829
|
-
type="button"
|
|
1830
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1831
|
-
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1832
|
-
>
|
|
1833
|
-
...
|
|
1834
|
-
</button>
|
|
1835
|
-
<button
|
|
1836
|
-
v-if="page - 1 > 1 && page <= totalPages "
|
|
1837
|
-
type="button"
|
|
1838
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1839
|
-
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1840
|
-
@click="setPage(page-1)"
|
|
1841
|
-
>
|
|
1842
|
-
{{ page-1 }}
|
|
1843
|
-
</button>
|
|
1844
|
-
<button
|
|
1845
|
-
v-if="page > 1 && page < totalPages"
|
|
1846
|
-
type="button"
|
|
1847
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1848
|
-
:style="{ color: `var(--default-text)`,border: `solid thin var(--primary)`}"
|
|
1849
|
-
@click="setPage(page)"
|
|
1850
|
-
>
|
|
1851
|
-
{{ page }}
|
|
1852
|
-
</button>
|
|
1853
|
-
<button
|
|
1854
|
-
v-if="page + 1 < totalPages "
|
|
1855
|
-
type="button"
|
|
1856
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1857
|
-
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1858
|
-
@click="setPage(page+1)"
|
|
1859
|
-
>
|
|
1860
|
-
{{ page+1 }}
|
|
1861
|
-
</button>
|
|
1862
|
-
<button
|
|
1863
|
-
v-if="page +2 < totalPages "
|
|
1864
|
-
type="button"
|
|
1865
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1866
|
-
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1867
|
-
>
|
|
1868
|
-
...
|
|
1869
|
-
</button>
|
|
1870
|
-
</div>
|
|
1871
|
-
</template>
|
|
1872
|
-
<!-- <button
|
|
1873
|
-
type="button"
|
|
1874
|
-
class="btn btn-sm role-multi-action"
|
|
1875
|
-
style="padding: 0;max-width: 32px;background-color: white !important;"
|
|
1876
|
-
>
|
|
1877
|
-
{{ page }}
|
|
1878
|
-
</button> -->
|
|
1879
|
-
<button
|
|
1880
|
-
v-if="totalPages > 1"
|
|
1881
|
-
type="button"
|
|
1882
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1883
|
-
:style="{ color: (page == totalPages) ? `var(--primary)`:`var(--default-text) !important`,border: (page == totalPages) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1884
|
-
@click="goToPage('last')"
|
|
1885
|
-
>
|
|
1886
|
-
<!-- <i class="icon icon-chevron-end" /> -->
|
|
1887
|
-
{{ totalPages }}
|
|
1888
|
-
</button>
|
|
1889
|
-
<button
|
|
1890
|
-
type="button"
|
|
1891
|
-
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1892
|
-
:disabled="page == totalPages"
|
|
1893
|
-
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1894
|
-
@click="goToPage('next')"
|
|
1895
|
-
>
|
|
1896
|
-
<!-- <i class="icon icon-chevron-right" /> -->
|
|
1802
|
+
<!-- <i class="icon icon-chevron-left" /> -->
|
|
1803
|
+
<
|
|
1804
|
+
</button>
|
|
1805
|
+
<button
|
|
1806
|
+
type="button"
|
|
1807
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1808
|
+
:style="{ color: (page == 1) ? `var(--primary)`:`var(--default-text) !important`,border: (page == 1) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1809
|
+
@click="goToPage('first')"
|
|
1810
|
+
>
|
|
1811
|
+
<!-- <i class="icon icon-chevron-beginning" /> -->
|
|
1812
|
+
{{ 1 }}
|
|
1813
|
+
</button>
|
|
1814
|
+
<template v-if="totalPages > 2">
|
|
1815
|
+
<div style="display: flex;flex-direction: row;gap: 10px;">
|
|
1816
|
+
<button
|
|
1817
|
+
v-if="page - 2 > 1 && page <= totalPages "
|
|
1818
|
+
type="button"
|
|
1819
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1820
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1897
1821
|
>
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1822
|
+
...
|
|
1823
|
+
</button>
|
|
1824
|
+
<button
|
|
1825
|
+
v-if="page - 1 > 1 && page <= totalPages "
|
|
1826
|
+
type="button"
|
|
1827
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1828
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1829
|
+
@click="setPage(page-1)"
|
|
1830
|
+
>
|
|
1831
|
+
{{ page-1 }}
|
|
1832
|
+
</button>
|
|
1833
|
+
<button
|
|
1834
|
+
v-if="page > 1 && page < totalPages"
|
|
1835
|
+
type="button"
|
|
1836
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1837
|
+
:style="{ color: `var(--default-text)`,border: `solid thin var(--primary)`}"
|
|
1838
|
+
@click="setPage(page)"
|
|
1839
|
+
>
|
|
1840
|
+
{{ page }}
|
|
1841
|
+
</button>
|
|
1842
|
+
<button
|
|
1843
|
+
v-if="page + 1 < totalPages "
|
|
1844
|
+
type="button"
|
|
1845
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1846
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1847
|
+
@click="setPage(page+1)"
|
|
1848
|
+
>
|
|
1849
|
+
{{ page+1 }}
|
|
1850
|
+
</button>
|
|
1851
|
+
<button
|
|
1852
|
+
v-if="page +2 < totalPages "
|
|
1853
|
+
type="button"
|
|
1854
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1855
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1856
|
+
>
|
|
1857
|
+
...
|
|
1858
|
+
</button>
|
|
1924
1859
|
</div>
|
|
1925
|
-
|
|
1860
|
+
</template>
|
|
1861
|
+
<!-- <button
|
|
1926
1862
|
type="button"
|
|
1927
1863
|
class="btn btn-sm role-multi-action"
|
|
1928
|
-
style="padding: 0;max-width:
|
|
1929
|
-
@click="setPage(inputPage)"
|
|
1864
|
+
style="padding: 0;max-width: 32px;background-color: white !important;"
|
|
1930
1865
|
>
|
|
1931
|
-
|
|
1866
|
+
{{ page }}
|
|
1932
1867
|
</button> -->
|
|
1933
|
-
</div>
|
|
1934
|
-
<button
|
|
1935
|
-
v-if="search"
|
|
1936
|
-
v-shortkey.once="['/']"
|
|
1937
|
-
class="hide"
|
|
1938
|
-
@shortkey="focusSearch()"
|
|
1939
|
-
/>
|
|
1940
|
-
<template v-if="tableActions">
|
|
1941
1868
|
<button
|
|
1942
|
-
v-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
class="
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
<button
|
|
1952
|
-
v-shortkey="['shift','j']"
|
|
1953
|
-
class="hide"
|
|
1954
|
-
@shortkey="focusNext($event, true)"
|
|
1955
|
-
/>
|
|
1869
|
+
v-if="totalPages > 1"
|
|
1870
|
+
type="button"
|
|
1871
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1872
|
+
:style="{ color: (page == totalPages) ? `var(--primary)`:`var(--default-text) !important`,border: (page == totalPages) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1873
|
+
@click="goToPage('last')"
|
|
1874
|
+
>
|
|
1875
|
+
<!-- <i class="icon icon-chevron-end" /> -->
|
|
1876
|
+
{{ totalPages }}
|
|
1877
|
+
</button>
|
|
1956
1878
|
<button
|
|
1957
|
-
|
|
1958
|
-
class="
|
|
1959
|
-
|
|
1879
|
+
type="button"
|
|
1880
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1881
|
+
:disabled="page == totalPages"
|
|
1882
|
+
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1883
|
+
@click="goToPage('next')"
|
|
1884
|
+
>
|
|
1885
|
+
<!-- <i class="icon icon-chevron-right" /> -->
|
|
1886
|
+
>
|
|
1887
|
+
</button>
|
|
1888
|
+
|
|
1889
|
+
<!-- 分页页码切换 -->
|
|
1890
|
+
<Select
|
|
1891
|
+
:mode="inputPerPage"
|
|
1892
|
+
:searchable="false"
|
|
1893
|
+
:clearable="false"
|
|
1894
|
+
:options="perPageOptions"
|
|
1895
|
+
v-model:value="inputPerPage"
|
|
1896
|
+
class="pageSelect"
|
|
1897
|
+
@update:value="changePerPage"
|
|
1960
1898
|
/>
|
|
1961
|
-
|
|
1962
|
-
|
|
1899
|
+
|
|
1900
|
+
<div style="height: 100%; align-content: center;">
|
|
1901
|
+
跳至
|
|
1902
|
+
</div>
|
|
1903
|
+
<input
|
|
1904
|
+
v-model="inputPage"
|
|
1905
|
+
type="number"
|
|
1906
|
+
min="1"
|
|
1907
|
+
step="1"
|
|
1908
|
+
style="padding: 0px 10px;"
|
|
1909
|
+
@keyup.enter="handleToPage"
|
|
1910
|
+
>
|
|
1911
|
+
<div style="height: 100%; align-content: center;">
|
|
1912
|
+
页
|
|
1913
|
+
</div>
|
|
1914
|
+
<!-- <button
|
|
1915
|
+
type="button"
|
|
1916
|
+
class="btn btn-sm role-multi-action"
|
|
1917
|
+
style="padding: 0;max-width: 80px;background-color: white !important;"
|
|
1918
|
+
@click="setPage(inputPage)"
|
|
1919
|
+
>
|
|
1920
|
+
|
|
1921
|
+
</button> -->
|
|
1922
|
+
</div>
|
|
1963
1923
|
</div>
|
|
1964
|
-
|
|
1924
|
+
<button
|
|
1925
|
+
v-if="search"
|
|
1926
|
+
v-shortkey.once="['/']"
|
|
1927
|
+
class="hide"
|
|
1928
|
+
@shortkey="focusSearch()"
|
|
1929
|
+
/>
|
|
1930
|
+
<template v-if="tableActions">
|
|
1931
|
+
<button
|
|
1932
|
+
v-shortkey="['j']"
|
|
1933
|
+
class="hide"
|
|
1934
|
+
@shortkey="focusNext($event)"
|
|
1935
|
+
/>
|
|
1936
|
+
<button
|
|
1937
|
+
v-shortkey="['k']"
|
|
1938
|
+
class="hide"
|
|
1939
|
+
@shortkey="focusPrevious($event)"
|
|
1940
|
+
/>
|
|
1941
|
+
<button
|
|
1942
|
+
v-shortkey="['shift','j']"
|
|
1943
|
+
class="hide"
|
|
1944
|
+
@shortkey="focusNext($event, true)"
|
|
1945
|
+
/>
|
|
1946
|
+
<button
|
|
1947
|
+
v-shortkey="['shift','k']"
|
|
1948
|
+
class="hide"
|
|
1949
|
+
@shortkey="focusPrevious($event, true)"
|
|
1950
|
+
/>
|
|
1951
|
+
<slot name="shortkeys" />
|
|
1952
|
+
</template>
|
|
1965
1953
|
</div>
|
|
1966
1954
|
</template>
|
|
1967
1955
|
|
|
@@ -2615,3 +2603,4 @@ export default {
|
|
|
2615
2603
|
z-index: 3;
|
|
2616
2604
|
}
|
|
2617
2605
|
</style>
|
|
2606
|
+
|