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

@aurouscia/au-table-editor

v0.5.9

Published

table editor based on vue with cell merging

Downloads

395

Readme

table editor based on vue with cell merging
基于vue的表格编辑器,支持单元格合并
(与au-table包无关)

English: see README.en.md

Have nothing to do with "au-table" package

preview

  1. 单元格合并
  2. 移动端可用
  3. 撤销/重做
  4. ts类型定义
  5. (较为)完整的单元测试

注意:这是个【vue组件】,只能在vue项目里使用

作者水平有限,谨慎使用

用法

npm install @aurouscia/au-table-editor

import { AuTableEditor, AuTableData } from '@aurouscia/au-table-editor'  
//"AuTableData"是编辑器的数据类型,写ts才需要引入  
import '@aurouscia/au-table-editor/style.css' 
//引入其样式

//必须在数据就绪后再让组件加载,未就绪前应使用v-if避免其加载
<AuTableEditor v-if="loadComplete" :table-data="【传入初始数据】" @save="【保存数据并返回状态(是否成功)】">
</AuTableEditor>

<!--见源代码中的 src/DemoParent.vue 示例父级文件-->

注意

  1. 要永久保存数据,需要架设一个后端并把数据post给后端保存
  2. 要控制其尺寸,需要父元素是position非static的元素
  3. 保存务必使用@save提供的值,不要使用传入的对象,该对象可能并不与表格当前状态一致
  4. 要去除底部栏的信息,只需向组件传递 :no-ads="true" 属性

Demo

试用:

git clone https://gitee.com/au114514/au-table-editor  
npm install  
npm run dev

数据格式示例

如果使用ts,直接引入AuTableData即可

{
    id:0,name:"testTable", 
    cells: //单元格数据
    [
        ["表头","","","",""],
        ["1A","1B","1C","1D","1E"],["2A","2B","2C","2D","2E"],["3A","3B","3C","3D","3E"],
        ["4A","4B","4C","4D","4E"],["5A","5B","5C","5D","5E"],["6A","6B","6C","6D","6E"],
        ["7A","7B","7C","7D","7E"],["8A","8B","8C","8D","8E"],["9A","9B","9C","9D","9E"],
    ],
    merges:[{row:0,col:0,right:4,down:0}] //合并组位置和尺寸
}

.net SDK

nuget:Aurouscia.TableEditor.Core
(只有类型定义和xlsx导入导出)

缺陷

  1. 新插入的行和列虽然选中了但是菜单没冒出来
  2. 菜单如果出现在视野最右边/最下面会导致需要滑动才能看得到完整菜单
  3. 点击拖动框选的起点如果在表格缝里就会导致框选失败