venus-design 1.0.13 → 1.0.15

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
  };
@@ -1,5 +1,3 @@
1
- import "antd/es/radio/style";
2
- import _Radio from "antd/es/radio";
3
1
  import React from 'react';
4
2
  /**
5
3
  * 表格列的格式化
@@ -7,23 +5,19 @@ import React from 'react';
7
5
  export var VENUS_VIRT_TABLE_COLUMNRENDER_TYPE = {
8
6
  "renderName": function renderName(column, actions, tableRef) {
9
7
  return function (cell) {
8
+ // 点击单元格时,判断是否进入编辑框
9
+ cell.column.isEditMethod = function (e) {
10
+ var inText = e.target.closest('.cell-text');
11
+ return inText ? false : true;
12
+ };
10
13
  return /*#__PURE__*/React.createElement("div", {
11
- style: {
12
- width: "100%",
13
- height: "100%",
14
- paddingLeft: 6,
15
- paddingRight: 6
16
- }
17
- }, /*#__PURE__*/React.createElement(_Radio, {
18
- "data-radio-click": "true",
14
+ className: "task_name",
19
15
  onClick: function onClick(e) {
20
- return e.stopPropagation();
21
- } // ✅ 阻止冒泡
22
- }), /*#__PURE__*/React.createElement("span", {
16
+ console.log("弹出");
17
+ }
18
+ }, /*#__PURE__*/React.createElement("span", {
23
19
  className: "cell-text",
24
20
  style: {
25
- flex: 1,
26
- paddingLeft: 8,
27
21
  cursor: 'text'
28
22
  },
29
23
  onClick: function onClick(e) {
@@ -79,6 +79,7 @@ export default class Cell extends BaseCell {
79
79
  fieldId?: string;
80
80
  hoverIconEvent?: string;
81
81
  hoverIconReadonly?: boolean;
82
+ isEditMethod?: (e: MouseEvent) => boolean;
82
83
  private hoverIconList;
83
84
  constructor(ctx: Context, rowIndex: number, colIndex: number, x: number, y: number, width: number, height: number, column: Column, row: any, cellType?: CellType);
84
85
  setWidthHeight(width: number, height: number): void;
@@ -112,6 +112,7 @@ var Cell = /*#__PURE__*/function (_BaseCell) {
112
112
  // 新增
113
113
  _defineProperty(_assertThisInitialized(_this), "hoverIconReadonly", false);
114
114
  // 新增
115
+ _defineProperty(_assertThisInitialized(_this), "isEditMethod", void 0);
115
116
  // 记录每个图标的位置信息,绘制用
116
117
  _defineProperty(_assertThisInitialized(_this), "hoverIconList", []);
117
118
  _this.visibleWidth = _this.width;
@@ -75,10 +75,13 @@ var EventTable = /*#__PURE__*/function () {
75
75
  });
76
76
  _this.handleBodyEvent(x, y, _this.ctx.body.renderRows, function (cell) {
77
77
  if (!cell) return;
78
- // ✅ 判断是否是 Radio 区域
79
- var target = e.target;
80
- if (target.closest('[data-radio-click]')) {
81
- return; // ✅ 是 Radio 区域,跳过编辑
78
+ // 点击源判断
79
+ //@ts-ignore
80
+ if (cell.column.isEditMethod) {
81
+ //@ts-ignore
82
+ if (cell.column.isEditMethod(e)) {
83
+ return;
84
+ }
82
85
  }
83
86
  _this.ctx.setFocusCell(cell);
84
87
  _this.ctx.emit('cellMousedown', cell, e);
package/dist/index.d.ts CHANGED
@@ -85,3 +85,4 @@ export { default as Cell } from './VirtTable/src/Cell';
85
85
  export { default as Config } from './VirtTable/src/Config';
86
86
  export { createUltimateSearch } from './Config/columnFilter';
87
87
  export { default as VenusEditor } from './VenusEditor';
88
+ export { addRenderVirtFunction } from './VenusVirtTable/staticAttr';
package/dist/index.js CHANGED
@@ -87,4 +87,5 @@ export { default as VenusVirtTable } from "./VenusVirtTable";
87
87
  export { default as Cell } from "./VirtTable/src/Cell";
88
88
  export { default as Config } from "./VirtTable/src/Config";
89
89
  export { createUltimateSearch } from "./Config/columnFilter";
90
- export { default as VenusEditor } from "./VenusEditor";
90
+ export { default as VenusEditor } from "./VenusEditor";
91
+ export { addRenderVirtFunction } from "./VenusVirtTable/staticAttr";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venus-design",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "venus all compoments",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",