fix: 修改图标和页面

This commit is contained in:
mtruning 2022-01-16 15:28:33 +08:00
parent fec6c6f23e
commit 6af050efb2
9 changed files with 43 additions and 112 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 KiB

View File

@ -12,10 +12,8 @@ import {
Open as OpenIcon, Open as OpenIcon,
Send as SendIcon, Send as SendIcon,
InformationCircleOutline as InformationCircleIcon, InformationCircleOutline as InformationCircleIcon,
Beer as BeerIcon,
Grid as GridIcon, Grid as GridIcon,
TvOutline as DesktopIcon, TvOutline as DesktopIcon,
LaptopOutline as LaptopOutlineIcon,
DocumentText as DocumentTextIcon, DocumentText as DocumentTextIcon,
Language as LanguageIcon, Language as LanguageIcon,
Moon as MoonIcon, Moon as MoonIcon,
@ -45,7 +43,10 @@ import {
TableSplit as TableSplitIcon, TableSplit as TableSplitIcon,
Roadmap as RoadmapIcon, Roadmap as RoadmapIcon,
SpellCheck as SpellCheckIcon, SpellCheck as SpellCheckIcon,
GraphicalDataFlow as GraphicalDataFlowIcon GraphicalDataFlow as GraphicalDataFlowIcon,
Store as StoreIcon,
Devices as DevicesIcon,
ObjectStorage as ObjectStorageIcon
} from '@vicons/carbon' } from '@vicons/carbon'
const ionicons5 = { const ionicons5 = {
@ -97,14 +98,10 @@ const ionicons5 = {
SendIcon, SendIcon,
// 信息 // 信息
InformationCircleIcon, InformationCircleIcon,
// 物料(颜色混合)
BeerIcon,
// 项目 // 项目
GridIcon, GridIcon,
// 电脑1 // 电脑1
DesktopIcon, DesktopIcon,
// 电脑2
LaptopOutlineIcon,
// 文档 // 文档
DocumentTextIcon, DocumentTextIcon,
// 语言 // 语言
@ -139,7 +136,13 @@ const carbon = {
// 表格 // 表格
TableSplitIcon, TableSplitIcon,
// 装饰 // 装饰
GraphicalDataFlowIcon GraphicalDataFlowIcon,
// 项目
DevicesIcon,
// 模板市场
StoreIcon,
// 我的模板
ObjectStorageIcon
} }
// https://www.xicons.org/#/ 还有很多 // https://www.xicons.org/#/ 还有很多

View File

@ -41,7 +41,7 @@ export const dialogIconSize = '20'
export const asideWidth = '270' export const asideWidth = '270'
// 侧边栏折叠后的宽度,支持全部折叠会覆盖为 0 // 侧边栏折叠后的宽度,支持全部折叠会覆盖为 0
export const asideCollapsedWidth = '60' export const asideCollapsedWidth = 60
// 弹窗是否可以通过点击遮罩关闭 // 弹窗是否可以通过点击遮罩关闭
export const maskClosable = false export const maskClosable = false

View File

@ -31,8 +31,8 @@ export const useSettingStore = defineStore({
getAsideAllCollapsed(): boolean { getAsideAllCollapsed(): boolean {
return this.asideAllCollapsed return this.asideAllCollapsed
}, },
getAsideCollapsedWidth(): string { getAsideCollapsedWidth(): number {
return this.asideAllCollapsed ? '0' : asideCollapsedWidth return this.asideAllCollapsed ? 0 : asideCollapsedWidth
} }
}, },
actions: { actions: {

View File

@ -23,9 +23,6 @@ $dark: (
linear-gradient($--color-dark-bg-1 14px, transparent 0), linear-gradient($--color-dark-bg-1 14px, transparent 0),
linear-gradient(90deg, transparent 14px, $--color-text-2 0) linear-gradient(90deg, transparent 14px, $--color-text-2 0)
), ),
// 物料市场背景
items-top-bg:
linear-gradient(180deg, $--color-dark-bg-1, rgba(23, 23, 26, 0)),
// hover 边框颜色 // hover 边框颜色
hover-border-color: #55606e, hover-border-color: #55606e,
); );

View File

@ -5,7 +5,8 @@ import { PageEnum } from '@/enums/pageEnum'
import { MenuOption, MenuGroupOption } from 'naive-ui' import { MenuOption, MenuGroupOption } from 'naive-ui'
import { icon } from '@/plugins' import { icon } from '@/plugins'
const { GridIcon, BeerIcon, DesktopIcon, LaptopOutlineIcon } = icon.ionicons5 const { GridIcon, DesktopIcon } = icon.ionicons5
const { StoreIcon, ObjectStorageIcon, DevicesIcon } = icon.carbon
export const renderMenuLabel = (option: MenuOption | MenuGroupOption) => { export const renderMenuLabel = (option: MenuOption | MenuGroupOption) => {
return option.label return option.label
} }
@ -18,12 +19,12 @@ export const menuOptionsInit = () => {
return reactive([ return reactive([
{ {
key: 'divider-1', key: 'divider-1',
type: 'divider' type: 'divider',
}, },
{ {
label: () => h('span', null, { default: () => t('project.project') }), label: () => h('span', null, { default: () => t('project.project') }),
key: 'all-project', key: 'all-project',
icon: renderIcon(GridIcon), icon: renderIcon(DevicesIcon),
children: [ children: [
{ {
type: 'group', type: 'group',
@ -36,13 +37,13 @@ export const menuOptionsInit = () => {
RouterLink, RouterLink,
{ {
to: { to: {
name: PageEnum.BASE_HOME_ITEMS_NAME name: PageEnum.BASE_HOME_ITEMS_NAME,
} },
}, },
{ default: () => t('project.all_project') } { default: () => t('project.all_project') }
), ),
key: PageEnum.BASE_HOME_ITEMS_NAME, key: PageEnum.BASE_HOME_ITEMS_NAME,
icon: renderIcon(DesktopIcon) icon: renderIcon(DesktopIcon),
}, },
{ {
label: () => label: () =>
@ -50,22 +51,22 @@ export const menuOptionsInit = () => {
RouterLink, RouterLink,
{ {
to: { to: {
name: PageEnum.BASE_HOME_TEMPLATE_NAME name: PageEnum.BASE_HOME_TEMPLATE_NAME,
} },
}, },
{ default: () => t('project.my_templete') } { default: () => t('project.my_templete') }
), ),
key: PageEnum.BASE_HOME_TEMPLATE_NAME, key: PageEnum.BASE_HOME_TEMPLATE_NAME,
icon: renderIcon(LaptopOutlineIcon) icon: renderIcon(ObjectStorageIcon),
} },
] ],
} },
] ],
}, },
{ {
key: 'divider-2', key: 'divider-2',
type: 'divider' type: 'divider',
}, },
{ {
label: () => label: () =>
@ -73,13 +74,13 @@ export const menuOptionsInit = () => {
RouterLink, RouterLink,
{ {
to: { to: {
name: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME name: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
} },
}, },
{ default: () => t('project.template_market') } { default: () => t('project.template_market') }
), ),
key: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME, key: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
icon: renderIcon(BeerIcon) icon: renderIcon(StoreIcon),
} },
]) ])
} }

