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

@firesoon/design-layout

v0.2.11

Published

@firesoon/design-layout

Downloads

100

Readme

为了进一步降低研发成本,提供 @firesoon/design-layout 包,结合 @firesoon/plugin-layout插件 将布局内置

@firesoon/design-layout

安装

npm install @firesoon/design-layout --save-dev

使用方式请查看@firesoon/plugin-layout 插件

修改记录

V 0.1.4

  • extraCacheUserKeys:缓存额外用户信息到 localStorage;
  • layoutWhitePath:布局路由白名单配置,当前路由包含在白名单内,则不使用当前 header 及 layout 布局;
  • initDispatcher:初始化完成后执行的回调,会返回一个dispatch方法,用于执行初始化后的一些操作;
  • versionModel:历史版本信息查看弹窗组件,用于展示历史版本信息;
  • onShowVersion:操作显示版本信息弹窗
import VerisonsModel from '@/components/VerisonsModel';

export const firesoonLayout = {
    ...,
    extraCacheUserKeys: ['hospitalCode'],
    layoutWhitePath: ['/analysis/inpatient'],
    initDispatcher: (dispatch) => {
        dispatch({
            type: 'global/initProject'
        })
    },
    versionModel: VerisonsModel
    onShowVersion: (dispatch) => {
        dispatch({
            type: 'global/updateState',
            payload: {
                versionVisible: true
            }
        })
    },
    ...
}

V 0.0.7

  • 窗口最小宽度调整 1280px

V 0.1.5

  • 添加浏览器类型判断标识,同时在firesoon-design节点添加浏览器类型样式 class

V 0.1.6

  • 根据用户信息,改造多机构信息展示

V 0.1.7

  • 权限菜单数据存储,放在 context 里面,可通过如下方式获取:
import { useContext } from 'react';
import { MenuContext } from '@firesoon/design-layout';

const { searchTree = [], accessMenu = [] } = useContext(MenuContext);

V 0.1.8

  • 多机构展示逻辑调整,提供isMultiAgency配置用于判断是否展示多机构,提供hideMultiCampusAll配置用于判断是否展示全部选项,app.ts配置如下:
export const firesoonLayout = {
    ...,
    hideMultiCampusAll: true,// true:隐藏全部选项;false:显示全部选项
    isMultiAgency: (sysRole) => { // 不配置isMultiAgency,则不显示多机构;如果始终显示多机构,isMultiAgency函数里面return true即可;也可以根据选中的角色信息里面的hospitalInfoVos长度判断,如下:
        const { hospitalInfoVos = [] } = sysRole
        return hospitalInfoVos.length > 0
    },
    ...
}

V 0.1.11

  • 多院区版本返回应用中心时,参数适配处理

V 0.1.16

  • Header添加hideRoles配置

V 0.1.17

  • isMultiAgency属性增强,支持Promise操作
export const firesoonLayout = {
    ...,
    isMultiAgency: (sysRole) => { 
        return new Promise(resolve => {
            resolve(true)
        })
    },
    ...
}

V 0.1.18

  • 优化返回应用中心携带的id取值逻辑

V 0.1.19

  • 面包屑缓存数据逻辑优化

V 0.1.20

  • 机构名称展示字段choiceHospitalName适配新本应用中心choiceOrgName字段

V 0.1.20

  • hideMultiCampusAll配置调整 1、默认可不配置。会根据sysRole.hospitalInfoVos的个数进行判断是否显示全部,当对于两个机构,则显示全部选项,否则隐藏全部选项 2、可配置boolean值。true隐藏全部选项,false显示全部选项 3、可配置函数,如下:
export const firesoonLayout = {
    ...,
    hideMultiCampusAll: (sysRole) => {
        // 可自己控制全部选项显示逻辑
        return sysRole?.hospitalInfoVos.length <= 1
    },
    ...
}

V 0.1.23

  • 移除断网状态展示界面逻辑

V 0.1.24

  • 添加模拟多院区展示逻辑

V 0.1.27

  • 修复不存在home时,页面下钻后左侧菜单选中问题

V 0.1.28

  • 新增加密存储方法getLocal、setLocal

V 0.1.30

  • 根据是否加密调整修改密码传参

V 0.1.31

  • 左侧菜单展开状态openKeys值去重处理

V 0.1.32

  • 增加返回应用中心前的回调方法onBeforeBackToAppCenter

V 0.1.33

  • 本地菜单数据新增hideBreadcrumb配置,用于当前菜单页面隐藏面包屑

V 0.1.34

  • errorPage页面跳转按钮处理

V 0.1.35

  • 新增消息盒子配置messageBox

V 0.1.40

  • Header组件适配应用传递的validateMode属性;

V 0.1.41

  • 调整validateMode属性,内置表单验证正则;

V 0.1.42

  • 布局插件返回应用中心逻辑调整,增加微应用加载时的返回逻辑;

V 0.1.43

  • 微应用返回基座跳转调整为history.pushState执行;

V 0.2.5

  • 布局Header组件addedMenus功能调整