细节修改,现在如果不配置sideBarLogo icon属性则不会渲染图标

This commit is contained in:
ray_wuhao 2023-04-06 10:23:11 +08:00
parent 41b6b9eed7
commit e455852b7d
2 changed files with 8 additions and 4 deletions

6
cfg.ts
View File

@ -30,10 +30,10 @@ const config: AppConfigExport = {
}, },
/** /**
* *
* icon: LOGO , `RayIcon` * icon: LOGO , `RayIcon` ()
* title: LOGO * title: LOGO
* url: 点击跳转地址, , * url: 点击跳转地址, ,
* jumpType: 跳转类型station: 项目内跳转, outsideStation: 新页面打开 * jumpType: 跳转类型(station: 项目内跳转, outsideStation: 新页面打开)
* *
* , LOGO * , LOGO
*/ */
@ -73,7 +73,7 @@ const config: AppConfigExport = {
title: HTMLTitlePlugin('Ray Template'), title: HTMLTitlePlugin('Ray Template'),
/** /**
* *
* HMR * HMR ()
*/ */
server: { server: {
host: '0.0.0.0', host: '0.0.0.0',

View File

@ -63,7 +63,11 @@ const LayoutMenu = defineComponent({
]} ]}
onClick={this.handleSideBarLogoClick.bind(this)} onClick={this.handleSideBarLogoClick.bind(this)}
> >
<RayIcon name={this.sideBarLogo.icon as string} size="30" /> {this.sideBarLogo.icon ? (
<RayIcon name={this.sideBarLogo.icon} size="30" />
) : (
''
)}
<h1 <h1
class={[ class={[
!this.modelCollapsed ? 'ray-menu__logo-title--open' : '', !this.modelCollapsed ? 'ray-menu__logo-title--open' : '',