Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dist

表格列设置, 拖动排序,列显示隐藏
  • Loading branch information
wangz-code committed Oct 28, 2024
2 parents 6cc2535 + eb0ec95 commit 864ab78
Show file tree
Hide file tree
Showing 39 changed files with 1,207 additions and 1,357 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"pkg-types": "^1.2.1",
"useNProgress": "link:@vueuse/integrations/useNProgress",
"vue": "^3.5.12",
"vue-draggable-plus": "^0.5.4",
"vue-echarts": "^7.0.3",
"vue-i18n": "^10.0.4",
"vue-router": "^4.4.5"
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/components/ActionIcon/src/ActionIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import ToolTipper from "./ToolTipper.vue";
interface Props {
tooltipText?: string;
icon: string;
transparent?: boolean; // 是否设置背景透明
size?: number; // 按钮大小
component?: Component | String; // 图标组件
}
withDefaults(defineProps<Props>(), {
tooltipText: undefined,
icon: "",
transparent: false, // 是否设置背景透明
size: 16, // 按钮大小
component: undefined, // 图标组件
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppLogo/src/AppLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const isLightTheme = computed(() => !isDarkMode.value);

<template>
<!-- 应用程序 Logo 区域 -->
<div :class="`text-${titleSize}`" class="app-logo flex items-center"@click="navigateHome">
<div :class="`text-${titleSize}`" class="flex items-center"@click="navigateHome">
<!-- 根据主题和模式显示 Logo 图片 -->
<Transition
appear :name="RouterTransitionConstants.FADE" mode="in-out"
Expand Down
4 changes: 2 additions & 2 deletions src/components/PageWrapper/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { withInstall } from "@/utils";
import pageWrapper from "./src/PageWrapper.vue";
import wrapper from "./src/PageWrapper.vue";

export const PageWrapper = withInstall(pageWrapper);
export const PageWrapper = withInstall(wrapper);
38 changes: 5 additions & 33 deletions src/components/PageWrapper/src/PageWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,43 +1,15 @@
<script setup lang="ts">
import { NBackTop } from "naive-ui";
interface PageWrapperProps {
useScrollbar?: boolean;
}
withDefaults(defineProps<PageWrapperProps>(), {
withDefaults(defineProps<{ useScrollbar?: boolean }>(), {
useScrollbar: true,
});
const { getShouldUseOpenBackTop } = useAppSetting();
</script>

<template>
<div class="page-wrapper" :class="[{ 'scrollbar-enabled': useScrollbar }]">
<NScrollbar v-if="useScrollbar" class="rounded-2xl">
<div class="m-4">
<slot />
</div>
<NBackTop v-if="getShouldUseOpenBackTop" :bottom="160" :right="0" />
</NScrollbar>
<div v-else class="m-4">
<slot />
</div>
</div>
<NScrollbar>
<slot />
<NBackTop v-if="getShouldUseOpenBackTop" :bottom="160" :right="0" />
</NScrollbar>
</template>

<style scoped>
.page-wrapper {
/* Default styles for page-wrapper */
@apply rounded-2xl w-full h-full min-h-full;
}
.page-wrapper.scrollbar-enabled {
/* Styles specific to when scrollbar is enabled */
width: calc(100% + 8px);
}
.page-wrapper.scrollbar-enabled :deep(.ca-scrollbar-container) {
width: calc(100% - 8px);
@apply rounded-2xl;
}
</style>
Loading

0 comments on commit 864ab78

Please sign in to comment.