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 - npm Package Compare versions

Comparing version 1.6.1 to 1.6.2

5

dist/index.umd.js

@@ -52,3 +52,3 @@ (function (global, factory) {

var $vxe = $table.$vxe;
text = _xeUtils["default"].toString(_xeUtils["default"].get(row, column.property)); // 操作内置剪贴板
text = _xeUtils["default"].toValueString(_xeUtils["default"].get(row, column.property)); // 操作内置剪贴板

@@ -354,3 +354,3 @@ $vxe.clipboard = {

modal.message({
message: $vxe.t('vxe.pro.area.mergeErr'),
content: $vxe.t('vxe.pro.area.mergeErr'),
status: 'error',

@@ -895,2 +895,3 @@ id: 'operErr'

});
return true;
}

@@ -897,0 +898,0 @@

2

dist/index.umd.min.js

@@ -1,1 +0,1 @@

!function(e,t){"function"==typeof define&&define.amd?define("vxe-table-plugin-menus",["exports","xe-utils"],t):"undefined"!=typeof exports?t(exports,require("xe-utils")):(t((t={exports:{}}).exports,e.XEUtils),e.VXETablePluginMenus=t.exports.default)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e,o){"use strict";var t,l;function a(a){return function(e){var t=e.$table,e=e.column;o.default.eachTree([e],function(e){e.fixed=a}),t.refreshColumn()}}function n(e,t){var a=e.$table,n=e.row,r=e.column;n&&r&&(e="",a.mouseConfig&&a.mouseOpts.area?e=(t?a.cutCellArea():a.copyCellArea()).text:(a=a.$vxe,e=o.default.toString(o.default.get(n,r.property)),a.clipboard={text:e}),o.default.isFunction(l)?l(e):console.warn("Copy function does not exist, copy to clipboard failed."))}function f(e){var e=e.$table,s=e.getTableData().visibleData,c=e.getTableColumn().visibleColumn,t=e.mouseConfig&&e.mouseOpts.area?e.getCellAreas():[];return e.getMergeCells().filter(function(e){var r=e.row,o=e.col,l=e.rowspan,E=e.colspan;return t.some(function(e){var t=e.rows,a=e.cols,n=s.indexOf(t[0]),e=s.indexOf(t[t.length-1]),t=c.indexOf(a[0]),a=c.indexOf(a[a.length-1]);return n<=r&&r+l-1<=e&&t<=o&&o+E-1<=a})})}function E(e){var t=e.$table,e=f(e);e.length&&t.removeMergeCells(e)}function r(e,t){console.warn('The code "'.concat(e,'" has been scrapped, please use "').concat(t,'"'))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.VXETablePluginMenus=void 0,o=(t=o)&&t.__esModule?t:{default:t};var s={CLEAR_CELL:function(e){var n=e.$table,t=e.row,a=e.column;t&&a&&(n.mouseConfig&&n.mouseOpts.area?(e=n.getCellAreas())&&e.length&&e.forEach(function(e){var a=e.rows;e.cols.forEach(function(t){a.forEach(function(e){n.clearData(e,t.property)})})}):n.clearData(t,a.property))},CLEAR_ROW:function(e){var t=e.$table,e=e.row;e&&t.clearData(e)},CLEAR_SELECTED_ROW:function(e){return r("CLEAR_SELECTED_ROW","CLEAR_CHECKBOX_ROW"),s.CLEAR_CHECKBOX_ROW(e)},CLEAR_CHECKBOX_ROW:function(e){e=e.$table;e.clearData(e.getCheckboxRecords())},CLEAR_ALL:function(e){e.$table.clearData()},REVERT_CELL:function(e){var n=e.$table,t=e.row,a=e.column;t&&a&&(n.mouseConfig&&n.mouseOpts.area?(e=n.getCellAreas())&&e.length&&e.forEach(function(e){var a=e.rows;e.cols.forEach(function(t){a.forEach(function(e){n.revertData(e,t.property)})})}):n.revertData(t,a.property))},REVERT_ROW:function(e){var t=e.$table,e=e.row;e&&t.revertData(e)},REVERT_SELECTED_ROW:function(e){return r("REVERT_SELECTED_ROW","REVERT_CHECKBOX_ROW"),s.REVERT_CHECKBOX_ROW(e)},REVERT_CHECKBOX_ROW:function(e){e=e.$table;e.revertData(e.getCheckboxRecords())},REVERT_ALL:function(e){e.$table.revertData()},COPY_CELL:function(e){n(e)},CUT_CELL:function(e){n(e,!0)},PASTE_CELL:function(e){var t=e.$table,a=e.row,e=e.column;t.mouseConfig&&t.mouseOpts.area?t.pasteCellArea():(t=t.$vxe.clipboard)&&t.text&&o.default.set(a,e.property,t.text)},MERGE_OR_CLEAR:function(e){var t=e.$table,a=t.getCellAreas(),e=f(e);e.length?t.removeMergeCells(e):t.setMergeCells(a.map(function(e){var t=e.rows,e=e.cols;return{row:t[0],col:e[0],rowspan:t.length,colspan:e.length}}))},MERGE_CELL:function(e){var t=e.$table,a=t.$vxe,n=a.modal,r=t.getTableData().visibleData,o=t.getTableColumn().visibleColumn,l=t.getCellAreas();E(e),l.some(function(e){var t=e.rows,e=e.cols;return t.length===r.length||e.length===o.length})?n&&n.message({message:a.t("vxe.pro.area.mergeErr"),status:"error",id:"operErr"}):t.setMergeCells(l.map(function(e){var t=e.rows,e=e.cols;return{row:t[0],col:e[0],rowspan:t.length,colspan:e.length}}))},CLEAR_MERGE_CELL:function(e){E(e)},CLEAR_ALL_MERGE:function(e){e=e.$table;e.clearMergeCells(),e.clearMergeFooterItems()},EDIT_CELL:function(e){var t=e.$table,a=e.row,e=e.column;t.setActiveCell(a,e.property)},EDIT_ROW:function(e){var t=e.$table,e=e.row;t.setActiveRow(e)},INSERT_ROW:function(e){var t=e.$table,e=e.menu;t.insert(e.params)},INSERT_ACTIVED_ROW:function(e){var t=e.$table,a=e.menu,n=e.column,r=a.params||[];t.insert(r[0]).then(function(e){e=e.row;return t.setActiveCell(e,r[1]||n.property)})},INSERT_AT_ROW:function(e){var t=e.$table,a=e.menu,e=e.row;e&&t.insertAt(a.params,e)},INSERT_AT_ACTIVED_ROW:function(e){var t,a=e.$table,n=e.menu,r=e.row,o=e.column;r&&(t=n.params||[],a.insertAt(t[0],r).then(function(e){e=e.row;return a.setActiveCell(e,t[1]||o.property)}))},DELETE_ROW:function(e){var t=e.$table,e=e.row;e&&t.remove(e)},DELETE_SELECTED_ROW:function(e){return r("DELETE_SELECTED_ROW","DELETE_CHECKBOX_ROW"),s.DELETE_CHECKBOX_ROW(e)},DELETE_CHECKBOX_ROW:function(e){e.$table.removeCheckboxRow()},DELETE_ALL:function(e){e.$table.remove()},CLEAR_SORT:function(e){e.$table.clearSort()},SORT_ASC:function(e){var t=e.$table,e=e.column;e&&t.sort(e.property,"asc")},SORT_DESC:function(e){var t=e.$table,e=e.column;e&&t.sort(e.property,"desc")},CLEAR_FILTER:function(e){var t=e.$table,e=e.column;e&&t.clearFilter(e)},CLEAR_ALL_FILTER:function(e){e.$table.clearFilter()},FILTER_CELL:function(e){var t=e.$table,a=e.row,n=e.column;a&&n&&(e=n.property,(n=n.filters).length&&((n=n[0]).data=o.default.get(a,e),n.checked=!0,t.updateData()))},EXPORT_ROW:function(e){var t=e.$table,a=e.menu,e=e.row;e&&(e={data:[e]},t.exportData(o.default.assign(e,a.params[0])))},EXPORT_SELECTED_ROW:function(e){return r("EXPORT_SELECTED_ROW","EXPORT_CHECKBOX_ROW"),s.EXPORT_CHECKBOX_ROW(e)},EXPORT_CHECKBOX_ROW:function(e){var t=e.$table,a=e.menu,e={data:t.getCheckboxRecords()};t.exportData(o.default.assign(e,a.params[0]))},EXPORT_ALL:function(e){var t=e.$table,e=e.menu;t.exportData(e.params)},PRINT_ALL:function(e){var t=e.$table,e=e.menu;t.print(e.params)},PRINT_SELECTED_ROW:function(e){return r("PRINT_SELECTED_ROW","PRINT_CHECKBOX_ROW"),s.PRINT_CHECKBOX_ROW(e)},PRINT_CHECKBOX_ROW:function(e){var t=e.$table,a=e.menu,e={data:t.getCheckboxRecords()};t.print(o.default.assign(e,a.params))},OPEN_FIND:function(e){e.$table.openFind()},OPEN_REPLACE:function(e){e.$table.openReplace()},HIDDEN_COLUMN:function(e){var t=e.$table,e=e.column;e&&t.hideColumn(e)},FIXED_LEFT_COLUMN:a("left"),FIXED_RIGHT_COLUMN:a("right"),CLEAR_FIXED_COLUMN:a(""),RESET_COLUMN:function(e){e.$table.resetColumn({visible:!0,resizable:!1})},RESET_RESIZABLE:function(e){e.$table.resetColumn({visible:!1,resizable:!0})},RESET_ALL:function(e){e.$table.resetColumn(!0)}};function c(e,t){var a=e.code,n=t.$table,r=t.columns,o=t.column,l=n.editConfig,E=n.mouseConfig,s=n.mouseOpts,c=n.fnrOpts;switch(a){case"CLEAR_SORT":e.disabled=!r.some(function(e){return e.sortable&&e.order});break;case"CLEAR_ALL_FILTER":e.disabled=!r.some(function(e){return e.filters&&e.filters.some(function(e){return e.checked})});break;case"CLEAR_ALL_MERGE":var i=n.getMergeCells(),u=n.getMergeFooterItems();e.disabled=!i.length&&!u.length;break;case"CLEAR_MERGE_CELL":u=f(t);e.disabled=!u.length;break;case"EDIT_ROW":e.disabled=!l||!r.some(function(e){return e.editRender});break;case"EDIT_CELL":case"CLEAR_CELL":case"CLEAR_ROW":case"COPY_CELL":case"CUT_CELL":case"PASTE_CELL":case"MERGE_OR_CLEAR":case"MERGE_CELL":case"REVERT_CELL":case"REVERT_ROW":case"INSERT_AT_ROW":case"INSERT_AT_ACTIVED_ROW":case"DELETE_ROW":case"SORT_ASC":case"SORT_DESC":case"CLEAR_FILTER":case"FILTER_CELL":case"EXPORT_ROW":case"OPEN_FIND":case"OPEN_REPLACE":case"HIDDEN_COLUMN":case"FIXED_LEFT_COLUMN":case"FIXED_RIGHT_COLUMN":case"CLEAR_FIXED_COLUMN":if(e.disabled=!o,o){var C=!!o.parentId;switch(a){case"SORT_ASC":case"SORT_DESC":e.disabled=!o.sortable;break;case"FILTER_CELL":case"CLEAR_FILTER":e.disabled=!o.filters||!o.filters.length,e.disabled||"CLEAR_FILTER"===a&&(e.disabled=!o.filters.some(function(e){return e.checked}));break;case"OPEN_FIND":e.disabled=!(c&&E&&s.area&&c.isFind);break;case"OPEN_REPLACE":e.disabled=!(c&&E&&s.area&&c.isReplace);break;case"EDIT_CELL":e.disabled=!l||!o.editRender;break;case"COPY_CELL":case"CUT_CELL":case"PASTE_CELL":var _=E&&s.area?n.getCellAreas():[];e.disabled=1<_.length,e.disabled||"PASTE_CELL"===a&&(R=n.$vxe.clipboard,e.disabled=!R||!R.text);break;case"MERGE_OR_CLEAR":case"MERGE_CELL":var R=E&&s.area?n.getCellAreas():[];e.disabled=!R.length||1===R.length&&1===R[0].rows.length&&1===R[0].cols.length||!function(e,t){for(var a=(e=e.$table).getTableData().visibleData,n=e.getTableColumn().visibleColumn,r={},o=0,l=t.length;o<l;o++)for(var E=t[o],s=E.rows,c=E.cols,i=0,u=s.length;i<u;i++)for(var C=s[i],_=a.indexOf(C),R=0,f=c.length;R<f;R++){var L=c[R],L=_+":"+n.indexOf(L);if(r[L])return;r[L]=!0}return 1}(t,R);break;case"FIXED_LEFT_COLUMN":e.disabled=C||"left"===o.fixed;break;case"FIXED_RIGHT_COLUMN":e.disabled=C||"right"===o.fixed;break;case"CLEAR_FIXED_COLUMN":e.disabled=C||!o.fixed}}}}function i(t){t.options.forEach(function(e){e.forEach(function(e){c(e,t),e.children&&e.children.forEach(function(e){c(e,t)})})})}function u(e){e&&e.copy&&(l=e.copy)}var C={setup:u,install:function(e,t){var a=e.interceptor,e=e.menus;window.XEClipboard&&(l=window.XEClipboard.copy),u(t),a.add("event.showMenu",i),e.mixin(s)}};e.VXETablePluginMenus=C,"undefined"!=typeof window&&window.VXETable&&window.VXETable.use&&window.VXETable.use(C),e.default=C});
!function(e,t){"function"==typeof define&&define.amd?define("vxe-table-plugin-menus",["exports","xe-utils"],t):"undefined"!=typeof exports?t(exports,require("xe-utils")):(t((t={exports:{}}).exports,e.XEUtils),e.VXETablePluginMenus=t.exports.default)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e,o){"use strict";var t,l;function a(a){return function(e){var t=e.$table,e=e.column;o.default.eachTree([e],function(e){e.fixed=a}),t.refreshColumn()}}function n(e,t){var a=e.$table,n=e.row,r=e.column;n&&r&&(e="",a.mouseConfig&&a.mouseOpts.area?e=(t?a.cutCellArea():a.copyCellArea()).text:(a=a.$vxe,e=o.default.toValueString(o.default.get(n,r.property)),a.clipboard={text:e}),o.default.isFunction(l)?l(e):console.warn("Copy function does not exist, copy to clipboard failed."))}function f(e){var e=e.$table,s=e.getTableData().visibleData,c=e.getTableColumn().visibleColumn,t=e.mouseConfig&&e.mouseOpts.area?e.getCellAreas():[];return e.getMergeCells().filter(function(e){var r=e.row,o=e.col,l=e.rowspan,E=e.colspan;return t.some(function(e){var t=e.rows,a=e.cols,n=s.indexOf(t[0]),e=s.indexOf(t[t.length-1]),t=c.indexOf(a[0]),a=c.indexOf(a[a.length-1]);return n<=r&&r+l-1<=e&&t<=o&&o+E-1<=a})})}function E(e){var t=e.$table,e=f(e);e.length&&t.removeMergeCells(e)}function r(e,t){console.warn('The code "'.concat(e,'" has been scrapped, please use "').concat(t,'"'))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.VXETablePluginMenus=void 0,o=(t=o)&&t.__esModule?t:{default:t};var s={CLEAR_CELL:function(e){var n=e.$table,t=e.row,a=e.column;t&&a&&(n.mouseConfig&&n.mouseOpts.area?(e=n.getCellAreas())&&e.length&&e.forEach(function(e){var a=e.rows;e.cols.forEach(function(t){a.forEach(function(e){n.clearData(e,t.property)})})}):n.clearData(t,a.property))},CLEAR_ROW:function(e){var t=e.$table,e=e.row;e&&t.clearData(e)},CLEAR_SELECTED_ROW:function(e){return r("CLEAR_SELECTED_ROW","CLEAR_CHECKBOX_ROW"),s.CLEAR_CHECKBOX_ROW(e)},CLEAR_CHECKBOX_ROW:function(e){e=e.$table;e.clearData(e.getCheckboxRecords())},CLEAR_ALL:function(e){e.$table.clearData()},REVERT_CELL:function(e){var n=e.$table,t=e.row,a=e.column;t&&a&&(n.mouseConfig&&n.mouseOpts.area?(e=n.getCellAreas())&&e.length&&e.forEach(function(e){var a=e.rows;e.cols.forEach(function(t){a.forEach(function(e){n.revertData(e,t.property)})})}):n.revertData(t,a.property))},REVERT_ROW:function(e){var t=e.$table,e=e.row;e&&t.revertData(e)},REVERT_SELECTED_ROW:function(e){return r("REVERT_SELECTED_ROW","REVERT_CHECKBOX_ROW"),s.REVERT_CHECKBOX_ROW(e)},REVERT_CHECKBOX_ROW:function(e){e=e.$table;e.revertData(e.getCheckboxRecords())},REVERT_ALL:function(e){e.$table.revertData()},COPY_CELL:function(e){n(e)},CUT_CELL:function(e){n(e,!0)},PASTE_CELL:function(e){var t=e.$table,a=e.row,e=e.column;t.mouseConfig&&t.mouseOpts.area?t.pasteCellArea():(t=t.$vxe.clipboard)&&t.text&&o.default.set(a,e.property,t.text)},MERGE_OR_CLEAR:function(e){var t=e.$table,a=t.getCellAreas(),e=f(e);e.length?t.removeMergeCells(e):t.setMergeCells(a.map(function(e){var t=e.rows,e=e.cols;return{row:t[0],col:e[0],rowspan:t.length,colspan:e.length}}))},MERGE_CELL:function(e){var t=e.$table,a=t.$vxe,n=a.modal,r=t.getTableData().visibleData,o=t.getTableColumn().visibleColumn,l=t.getCellAreas();E(e),l.some(function(e){var t=e.rows,e=e.cols;return t.length===r.length||e.length===o.length})?n&&n.message({content:a.t("vxe.pro.area.mergeErr"),status:"error",id:"operErr"}):t.setMergeCells(l.map(function(e){var t=e.rows,e=e.cols;return{row:t[0],col:e[0],rowspan:t.length,colspan:e.length}}))},CLEAR_MERGE_CELL:function(e){E(e)},CLEAR_ALL_MERGE:function(e){e=e.$table;e.clearMergeCells(),e.clearMergeFooterItems()},EDIT_CELL:function(e){var t=e.$table,a=e.row,e=e.column;t.setActiveCell(a,e.property)},EDIT_ROW:function(e){var t=e.$table,e=e.row;t.setActiveRow(e)},INSERT_ROW:function(e){var t=e.$table,e=e.menu;t.insert(e.params)},INSERT_ACTIVED_ROW:function(e){var t=e.$table,a=e.menu,n=e.column,r=a.params||[];t.insert(r[0]).then(function(e){e=e.row;return t.setActiveCell(e,r[1]||n.property)})},INSERT_AT_ROW:function(e){var t=e.$table,a=e.menu,e=e.row;e&&t.insertAt(a.params,e)},INSERT_AT_ACTIVED_ROW:function(e){var t,a=e.$table,n=e.menu,r=e.row,o=e.column;r&&(t=n.params||[],a.insertAt(t[0],r).then(function(e){e=e.row;return a.setActiveCell(e,t[1]||o.property)}))},DELETE_ROW:function(e){var t=e.$table,e=e.row;e&&t.remove(e)},DELETE_SELECTED_ROW:function(e){return r("DELETE_SELECTED_ROW","DELETE_CHECKBOX_ROW"),s.DELETE_CHECKBOX_ROW(e)},DELETE_CHECKBOX_ROW:function(e){e.$table.removeCheckboxRow()},DELETE_ALL:function(e){e.$table.remove()},CLEAR_SORT:function(e){e.$table.clearSort()},SORT_ASC:function(e){var t=e.$table,e=e.column;e&&t.sort(e.property,"asc")},SORT_DESC:function(e){var t=e.$table,e=e.column;e&&t.sort(e.property,"desc")},CLEAR_FILTER:function(e){var t=e.$table,e=e.column;e&&t.clearFilter(e)},CLEAR_ALL_FILTER:function(e){e.$table.clearFilter()},FILTER_CELL:function(e){var t=e.$table,a=e.row,n=e.column;a&&n&&(e=n.property,(n=n.filters).length&&((n=n[0]).data=o.default.get(a,e),n.checked=!0,t.updateData()))},EXPORT_ROW:function(e){var t=e.$table,a=e.menu,e=e.row;e&&(e={data:[e]},t.exportData(o.default.assign(e,a.params[0])))},EXPORT_SELECTED_ROW:function(e){return r("EXPORT_SELECTED_ROW","EXPORT_CHECKBOX_ROW"),s.EXPORT_CHECKBOX_ROW(e)},EXPORT_CHECKBOX_ROW:function(e){var t=e.$table,a=e.menu,e={data:t.getCheckboxRecords()};t.exportData(o.default.assign(e,a.params[0]))},EXPORT_ALL:function(e){var t=e.$table,e=e.menu;t.exportData(e.params)},PRINT_ALL:function(e){var t=e.$table,e=e.menu;t.print(e.params)},PRINT_SELECTED_ROW:function(e){return r("PRINT_SELECTED_ROW","PRINT_CHECKBOX_ROW"),s.PRINT_CHECKBOX_ROW(e)},PRINT_CHECKBOX_ROW:function(e){var t=e.$table,a=e.menu,e={data:t.getCheckboxRecords()};t.print(o.default.assign(e,a.params))},OPEN_FIND:function(e){e.$table.openFind()},OPEN_REPLACE:function(e){e.$table.openReplace()},HIDDEN_COLUMN:function(e){var t=e.$table,e=e.column;e&&t.hideColumn(e)},FIXED_LEFT_COLUMN:a("left"),FIXED_RIGHT_COLUMN:a("right"),CLEAR_FIXED_COLUMN:a(""),RESET_COLUMN:function(e){e.$table.resetColumn({visible:!0,resizable:!1})},RESET_RESIZABLE:function(e){e.$table.resetColumn({visible:!1,resizable:!0})},RESET_ALL:function(e){e.$table.resetColumn(!0)}};function c(e,t){var a=e.code,n=t.$table,r=t.columns,o=t.column,l=n.editConfig,E=n.mouseConfig,s=n.mouseOpts,c=n.fnrOpts;switch(a){case"CLEAR_SORT":e.disabled=!r.some(function(e){return e.sortable&&e.order});break;case"CLEAR_ALL_FILTER":e.disabled=!r.some(function(e){return e.filters&&e.filters.some(function(e){return e.checked})});break;case"CLEAR_ALL_MERGE":var i=n.getMergeCells(),u=n.getMergeFooterItems();e.disabled=!i.length&&!u.length;break;case"CLEAR_MERGE_CELL":u=f(t);e.disabled=!u.length;break;case"EDIT_ROW":e.disabled=!l||!r.some(function(e){return e.editRender});break;case"EDIT_CELL":case"CLEAR_CELL":case"CLEAR_ROW":case"COPY_CELL":case"CUT_CELL":case"PASTE_CELL":case"MERGE_OR_CLEAR":case"MERGE_CELL":case"REVERT_CELL":case"REVERT_ROW":case"INSERT_AT_ROW":case"INSERT_AT_ACTIVED_ROW":case"DELETE_ROW":case"SORT_ASC":case"SORT_DESC":case"CLEAR_FILTER":case"FILTER_CELL":case"EXPORT_ROW":case"OPEN_FIND":case"OPEN_REPLACE":case"HIDDEN_COLUMN":case"FIXED_LEFT_COLUMN":case"FIXED_RIGHT_COLUMN":case"CLEAR_FIXED_COLUMN":if(e.disabled=!o,o){var C=!!o.parentId;switch(a){case"SORT_ASC":case"SORT_DESC":e.disabled=!o.sortable;break;case"FILTER_CELL":case"CLEAR_FILTER":e.disabled=!o.filters||!o.filters.length,e.disabled||"CLEAR_FILTER"===a&&(e.disabled=!o.filters.some(function(e){return e.checked}));break;case"OPEN_FIND":e.disabled=!(c&&E&&s.area&&c.isFind);break;case"OPEN_REPLACE":e.disabled=!(c&&E&&s.area&&c.isReplace);break;case"EDIT_CELL":e.disabled=!l||!o.editRender;break;case"COPY_CELL":case"CUT_CELL":case"PASTE_CELL":var _=E&&s.area?n.getCellAreas():[];e.disabled=1<_.length,e.disabled||"PASTE_CELL"===a&&(R=n.$vxe.clipboard,e.disabled=!R||!R.text);break;case"MERGE_OR_CLEAR":case"MERGE_CELL":var R=E&&s.area?n.getCellAreas():[];e.disabled=!R.length||1===R.length&&1===R[0].rows.length&&1===R[0].cols.length||!function(e,t){for(var a=(e=e.$table).getTableData().visibleData,n=e.getTableColumn().visibleColumn,r={},o=0,l=t.length;o<l;o++)for(var E=t[o],s=E.rows,c=E.cols,i=0,u=s.length;i<u;i++)for(var C=s[i],_=a.indexOf(C),R=0,f=c.length;R<f;R++){var L=c[R],L=_+":"+n.indexOf(L);if(r[L])return;r[L]=!0}return 1}(t,R);break;case"FIXED_LEFT_COLUMN":e.disabled=C||"left"===o.fixed;break;case"FIXED_RIGHT_COLUMN":e.disabled=C||"right"===o.fixed;break;case"CLEAR_FIXED_COLUMN":e.disabled=C||!o.fixed}}}}function i(t){return t.options.forEach(function(e){e.forEach(function(e){c(e,t),e.children&&e.children.forEach(function(e){c(e,t)})})}),!0}function u(e){e&&e.copy&&(l=e.copy)}var C={setup:u,install:function(e,t){var a=e.interceptor,e=e.menus;window.XEClipboard&&(l=window.XEClipboard.copy),u(t),a.add("event.showMenu",i),e.mixin(s)}};e.VXETablePluginMenus=C,"undefined"!=typeof window&&window.VXETable&&window.VXETable.use&&window.VXETable.use(C),e.default=C});

@@ -10,3 +10,3 @@ import XEUtils from 'xe-utils'

Table
} from 'vxe-table/lib/vxe-table'
} from 'vxe-table'

