@nokecy/qc-ui 0.0.5 → 0.0.7
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.
|
@@ -127,8 +127,7 @@ function AgGridPlus(props) {
|
|
|
127
127
|
|
|
128
128
|
var defaultColDef = {
|
|
129
129
|
resizable: true,
|
|
130
|
-
sortable: true
|
|
131
|
-
flex: 1
|
|
130
|
+
sortable: true
|
|
132
131
|
};
|
|
133
132
|
(0, _react.useEffect)(function () {
|
|
134
133
|
if (ready && request) {
|
|
@@ -252,6 +251,23 @@ function AgGridPlus(props) {
|
|
|
252
251
|
sortChanged(event.columnApi);
|
|
253
252
|
},
|
|
254
253
|
columnTypes: {
|
|
254
|
+
bool: {
|
|
255
|
+
cellRenderer: function cellRenderer(params) {
|
|
256
|
+
switch (params.value) {
|
|
257
|
+
case true:
|
|
258
|
+
case "0":
|
|
259
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
260
|
+
color: "success"
|
|
261
|
+
}, "\u662F");
|
|
262
|
+
|
|
263
|
+
case false:
|
|
264
|
+
case "1":
|
|
265
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
266
|
+
color: "error"
|
|
267
|
+
}, "\u5426");
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
255
271
|
numberColumn: {
|
|
256
272
|
width: 130,
|
|
257
273
|
filter: 'agNumberColumnFilter'
|
|
@@ -25,7 +25,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
25
25
|
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; }
|
|
26
26
|
|
|
27
27
|
import { AgGridReact } from 'ag-grid-react';
|
|
28
|
-
import { Spin, Pagination, Card } from 'antd';
|
|
28
|
+
import { Spin, Pagination, Card, Tag } from 'antd';
|
|
29
29
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
30
30
|
import GridManage from "./gridManager";
|
|
31
31
|
import "ag-grid-enterprise";
|
|
@@ -100,8 +100,7 @@ function AgGridPlus(props) {
|
|
|
100
100
|
|
|
101
101
|
var defaultColDef = {
|
|
102
102
|
resizable: true,
|
|
103
|
-
sortable: true
|
|
104
|
-
flex: 1
|
|
103
|
+
sortable: true
|
|
105
104
|
};
|
|
106
105
|
useEffect(function () {
|
|
107
106
|
if (ready && request) {
|
|
@@ -225,6 +224,23 @@ function AgGridPlus(props) {
|
|
|
225
224
|
sortChanged(event.columnApi);
|
|
226
225
|
},
|
|
227
226
|
columnTypes: {
|
|
227
|
+
bool: {
|
|
228
|
+
cellRenderer: function cellRenderer(params) {
|
|
229
|
+
switch (params.value) {
|
|
230
|
+
case true:
|
|
231
|
+
case "0":
|
|
232
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
233
|
+
color: "success"
|
|
234
|
+
}, "\u662F");
|
|
235
|
+
|
|
236
|
+
case false:
|
|
237
|
+
case "1":
|
|
238
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
239
|
+
color: "error"
|
|
240
|
+
}, "\u5426");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
228
244
|
numberColumn: {
|
|
229
245
|
width: 130,
|
|
230
246
|
filter: 'agNumberColumnFilter'
|