npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@centit/ui-workspace

v0.0.39

Published

一个开箱即用、统一样式的工作台框架

Downloads

18

Readme

ui-workspace

一个开箱即用、统一样式的工作台框架

安装

npm install @centit/ui-workspace --save

[main.js]

import Workspace, { Tools } from '@centit/ui-workspace'
import '@centit/ui-workspace/ui-workspace.css'

...

app.use(Workspace)
app.use(Tools)

使用说明

使用说明

工作台

<c-workspace :layout="layout" >
  <template #header-left>
    <c-logo-tool />
  </template>
  
  ...
  
  <template #left="{ tab, tabs }">
      <ElementsPanel v-if="tabs[0].resolved" v-show="tab.value === 'C'" />
      <LayersPanel v-if="tabs[1].resolved" v-show="tab.value === 'S'" />
      <PagesPanel v-if="tabs[2].resolved" v-show="tab.value === 'P'" />
  </template>
  
  ...
</c-workspace>

<script>
const layout = {
    header: {
        size: 52,
    },
    tools: {
        size: 48,
    },
    left: {
        size: 300,
        tabs: [
            { value: 'C', label: '组件', icon: BuildOutlined },
            { value: 'S', label: '结构', icon: ApartmentOutlined },
            { value: 'P', label: '页面', icon: FolderOpenOutlined },
            { value: 'A', label: '工程', icon: RocketOutlined },
        ],
        tab: 'C',
    },
    right: {
        size: 300,
    },
    bottom: {
        size: 256,
        isClosed: false,
        isFullscreen: false,
        tabs: [
            { value: 'C', label: '代码', icon: ApiOutlined },
            { value: 'E', label: '效果', icon: AlertOutlined },
        ],
        tab: 'C',
    },
    main: {
        tabs: false,
    },
}
</script>

组件选择Panel

<c-items-panel
  :items="plugins"
  @startDrag="onStartDragItem"
  @endDrag="onEndDragItem"
/>

<script>
const plugins = [
  {
    key: 'Layout',
    label: '布局',
    children: [
      {
        icon: '图标地址或者base64',
        label: '容器'
        ... // 其他自己需要的属性
      },
      ...
    ],
  },
  ... // 其他栏目
]

// 从侧边栏开始拖动元素
function onStartDragItem(e, item) {
  
}

// 结束拖动
function onEndDragItem(e, item) {

}
</script>

Change Logs

0.0.15

1、添加c-history-panel组件

<c-history-panel
    v-if="tab.value === 'H' && application && modelId"
    :height="layout.bottom.size"
    :osId="application.osId"
    :relationId="modelId"
    :pushUser="user.userInfo.userCode"
    :content="model.forTemplate"
    type="2"
/>

0.0.14

1、c-item-panels内各组件可以折叠

2、c-item-panels添加col属性,可以控制每行显示组件数量(默认=4,对于工作流或其他组件比较少的情况可以改成3)

3、添加c-title-tool组件,用来显示应用名称和当前菜单名称