@@ -34,3 +34,3 @@ let handleCopy: (content: string | number) => boolean

const { $vxe } = $table
text = XEUtils.toString(XEUtils.get(row, column.property))
text = XEUtils.toValueString(XEUtils.get(row, column.property))
// 操作内置剪贴板

@@ -269,3 +269,3 @@ $vxe.clipboard = { text }

if (modal) {
modal.message({ message: $vxe.t('vxe.pro.area.mergeErr'), status: 'error', id: 'operErr' })
modal.message({ content: $vxe.t('vxe.pro.area.mergeErr') as string, status: 'error', id: 'operErr' })
}

@@ -673,2 +673,3 @@ return

})
return true
}

@@ -675,0 +676,0 @@

{
"name": "vxe-table-plugin-menus",
"version": "1.6.1",
"version": "1.6.2",
"description": "基于 vxe-table 的表格插件,提供实用的快捷菜单集",

@@ -51,4 +51,4 @@ "scripts": {

"vue": "^2.6.12",
"vxe-table": "^3.2.4",
"xe-utils": "^3.1.11"
"vxe-table": "^3.3.0",
"xe-utils": "^3.2.1"
},

@@ -55,0 +55,0 @@ "peerDependencies": {

@@ -96,6 +96,6 @@ # vxe-table-plugin-menus

:edit-config="{trigger: 'click', mode: 'cell'}">
<vxe-table-column type="seq" 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-column type="seq" width="60"></vxe-column>
<vxe-column field="name" title="Name" :edit-render="{name: 'input'}"></vxe-column>
<vxe-column field="sex" title="sex" :edit-render="{name: 'input'}"></vxe-column>
<vxe-column field="age" title="Age" :edit-render="{name: 'input'}"></vxe-column>
</vxe-table>

@@ -102,0 +102,0 @@ ```

Sorry, the diff of this file is too big to display

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