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

cw-table-ui

v2.0.6

Published

"table的封装包含排序、固定列、左滑右滑等功能, 包含封装的源码",

Downloads

12

Readme

曹伟封装的table ui组件

cw-table-ui

安装

npm install cw-table-ui

使用

main.js中引入 import cwTable from "cw-table-ui"; import cwTableColumn from "cw-table-ui"; vue.use(cwTableColumn) vue.use(cwTable)

示例

主要封装了一些公司项目中一些通用的功能,加快开发

<cw-table :data="resultList" checkField="urlhash" ref="cwTable" showScrollBtn :loading="loading" @selection-change="selectionChange"
    @sort-change="onSortChange" v-loading="loading">
    <cw-table-column type="selection" fixed width="40">
    </cw-table-column>
    <cw-table-column type="index" label="序号" width="60">
    </cw-table-column>
    <cw-table-column prop="accountName" label="网站/公众号" width="200"></cw-table-column>
    <cw-table-column prop="url" label="链接" width="200"></cw-table-column>
    <cw-table-column prop="deadlineTime" label="截止时间" width="200"></cw-table-column>
    <cw-table-column label="操作" fixed="right">
        <template slot-scope="scope">
            <span class="operate edit" title="编辑" @click="handleEdit(scope.row)"></span>
            <el-popover placement="bottom" title="提示" trigger="click" v-model="scope.row.visible">
                <div style="text-align: right; margin: 0">
                    <p>确认删除并屏蔽账号?</p>
                    <el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
                    <el-button type="primary" size="mini" @click="accountDelete(scope.row.id)"
                        v-loading="batchDeleteLoading">确定</el-button>
                </div>
                <span slot="reference" class="operate delete" title="删除并屏蔽账号"
                    @click="handleDelete(scope.row)"></span>
            </el-popover
        </template>
    </cw-table-column>
</cw-table>

效果
alt text

类似于饿了么ui的table,又添加了一些独有的功能如:
一、fixed:固定列(默认固定在左侧), fixed="right" 固定在右侧

二、showScrollBtn:当列表宽度过宽出现滚动条,则会出现左切 右切按钮

三、checkField="urlhash":当列的type="selection"时,默认勾选选的是id,但如果想选别的列,则可以手动指定选择的列,非常有用

待补充......