View File

@ -1,3 +0,0 @@
import TopCarousel from './index.vue'
export { TopCarousel }

View File

@ -1,12 +0,0 @@
<template>
<div class="go-template-market-top-carousel">
<h1>轮播图</h1>
</div>
</template>
<script setup lang="ts"></script>
<style lang="scss" scoped>
@include go('project-template-market-top-carousel') {
}
</style>

View File

@ -1,74 +1,19 @@
<template> <template>
<div class="go-project-template-market"> <div class="go-project-template-market">
<header class="top-box"> <n-space vertical>
<div class="top-box-bg"></div> <n-image object-fit="contain" height="300" preview-disabled :src="requireFallbackImg()" />
<div class="top-content"> <n-h3>暂时还没有东西呢</n-h3>
<n-carousel class="top-content-carousel" show-arrow>
<n-card title="模板1" hoverable>
<n-space>
<img
class="carousel-img"
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel3.jpeg"
/>
<n-text>这里是介绍拉巴拉巴拉巴拉</n-text>
</n-space> </n-space>
</n-card>
<n-card title="模板2" hoverable>
<n-space>
<img
class="carousel-img"
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel2.jpeg"
/>
<n-text>这里是介绍拉巴拉巴拉巴拉</n-text>
</n-space>
</n-card>
<n-card title="模板2" hoverable>
<n-space>
<img
class="carousel-img"
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel3.jpeg"
/>
<n-text>这里是介绍拉巴拉巴拉巴拉</n-text>
</n-space>
</n-card>
<n-card title="模板2" hoverable>
<n-space>
<img
class="carousel-img"
src="https://naive-ui.oss-cn-beijing.aliyuncs.com/carousel-img/carousel4.jpeg"
/>
<n-text>这里是介绍拉巴拉巴拉巴拉</n-text>
</n-space>
</n-card>
</n-carousel>
</div>
<n-divider />
</header>
</div> </div>
</template> </template>
<script setup lang="ts"></script> <script setup lang="ts">
import { requireFallbackImg } from '@/utils'
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
@include go('project-template-market') { @include go("project-template-market") {
.top-box { margin-top: 100px;
background: url('@/assets/images/project/project-top-bg.png'); @extend .go-flex-center;
background-position: top -185px left -1560px;
&-bg {
position: absolute;
width: 100%;
height: 100%;
@include background-image('items-top-bg');
}
.top-content {
display: flex;
justify-content: center;
position: relative;
padding-top: 30px;
&-carousel {
width: 70%;
}
}
}
} }
</style> </style>