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.
- package/dist/Config/columnFilter.d.ts +1 -1
- package/dist/VenusVirtTable/staticAttr.js +9 -15
- package/dist/VirtTable/src/Cell.d.ts +1 -0
- package/dist/VirtTable/src/Cell.js +1 -0
- package/dist/VirtTable/src/EventTable.js +7 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -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?: "
|
|
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
|
-
|
|
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
|
-
|
|
21
|
-
}
|
|
22
|
-
}
|
|
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
|
-
//
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
|
|
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";
|