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

vue-element-ts

v0.3.0

Published

基于 ElementUI 的二次封装组件库

Downloads

16

Readme

vue-element-ts

项目介绍

此项目为基于 ElementUI 二次封装的组件库,项目可本地运行

项目地址

组件使用文档

表格 VTableTs

特性

  1. 基于 Element UI 中的 el-table 组件进行的二次封装,兼容 el-table 的属性和事件。
  2. 通过配置 column 属性配置并渲染表格。
  3. 内部集成 el-pagination,并可根据配置项修改分页器。
  4. 内置表格高度自适应指令,可根据容器高度自动设置表格高度。

VTableTs 属性

VTableTs 继承了 el-table 的所有属性和事件,并增加了以下属性

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | columns | 表格项配置 | Array | | | | selection | 是否显示多选框 | Boolean | | false | | columnIndex | 是否显示序号 | Boolean | | false | | pagination | 分页器配置 | Boolean, Object | | | | total | 数据总条数 | Number | | 0 |

column 属性

column 继承了 TableColumn,并扩展了新的属性

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | hidden | 对应列是否隐藏 | Boolean | | false | | scopedSlots | 对应列是否使用自定义插槽 | Object | | |

scopedSlots 属性

scopedSlots 是用于配置自定义插槽的属性

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | cellSlotName | 单元格插槽名称 | String | | | | headerSlotName | 表头插槽名称 | String | | |

Pagination 分页配置项

Pagination 集成自 ElPagination 并扩展新的属性,用于设置内置的分页器

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | background | 是否为分页按钮添加背景色 | Boolean | | true | | disabled | 是否禁用 | Boolean | | false |

组件对外暴露了 Pagination 的 slot,通过配置在配置项 layout 中增加 slot,并通过 pagination(slotName) 加入插槽

导航菜单 VMenuTs

特性

  1. 基于 Element UI 中的 el-menu 组件进行的二次封装,兼容 el-menu 的属性和方法。
  2. 通过配置 menus 属性自动渲染菜单。

VMenuTs 属性

options 为 Element UI 原生属性集合,具体可参考 Element 文档

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | options | el-menu 原生属性集合 | Object | | | | menus | 菜单配置 | Array | 数组对象,参考 MenuItem | |

MenuItem 属性

MenuItem 属性集成自 Element UI 中的 Submenu,并在此之上扩展了新的属性

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | | name | 菜单标题,即菜单中显示文字 | String | | | | icon | 菜单 icon 图标 class 名 | String | | | | hidden| 是否隐藏菜单项(连同子级一起隐藏) | Boolean | | false | | children | 子级菜单(组件内部会递归渲染) | MenuItem | | |