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

khari21-component

v1.0.2

Published

khari组件

Downloads

1

Readme

kolor-element-ui

基于vue2+ 使用jsx二次封装element-ui的业务组件,通过全数据配置方式生成视图

Project setup

npm install / yarn

Compiles and hot-reloads for development

npm run serve / yarn serve / yarn start

Compiles and minifies for production

npm run build / yarn build

Lints and fixes files

npm run lint 

Customize configuration

See Configuration Reference.

KolorTable组件 Attributes

根容器为el-table组件,组件的Attributes除了以下新增的之外,还支持所有el-table的Attributes

| 新增参数 | 说明 | 类型 | 可选值 | 默认值 | | :----: | :----: | :----: | :----: | :----: | | data | 表格数据对象 | Array | | - | - | | columns | 单元格数据对象(用于渲染) | Array |全部为el-table-column的Attributes | - |
| show-pagination | 是否展示分页器 | boolean | false/true | true |
| pagination | 分页配置 | Object | 全部为el-pagination的Attributes | - |

KolorTable组件 Events

除了下面新增的events之外,还支持所有el-table的events

| 事件名 | 说明 | 返回值 | | :----: | :----: | :----: | | page-change | 监听分页变化,映射 组件的所有事件 | { currentPage, pageSize } |

父组件访问el-table组件实例


<ko-table 
  :data="tableData" 
  :columns="columns" 
  :border="true" 
  :pagination="pagination"
  :show-pagination="true"
  @page-change="pageChange"
  @row-click="rowClick"
  stripe
  ref="kolorTable"
/>

...

this.$refs.multipleTable.ElTable();

// 拿到实例时候,可以执行所有官方el-table的Methods

// 例: 用于多选表格,清空用户的选择  其余Methods查看element-ui官方文档 

<[链接地址](https://element.eleme.cn/#/zh-CN/component/table#table-methods)>

this.$refs.multipleTable.ElTable().clearSelection();

KolorQueryFormJsx 组件 Attributes

根容器为el-form组件,组件的Attributes除了以下新增的之外,还支持所有el-form的Attributes和事件

| 新增参数 | 说明 | 类型 | 可选值 | 默认值 | | :----: | :----: | :----: | :----: | :----: | | v-model | 表单的双向绑定值 | object | | - | - | | formItems | 表单的数据对象(用于渲染) | FormItem[] | - | [] |

FormItem数据结构

| 键名 | 说明 | 类型 | 可选值 | | :----: | :----: | :----: | :----: | | type | 表单项类型 | string | select | | itemLists | 当type为'select'时传,下拉框列表 | ItemList[] | - | | 其余参数全部为组件的prop| - | - | - |

ItemList数据结构

| 键名 | 说明 | 类型 | 可选值 | | :----: | :----: | :----: | :----: | | prop | 下拉框v-model绑定值的字段名 | string | - | | dataLists | 下拉框option的数据对象 | any[] | any还可为的所有prop | | formatDataKey | 格式化dataLists中绑定到上面的label和value字段 | object | - | | 其余参数全部为组件的prop| - | - | - |