@nokecy/qc-ui 1.0.68 → 1.0.69
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.
|
@@ -140,6 +140,23 @@ var FormRender = function FormRender(props) {
|
|
|
140
140
|
var component = getComponent(colDef);
|
|
141
141
|
if (colDef.filter != false) {
|
|
142
142
|
var _colDef$searchCompone, _colDef$searchCompone2, _colDef$searchCompone3;
|
|
143
|
+
// 为多选下拉框添加maxTagCount配置
|
|
144
|
+
var componentProps = _objectSpread({
|
|
145
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(headerName),
|
|
146
|
+
allowClear: true,
|
|
147
|
+
style: {
|
|
148
|
+
maxWidth: 200
|
|
149
|
+
}
|
|
150
|
+
}, colDef === null || colDef === void 0 ? void 0 : colDef.searchComponentProps);
|
|
151
|
+
|
|
152
|
+
// 如果是Select组件且为多选模式,添加标签数量限制
|
|
153
|
+
if (component === 'Select' && (componentProps.mode === 'multiple' || componentProps.mode === 'tags')) {
|
|
154
|
+
var _componentProps$maxTa, _componentProps$maxTa2;
|
|
155
|
+
componentProps.maxTagCount = (_componentProps$maxTa = componentProps.maxTagCount) !== null && _componentProps$maxTa !== void 0 ? _componentProps$maxTa : 2;
|
|
156
|
+
componentProps.maxTagPlaceholder = (_componentProps$maxTa2 = componentProps.maxTagPlaceholder) !== null && _componentProps$maxTa2 !== void 0 ? _componentProps$maxTa2 : function (omittedValues) {
|
|
157
|
+
return "+".concat(omittedValues.length, "...");
|
|
158
|
+
};
|
|
159
|
+
}
|
|
143
160
|
var filedSchema = {
|
|
144
161
|
type: 'string',
|
|
145
162
|
title: headerName,
|
|
@@ -147,13 +164,7 @@ var FormRender = function FormRender(props) {
|
|
|
147
164
|
default: (colDef === null || colDef === void 0 || (_colDef$searchCompone2 = colDef.searchComponentProps) === null || _colDef$searchCompone2 === void 0 ? void 0 : _colDef$searchCompone2.default) || (colDef === null || colDef === void 0 || (_colDef$searchCompone3 = colDef.searchComponentProps) === null || _colDef$searchCompone3 === void 0 ? void 0 : _colDef$searchCompone3.defaultValue),
|
|
148
165
|
enum: colDef === null || colDef === void 0 ? void 0 : colDef.enum,
|
|
149
166
|
"x-component": component,
|
|
150
|
-
"x-component-props":
|
|
151
|
-
placeholder: "\u8BF7\u8F93\u5165".concat(headerName),
|
|
152
|
-
allowClear: true,
|
|
153
|
-
style: {
|
|
154
|
-
maxWidth: 200
|
|
155
|
-
}
|
|
156
|
-
}, colDef === null || colDef === void 0 ? void 0 : colDef.searchComponentProps),
|
|
167
|
+
"x-component-props": componentProps,
|
|
157
168
|
"x-decorator": 'FormItem',
|
|
158
169
|
"x-decorator-props": {
|
|
159
170
|
wrapperWrap: true
|
|
@@ -33,6 +33,25 @@
|
|
|
33
33
|
justify-content: flex-start;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// 多选下拉框标签省略样式
|
|
38
|
+
.ant-select-multiple {
|
|
39
|
+
.ant-select-selector {
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
|
|
42
|
+
.ant-select-selection-overflow {
|
|
43
|
+
max-width: 100%;
|
|
44
|
+
flex-wrap: nowrap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ant-select-selection-item {
|
|
48
|
+
max-width: 100px;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
36
55
|
}
|
|
37
56
|
|
|
38
57
|
@media (max-width: 575px) {
|