@byteluck-fe/model-driven-settings 2.7.0-beta → 2.7.0-beta.4
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/esm/default/createBaseFields.js +2 -4
- package/dist/esm/default/createFormBaseFields.js +7 -8
- package/dist/esm/props/base.js +2 -3
- package/dist/esm/props/checkbox.js +1 -2
- package/dist/esm/props/input-number.js +3 -4
- package/dist/esm/props/input.js +4 -5
- package/dist/esm/props/radio.js +2 -3
- package/dist/esm/props/select.js +2 -3
- package/dist/esm/props/switch.js +3 -4
- package/dist/esm/props/textarea.js +6 -7
- package/package.json +4 -4
|
@@ -23,9 +23,8 @@ export function createBaseFields() {
|
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
26
|
-
var _oldParent;
|
|
27
26
|
var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
|
|
28
|
-
if ((
|
|
27
|
+
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === "advanced-container" && newParent.type === "positioning-container") {
|
|
29
28
|
driven.setInstance(instance, "style.width", "");
|
|
30
29
|
driven.setInstance(instance, "style.widthConfig", "fill");
|
|
31
30
|
}
|
|
@@ -49,9 +48,8 @@ export function createBaseFields() {
|
|
|
49
48
|
]
|
|
50
49
|
},
|
|
51
50
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
52
|
-
var _oldParent;
|
|
53
51
|
var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
|
|
54
|
-
if ((
|
|
52
|
+
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === "advanced-container" && newParent.type === "positioning-container") {
|
|
55
53
|
driven.setInstance(instance, "style.height", "");
|
|
56
54
|
driven.setInstance(instance, "style.heightConfig", "fill");
|
|
57
55
|
}
|
|
@@ -25,13 +25,12 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
25
25
|
}
|
|
26
26
|
import { createBaseFields } from "./createBaseFields";
|
|
27
27
|
export function createFormBaseFields(defaultValues) {
|
|
28
|
-
var _defaultValues, _defaultValues1, _defaultValues2, _defaultValues3, _defaultValues4, _defaultValues5, _defaultValues6;
|
|
29
28
|
return _to_consumable_array(createBaseFields()).concat([
|
|
30
29
|
{
|
|
31
30
|
type: "DataBind",
|
|
32
31
|
key: "dataBind",
|
|
33
32
|
component: "data-bind",
|
|
34
|
-
defaultValue:
|
|
33
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.dataBind
|
|
35
34
|
},
|
|
36
35
|
{
|
|
37
36
|
key: "caption",
|
|
@@ -41,7 +40,7 @@ export function createFormBaseFields(defaultValues) {
|
|
|
41
40
|
maxLength: 80,
|
|
42
41
|
i18n: true
|
|
43
42
|
},
|
|
44
|
-
defaultValue:
|
|
43
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.caption,
|
|
45
44
|
validator: function validator(value) {
|
|
46
45
|
if (!value) {
|
|
47
46
|
return "标题必填";
|
|
@@ -53,7 +52,7 @@ export function createFormBaseFields(defaultValues) {
|
|
|
53
52
|
key: "isHideCaption",
|
|
54
53
|
type: "boolean",
|
|
55
54
|
component: "switch",
|
|
56
|
-
defaultValue:
|
|
55
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.isHideCaption,
|
|
57
56
|
props: {
|
|
58
57
|
showType: "checkbox"
|
|
59
58
|
},
|
|
@@ -75,7 +74,7 @@ export function createFormBaseFields(defaultValues) {
|
|
|
75
74
|
key: "labelPosition",
|
|
76
75
|
type: "string",
|
|
77
76
|
component: "radio",
|
|
78
|
-
defaultValue:
|
|
77
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.labelPosition,
|
|
79
78
|
props: {
|
|
80
79
|
showType: "solid",
|
|
81
80
|
options: [
|
|
@@ -94,7 +93,7 @@ export function createFormBaseFields(defaultValues) {
|
|
|
94
93
|
key: "defaultState",
|
|
95
94
|
type: "string",
|
|
96
95
|
component: "radio",
|
|
97
|
-
defaultValue:
|
|
96
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.defaultState,
|
|
98
97
|
props: {
|
|
99
98
|
showType: "solid",
|
|
100
99
|
options: [
|
|
@@ -114,14 +113,14 @@ export function createFormBaseFields(defaultValues) {
|
|
|
114
113
|
key: "required",
|
|
115
114
|
type: "boolean",
|
|
116
115
|
component: "switch",
|
|
117
|
-
defaultValue:
|
|
116
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.required
|
|
118
117
|
},
|
|
119
118
|
{
|
|
120
119
|
label: "提示文字",
|
|
121
120
|
key: "placeholder",
|
|
122
121
|
type: "string",
|
|
123
122
|
component: "input",
|
|
124
|
-
defaultValue:
|
|
123
|
+
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.placeholder,
|
|
125
124
|
props: {
|
|
126
125
|
maxLength: 80,
|
|
127
126
|
i18n: true
|
package/dist/esm/props/base.js
CHANGED
|
@@ -34,7 +34,6 @@ export var BaseProps = /*#__PURE__*/ function() {
|
|
|
34
34
|
"use strict";
|
|
35
35
|
function BaseProps(props) {
|
|
36
36
|
_class_call_check(this, BaseProps);
|
|
37
|
-
var _props, _props1;
|
|
38
37
|
/**
|
|
39
38
|
* 显示隐藏
|
|
40
39
|
* */ _define_property(this, "visible", void 0);
|
|
@@ -42,9 +41,9 @@ export var BaseProps = /*#__PURE__*/ function() {
|
|
|
42
41
|
* 开启表达式
|
|
43
42
|
* */ _define_property(this, "expression", void 0);
|
|
44
43
|
var _props_visible;
|
|
45
|
-
this.visible = (_props_visible =
|
|
44
|
+
this.visible = (_props_visible = props === null || props === void 0 ? void 0 : props.visible) !== null && _props_visible !== void 0 ? _props_visible : true;
|
|
46
45
|
var _props_expression;
|
|
47
|
-
this.expression = (_props_expression =
|
|
46
|
+
this.expression = (_props_expression = props === null || props === void 0 ? void 0 : props.expression) !== null && _props_expression !== void 0 ? _props_expression : false;
|
|
48
47
|
}
|
|
49
48
|
_create_class(BaseProps, [
|
|
50
49
|
{
|
|
@@ -90,11 +90,10 @@ export var CheckboxProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function CheckboxProps(props) {
|
|
91
91
|
_class_call_check(this, CheckboxProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "options", void 0);
|
|
96
95
|
var _props_options;
|
|
97
|
-
_this.options = (_props_options =
|
|
96
|
+
_this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
|
|
98
97
|
return _this;
|
|
99
98
|
}
|
|
100
99
|
return CheckboxProps;
|
|
@@ -90,17 +90,16 @@ export var InputNumberProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function InputNumberProps(props) {
|
|
91
91
|
_class_call_check(this, InputNumberProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props, _props1, _props2;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "max", void 0);
|
|
96
95
|
_define_property(_assert_this_initialized(_this), "min", void 0);
|
|
97
96
|
_define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
98
97
|
var _props_max;
|
|
99
|
-
_this.max = (_props_max =
|
|
98
|
+
_this.max = (_props_max = props === null || props === void 0 ? void 0 : props.max) !== null && _props_max !== void 0 ? _props_max : "";
|
|
100
99
|
var _props_min;
|
|
101
|
-
_this.min = (_props_min =
|
|
100
|
+
_this.min = (_props_min = props === null || props === void 0 ? void 0 : props.min) !== null && _props_min !== void 0 ? _props_min : "";
|
|
102
101
|
var _props_placeholder;
|
|
103
|
-
_this.placeholder = (_props_placeholder =
|
|
102
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
|
|
104
103
|
return _this;
|
|
105
104
|
}
|
|
106
105
|
return InputNumberProps;
|
package/dist/esm/props/input.js
CHANGED
|
@@ -90,20 +90,19 @@ export var InputProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function InputProps(props) {
|
|
91
91
|
_class_call_check(this, InputProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props, _props1, _props2, _props3;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "maxLength", void 0);
|
|
96
95
|
_define_property(_assert_this_initialized(_this), "minLength", void 0);
|
|
97
96
|
_define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
98
97
|
_define_property(_assert_this_initialized(_this), "i18n", void 0);
|
|
99
98
|
var _props_maxLength;
|
|
100
|
-
_this.maxLength = (_props_maxLength =
|
|
99
|
+
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : "";
|
|
101
100
|
var _props_minLength;
|
|
102
|
-
_this.minLength = (_props_minLength =
|
|
101
|
+
_this.minLength = (_props_minLength = props === null || props === void 0 ? void 0 : props.minLength) !== null && _props_minLength !== void 0 ? _props_minLength : "";
|
|
103
102
|
var _props_placeholder;
|
|
104
|
-
_this.placeholder = (_props_placeholder =
|
|
103
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
|
|
105
104
|
var _props_i18n;
|
|
106
|
-
_this.i18n = (_props_i18n =
|
|
105
|
+
_this.i18n = (_props_i18n = props === null || props === void 0 ? void 0 : props.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
|
|
107
106
|
return _this;
|
|
108
107
|
}
|
|
109
108
|
return InputProps;
|
package/dist/esm/props/radio.js
CHANGED
|
@@ -90,14 +90,13 @@ export var RadioProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function RadioProps(props) {
|
|
91
91
|
_class_call_check(this, RadioProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props, _props1;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "options", void 0);
|
|
96
95
|
_define_property(_assert_this_initialized(_this), "showType", void 0);
|
|
97
96
|
var _props_options;
|
|
98
|
-
_this.options = (_props_options =
|
|
97
|
+
_this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
|
|
99
98
|
var _props_showType;
|
|
100
|
-
_this.showType = (_props_showType =
|
|
99
|
+
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : "outline";
|
|
101
100
|
return _this;
|
|
102
101
|
}
|
|
103
102
|
return RadioProps;
|
package/dist/esm/props/select.js
CHANGED
|
@@ -90,14 +90,13 @@ export var SelectProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function SelectProps(props) {
|
|
91
91
|
_class_call_check(this, SelectProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props, _props1;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
96
95
|
_define_property(_assert_this_initialized(_this), "options", void 0);
|
|
97
96
|
var _props_placeholder;
|
|
98
|
-
_this.placeholder = (_props_placeholder =
|
|
97
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
|
|
99
98
|
var _props_options;
|
|
100
|
-
_this.options = (_props_options =
|
|
99
|
+
_this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
|
|
101
100
|
return _this;
|
|
102
101
|
}
|
|
103
102
|
return SelectProps;
|
package/dist/esm/props/switch.js
CHANGED
|
@@ -90,17 +90,16 @@ export var SwitchProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function SwitchProps(props) {
|
|
91
91
|
_class_call_check(this, SwitchProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props, _props1, _props2;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "showType", void 0);
|
|
96
95
|
_define_property(_assert_this_initialized(_this), "tips", void 0);
|
|
97
96
|
_define_property(_assert_this_initialized(_this), "disabled", void 0);
|
|
98
97
|
var _props_showType;
|
|
99
|
-
_this.showType = (_props_showType =
|
|
98
|
+
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : "switch";
|
|
100
99
|
var _props_tips;
|
|
101
|
-
_this.tips = (_props_tips =
|
|
100
|
+
_this.tips = (_props_tips = props === null || props === void 0 ? void 0 : props.tips) !== null && _props_tips !== void 0 ? _props_tips : "";
|
|
102
101
|
var _props_disabled;
|
|
103
|
-
_this.disabled = (_props_disabled =
|
|
102
|
+
_this.disabled = (_props_disabled = props === null || props === void 0 ? void 0 : props.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : false;
|
|
104
103
|
return _this;
|
|
105
104
|
}
|
|
106
105
|
return SwitchProps;
|
|
@@ -90,7 +90,6 @@ export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
90
90
|
function TextareaProps(props) {
|
|
91
91
|
_class_call_check(this, TextareaProps);
|
|
92
92
|
var _this;
|
|
93
|
-
var _props, _props1, _props2, _props3, _props4, _props5;
|
|
94
93
|
_this = _super.call(this, props);
|
|
95
94
|
_define_property(_assert_this_initialized(_this), "maxLength", void 0);
|
|
96
95
|
_define_property(_assert_this_initialized(_this), "minLength", void 0);
|
|
@@ -99,17 +98,17 @@ export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
99
98
|
_define_property(_assert_this_initialized(_this), "maxRows", void 0);
|
|
100
99
|
_define_property(_assert_this_initialized(_this), "minRows", void 0);
|
|
101
100
|
var _props_maxLength;
|
|
102
|
-
_this.maxLength = (_props_maxLength =
|
|
101
|
+
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : "";
|
|
103
102
|
var _props_minLength;
|
|
104
|
-
_this.minLength = (_props_minLength =
|
|
103
|
+
_this.minLength = (_props_minLength = props === null || props === void 0 ? void 0 : props.minLength) !== null && _props_minLength !== void 0 ? _props_minLength : "";
|
|
105
104
|
var _props_placeholder;
|
|
106
|
-
_this.placeholder = (_props_placeholder =
|
|
105
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
|
|
107
106
|
var _props_maxRows;
|
|
108
|
-
_this.maxRows = (_props_maxRows =
|
|
107
|
+
_this.maxRows = (_props_maxRows = props === null || props === void 0 ? void 0 : props.maxRows) !== null && _props_maxRows !== void 0 ? _props_maxRows : "";
|
|
109
108
|
var _props_minRows;
|
|
110
|
-
_this.minRows = (_props_minRows =
|
|
109
|
+
_this.minRows = (_props_minRows = props === null || props === void 0 ? void 0 : props.minRows) !== null && _props_minRows !== void 0 ? _props_minRows : "";
|
|
111
110
|
var _props_i18n;
|
|
112
|
-
_this.i18n = (_props_i18n =
|
|
111
|
+
_this.i18n = (_props_i18n = props === null || props === void 0 ? void 0 : props.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
|
|
113
112
|
return _this;
|
|
114
113
|
}
|
|
115
114
|
return TextareaProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-settings",
|
|
3
|
-
"version": "2.7.0-beta",
|
|
3
|
+
"version": "2.7.0-beta.4",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@byteluck-fe/model-driven-core": "2.7.0-beta",
|
|
30
|
-
"@byteluck-fe/model-driven-shared": "2.
|
|
29
|
+
"@byteluck-fe/model-driven-core": "2.7.0-beta.4",
|
|
30
|
+
"@byteluck-fe/model-driven-shared": "2.7.0-beta.4",
|
|
31
31
|
"tslib": "^2.1.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "1bf9f693724f41f144a37e4f81f2c06dfe2069de"
|
|
34
34
|
}
|