1.0.2 • Published 2 years ago

f2c-workbench v1.0.2

Weekly downloads
-
License
GPL-3.0 License
Repository
github
Last release
2 years ago

Workbench

Workbench 是基于浏览器的工作台前端框架组件,提供可拖拽的分割面板、以及工作台的基本结构和样式

在线预览网址:https://fit2cloud-ui.github.io/workbench

安装

npm install Workbench --save

引入

import Workbench from "Workbench"

Vue.use(Workbench);

使用

<workbench ref="workbench" :title="title">

</workbench>

API 文档

Attributes

参数说明类型可选值默认值
title头部标题String--
app-menu头部导航Array--
logo头部LogoString--
sidebar左侧侧边栏导航Array--
footerClass定义footer ClassNameString--
footerStyle定义footer StyleObject--
:visible-bottom-panel内容面板是否显示bottom面板(终端面板)Boolean-false
contextmenu内容面板右键tab时菜单Array--

Events

事件名说明参数
changeSidebar左侧侧边栏菜单切换时触发的事件当前菜单的实例
actived内容面板标签被激活时触发{ id, name, icon, iconClass, closable }
deleted内容面板标签被删除时触发{ id, name, icon, iconClass, closable }
onContextmenu如果使用contextmenu属性时,内容面板标签被右键时触发id
drop内容面板使用draggable时,当拖到内容面板区域并释放时触发-

Methods

方法名说明参数
activate激活内容面板某个标签(需使用ref)id

Slot

name说明
——内容面板的内容
sidebar左侧侧边栏的内容
sidebar-components左侧侧边栏展开后的内容
footerfooter的内容
bottom-panel内容面板中bottom面板的内容(终端面板)

app-menu Attributes

参数说明类型可选值默认值
name菜单名称String--
icon图标(class)String--
submenu子菜单Array--

submenu Attributes

参数说明类型可选值默认值
name菜单名称String--
submenu子菜单Array--
hotkey关键字String--
divided分割线Boolean-false
isSet是否已选择Boolean-false

submenu Events

事件名说明参数
click子菜单点击事件当前子菜单的实例

Sidebar Attributes

参数说明类型可选值默认值
name名称String--
icon图标(class)String--
hotkey关键字String--
location位置Stringtop / bottomtop
component要展开的组件String--
...(component)component组件里的所有属性和事件---
type触发后的方式Stringpopover / --
submenu子菜单(如果是popover方式时使用)Array(同头部子菜单属性)-

文件 Widgets Attributes

(*激活文件时,交互的属性)
参数说明类型可选值默认值
id文件唯一idString--
name文件显示名称String--
iconClass图标(class)String--
icon图标(url)String--
components文件(文件名)String--