Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vxe-table-plugin-menus

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vxe-table-plugin-menus

基于 vxe-table 表格的增强插件,提供实用的快捷菜单集

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
638
increased by83.33%
Maintainers
1
Weekly downloads
 
Created
Source

vxe-table-plugin-menus

gitee star npm version npm downloads gzip size: JS npm license

基于 vxe-table 表格的增强插件,提供实用的快捷菜单集

Installing

npm install xe-utils vxe-table vxe-table-plugin-menus
import Vue from 'vue'
import VXETable from 'vxe-table'
import VXETablePluginMenus from 'vxe-table-plugin-menus'

Vue.use(VXETable)
VXETable.use(VXETablePluginMenus)

API

Context menu codes

code 编码describe 描述params 参数
CLEAR_CELL清除单元格数据的值
CLEAR_ROW清除行数据的值
CLEAR_SELECTED_ROW清除选中行数据的值
CLEAR_ALL清除所有数据的值
REVERT_CELL还原单元格数据的值
REVERT_ROW还原行数据的值
REVERT_SELECTED_ROW还原选中行数据的值
REVERT_ALL还原所有数据的值
INSERT_ROW插入数据records
INSERT_ACTIVED_ROW插入数据并激活编辑状态Array<records, field>
INSERT_AT_ROW插入数据到指定位置并激活编辑状态records
INSERT_AT_ACTIVED_ROW插入数据到指定位置并激活编辑状态Array<records, field>
DELETE_ROW移除行数据
DELETE_SELECTED_ROW移除选中行数据
DELETE_ALL移除所有行数据
CLEAR_SORT清除排序条件
SORT_ASC按所选列的值升序
SORT_DESC按所选列的值倒序
CLEAR_FILTER清除选中列的筛选条件
CLEAR_ALL_FILTER清除所有列筛选条件
EXPORT_ROW导出行数据options
EXPORT_SELECTED_ROW导出选中行数据options
EXPORT_ALL导出所有行数据options
PRINT_ALL打印所有行数据options
PRINT_SELECTED_ROW打印选中行options
HIDDEN_COLUMN隐藏列
RESET_COLUMN重置列可视状态
RESET_RESIZABLE重置列宽状态
RESET_ALL重置所有个性化数据

demo

<vxe-table
  border
  :data="tableData"
  :context-menu="{body: {options: bodyMenus}}"
  :edit-config="{trigger: 'click', mode: 'cell'}">
  <vxe-table-column type="index" width="60"></vxe-table-column>
  <vxe-table-column field="name" title="Name" :edit-render="{name: 'input'}"></vxe-table-column>
  <vxe-table-column field="sex" title="sex" :edit-render="{name: 'input'}"></vxe-table-column>
  <vxe-table-column field="age" title="Age" :edit-render="{name: 'input'}"></vxe-table-column>
</vxe-table>
export default {
  data () {
    return {
      tableData: [
        {
          id: 100,
          name: 'test1',
          age: 26,
          sex: '1'
        }
      ],
      bodyMenus: [
        [
          {
            code: 'EXPORT_ALL',
            name: '导出.csv'
          },
          {
            code: 'INSERT_ACTIVED_ROW',
            name: '新增'
          }
        ]
      ]
    }
  }
}

License

MIT License, 2019-present, Xu Liangzhan

Keywords

FAQs

Package last updated on 14 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc