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 🙏

© 2026 – Pkg Stats / Ryan Hefner

element-ui-plugin

v2.5.0

Published

在ElementUI下使用的组件

Readme

在ElementUI下使用的组件

Menus

在el-menu的基础上,封装成,传入menus参数,根据对象生成元素;el-menu的props参数适用于menus

<template>
    <menus :menus="menus"></menus>
</template>
<script>
export default {
    data(){
        return {
            menus: [
                {
                    icon: "el-icon-message",
                    title: "导航一",
                    submenus: [
                        {
                            title: "分组一",
                            group: [
                                {
                                    title: "选项1",
                                    index: "/shell/path1"
                                },
                                {
                                    title: "选项2",
                                    index: "/shell/path2"
                                }
                            ]
                        },
                        {
                            title: "分组二",
                            group: [
                                {
                                    title: "选项3",
                                    index: "/shell/path3"
                                },
                                {
                                    title: "选项4",
                                    index: "/shell/path4"
                                }
                            ]
                        },
                        {
                            title: "子菜单",
                            submenus: [
                                {
                                    title: "选项5",
                                    index: "/shell/path5"
                                },
                                {
                                    title: "选项6",
                                    index: "/shell/path6"
                                }
                            ]
                        }
                    ]
                },
                {
                    icon: "el-icon-menu",
                    title: "表格",
                    index: "/shell/table"
                },
                {
                    icon: "el-icon-setting",
                    title: "设置",
                    index: "/shell/setting"
                },
                {
                    icon: "fa fa-bar-chart",
                    title: "图表",
                    index: "/shell/chart"
                }
            ]
        }
    }
}
</script>

Attributes

|参数|说明|类型|可选值|默认值| |---|---|---|---|---| |menus|菜单数组|Array|-|-| |mode|模式|String|horizontal,vertical|vertical| |collapse|是否水平折叠收起菜单(仅在 mode 为 vertical 时可用)|boolean|-|false| |default-active|当前激活菜单的 index|string|-|-| |default-openeds|当前打开的submenu的 key 数组|Array|-|-| |unique-opened|是否只保持一个子菜单的展开|boolean|-|false| |menu-trigger|子菜单打开的触发方式(只在 mode 为 horizontal 时有效)|string|-|hover| |router|是否使用 vue-router 的模式,启用该模式会在激活导航时以 index 作为 path 进行路由跳转|boolean|-|false|

Menus Events

|事件名称|说明|回调参数| |---|---|---| |select|菜单激活回调|index: 选中菜单项的 indexObject: 选中菜单项的对象| |open|SubMenu 展开的回调|index: 打开的 subMenu 的 index, indexObject: 打开的 subMenu 的菜单项的对象| |close|SubMenu 关闭的回调|index: 关闭的 subMenu 的 index, indexObject: 关闭的 subMenu 的菜单项的对象

Menus Methods

|方法名称|说明|参数| |---|---|---| |open|展开指定的 sub-menu|index: 需要打开的 sub-menu 的 index| |close|收起指定的 sub-menu|index: 需要收起的 sub-menu 的 index|

Layout

经典top|left|bottom|right|center五格布局

<template>
    <layout layout="fill_parent">
        <layout-item slot="top">top</layout-item>
        <layout-item slot="left">left</layout-item>
        <layout-item slot="center" :primary="true">center</layout-item>
        <layout-item slot="bottom">bottom</layout-item>
        <layout-item slot="right">right</layout-item>
    </layout>
</template>
<script>
export default {
    data(){
        retutn {}
    }
}
</script>

Layout Attributes

|参数|说明|类型|可选值|默认值| |---|---|---|---|---| |layout|填充类型|String|wrap_content / fill_parent / full_screen|wrap_content|

LayoutItem Attributes

|参数|说明|类型|可选值|默认值| |---|---|---|---|---| |primary|是否填充剩余空间|Boolean|true / false|false|

Layout Slot

|name|说明| |---|---| |top|显示在顶部| |right|显示在右侧| |bottom|显示在底部| |left|显示在左侧| |center|显示在中央|

SY-Address

行政区划下拉选择,行政区划数据地址https://sisp.servyou.com.cn/apiweb/sisp/1/xzqh/getXzqhFile?code=

<sy-address v-model="code"></sy-address>

sy-address Attributes

|参数|说明|类型|可选值|默认值| |---|---|---|---|---| |width|宽度|number|-|-| |placeholder|-|string|-|-| |disabled|-|boolean|-|false| |prefix-icon|-|string|-|-| |suffix-icon|-|string|-|-| |autosize|是否可以调整大小|boolean|-|false| |name|input的name属性|string|-|-| |label|标题|string|-|-|