@nokecy/qc-ui 0.6.4 → 0.6.5
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.
|
@@ -112,29 +112,34 @@ function AgGridPlus(props) {
|
|
|
112
112
|
return {
|
|
113
113
|
resizable: true,
|
|
114
114
|
sortable: true,
|
|
115
|
+
suppressHeaderFilterButton: true,
|
|
116
|
+
suppressFillHandle: true,
|
|
115
117
|
headerComponentParams: {
|
|
116
118
|
template: '<div class="ag-cell-label-container" role="presentation">' +
|
|
117
|
-
// '<span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button"></span>'+
|
|
118
|
-
|
|
119
|
-
'<div data-ref="eLabel" class="ag-header-cell-label" role="presentation">' + '<span data-ref="eText" class="ag-header-cell-text" role="columnheader"></span>' + '<span data-ref="eFilter" class="ag-header-icon ag-filter-icon"></span>' + '<span data-ref="eSortOrder" class="ag-header-icon ag-sort-order"></span>' + '<span data-ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon"></span>' + '<span data-ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon"></span>' + '<span data-ref="eSortNone" class="ag-header-icon ag-sort-none-icon"></span>' + '</div>' + '</div>'
|
|
119
|
+
// '<span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button"></span>' +
|
|
120
|
+
'<span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button"></span>' + '<div data-ref="eLabel" class="ag-header-cell-label" role="presentation">' + '<span data-ref="eText" class="ag-header-cell-text" role="columnheader"></span>' + '<span data-ref="eFilter" class="ag-header-icon ag-filter-icon"></span>' + '<span data-ref="eSortOrder" class="ag-header-icon ag-sort-order"></span>' + '<span data-ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon"></span>' + '<span data-ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon"></span>' + '<span data-ref="eSortNone" class="ag-header-icon ag-sort-none-icon"></span>' + '</div>' + '</div>'
|
|
120
121
|
}
|
|
121
122
|
};
|
|
122
123
|
}, []);
|
|
123
124
|
var columnTypes = (0, _react.useMemo)(function () {
|
|
124
125
|
return {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
126
|
+
bool: {
|
|
127
|
+
filter: 'boolFilter',
|
|
128
|
+
cellRenderer: function cellRenderer(params) {
|
|
129
|
+
switch (params.value) {
|
|
130
|
+
case true:
|
|
131
|
+
case "0":
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
133
|
+
color: "success"
|
|
134
|
+
}, "\u662F");
|
|
135
|
+
case false:
|
|
136
|
+
case "1":
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
138
|
+
color: "error"
|
|
139
|
+
}, "\u5426");
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
138
143
|
numberColumn: {
|
|
139
144
|
width: 130,
|
|
140
145
|
filter: 'agNumberColumnFilter'
|
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
18
|
import { AgGridReact } from 'ag-grid-react';
|
|
19
|
-
import { Spin, Pagination, Card } from 'antd';
|
|
19
|
+
import { Spin, Pagination, Card, Tag } from 'antd';
|
|
20
20
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
21
21
|
import "ag-grid-enterprise";
|
|
22
22
|
import "./index.less";
|
|
@@ -103,29 +103,34 @@ function AgGridPlus(props) {
|
|
|
103
103
|
return {
|
|
104
104
|
resizable: true,
|
|
105
105
|
sortable: true,
|
|
106
|
+
suppressHeaderFilterButton: true,
|
|
107
|
+
suppressFillHandle: true,
|
|
106
108
|
headerComponentParams: {
|
|
107
109
|
template: '<div class="ag-cell-label-container" role="presentation">' +
|
|
108
|
-
// '<span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button"></span>'+
|
|
109
|
-
|
|
110
|
-
'<div data-ref="eLabel" class="ag-header-cell-label" role="presentation">' + '<span data-ref="eText" class="ag-header-cell-text" role="columnheader"></span>' + '<span data-ref="eFilter" class="ag-header-icon ag-filter-icon"></span>' + '<span data-ref="eSortOrder" class="ag-header-icon ag-sort-order"></span>' + '<span data-ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon"></span>' + '<span data-ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon"></span>' + '<span data-ref="eSortNone" class="ag-header-icon ag-sort-none-icon"></span>' + '</div>' + '</div>'
|
|
110
|
+
// '<span data-ref="eMenu" class="ag-header-icon ag-header-cell-menu-button"></span>' +
|
|
111
|
+
'<span data-ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button"></span>' + '<div data-ref="eLabel" class="ag-header-cell-label" role="presentation">' + '<span data-ref="eText" class="ag-header-cell-text" role="columnheader"></span>' + '<span data-ref="eFilter" class="ag-header-icon ag-filter-icon"></span>' + '<span data-ref="eSortOrder" class="ag-header-icon ag-sort-order"></span>' + '<span data-ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon"></span>' + '<span data-ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon"></span>' + '<span data-ref="eSortNone" class="ag-header-icon ag-sort-none-icon"></span>' + '</div>' + '</div>'
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
114
|
}, []);
|
|
114
115
|
var columnTypes = useMemo(function () {
|
|
115
116
|
return {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
117
|
+
bool: {
|
|
118
|
+
filter: 'boolFilter',
|
|
119
|
+
cellRenderer: function cellRenderer(params) {
|
|
120
|
+
switch (params.value) {
|
|
121
|
+
case true:
|
|
122
|
+
case "0":
|
|
123
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
124
|
+
color: "success"
|
|
125
|
+
}, "\u662F");
|
|
126
|
+
case false:
|
|
127
|
+
case "1":
|
|
128
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
129
|
+
color: "error"
|
|
130
|
+
}, "\u5426");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
129
134
|
numberColumn: {
|
|
130
135
|
width: 130,
|
|
131
136
|
filter: 'agNumberColumnFilter'
|