@byteluck-fe/model-driven-controls 2.0.7 → 2.0.8-beta.2
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.
|
@@ -69,8 +69,43 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { ColumnControlProperty
|
|
72
|
+
import { ColumnControlProperty } from "@byteluck-fe/model-driven-core";
|
|
73
73
|
import { DesignerOperationColumnControl } from "./designer";
|
|
74
|
+
//qiyu 因为都是自定义的了,无法在模型中定义必填校验了
|
|
75
|
+
// class OperationColumnControlPropertyRules extends ColumnControlPropertyRules {
|
|
76
|
+
// public check: RuleItem[] = [
|
|
77
|
+
// {
|
|
78
|
+
// type: 'object',
|
|
79
|
+
// message: RulesMessage.getMessage('isNotObject'),
|
|
80
|
+
// },
|
|
81
|
+
// ]
|
|
82
|
+
// public edit: RuleItem[] = [
|
|
83
|
+
// {
|
|
84
|
+
// type: 'object',
|
|
85
|
+
// message: RulesMessage.getMessage('isNotObject'),
|
|
86
|
+
// },
|
|
87
|
+
// ]
|
|
88
|
+
// constructor(props: OperationColumnControlProperty) {
|
|
89
|
+
// super(props)
|
|
90
|
+
// const getRules = () =>
|
|
91
|
+
// ({
|
|
92
|
+
// type: 'object',
|
|
93
|
+
// fields: {
|
|
94
|
+
// formKey: {
|
|
95
|
+
// type: 'string',
|
|
96
|
+
// required: true,
|
|
97
|
+
// message: RulesMessage.getMessage('pleaseEnterForm'),
|
|
98
|
+
// },
|
|
99
|
+
// },
|
|
100
|
+
// } as RuleItem)
|
|
101
|
+
// if (props.check.isShow) {
|
|
102
|
+
// this.check.push(getRules())
|
|
103
|
+
// }
|
|
104
|
+
// if (props.edit.isShow) {
|
|
105
|
+
// this.edit.push(getRules())
|
|
106
|
+
// }
|
|
107
|
+
// }
|
|
108
|
+
// }
|
|
74
109
|
var OperationColumnControlProperty = /*#__PURE__*/ function(ColumnControlProperty) {
|
|
75
110
|
"use strict";
|
|
76
111
|
_inherits(OperationColumnControlProperty, ColumnControlProperty);
|
|
@@ -78,10 +113,12 @@ var OperationColumnControlProperty = /*#__PURE__*/ function(ColumnControlPropert
|
|
|
78
113
|
function OperationColumnControlProperty(props) {
|
|
79
114
|
_classCallCheck(this, OperationColumnControlProperty);
|
|
80
115
|
var _this;
|
|
116
|
+
var _props_autoWidth;
|
|
81
117
|
_this = _super.call(this, props);
|
|
82
118
|
var _props_fixed;
|
|
83
119
|
_this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : "right";
|
|
84
120
|
_this.widthType = "auto";
|
|
121
|
+
var _props_autoWidth_minWidth;
|
|
85
122
|
// this.check = new OperationItem(
|
|
86
123
|
// props?.check ?? {
|
|
87
124
|
// content: '查看',
|
|
@@ -97,7 +134,8 @@ var OperationColumnControlProperty = /*#__PURE__*/ function(ColumnControlPropert
|
|
|
97
134
|
// props?.delete ?? { content: '删除', type: 'delete', isShow: false }
|
|
98
135
|
// )
|
|
99
136
|
// this.custom = (props?.custom ?? []).map((item) => new OperationItem(item))
|
|
100
|
-
|
|
137
|
+
//默认宽度
|
|
138
|
+
_this.autoWidth.minWidth = (_props_autoWidth_minWidth = props === null || props === void 0 ? void 0 : (_props_autoWidth = props.autoWidth) === null || _props_autoWidth === void 0 ? void 0 : _props_autoWidth.minWidth) !== null && _props_autoWidth_minWidth !== void 0 ? _props_autoWidth_minWidth : 84;
|
|
101
139
|
var _props_caption;
|
|
102
140
|
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : DesignerOperationColumnControl.controlName;
|
|
103
141
|
var _props_showType;
|