-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Soybean
committed
Jan 7, 2022
1 parent
0653fb1
commit 10e4d81
Showing
15 changed files
with
356 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/layouts/common/SettingDrawer/components/DrawerButton/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<n-button | ||
class="fixed top-240px right-14px z-10000" | ||
:class="{ '!right-330px': app.settingDrawerVisible }" | ||
@click="toggleSettingdrawerVisible" | ||
> | ||
点击 | ||
</n-button> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { NButton } from 'naive-ui'; | ||
import { useAppStore } from '@/store'; | ||
const app = useAppStore(); | ||
const { toggleSettingdrawerVisible } = useAppStore(); | ||
</script> | ||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import DrawerButton from './DrawerButton/index.vue'; | ||
|
||
export { DrawerButton }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<n-drawer :show="app.settingDrawerVisible" display-directive="show" :width="330" @mask-click="app.closeSettingDrawer"> | ||
<n-drawer-content title="主题配置" :native-scrollbar="false"></n-drawer-content> | ||
</n-drawer> | ||
<drawer-button /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { NDrawer, NDrawerContent } from 'naive-ui'; | ||
import { useAppStore } from '@/store'; | ||
import { DrawerButton } from './components'; | ||
const app = useAppStore(); | ||
</script> | ||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import SettingDrawer from './SettingDrawer/index.vue'; | ||
import GlobalContent from './GlobalContent/index.vue'; | ||
|
||
export { GlobalContent }; | ||
export { SettingDrawer, GlobalContent }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
/*---滚动条默认显示样式--*/ | ||
::-webkit-scrollbar-thumb { | ||
background-color: #d9d9d9; | ||
border-radius: 4px; | ||
background-color: #e6e6e6; | ||
border-radius: 6px; | ||
} | ||
/*---鼠标点击滚动条显示样式--*/ | ||
::-webkit-scrollbar-thumb:hover { | ||
background-color: #d9d9d9; | ||
border-radius: 4px; | ||
background-color: #e6e6e6; | ||
border-radius: 6px; | ||
} | ||
/*---滚动条大小--*/ | ||
::-webkit-scrollbar { | ||
width: 5px; | ||
height: 5px; | ||
width: 6px; | ||
height: 6px; | ||
} | ||
|
||
/*---滚动框背景样式--*/ | ||
::-webkit-scrollbar-track-piece { | ||
background-color: rgba(0, 0, 0, 0); | ||
border-radius: 0; | ||
} | ||
|
||
html { | ||
scrollbar-width: thin; | ||
scrollbar-color: e6e6e6 transparent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/views/dashboard/workbench/components/WorkbenchHeader/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<n-card :bordered="false" class="rounded-16px shadow-sm"> | ||
<div class="flex-y-center justify-between"> | ||
<div class="flex-y-center"> | ||
<img src="@/assets/svg/avatar/avatar01.svg" alt="" class="w-70px h-70px" /> | ||
<div class="pl-12px"> | ||
<h3 class="text-18px font-semibold">早安,{{ auth.userInfo.userName }}, 今天又是充满活力的一天!</h3> | ||
<p class="leading-30px text-[#999]">今日多云转晴,20℃ - 25℃!</p> | ||
</div> | ||
</div> | ||
<n-space :size="24" :wrap="false"> | ||
<n-statistic v-for="item in statisticData" :key="item.id" class="whitespace-nowrap" v-bind="item"></n-statistic> | ||
</n-space> | ||
</div> | ||
</n-card> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { NCard, NSpace, NStatistic } from 'naive-ui'; | ||
import { useAuthStore } from '@/store'; | ||
interface StatisticData { | ||
id: number; | ||
label: string; | ||
value: string; | ||
} | ||
const auth = useAuthStore(); | ||
const statisticData: StatisticData[] = [ | ||
{ | ||
id: 0, | ||
label: '项目数', | ||
value: '25' | ||
}, | ||
{ | ||
id: 1, | ||
label: '待办', | ||
value: '4/16' | ||
}, | ||
{ | ||
id: 2, | ||
label: '消息', | ||
value: '12' | ||
} | ||
]; | ||
</script> | ||
<style scoped></style> |
24 changes: 24 additions & 0 deletions
24
src/views/dashboard/workbench/components/WorkbenchMain/components/ShortcutsCard.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<div | ||
class="flex-col-center p-12px border-1px border-[#efeff5] dark:border-[#ffffff17] rounded-4px hover:shadow-sm cursor-pointer" | ||
> | ||
<Icon :icon="icon" :style="{ color: iconColor }" class="text-30px" /> | ||
<p class="py-8px text-16px">{{ label }}</p> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue'; | ||
interface Props { | ||
/** 快捷操作名称 */ | ||
label: string; | ||
/** 图标 */ | ||
icon: string; | ||
/** 图标颜色 */ | ||
iconColor: string; | ||
} | ||
defineProps<Props>(); | ||
</script> | ||
<style scoped></style> |
41 changes: 41 additions & 0 deletions
41
src/views/dashboard/workbench/components/WorkbenchMain/components/TechnologyCard.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<div | ||
class="p-4px border-1px border-[#efeff5] dark:border-[#ffffff17] rounded-4px hover:shadow-sm cursor-pointer" | ||
@click="handleOpenSite" | ||
> | ||
<header class="flex-y-center"> | ||
<Icon :icon="icon" :style="{ color: iconColor }" class="text-30px" /> | ||
<h3 class="pl-12px text-18px font-semibold">{{ name }}</h3> | ||
</header> | ||
<p class="py-8px h-56px text-[#999]">{{ description }}</p> | ||
<div class="flex justify-end"> | ||
<span>{{ author }}</span> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue'; | ||
interface Props { | ||
/** 技术名称 */ | ||
name: string; | ||
/** 技术描述 */ | ||
description: string; | ||
/** 技术作者 */ | ||
author: string; | ||
/** 技术官网 */ | ||
site: string; | ||
/** 技术图标 */ | ||
icon: string; | ||
/** 图标颜色 */ | ||
iconColor?: string; | ||
} | ||
const props = defineProps<Props>(); | ||
function handleOpenSite() { | ||
window.open(props.site, '_blank'); | ||
} | ||
</script> | ||
<style scoped></style> |
4 changes: 4 additions & 0 deletions
4
src/views/dashboard/workbench/components/WorkbenchMain/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import TechnologyCard from './TechnologyCard.vue'; | ||
import ShortcutsCard from './ShortcutsCard.vue'; | ||
|
||
export { TechnologyCard, ShortcutsCard }; |
Oops, something went wrong.