@nokecy/qc-ui-components 2.0.0-beta.3 → 2.0.0-beta.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.
- package/dist/cjs/array-table/index.js +4 -1
- package/dist/cjs/array-table/rowFeedback.d.ts +14 -6
- package/dist/cjs/array-table/rowFeedback.js +67 -12
- package/dist/cjs/array-table/theme.d.ts +1 -1
- package/dist/cjs/array-table/theme.js +1 -1
- package/dist/esm/array-table/index.js +4 -1
- package/dist/esm/array-table/rowFeedback.d.ts +14 -6
- package/dist/esm/array-table/rowFeedback.js +67 -12
- package/dist/esm/array-table/theme.d.ts +1 -1
- package/dist/esm/array-table/theme.js +1 -1
- package/package.json +1 -1
|
@@ -128,8 +128,11 @@ var ArrayTableInner = (0, _formilyReact.observer)(function (props) {
|
|
|
128
128
|
var _useFeedbackRows = (0, _rowFeedback.useFeedbackRows)(field, _formilyAntd.FormLayout.useFormLayout().feedbackLayout),
|
|
129
129
|
feedbackRowsRef = _useFeedbackRows.rowsRef,
|
|
130
130
|
feedbackSignature = _useFeedbackRows.signature;
|
|
131
|
+
// 修复:用行下标(node.rowIndex)判定出错行,而非 rowData 对象引用。
|
|
132
|
+
// formily observable 数组 slice 后,getRowHeight 拿到的 rowData 元素与 useFeedbackRows 里取到的表单值元素不是同一引用,
|
|
133
|
+
// 用对象引用 has() 会恒为 false,导致出错行不撑高、校验浮层溢出遮挡下一行/合计行。@author nokecy
|
|
131
134
|
var getRowHeight = (0, _react.useCallback)(function (params) {
|
|
132
|
-
return params.
|
|
135
|
+
return params.node != null && feedbackRowsRef.current.has(params.node.rowIndex) ? rowHeight + _rowFeedback.ROW_FEEDBACK_EXTRA_HEIGHT : rowHeight;
|
|
133
136
|
}, [rowHeight]);
|
|
134
137
|
var isAutoHeight = height === 'auto';
|
|
135
138
|
var autoGridHeight = isAutoHeight ? (0, _autoHeight.calcAutoGridHeight)({
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import type { ArrayField } from '@nokecy/formily-core';
|
|
3
3
|
/**
|
|
4
4
|
* 默认(loose)反馈布局下,单元格里的校验错误文字画在输入框下方;行高只放得下输入框,
|
|
5
|
-
*
|
|
5
|
+
* 错误文字改为浮在输入框下方的浮层(见 theme.ts),不占行高,出错/改对时行高不变,避免视觉跳动。
|
|
6
|
+
* 保留本常量(0)以便 getRowHeight / autoHeight 统一计算。
|
|
6
7
|
*/
|
|
7
|
-
export declare const ROW_FEEDBACK_EXTRA_HEIGHT =
|
|
8
|
+
export declare const ROW_FEEDBACK_EXTRA_HEIGHT = 0;
|
|
8
9
|
/**
|
|
9
10
|
* 找出当前有「行内错误文字」的行:返回这些行的数据对象(与 AG-Grid rowData 里的元素同一引用)。
|
|
10
11
|
*
|
|
@@ -13,14 +14,21 @@ export declare const ROW_FEEDBACK_EXTRA_HEIGHT = 24;
|
|
|
13
14
|
* 渲染期读它会让组件订阅字段表,每创建一个字段就重渲一次。请用 useFeedbackRows。@author nokecy
|
|
14
15
|
*/
|
|
15
16
|
export declare const collectFeedbackRows: (arrayField: ArrayField, defaultLayout?: string) => Set<object>;
|
|
17
|
+
/**
|
|
18
|
+
* 与 collectFeedbackRows 同源,但返回「有行内错误文字的行的下标」(Set<number>) 而非行对象引用。
|
|
19
|
+
* 渲染期之外读反馈会订阅整张字段表(见 collectFeedbackRows),这里只供 useFeedbackRows 在事件驱动后重算。
|
|
20
|
+
* 用下标而非对象引用,是为了避开 formily observable 数组 slice 后元素引用不一致导致撑高判空的问题
|
|
21
|
+
* (getRowHeight 拿到的 rowData 元素与这里取到的不是同一引用)。@author nokecy
|
|
22
|
+
*/
|
|
23
|
+
export declare const collectFeedbackIndexes: (arrayField: ArrayField, defaultLayout?: string) => Set<number>;
|
|
16
24
|
/**
|
|
17
25
|
* 订阅数组下字段的校验反馈,返回「有行内错误文字的行」。
|
|
18
26
|
*
|
|
19
|
-
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily
|
|
20
|
-
*
|
|
21
|
-
* signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
27
|
+
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily 事件:字段校验成功/失败、表单校验结束、
|
|
28
|
+
* 提交校验结束、字段值变化、字段卸载(删行)、表单重置时,合并成一次(下一个宏任务)重算;行集合变化才触发重渲。
|
|
29
|
+
* rows 供 AG-Grid 的 getRowHeight 同步读取,signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
22
30
|
*/
|
|
23
31
|
export declare const useFeedbackRows: (arrayField: ArrayField, defaultLayout?: string) => {
|
|
24
|
-
rowsRef: import("react").RefObject<Set<
|
|
32
|
+
rowsRef: import("react").RefObject<Set<number>>;
|
|
25
33
|
signature: string;
|
|
26
34
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useFeedbackRows = exports.collectFeedbackRows = exports.ROW_FEEDBACK_EXTRA_HEIGHT = void 0;
|
|
6
|
+
exports.useFeedbackRows = exports.collectFeedbackRows = exports.collectFeedbackIndexes = exports.ROW_FEEDBACK_EXTRA_HEIGHT = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _formilyCore = require("@nokecy/formily-core");
|
|
9
9
|
var _uniqueId = _interopRequireDefault(require("lodash/uniqueId"));
|
|
@@ -18,12 +18,19 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
18
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19
19
|
/**
|
|
20
20
|
* 默认(loose)反馈布局下,单元格里的校验错误文字画在输入框下方;行高只放得下输入框,
|
|
21
|
-
*
|
|
21
|
+
* 错误文字改为浮在输入框下方的浮层(见 theme.ts),不占行高,出错/改对时行高不变,避免视觉跳动。
|
|
22
|
+
* 保留本常量(0)以便 getRowHeight / autoHeight 统一计算。
|
|
22
23
|
*/
|
|
23
|
-
var ROW_FEEDBACK_EXTRA_HEIGHT = exports.ROW_FEEDBACK_EXTRA_HEIGHT =
|
|
24
|
+
var ROW_FEEDBACK_EXTRA_HEIGHT = exports.ROW_FEEDBACK_EXTRA_HEIGHT = 0;
|
|
24
25
|
|
|
25
|
-
/**
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* 这些反馈布局的错误不占行内位置(浮层 / 不显示),不需要撑高行。
|
|
28
|
+
* 注意:不含 terse。ArrayTable 的主题把 .ant-formily-item-help 钉在输入框正下方(见 theme.ts),
|
|
29
|
+
* terse 的紧凑提示在格内同样是「浮在输入框下沿」的行内文字,focusFirstError 聚焦后会显示并超出行底;
|
|
30
|
+
* 若把 terse 当浮层过滤,feedbackSignature 会恒为空、出错行永远不撑高,校验提示就会溢出遮挡下一行/合计行。
|
|
31
|
+
* @author nokecy
|
|
32
|
+
*/
|
|
33
|
+
var OUT_OF_FLOW_LAYOUTS = new Set(['popover', 'none']);
|
|
27
34
|
|
|
28
35
|
/**
|
|
29
36
|
* 找出当前有「行内错误文字」的行:返回这些行的数据对象(与 AG-Grid rowData 里的元素同一引用)。
|
|
@@ -63,12 +70,48 @@ var collectFeedbackRows = exports.collectFeedbackRows = function collectFeedback
|
|
|
63
70
|
return rows;
|
|
64
71
|
};
|
|
65
72
|
|
|
73
|
+
/**
|
|
74
|
+
* 与 collectFeedbackRows 同源,但返回「有行内错误文字的行的下标」(Set<number>) 而非行对象引用。
|
|
75
|
+
* 渲染期之外读反馈会订阅整张字段表(见 collectFeedbackRows),这里只供 useFeedbackRows 在事件驱动后重算。
|
|
76
|
+
* 用下标而非对象引用,是为了避开 formily observable 数组 slice 后元素引用不一致导致撑高判空的问题
|
|
77
|
+
* (getRowHeight 拿到的 rowData 元素与这里取到的不是同一引用)。@author nokecy
|
|
78
|
+
*/
|
|
79
|
+
var collectFeedbackIndexes = exports.collectFeedbackIndexes = function collectFeedbackIndexes(arrayField, defaultLayout) {
|
|
80
|
+
var indexes = new Set();
|
|
81
|
+
var form = arrayField === null || arrayField === void 0 ? void 0 : arrayField.form;
|
|
82
|
+
var value = arrayField === null || arrayField === void 0 ? void 0 : arrayField.value;
|
|
83
|
+
if (!form || !Array.isArray(value)) return indexes;
|
|
84
|
+
var base = arrayField.address.toString();
|
|
85
|
+
var baseLength = arrayField.path.length;
|
|
86
|
+
var _iterator2 = _createForOfIteratorHelper(form.queryFeedbacks({
|
|
87
|
+
type: 'error',
|
|
88
|
+
address: "".concat(base, ".*")
|
|
89
|
+
})),
|
|
90
|
+
_step2;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
93
|
+
var _feedback$path$segmen2, _feedback$path4, _feedback$path5, _feedback$path5$toStr, _feedback$path6, _form$query$take$deco2, _form$query$take2;
|
|
94
|
+
var feedback = _step2.value;
|
|
95
|
+
var index = Number((_feedback$path$segmen2 = (_feedback$path4 = feedback.path) === null || _feedback$path4 === void 0 || (_feedback$path4 = _feedback$path4.segments) === null || _feedback$path4 === void 0 ? void 0 : _feedback$path4[baseLength]) !== null && _feedback$path$segmen2 !== void 0 ? _feedback$path$segmen2 : (_feedback$path5 = feedback.path) === null || _feedback$path5 === void 0 || (_feedback$path5$toStr = (_feedback$path6 = _feedback$path5).toString) === null || _feedback$path5$toStr === void 0 ? void 0 : _feedback$path5$toStr.call(_feedback$path6).split('.')[baseLength]);
|
|
96
|
+
if (!Number.isInteger(index)) continue;
|
|
97
|
+
var layout = (_form$query$take$deco2 = (_form$query$take2 = form.query(feedback.address).take()) === null || _form$query$take2 === void 0 || (_form$query$take2 = _form$query$take2.decoratorProps) === null || _form$query$take2 === void 0 ? void 0 : _form$query$take2.feedbackLayout) !== null && _form$query$take$deco2 !== void 0 ? _form$query$take$deco2 : defaultLayout;
|
|
98
|
+
if (OUT_OF_FLOW_LAYOUTS.has(layout)) continue;
|
|
99
|
+
indexes.add(index);
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_iterator2.e(err);
|
|
103
|
+
} finally {
|
|
104
|
+
_iterator2.f();
|
|
105
|
+
}
|
|
106
|
+
return indexes;
|
|
107
|
+
};
|
|
108
|
+
|
|
66
109
|
/**
|
|
67
110
|
* 订阅数组下字段的校验反馈,返回「有行内错误文字的行」。
|
|
68
111
|
*
|
|
69
|
-
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily
|
|
70
|
-
*
|
|
71
|
-
* signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
112
|
+
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily 事件:字段校验成功/失败、表单校验结束、
|
|
113
|
+
* 提交校验结束、字段值变化、字段卸载(删行)、表单重置时,合并成一次(下一个宏任务)重算;行集合变化才触发重渲。
|
|
114
|
+
* rows 供 AG-Grid 的 getRowHeight 同步读取,signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
72
115
|
*/
|
|
73
116
|
var useFeedbackRows = exports.useFeedbackRows = function useFeedbackRows(arrayField, defaultLayout) {
|
|
74
117
|
var rowsRef = (0, _react.useRef)(new Set());
|
|
@@ -86,19 +129,31 @@ var useFeedbackRows = exports.useFeedbackRows = function useFeedbackRows(arrayFi
|
|
|
86
129
|
if (timer !== undefined) clearTimeout(timer);
|
|
87
130
|
timer = setTimeout(function () {
|
|
88
131
|
timer = undefined;
|
|
89
|
-
|
|
90
|
-
|
|
132
|
+
// 用下标集合(而非对象引用)判定出错行:formily observable 数组 slice 后,rowData 元素与表单值元素引用不一致,
|
|
133
|
+
// 以对象引用做 has 判定会落空,导致出错行不撑高、校验浮层溢出遮挡下一行。@author nokecy
|
|
134
|
+
var indexes = collectFeedbackIndexes(arrayField, defaultLayout);
|
|
135
|
+
rowsRef.current = indexes;
|
|
91
136
|
var value = Array.isArray(arrayField.value) ? arrayField.value : [];
|
|
92
|
-
var next = value.flatMap(function (
|
|
93
|
-
return
|
|
137
|
+
var next = value.flatMap(function (_, index) {
|
|
138
|
+
return indexes.has(index) ? [index] : [];
|
|
94
139
|
}).join(',');
|
|
95
140
|
setSignature(function (prev) {
|
|
96
141
|
return prev === next ? prev : next;
|
|
97
142
|
});
|
|
98
143
|
}, 0);
|
|
99
144
|
};
|
|
145
|
+
// formily-core 的 batchValidate/validateSelf 只发 ON_FIELD_VALIDATE_SUCCESS/FAILED,
|
|
146
|
+
// ON_FIELD_VALIDATE_END / ON_FORM_VALIDATE_END 在 core 里从未 notify(是死事件),
|
|
147
|
+
// 只订阅它会让 feedbackSignature 永远不变、出错行永远不撑高。这里订阅实际会触发的
|
|
148
|
+
// 成功/失败事件,并补上表单提交校验结束、字段值变化(用户改对后回收行高)作兜底。@author nokecy
|
|
100
149
|
form.addEffects(id, function () {
|
|
150
|
+
(0, _formilyCore.onFieldValidateFailed)(pattern, refresh);
|
|
151
|
+
(0, _formilyCore.onFieldValidateSuccess)(pattern, refresh);
|
|
101
152
|
(0, _formilyCore.onFieldValidateEnd)(pattern, refresh);
|
|
153
|
+
(0, _formilyCore.onFormValidateFailed)(refresh);
|
|
154
|
+
(0, _formilyCore.onFormValidateSuccess)(refresh);
|
|
155
|
+
(0, _formilyCore.onFormSubmitValidateEnd)(refresh);
|
|
156
|
+
(0, _formilyCore.onFieldValueChange)(pattern, refresh);
|
|
102
157
|
(0, _formilyCore.onFieldUnmount)(pattern, refresh);
|
|
103
158
|
(0, _formilyCore.onFormReset)(refresh);
|
|
104
159
|
});
|
|
@@ -34,7 +34,7 @@ export declare const ARRAY_TABLE_FEEDBACK_CLASS = "ag-array-table-has-feedback";
|
|
|
34
34
|
* - 错误文字单行显示、超出列宽省略,出错行只多留一行的高度(ROW_FEEDBACK_EXTRA_HEIGHT);
|
|
35
35
|
* - 错误提示文字移出文档流(位置仍在输入框下方),出错时输入框不会被挤得上下跳。
|
|
36
36
|
*/
|
|
37
|
-
export declare const ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .ag-array-table-has-feedback & .ag-cell .ag-cell-wrapper,\n &.ag-array-table-has-feedback .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: 20px !important; line-height: 18px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ";
|
|
37
|
+
export declare const ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .ag-array-table-has-feedback & .ag-cell .ag-cell-wrapper,\n &.ag-array-table-has-feedback .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: 20px !important; line-height: 18px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u9519\u8BEF\u6587\u5B57\u662F\u6D6E\u5728\u8F93\u5165\u6846\u4E0B\u65B9\u7684\u6D6E\u5C42\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1A\u683C\u5B50\u4E0E\u6240\u5728\u884C\u653E\u5F00\u88C1\u526A\u5E76\u62AC\u9AD8\u5C42\u7EA7\uFF0C\u76D6\u5728\u4E0B\u4E00\u884C\u4E4B\u4E0A\uFF0C\u884C\u9AD8\u6052\u5B9A\u4E0D\u8DF3\u52A8\u3002@author nokecy */\n .ag-cell:has(.ant-formily-item-help) { overflow: visible !important; z-index: 6; }\n .ag-row:has(.ant-formily-item-help) { z-index: 6; }\n .ag-cell .ant-formily-item-help { z-index: 6; box-shadow: 0 2px 6px rgb(0 0 0 / 12%); background: var(--ant-color-bg-container, #fff); }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n /* \u5408\u8BA1\u884C\u6D6E\u5C42\u7684\u56FA\u5B9A\u5217\u5BF9\u9F50\uFF1AAG-Grid \u7ED9 .ag-floating-bottom \u52A0\u4E86\u5185\u8054 overflow-y:scroll\uFF0C\n \u4F1A\u4E3A\u300C\u6D6E\u5C42\u81EA\u5DF1\u300D\u9884\u7559\u4E00\u6761\u5782\u76F4\u6EDA\u52A8\u6761(\u5BBD\u5EA6=\u6EDA\u52A8\u6761\u5BBD)\u3002\u4F46\u6D6E\u5C42\u5185\u7684 center viewport \u5DF2\u7ECF\u6309 body\n \u6263\u6389\u8FC7\u4E00\u6B21\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u53F3\u56FA\u5B9A\u5217\u518D\u88AB\u6324\u5DE6\u4E00\u4E2A\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u4E8E\u662F\u5408\u8BA1\u884C\u7684\u53F3\u56FA\u5B9A\u5217\u76F8\u5BF9\u660E\u7EC6\u884C\u6574\u4F53\u5DE6\u504F\n (\u5B9E\u6D4B 8px)\uFF0C\u770B\u8D77\u6765\u300C\u56FA\u5B9A\u5217\u4E0D\u5BF9\u9F50\u300D\u3002\u5408\u8BA1\u884C\u6C38\u8FDC\u53EA\u6709\u4E00\u884C\u3001\u4E0D\u9700\u8981\u7EB5\u5411\u6EDA\u52A8\uFF0C\u53BB\u6389\u8FD9\u6761\u591A\u4F59\u6EDA\u52A8\u6761\u5373\u53EF\uFF0C\n \u4E0D\u5199\u6B7B\u50CF\u7D20\uFF0C\u6EDA\u52A8\u6761\u5BBD\u5EA6\u56E0\u5E73\u53F0/\u6D4F\u89C8\u5668\u800C\u5F02\u65F6\u540C\u6837\u6210\u7ACB\u3002@author nokecy */\n .ag-floating-bottom { overflow-y: hidden !important; }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ";
|
|
38
38
|
export declare const arrayTableCellFit: import("ag-grid-community").Part<{}>;
|
|
39
39
|
/** 根据当前 antd 主题与 Provider 密度生成编辑态或阅读态明细表格主题。@author nokecy */
|
|
40
40
|
export declare function useArrayTableTheme(editable?: boolean): import("ag-grid-community").Theme<import("ag-grid-community").CoreParams & import("ag-grid-community").ButtonStyleParams & import("ag-grid-community").CheckboxStyleParams & import("ag-grid-community").TabStyleParams & import("ag-grid-community").InputStyleParams & {}>;
|
|
@@ -69,7 +69,7 @@ var ARRAY_TABLE_FEEDBACK_CLASS = exports.ARRAY_TABLE_FEEDBACK_CLASS = 'ag-array-
|
|
|
69
69
|
* - 错误文字单行显示、超出列宽省略,出错行只多留一行的高度(ROW_FEEDBACK_EXTRA_HEIGHT);
|
|
70
70
|
* - 错误提示文字移出文档流(位置仍在输入框下方),出错时输入框不会被挤得上下跳。
|
|
71
71
|
*/
|
|
72
|
-
var ARRAY_TABLE_CELL_FIT_CSS = exports.ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .".concat(ARRAY_TABLE_FEEDBACK_CLASS, " & .ag-cell .ag-cell-wrapper,\n &.").concat(ARRAY_TABLE_FEEDBACK_CLASS, " .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT, "px !important; line-height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT - 2, "px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ");
|
|
72
|
+
var ARRAY_TABLE_CELL_FIT_CSS = exports.ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .".concat(ARRAY_TABLE_FEEDBACK_CLASS, " & .ag-cell .ag-cell-wrapper,\n &.").concat(ARRAY_TABLE_FEEDBACK_CLASS, " .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT, "px !important; line-height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT - 2, "px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u9519\u8BEF\u6587\u5B57\u662F\u6D6E\u5728\u8F93\u5165\u6846\u4E0B\u65B9\u7684\u6D6E\u5C42\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1A\u683C\u5B50\u4E0E\u6240\u5728\u884C\u653E\u5F00\u88C1\u526A\u5E76\u62AC\u9AD8\u5C42\u7EA7\uFF0C\u76D6\u5728\u4E0B\u4E00\u884C\u4E4B\u4E0A\uFF0C\u884C\u9AD8\u6052\u5B9A\u4E0D\u8DF3\u52A8\u3002@author nokecy */\n .ag-cell:has(.ant-formily-item-help) { overflow: visible !important; z-index: 6; }\n .ag-row:has(.ant-formily-item-help) { z-index: 6; }\n .ag-cell .ant-formily-item-help { z-index: 6; box-shadow: 0 2px 6px rgb(0 0 0 / 12%); background: var(--ant-color-bg-container, #fff); }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n /* \u5408\u8BA1\u884C\u6D6E\u5C42\u7684\u56FA\u5B9A\u5217\u5BF9\u9F50\uFF1AAG-Grid \u7ED9 .ag-floating-bottom \u52A0\u4E86\u5185\u8054 overflow-y:scroll\uFF0C\n \u4F1A\u4E3A\u300C\u6D6E\u5C42\u81EA\u5DF1\u300D\u9884\u7559\u4E00\u6761\u5782\u76F4\u6EDA\u52A8\u6761(\u5BBD\u5EA6=\u6EDA\u52A8\u6761\u5BBD)\u3002\u4F46\u6D6E\u5C42\u5185\u7684 center viewport \u5DF2\u7ECF\u6309 body\n \u6263\u6389\u8FC7\u4E00\u6B21\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u53F3\u56FA\u5B9A\u5217\u518D\u88AB\u6324\u5DE6\u4E00\u4E2A\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u4E8E\u662F\u5408\u8BA1\u884C\u7684\u53F3\u56FA\u5B9A\u5217\u76F8\u5BF9\u660E\u7EC6\u884C\u6574\u4F53\u5DE6\u504F\n (\u5B9E\u6D4B 8px)\uFF0C\u770B\u8D77\u6765\u300C\u56FA\u5B9A\u5217\u4E0D\u5BF9\u9F50\u300D\u3002\u5408\u8BA1\u884C\u6C38\u8FDC\u53EA\u6709\u4E00\u884C\u3001\u4E0D\u9700\u8981\u7EB5\u5411\u6EDA\u52A8\uFF0C\u53BB\u6389\u8FD9\u6761\u591A\u4F59\u6EDA\u52A8\u6761\u5373\u53EF\uFF0C\n \u4E0D\u5199\u6B7B\u50CF\u7D20\uFF0C\u6EDA\u52A8\u6761\u5BBD\u5EA6\u56E0\u5E73\u53F0/\u6D4F\u89C8\u5668\u800C\u5F02\u65F6\u540C\u6837\u6210\u7ACB\u3002@author nokecy */\n .ag-floating-bottom { overflow-y: hidden !important; }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ");
|
|
73
73
|
var arrayTableCellFit = exports.arrayTableCellFit = (0, _agGridCommunity.createPart)({
|
|
74
74
|
feature: 'arrayTableCellFit',
|
|
75
75
|
css: ARRAY_TABLE_CELL_FIT_CSS
|
|
@@ -127,8 +127,11 @@ var ArrayTableInner = observer(function (props) {
|
|
|
127
127
|
var _useFeedbackRows = useFeedbackRows(field, FormLayout.useFormLayout().feedbackLayout),
|
|
128
128
|
feedbackRowsRef = _useFeedbackRows.rowsRef,
|
|
129
129
|
feedbackSignature = _useFeedbackRows.signature;
|
|
130
|
+
// 修复:用行下标(node.rowIndex)判定出错行,而非 rowData 对象引用。
|
|
131
|
+
// formily observable 数组 slice 后,getRowHeight 拿到的 rowData 元素与 useFeedbackRows 里取到的表单值元素不是同一引用,
|
|
132
|
+
// 用对象引用 has() 会恒为 false,导致出错行不撑高、校验浮层溢出遮挡下一行/合计行。@author nokecy
|
|
130
133
|
var getRowHeight = useCallback(function (params) {
|
|
131
|
-
return params.
|
|
134
|
+
return params.node != null && feedbackRowsRef.current.has(params.node.rowIndex) ? rowHeight + ROW_FEEDBACK_EXTRA_HEIGHT : rowHeight;
|
|
132
135
|
}, [rowHeight]);
|
|
133
136
|
var isAutoHeight = height === 'auto';
|
|
134
137
|
var autoGridHeight = isAutoHeight ? calcAutoGridHeight({
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import type { ArrayField } from '@nokecy/formily-core';
|
|
3
3
|
/**
|
|
4
4
|
* 默认(loose)反馈布局下,单元格里的校验错误文字画在输入框下方;行高只放得下输入框,
|
|
5
|
-
*
|
|
5
|
+
* 错误文字改为浮在输入框下方的浮层(见 theme.ts),不占行高,出错/改对时行高不变,避免视觉跳动。
|
|
6
|
+
* 保留本常量(0)以便 getRowHeight / autoHeight 统一计算。
|
|
6
7
|
*/
|
|
7
|
-
export declare const ROW_FEEDBACK_EXTRA_HEIGHT =
|
|
8
|
+
export declare const ROW_FEEDBACK_EXTRA_HEIGHT = 0;
|
|
8
9
|
/**
|
|
9
10
|
* 找出当前有「行内错误文字」的行:返回这些行的数据对象(与 AG-Grid rowData 里的元素同一引用)。
|
|
10
11
|
*
|
|
@@ -13,14 +14,21 @@ export declare const ROW_FEEDBACK_EXTRA_HEIGHT = 24;
|
|
|
13
14
|
* 渲染期读它会让组件订阅字段表,每创建一个字段就重渲一次。请用 useFeedbackRows。@author nokecy
|
|
14
15
|
*/
|
|
15
16
|
export declare const collectFeedbackRows: (arrayField: ArrayField, defaultLayout?: string) => Set<object>;
|
|
17
|
+
/**
|
|
18
|
+
* 与 collectFeedbackRows 同源,但返回「有行内错误文字的行的下标」(Set<number>) 而非行对象引用。
|
|
19
|
+
* 渲染期之外读反馈会订阅整张字段表(见 collectFeedbackRows),这里只供 useFeedbackRows 在事件驱动后重算。
|
|
20
|
+
* 用下标而非对象引用,是为了避开 formily observable 数组 slice 后元素引用不一致导致撑高判空的问题
|
|
21
|
+
* (getRowHeight 拿到的 rowData 元素与这里取到的不是同一引用)。@author nokecy
|
|
22
|
+
*/
|
|
23
|
+
export declare const collectFeedbackIndexes: (arrayField: ArrayField, defaultLayout?: string) => Set<number>;
|
|
16
24
|
/**
|
|
17
25
|
* 订阅数组下字段的校验反馈,返回「有行内错误文字的行」。
|
|
18
26
|
*
|
|
19
|
-
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily
|
|
20
|
-
*
|
|
21
|
-
* signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
27
|
+
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily 事件:字段校验成功/失败、表单校验结束、
|
|
28
|
+
* 提交校验结束、字段值变化、字段卸载(删行)、表单重置时,合并成一次(下一个宏任务)重算;行集合变化才触发重渲。
|
|
29
|
+
* rows 供 AG-Grid 的 getRowHeight 同步读取,signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
22
30
|
*/
|
|
23
31
|
export declare const useFeedbackRows: (arrayField: ArrayField, defaultLayout?: string) => {
|
|
24
|
-
rowsRef: import("react").RefObject<Set<
|
|
32
|
+
rowsRef: import("react").RefObject<Set<number>>;
|
|
25
33
|
signature: string;
|
|
26
34
|
};
|
|
@@ -7,17 +7,24 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
7
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
9
|
import { useEffect, useRef, useState } from 'react';
|
|
10
|
-
import { onFieldUnmount, onFieldValidateEnd, onFormReset } from '@nokecy/formily-core';
|
|
10
|
+
import { onFieldUnmount, onFieldValueChange, onFieldValidateEnd, onFieldValidateFailed, onFieldValidateSuccess, onFormValidateFailed, onFormValidateSuccess, onFormSubmitValidateEnd, onFormReset } from '@nokecy/formily-core';
|
|
11
11
|
import uniqueId from 'lodash/uniqueId';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 默认(loose)反馈布局下,单元格里的校验错误文字画在输入框下方;行高只放得下输入框,
|
|
15
|
-
*
|
|
15
|
+
* 错误文字改为浮在输入框下方的浮层(见 theme.ts),不占行高,出错/改对时行高不变,避免视觉跳动。
|
|
16
|
+
* 保留本常量(0)以便 getRowHeight / autoHeight 统一计算。
|
|
16
17
|
*/
|
|
17
|
-
export var ROW_FEEDBACK_EXTRA_HEIGHT =
|
|
18
|
+
export var ROW_FEEDBACK_EXTRA_HEIGHT = 0;
|
|
18
19
|
|
|
19
|
-
/**
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 这些反馈布局的错误不占行内位置(浮层 / 不显示),不需要撑高行。
|
|
22
|
+
* 注意:不含 terse。ArrayTable 的主题把 .ant-formily-item-help 钉在输入框正下方(见 theme.ts),
|
|
23
|
+
* terse 的紧凑提示在格内同样是「浮在输入框下沿」的行内文字,focusFirstError 聚焦后会显示并超出行底;
|
|
24
|
+
* 若把 terse 当浮层过滤,feedbackSignature 会恒为空、出错行永远不撑高,校验提示就会溢出遮挡下一行/合计行。
|
|
25
|
+
* @author nokecy
|
|
26
|
+
*/
|
|
27
|
+
var OUT_OF_FLOW_LAYOUTS = new Set(['popover', 'none']);
|
|
21
28
|
|
|
22
29
|
/**
|
|
23
30
|
* 找出当前有「行内错误文字」的行:返回这些行的数据对象(与 AG-Grid rowData 里的元素同一引用)。
|
|
@@ -57,12 +64,48 @@ export var collectFeedbackRows = function collectFeedbackRows(arrayField, defaul
|
|
|
57
64
|
return rows;
|
|
58
65
|
};
|
|
59
66
|
|
|
67
|
+
/**
|
|
68
|
+
* 与 collectFeedbackRows 同源,但返回「有行内错误文字的行的下标」(Set<number>) 而非行对象引用。
|
|
69
|
+
* 渲染期之外读反馈会订阅整张字段表(见 collectFeedbackRows),这里只供 useFeedbackRows 在事件驱动后重算。
|
|
70
|
+
* 用下标而非对象引用,是为了避开 formily observable 数组 slice 后元素引用不一致导致撑高判空的问题
|
|
71
|
+
* (getRowHeight 拿到的 rowData 元素与这里取到的不是同一引用)。@author nokecy
|
|
72
|
+
*/
|
|
73
|
+
export var collectFeedbackIndexes = function collectFeedbackIndexes(arrayField, defaultLayout) {
|
|
74
|
+
var indexes = new Set();
|
|
75
|
+
var form = arrayField === null || arrayField === void 0 ? void 0 : arrayField.form;
|
|
76
|
+
var value = arrayField === null || arrayField === void 0 ? void 0 : arrayField.value;
|
|
77
|
+
if (!form || !Array.isArray(value)) return indexes;
|
|
78
|
+
var base = arrayField.address.toString();
|
|
79
|
+
var baseLength = arrayField.path.length;
|
|
80
|
+
var _iterator2 = _createForOfIteratorHelper(form.queryFeedbacks({
|
|
81
|
+
type: 'error',
|
|
82
|
+
address: "".concat(base, ".*")
|
|
83
|
+
})),
|
|
84
|
+
_step2;
|
|
85
|
+
try {
|
|
86
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
87
|
+
var _feedback$path$segmen2, _feedback$path4, _feedback$path5, _feedback$path5$toStr, _feedback$path6, _form$query$take$deco2, _form$query$take2;
|
|
88
|
+
var feedback = _step2.value;
|
|
89
|
+
var index = Number((_feedback$path$segmen2 = (_feedback$path4 = feedback.path) === null || _feedback$path4 === void 0 || (_feedback$path4 = _feedback$path4.segments) === null || _feedback$path4 === void 0 ? void 0 : _feedback$path4[baseLength]) !== null && _feedback$path$segmen2 !== void 0 ? _feedback$path$segmen2 : (_feedback$path5 = feedback.path) === null || _feedback$path5 === void 0 || (_feedback$path5$toStr = (_feedback$path6 = _feedback$path5).toString) === null || _feedback$path5$toStr === void 0 ? void 0 : _feedback$path5$toStr.call(_feedback$path6).split('.')[baseLength]);
|
|
90
|
+
if (!Number.isInteger(index)) continue;
|
|
91
|
+
var layout = (_form$query$take$deco2 = (_form$query$take2 = form.query(feedback.address).take()) === null || _form$query$take2 === void 0 || (_form$query$take2 = _form$query$take2.decoratorProps) === null || _form$query$take2 === void 0 ? void 0 : _form$query$take2.feedbackLayout) !== null && _form$query$take$deco2 !== void 0 ? _form$query$take$deco2 : defaultLayout;
|
|
92
|
+
if (OUT_OF_FLOW_LAYOUTS.has(layout)) continue;
|
|
93
|
+
indexes.add(index);
|
|
94
|
+
}
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator2.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator2.f();
|
|
99
|
+
}
|
|
100
|
+
return indexes;
|
|
101
|
+
};
|
|
102
|
+
|
|
60
103
|
/**
|
|
61
104
|
* 订阅数组下字段的校验反馈,返回「有行内错误文字的行」。
|
|
62
105
|
*
|
|
63
|
-
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily
|
|
64
|
-
*
|
|
65
|
-
* signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
106
|
+
* 不在渲染期读错误(见 collectFeedbackRows 说明),而是挂 Formily 事件:字段校验成功/失败、表单校验结束、
|
|
107
|
+
* 提交校验结束、字段值变化、字段卸载(删行)、表单重置时,合并成一次(下一个宏任务)重算;行集合变化才触发重渲。
|
|
108
|
+
* rows 供 AG-Grid 的 getRowHeight 同步读取,signature(有错误的行下标)变化时调用方让网格重算行高。@author nokecy
|
|
66
109
|
*/
|
|
67
110
|
export var useFeedbackRows = function useFeedbackRows(arrayField, defaultLayout) {
|
|
68
111
|
var rowsRef = useRef(new Set());
|
|
@@ -80,19 +123,31 @@ export var useFeedbackRows = function useFeedbackRows(arrayField, defaultLayout)
|
|
|
80
123
|
if (timer !== undefined) clearTimeout(timer);
|
|
81
124
|
timer = setTimeout(function () {
|
|
82
125
|
timer = undefined;
|
|
83
|
-
|
|
84
|
-
|
|
126
|
+
// 用下标集合(而非对象引用)判定出错行:formily observable 数组 slice 后,rowData 元素与表单值元素引用不一致,
|
|
127
|
+
// 以对象引用做 has 判定会落空,导致出错行不撑高、校验浮层溢出遮挡下一行。@author nokecy
|
|
128
|
+
var indexes = collectFeedbackIndexes(arrayField, defaultLayout);
|
|
129
|
+
rowsRef.current = indexes;
|
|
85
130
|
var value = Array.isArray(arrayField.value) ? arrayField.value : [];
|
|
86
|
-
var next = value.flatMap(function (
|
|
87
|
-
return
|
|
131
|
+
var next = value.flatMap(function (_, index) {
|
|
132
|
+
return indexes.has(index) ? [index] : [];
|
|
88
133
|
}).join(',');
|
|
89
134
|
setSignature(function (prev) {
|
|
90
135
|
return prev === next ? prev : next;
|
|
91
136
|
});
|
|
92
137
|
}, 0);
|
|
93
138
|
};
|
|
139
|
+
// formily-core 的 batchValidate/validateSelf 只发 ON_FIELD_VALIDATE_SUCCESS/FAILED,
|
|
140
|
+
// ON_FIELD_VALIDATE_END / ON_FORM_VALIDATE_END 在 core 里从未 notify(是死事件),
|
|
141
|
+
// 只订阅它会让 feedbackSignature 永远不变、出错行永远不撑高。这里订阅实际会触发的
|
|
142
|
+
// 成功/失败事件,并补上表单提交校验结束、字段值变化(用户改对后回收行高)作兜底。@author nokecy
|
|
94
143
|
form.addEffects(id, function () {
|
|
144
|
+
onFieldValidateFailed(pattern, refresh);
|
|
145
|
+
onFieldValidateSuccess(pattern, refresh);
|
|
95
146
|
onFieldValidateEnd(pattern, refresh);
|
|
147
|
+
onFormValidateFailed(refresh);
|
|
148
|
+
onFormValidateSuccess(refresh);
|
|
149
|
+
onFormSubmitValidateEnd(refresh);
|
|
150
|
+
onFieldValueChange(pattern, refresh);
|
|
96
151
|
onFieldUnmount(pattern, refresh);
|
|
97
152
|
onFormReset(refresh);
|
|
98
153
|
});
|
|
@@ -34,7 +34,7 @@ export declare const ARRAY_TABLE_FEEDBACK_CLASS = "ag-array-table-has-feedback";
|
|
|
34
34
|
* - 错误文字单行显示、超出列宽省略,出错行只多留一行的高度(ROW_FEEDBACK_EXTRA_HEIGHT);
|
|
35
35
|
* - 错误提示文字移出文档流(位置仍在输入框下方),出错时输入框不会被挤得上下跳。
|
|
36
36
|
*/
|
|
37
|
-
export declare const ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .ag-array-table-has-feedback & .ag-cell .ag-cell-wrapper,\n &.ag-array-table-has-feedback .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: 20px !important; line-height: 18px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ";
|
|
37
|
+
export declare const ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .ag-array-table-has-feedback & .ag-cell .ag-cell-wrapper,\n &.ag-array-table-has-feedback .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: 20px !important; line-height: 18px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u9519\u8BEF\u6587\u5B57\u662F\u6D6E\u5728\u8F93\u5165\u6846\u4E0B\u65B9\u7684\u6D6E\u5C42\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1A\u683C\u5B50\u4E0E\u6240\u5728\u884C\u653E\u5F00\u88C1\u526A\u5E76\u62AC\u9AD8\u5C42\u7EA7\uFF0C\u76D6\u5728\u4E0B\u4E00\u884C\u4E4B\u4E0A\uFF0C\u884C\u9AD8\u6052\u5B9A\u4E0D\u8DF3\u52A8\u3002@author nokecy */\n .ag-cell:has(.ant-formily-item-help) { overflow: visible !important; z-index: 6; }\n .ag-row:has(.ant-formily-item-help) { z-index: 6; }\n .ag-cell .ant-formily-item-help { z-index: 6; box-shadow: 0 2px 6px rgb(0 0 0 / 12%); background: var(--ant-color-bg-container, #fff); }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n /* \u5408\u8BA1\u884C\u6D6E\u5C42\u7684\u56FA\u5B9A\u5217\u5BF9\u9F50\uFF1AAG-Grid \u7ED9 .ag-floating-bottom \u52A0\u4E86\u5185\u8054 overflow-y:scroll\uFF0C\n \u4F1A\u4E3A\u300C\u6D6E\u5C42\u81EA\u5DF1\u300D\u9884\u7559\u4E00\u6761\u5782\u76F4\u6EDA\u52A8\u6761(\u5BBD\u5EA6=\u6EDA\u52A8\u6761\u5BBD)\u3002\u4F46\u6D6E\u5C42\u5185\u7684 center viewport \u5DF2\u7ECF\u6309 body\n \u6263\u6389\u8FC7\u4E00\u6B21\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u53F3\u56FA\u5B9A\u5217\u518D\u88AB\u6324\u5DE6\u4E00\u4E2A\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u4E8E\u662F\u5408\u8BA1\u884C\u7684\u53F3\u56FA\u5B9A\u5217\u76F8\u5BF9\u660E\u7EC6\u884C\u6574\u4F53\u5DE6\u504F\n (\u5B9E\u6D4B 8px)\uFF0C\u770B\u8D77\u6765\u300C\u56FA\u5B9A\u5217\u4E0D\u5BF9\u9F50\u300D\u3002\u5408\u8BA1\u884C\u6C38\u8FDC\u53EA\u6709\u4E00\u884C\u3001\u4E0D\u9700\u8981\u7EB5\u5411\u6EDA\u52A8\uFF0C\u53BB\u6389\u8FD9\u6761\u591A\u4F59\u6EDA\u52A8\u6761\u5373\u53EF\uFF0C\n \u4E0D\u5199\u6B7B\u50CF\u7D20\uFF0C\u6EDA\u52A8\u6761\u5BBD\u5EA6\u56E0\u5E73\u53F0/\u6D4F\u89C8\u5668\u800C\u5F02\u65F6\u540C\u6837\u6210\u7ACB\u3002@author nokecy */\n .ag-floating-bottom { overflow-y: hidden !important; }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ";
|
|
38
38
|
export declare const arrayTableCellFit: import("ag-grid-community").Part<{}>;
|
|
39
39
|
/** 根据当前 antd 主题与 Provider 密度生成编辑态或阅读态明细表格主题。@author nokecy */
|
|
40
40
|
export declare function useArrayTableTheme(editable?: boolean): import("ag-grid-community").Theme<import("ag-grid-community").CoreParams & import("ag-grid-community").ButtonStyleParams & import("ag-grid-community").CheckboxStyleParams & import("ag-grid-community").TabStyleParams & import("ag-grid-community").InputStyleParams & {}>;
|
|
@@ -60,7 +60,7 @@ export var ARRAY_TABLE_FEEDBACK_CLASS = 'ag-array-table-has-feedback';
|
|
|
60
60
|
* - 错误文字单行显示、超出列宽省略,出错行只多留一行的高度(ROW_FEEDBACK_EXTRA_HEIGHT);
|
|
61
61
|
* - 错误提示文字移出文档流(位置仍在输入框下方),出错时输入框不会被挤得上下跳。
|
|
62
62
|
*/
|
|
63
|
-
export var ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .".concat(ARRAY_TABLE_FEEDBACK_CLASS, " & .ag-cell .ag-cell-wrapper,\n &.").concat(ARRAY_TABLE_FEEDBACK_CLASS, " .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT, "px !important; line-height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT - 2, "px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ");
|
|
63
|
+
export var ARRAY_TABLE_CELL_FIT_CSS = "\n .ag-cell .ag-cell-wrapper { height: 100%; max-height: 100%; min-height: 0; }\n .ag-cell .ag-cell-value { max-height: 100%; min-height: 0; }\n /* \u672C part \u7684 CSS \u4F1A\u88AB AG-Grid \u5305\u8FDB :where(.ag-theme-xxx) { ... }\uFF08\u5D4C\u5957\uFF09\uFF0C\u88F8\u5199 .has-feedback .ag-cell \u4F1A\u7F16\u8BD1\u6210\n \u300C\u4E3B\u9898\u5143\u7D20\u7684\u540E\u4EE3 has-feedback\u300D\uFF0C\u800C\u8BE5\u7C7B\u6302\u5728\u4E3B\u9898\u5143\u7D20\u7684\u7956\u5148\u4E0A\uFF0C\u89C4\u5219\u6C38\u8FDC\u4E0D\u547D\u4E2D\u3002\n \u6240\u4EE5\u7528 & \u663E\u5F0F\u653E\u5728 has-feedback \u4E4B\u540E\uFF08\u7956\u5148\u5199\u6CD5\uFF09\uFF0C\u540C\u65F6\u517C\u5BB9\u7C7B\u540D\u6302\u5728\u4E3B\u9898\u5143\u7D20\u81EA\u8EAB\u7684\u5199\u6CD5\u3002 */\n .".concat(ARRAY_TABLE_FEEDBACK_CLASS, " & .ag-cell .ag-cell-wrapper,\n &.").concat(ARRAY_TABLE_FEEDBACK_CLASS, " .ag-cell .ag-cell-wrapper { height: min(100%, calc(var(--ag-row-height) - 3px)); }\n /* \u5BBF\u4E3B\u53EF\u80FD\u5199 .xxx .ant-formily-item { margin-bottom: 12px }\uFF08\u7279\u5F02\u6027 0,3,0\uFF09\uFF1B\u8FD9\u91CC\u53E0\u7C7B\u540D\u5E76 !important\uFF0C\u4EFB\u4F55\u5BBF\u4E3B\u89C4\u5219\u90FD\u538B\u4E0D\u8FC7\uFF0C\n \u5426\u5219\u683C\u5185\u63A7\u4EF6\u4F1A\u88AB margin \u9876\u5F97\u504F\u4E0A 3-5px\u3002@author nokecy */\n .ag-cell .ag-cell-wrapper .ant-formily-item.ant-formily-item { margin-bottom: 0 !important; }\n /* \u6807\u9898\u548C\u8BF4\u660E\u7531\u5217\u5934\u627F\u8F7D\uFF0ClabelWidth:0 \u672C\u8EAB\u4E0D\u4F1A\u9690\u85CF\u5B57\u6BB5\u6807\u9898\u3002@author nokecy */\n .ag-cell .ant-formily-item-label { display: none; }\n .ag-cell .ant-formily-item-control { flex: 1; min-width: 0; width: 100%; }\n /* \u5E26\u5916\u58F3\u7684\u8F93\u5165\u6846\uFF08affix/wrapper\uFF09\u662F inline-flex\uFF0Cantd \u7ED9\u8868\u5355\u9879\u5185\u5BB9\u533A controlHeight \u7684\u6700\u5C0F\u9AD8\u5EA6\u548C\u5BF9\u5E94\u884C\u9AD8\uFF0C\n \u5916\u58F3\u6309\u57FA\u7EBF\u5BF9\u9F50\u88AB\u9876\u504F\u3002\u5185\u5BB9\u533A\u6539\u6210\u5C45\u4E2D\u7684 flex\uFF08\u5B50\u9879\u88AB\u5757\u5316\uFF0C\u4E0D\u518D\u6709\u57FA\u7EBF\u5BF9\u9F50\uFF09\uFF0C\u6700\u5C0F\u9AD8\u5EA6\u5F52\u96F6\uFF0C\n \u8868\u5355\u9879\u9AD8\u5EA6\u7531\u63A7\u4EF6\u81EA\u5DF1\u7684\u9AD8\u5EA6\uFF08\u884C\u9AD8-3px\uFF09\u51B3\u5B9A\uFF0C\u4E0D\u8D85\u51FA\u884C\u9AD8\u3002 */\n .ag-cell .ant-formily-item,\n .ag-cell .ant-formily-item-control,\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { min-height: 0 !important; }\n .ag-cell .ant-formily-item-control-content,\n .ag-cell .ant-formily-item-control-content-component { display: flex; align-items: center; }\n .ag-cell .ant-formily-item-control-content-component { flex: 1 1 auto; min-width: 0; }\n .ag-cell .ant-formily-item-control-content-component > * { flex: 1 1 auto; min-width: 0; }\n /* \u9519\u8BEF\u6587\u5B57\u9489\u5728\u8F93\u5165\u6846\u6B63\u4E0B\u65B9\uFF08top:100% \u76F8\u5BF9 .ant-formily-item\uFF09\uFF0C\u9AD8\u5EA6\u56FA\u5B9A\u4E3A ARRAY_TABLE_HELP_LINE_HEIGHT\uFF0C\n \u4E0D\u518D\u4F9D\u8D56\u6587\u6863\u6D41\u91CC\u7684\u9759\u6001\u4F4D\u7F6E\uFF08\u4F1A\u968F margin/\u5C45\u4E2D\u504F\u79FB\uFF0C\u5BFC\u81F4\u88AB\u884C\u5E95\u8FB9\u7EBF\u7A7F\u8FC7\uFF09\u3002 */\n .ag-cell .ant-formily-item-help { position: absolute; top: 100%; inset-inline-start: 0; margin: 0 !important; padding-block: 0 !important; box-sizing: border-box !important; min-height: 0 !important; height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT, "px !important; line-height: ").concat(ARRAY_TABLE_HELP_LINE_HEIGHT - 2, "px !important; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .ag-cell .ag-cell-value:has(.ant-formily-item-help) { overflow: visible; }\n /* \u9519\u8BEF\u6587\u5B57\u662F\u6D6E\u5728\u8F93\u5165\u6846\u4E0B\u65B9\u7684\u6D6E\u5C42\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1A\u683C\u5B50\u4E0E\u6240\u5728\u884C\u653E\u5F00\u88C1\u526A\u5E76\u62AC\u9AD8\u5C42\u7EA7\uFF0C\u76D6\u5728\u4E0B\u4E00\u884C\u4E4B\u4E0A\uFF0C\u884C\u9AD8\u6052\u5B9A\u4E0D\u8DF3\u52A8\u3002@author nokecy */\n .ag-cell:has(.ant-formily-item-help) { overflow: visible !important; z-index: 6; }\n .ag-row:has(.ant-formily-item-help) { z-index: 6; }\n .ag-cell .ant-formily-item-help { z-index: 6; box-shadow: 0 2px 6px rgb(0 0 0 / 12%); background: var(--ant-color-bg-container, #fff); }\n /* \u5217\u5BF9\u9F50\uFF08align \u5199\u6CD5\uFF09\uFF1B\u6B63\u5728\u7F16\u8F91\u7684\u8F93\u5165\u6846\u8DDF\u968F\u6240\u5728\u5217\u7684\u5BF9\u9F50\uFF0C\u6570\u5B57\u5217\u70B9\u5F00\u7F16\u8F91\u65F6\u4E0D\u4F1A\u8DF3\u5230\u5DE6\u8FB9\u3002@author nokecy */\n .ag-cell.qc-array-table-align-left { text-align: left; }\n .ag-cell.qc-array-table-align-center { text-align: center; }\n .ag-cell.qc-array-table-align-right { text-align: right; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-input-affix-wrapper .ant-input,\n .ag-cell .ant-input.ant-input { text-align: inherit; }\n .ag-header-cell.qc-array-table-required .ag-header-cell-text::before {\n content: '*';\n color: var(--ag-invalid-color);\n margin-inline-end: 4px;\n }\n /* \u5355\u5C42\u6846\uFF1A\u683C\u5185\u63A7\u4EF6\u4E0D\u753B\u81EA\u5DF1\u7684\u8FB9\u6846/\u9634\u5F71/\u5E95\u8272\uFF0C\u6491\u6EE1\u5355\u5143\u683C\uFF1B\n \u805A\u7126/\u9519\u8BEF/\u9501\u5B9A\u53EA\u7531\u5355\u5143\u683C\u7684 inset \u6846\uFF08\u6216\u5E95\u8272\uFF09\u8868\u8FBE\uFF0C\u4E0D\u5360\u5C3A\u5BF8\uFF0C\u884C\u9AD8\u4E0E\u5355\u5143\u683C\u5C3A\u5BF8\u4E0D\u53D8\u3002\n \u9009\u62E9\u5668\u5168\u90E8\u9650\u5B9A\u5728 .ag-cell \u5185\uFF0C\u800C\u672C part \u53EA\u6302\u5728 ArrayTable \u7684\u4E3B\u9898\u4E0A\uFF0C\u4E0D\u5F71\u54CD\u8868\u683C\u5916\u7684\u8868\u5355\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker,\n .ag-cell .ant-input-outlined.ant-input-outlined {\n border: 0 !important;\n box-shadow: none !important;\n background: transparent !important;\n outline: none;\n }\n .ag-cell .ant-input-number, .ag-cell .ant-picker, .ag-cell .ant-select, .ag-cell .ant-input-affix-wrapper { width: 100%; }\n /* \u63A7\u4EF6\u300C\u50CF\u6587\u672C\u300D\uFF1A\u5B57\u53F7\u3001\u6C34\u5E73\u5185\u8FB9\u8DDD\u8DDF\u968F\u5BC6\u5EA6\uFF08\u5355\u5143\u683C\u81EA\u5DF1\u5DF2\u6709 --ag-cell-horizontal-padding\uFF0C\u63A7\u4EF6\u4E0D\u518D\u53E0\u4E00\u5C42\uFF09\uFF0C\n \u9AD8\u5EA6\u968F\u884C\u9AD8\u3001\u7559 3px \u7ED9\u4E0B\u8FB9\u6846\u4E0E\u5C45\u4E2D\u4F59\u91CF\uFF0C\u4E0D\u6491\u9AD8\u884C\uFF1B\u5BC6\u5EA6\u7531\u4E3B\u9898\u53C2\u6570 rowHeight \u51B3\u5B9A\uFF0C\u4E0D\u5199\u6B7B\u50CF\u7D20\u3002@author nokecy */\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { font-size: inherit !important; padding-inline: 0 !important; }\n /* antd 6 \u7684 Select \u6839\u8282\u70B9\u81EA\u5DF1\u5E26\u8FB9\u6846\u4E0E\u5185\u8FB9\u8DDD\uFF08\u6CA1\u6709 .ant-select-selector\uFF09\uFF0C\u4E0A\u4E0B\u5185\u8FB9\u8DDD\u4E5F\u5F52\u96F6\uFF0C\u9AD8\u5EA6\u7531\u4E0B\u9762\u7684 height \u51B3\u5B9A\uFF0C\u5782\u76F4\u5C45\u4E2D\u3002*/\n .ag-cell .ant-select.ant-select { padding-block: 0 !important; align-items: center; }\n .ag-cell .ant-input-number .ant-input-number-input,\n .ag-cell .ant-picker .ant-picker-input > input,\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { font-size: inherit !important; padding-inline: 0 !important; }\n .ag-cell .ant-input.ant-input,\n .ag-cell .ant-input-affix-wrapper.ant-input-affix-wrapper,\n .ag-cell .ant-input-number.ant-input-number,\n .ag-cell .ant-input-number-affix-wrapper.ant-input-number-affix-wrapper,\n .ag-cell .ant-select.ant-select,\n .ag-cell .ant-select.ant-select .ant-select-selector,\n .ag-cell .ant-picker.ant-picker { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; }\n /* \u5957\u5728\u5916\u58F3\u91CC\u7684\u5185\u5C42\u63A7\u4EF6\u6491\u6EE1\u5916\u58F3\u5373\u53EF\uFF0C\u518D\u8BBE\u540C\u4E00\u9AD8\u5EA6\u4F1A\u52A0\u4E0A\u5916\u58F3 padding \u6EA2\u51FA\uFF1B\u591A\u884C\u6587\u672C\u57DF\u4E0D\u53D7\u9650\u3002*/\n .ag-cell .ant-input-affix-wrapper .ant-input.ant-input,\n .ag-cell .ant-input-number-affix-wrapper .ant-input-number-input { height: 100% !important; }\n /* \u591A\u884C\u6587\u672C\u5728\u56FA\u5B9A\u884C\u9AD8\u7684\u683C\u91CC\u4E0D\u6491\u9AD8\u884C\uFF1A\u9AD8\u5EA6\u53D6\u5355\u884C\u9AD8\uFF0C\u8D85\u51FA\u5185\u5BB9\u5728\u6846\u5185\u6EDA\u52A8 */\n .ag-cell textarea.ant-input.ant-input { height: calc(var(--ag-row-height) - 3px) !important; min-height: 0 !important; resize: none; overflow-y: auto; line-height: calc(var(--ag-row-height) - 5px) !important; padding-block: 0 !important; }\n /* Editable \u88C5\u9970\u5668\u5916\u58F3\u9ED8\u8BA4 inline-block\uFF0C\u4F1A\u5728 .ag-cell-value \u7684\u884C\u76D2\u91CC\u6309\u57FA\u7EBF\u5BF9\u9F50\u3001\u88AB\u9876\u504F\uFF1B\u6539\u4E3A\u5757\u7EA7 flex \u4E0E\u5176\u4ED6\u63A7\u4EF6\u4E00\u81F4\u5C45\u4E2D */\n .ag-cell .ant-formily-editable { display: flex; align-items: center; width: 100%; }\n /* Select \u6587\u5B57\u884C\u9AD8\u4E0E\u641C\u7D22\u6846\u4F4D\u7F6E\uFF1Aselector \u5F52\u96F6\u5185\u8FB9\u8DDD\u540E\uFF0C\u6587\u5B57\u884C\u9AD8\u53D6\u683C\u5185\u53EF\u7528\u9AD8\u5EA6\uFF0C\u641C\u7D22\u8F93\u5165\u6846\u8D34\u5DE6\uFF0C\u5149\u6807\u4E0D\u9519\u4F4D\u3002*/\n .ag-cell .ant-select .ant-select-selection-item,\n .ag-cell .ant-select .ant-select-selection-placeholder,\n .ag-cell .ant-select .ant-select-selection-search-input,\n .ag-cell .ant-select .ant-select-content,\n .ag-cell .ant-select .ant-select-content-item,\n .ag-cell .ant-select .ant-select-placeholder,\n .ag-cell .ant-select .ant-select-input { line-height: calc(var(--ag-row-height) - 3px) !important; }\n .ag-cell .ant-select .ant-select-selection-search { inset-inline: 0 !important; }\n /* \u6B65\u8FDB\u5668\u4E0E\u65E5\u5386\u56FE\u6807\u5728\u4EFB\u4F55\u72B6\u6001\u90FD\u4E0D\u663E\u793A\uFF08\u4E0E\u6F14\u793A\u4E00\u81F4\uFF1A\u952E\u76D8\u7528\u65B9\u5411\u952E/\u952E\u5165\uFF0C\u9762\u677F\u7531\u70B9\u51FB\u5C55\u5F00\uFF09\uFF1B\n Input \u53EA\u4FDD\u7559\u6E05\u9664\u56FE\u6807\u3002\u4E0B\u62C9\u7BAD\u5934\u53EA\u5728\u805A\u7126\u6216\u9762\u677F\u5C55\u5F00\u65F6\u51FA\u73B0\u3002@author nokecy */\n .ag-cell .ant-input-number-handler-wrap { display: none !important; }\n .ag-cell .ant-picker .ant-picker-suffix { display: none !important; }\n .ag-cell .ant-input-suffix > :not(.ant-input-clear-icon):not(.ant-input-show-count-suffix) { display: none !important; }\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-arrow,\n .ag-cell .ant-select:not(.ant-select-focused):not(.ant-select-open) .ant-select-suffix { display: none !important; }\n /* \u672A\u805A\u7126\u4E14\u4E3A\u7A7A\uFF1A\u5F31\u5360\u4F4D\u4E0E\u666E\u901A\u7A7A\u683C\u4E00\u81F4\uFF0C\u53EA\u7528 placeholder \u8272\uFF0C\u4E0D\u753B\u8F93\u5165\u6846\u5916\u89C2\u3002@author nokecy */\n .ag-cell .ant-select-selection-placeholder,\n .ag-cell .ant-select-placeholder,\n .ag-cell .ant-input::placeholder,\n .ag-cell .ant-input-number-input::placeholder,\n .ag-cell .ant-picker input::placeholder { color: var(--ant-color-text-placeholder, rgb(0 0 0 / 25%)) !important; }\n /* \u5408\u8BA1\u884C\uFF1A\u56FA\u5B9A\u5728\u8868\u5C3E\uFF0C\u5B57\u91CD\u5F3A\u8C03\u3001\u4E0E\u660E\u7EC6\u884C\u4EE5\u4E0A\u8FB9\u7EBF\u5206\u5F00\u3002@author nokecy */\n .ag-floating-bottom .ag-row { font-weight: 600; background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%)); }\n /* \u5408\u8BA1\u884C\u6D6E\u5C42\u7684\u56FA\u5B9A\u5217\u5BF9\u9F50\uFF1AAG-Grid \u7ED9 .ag-floating-bottom \u52A0\u4E86\u5185\u8054 overflow-y:scroll\uFF0C\n \u4F1A\u4E3A\u300C\u6D6E\u5C42\u81EA\u5DF1\u300D\u9884\u7559\u4E00\u6761\u5782\u76F4\u6EDA\u52A8\u6761(\u5BBD\u5EA6=\u6EDA\u52A8\u6761\u5BBD)\u3002\u4F46\u6D6E\u5C42\u5185\u7684 center viewport \u5DF2\u7ECF\u6309 body\n \u6263\u6389\u8FC7\u4E00\u6B21\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u53F3\u56FA\u5B9A\u5217\u518D\u88AB\u6324\u5DE6\u4E00\u4E2A\u6EDA\u52A8\u6761\u5BBD\u5EA6\uFF0C\u4E8E\u662F\u5408\u8BA1\u884C\u7684\u53F3\u56FA\u5B9A\u5217\u76F8\u5BF9\u660E\u7EC6\u884C\u6574\u4F53\u5DE6\u504F\n (\u5B9E\u6D4B 8px)\uFF0C\u770B\u8D77\u6765\u300C\u56FA\u5B9A\u5217\u4E0D\u5BF9\u9F50\u300D\u3002\u5408\u8BA1\u884C\u6C38\u8FDC\u53EA\u6709\u4E00\u884C\u3001\u4E0D\u9700\u8981\u7EB5\u5411\u6EDA\u52A8\uFF0C\u53BB\u6389\u8FD9\u6761\u591A\u4F59\u6EDA\u52A8\u6761\u5373\u53EF\uFF0C\n \u4E0D\u5199\u6B7B\u50CF\u7D20\uFF0C\u6EDA\u52A8\u6761\u5BBD\u5EA6\u56E0\u5E73\u53F0/\u6D4F\u89C8\u5668\u800C\u5F02\u65F6\u540C\u6837\u6210\u7ACB\u3002@author nokecy */\n .ag-floating-bottom { overflow-y: hidden !important; }\n .ag-cell:focus-within { box-shadow: inset 0 0 0 1px var(--ant-color-primary, #1f5fbf); }\n .ag-cell:has(.ant-formily-item-error), .ag-cell:has(.ant-formily-item-error):focus-within {\n box-shadow: inset 0 0 0 1px var(--ant-color-error, #d93025);\n }\n .ag-cell:has(.ant-input[disabled], .ant-input-disabled, .ant-input-number-disabled, .ant-select-disabled, .ant-picker-disabled) {\n background: var(--ant-color-fill-quaternary, rgb(0 0 0 / 4%));\n }\n ");
|
|
64
64
|
export var arrayTableCellFit = createPart({
|
|
65
65
|
feature: 'arrayTableCellFit',
|
|
66
66
|
css: ARRAY_TABLE_CELL_FIT_CSS
|