Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vy-layout

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vy-layout

这是一个基于element-plus组件库创造的布局组件

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

VyLayout

  • 这是基于element-plus和vue3.x做的布局组件

Props

NameDescriptionTypeRequiredDefault
iconComponent渲染布局图标的组件名称,默认为el-icon;若为自定义组件,则必须有icon属性,进行图标渲染Stringfalseel-icon
layout三种不同方式布局'top' / 'mix'/'side'falsemix
menus用于显示菜单的数据Object[]true[]
avatar头像路径Stringfalse-
ellipsis顶部导航栏是否省略多余的子项Booleanfalsetrue
topBackground顶部导航栏背景色Stringfalse#545c64
topActiveColor顶部导航栏激活字体色Stringfalse#409EFF
topColor顶部导航栏字体色Stringfalse#fff
topHeight顶部导航栏高度Stringfalse60px
sideBackground侧边栏背景色Stringfalse#F2F3F5
sideActiveColor侧边栏激活字体色Stringfalse#409EFF
sideColor侧边栏字体色Stringfalse#303133
sideWidth侧边栏宽度Stringfalse200px
collopse侧边栏默认是否折叠Booleanfalsetrue
collopseStyle侧边栏折叠操作按钮样式Objectfalse{}
expandIcon侧边栏展开操作按钮图标名称StringfalseExpand
foldIcon侧边栏折叠操作按钮图标名称StringfalseFold
logoImglogo图片的地址Stringfalse-
logoTitlelogo的标题Stringfalse-

Events

Event NameDescriptionParameters
collopse折叠操作按钮事件-

Slots

NameDescriptionDefault Slot Content
right-content自定义顶部导航栏右侧内容 或侧边栏底部内容-
logo顶部导航栏/侧边栏logo内容-
other顶部导航栏/侧边栏其他内容操作-
logo顶部导航栏/侧边栏logo内容-
other顶部导航栏/侧边栏其他内容操作-
right-content自定义顶部导航栏右侧内容或侧边栏底部内容-
main主要内容展示区域-

菜单menus数组对象中的属性

NameDescriptionTypeRequiredDefault
hidden是否显示菜单Booleanfalse'false'
path跳转的路径Stringfalse''
meta-Objectfalse{}

meta对象中的属性

NameDescriptionTypeRequiredDefault
title菜单标题Stringfalse''
icon菜单显示图标的名称Stringfalse''
iconComponent每一个个性化菜单图标的渲染组件名称;优先级大于layout中的iconComponentStringfalse''

使用方法

  • 引入组件及样式
  • import VyLayout from 'vy-layout'
  • import 'vy-layout/style/index.css'
  • app.use(VyLayout)
  • 注意事项;自定义菜单图标组件,必须用icon属性来作为图标渲染属性

组件样式

mix top side

Keywords

FAQs

Package last updated on 25 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc