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 context menu plugins.

  • 1.0.0
  • Source
  • npm
  • Socket score

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

vxe-table-plugin-menus

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 编码描述params 参数
CLEAR_CELL清除单元格数据的值
CLEAR_ROW清除行数据的值
CLEAR_SELECTION_ROW清除选中行数据的值
CLEAR_ALL清除所有数据的值
REVERT_CELL还原单元格数据的值
REVERT_ROW还原行数据的值
REVERT_SELECTION_ROW还原选中行数据的值
REVERT_ALL还原所有数据的值
INSERT_ROW新增行Array<records, row>
INSERT_ACTIVED_ROW新增行并激活编辑状态Array<Array<records, row>, Array<field>>
DELETE_ROW移除行数据
DELETE_SELECTION_ROW移除选中行数据
DELETE_ALL移除所有行数据
EXPORT_ROW导出行数据options
EXPORT_SELECTION_ROW导出选中行数据options
EXPORT_ALL导出所有行数据options
HIDDEN_COLUMN隐藏列
RESET_COLUMN重置列可视状态
RESET_RESIZABLE重置列宽状态
RESET_ALL重置所有个性化数据

demo

<vxe-table
  border
  :data.sync="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 24 Aug 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