venus-design 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,7 @@ export interface UltimateSearchProps<T> {
55
55
  export declare const createUltimateSearchNews: <T extends Record<string, any>>(config: UltimateSearchProps<T>) => ProColumns<T>;
56
56
  export declare const createUltimateSearch: <T extends Record<string, any>>(column: ProColumns<T>, dataIndex?: string, title?: string, socketSearch?: boolean, searchType?: 'flat' | 'tree', showHistory?: boolean, theme?: ThemeType) => ProColumns<T>;
57
57
  declare const _default: {
58
- createUltimateSearch: <T extends Record<string, any>>(column: ProColumns<T>, dataIndex?: string, title?: string | undefined, socketSearch?: boolean, searchType?: "tree" | "flat", showHistory?: boolean, theme?: ThemeType) => ProColumns<T>;
58
+ createUltimateSearch: <T extends Record<string, any>>(column: ProColumns<T>, dataIndex?: string, title?: string | undefined, socketSearch?: boolean, searchType?: "flat" | "tree", showHistory?: boolean, theme?: ThemeType) => ProColumns<T>;
59
59
  createUltimateFilter: ({ dataIndex, title, dataSource, options, showSearch, showHistory, theme }: UltimateFilterProps) => Partial<ColumnType<any>>;
60
60
  createUltimateSearchNews: <T_1 extends Record<string, any>>(config: UltimateSearchProps<T_1>) => ProColumns<T_1>;
61
61
  };
@@ -311,6 +311,9 @@ var Config = /*#__PURE__*/function () {
311
311
  _defineProperty(this, "TOOLTIP_CUSTOM_STYLE", {});
312
312
  /** 自定义右键菜单 */
313
313
  _defineProperty(this, "CONTEXT_MENU", [{
314
+ label: '编辑',
315
+ value: 'edit'
316
+ }, {
314
317
  label: '复制',
315
318
  value: 'copy'
316
319
  }, {
@@ -323,7 +326,7 @@ var Config = /*#__PURE__*/function () {
323
326
  label: '清空选中内容',
324
327
  value: 'clearSelected'
325
328
  }, {
326
- label: '删除行',
329
+ label: '删除',
327
330
  value: 'deleteRow'
328
331
  } // ← 新增
329
332
  ]);
@@ -97,6 +97,12 @@ var ContextMenu = /*#__PURE__*/function () {
97
97
  var CONTEXT_MENU = this.ctx.config.CONTEXT_MENU;
98
98
  this.createContextMenuItems(CONTEXT_MENU, function (item) {
99
99
  switch (item.value) {
100
+ case 'edit':
101
+ var cellEdit = _this2.ctx.contextMenuCell;
102
+ if (!cellEdit) return;
103
+ var rowEditData = _this2.ctx.database.getRowDataItemForRowKey(cellEdit.rowKey);
104
+ _this2.ctx.emit('rowEdit', rowEditData, cellEdit);
105
+ break;
100
106
  case 'copy':
101
107
  _this2.ctx.emit('contextMenuCopy');
102
108
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-design",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",