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

ccs-layout-ui

v1.0.0-test1

Published

ccs-layout-ui 是项目工程的一个公用组件,包含开发 登录界面、 头部信息、 侧边栏、 tab-view 和封装 CcsLogOut 外部方法供退出操作使用

Downloads

12

Readme

ccs-layout-ui

ccs-layout-ui 是项目工程的一个公用组件,包含开发
登录界面、
头部信息、
侧边栏、
tab-view
和封装 CcsLogOut 外部方法供退出操作使用

ccs-layout-ui 引入 main.js引入

import Vue from 'vue'
import App from './App'

import CcsLayout from 'ccs-layout-ui'
Vue.use(CcsLayout)
...

登录组件

登录组件在 CcsLayout里面 use后会注册到Vue中

具体使用如下:

<template>
    <login title="登录标题" :submit="handleLogin"></login>
</template>
<script>
export default {
  methods: {
    /**
     * @params data 表单参数
     * @function callback 按钮loading回调函数
     */
    handleLogin(data, callback) {
      // 登录操作
    }
  },
  created () {

  },
}
</script>

头部信息组件

头部信息组件在 CcsLayout里面 use后会注册到Vue中

具体使用如下:

<template>
    <headerTop
      :applicationCode="appCode"
      :cookieCode="TokenKey"
      :personalCenterMenu="extendTemConfig"
      :apiHttpUrl="httpUrl">
      <div slot="tenantDashboard1">
        这是AA应用注入1对应的内容模块
      </div>
      <div slot="tenantDashboard2">
        这是AA应用注入2对应的内容模块
      </div>
    </headerTop>
</template>

<script >
export default {
    data() {
        return {
            TokenKey: 'token',
            extendTemConfig: [
                { //如果需要在个人中心左侧动态扩展选项时
                    id: 'tenantDashboard1',
                    label: 'AA应用注入1',
                },
                {
                    id: 'tenantDashboard2',
                    label: 'AA应用注入2',
                }
            ],
            appCode: 'BASIC_APPLICATION',//应用的code
            httpUrl: "http://loclhost/admin", //用于用户数据 auth删除token等请求的api
        }
    }
}
</script>

侧边栏组件

侧边栏组件在 CcsLayout里面 use后会注册到Vue中

具体使用如下:

<template>
      <sideBar :menuRoutes="menuRoutes" @select="select"></sideBar>
</template>
<script >
export default {
    data() {
        return {
            menuRoutes: [...],
        }
    },
    methods: {
        /**
         * @params path 当前路径
         * @function paths 选中到菜单组
         */
        select(path, paths) {
          console.error(path, paths)
        }
    }
}
</script>

tab-view组件

tab-view组件在 CcsLayout里面 use后会注册到Vue中

具体使用如下:

<template>
    <tags-view></tags-view>
</template>

CcsLogOut方法调用

CcsLogOut 方法注册全局和window上。

具体使用如下:

CcsLogOut()
// 或者
this.CcsLogOut()

具体参数

  • 头部组件headerTop 基本参数

参数|描述|类型|默认值 ---|:---:|:---:|---: applicationCode|当前应用的应用code|String|— cookieCode|保存在cookie中的cookie键名,用于获取该存储的cookie|String|— apiHttpUrl|接口网关地址|String|- personalCenterMenu|个人中心菜单,配合slot使用|Array|-


  • 登录组件 login 基本参数

参数|描述|类型|默认值 ---|:---:|:---:|---: cookieCode|获取cookie的key|String|— apiHttpUrl|登录接口的网关地址|String|— title|登录界面标题|String|通福云开发户环境登录 submit|数据提交回调方法,submit存在tokeneName和loginUrl传过来无意义|Function|-


  • 侧边栏 sidbar 基本参数

参数|描述|类型|默认值 ---|:---:|:---:|---: menuRoutes|菜单列表|Array|— router|是否开启菜单路由|Boolean|true select|侧边栏选择后,返回两个参数均为路径|Function|-

  • menuRoutes 属性

参数|描述|类型|默认值 ---|:---:|:---:|---: path|路由地址|String|- name|标题|String|- icon|图标|String|- children|子集|Array|- meta|描述信息|Object|- hidden|是否隐藏|Boolean|- meta-node|el-menu的index|String|-