@byteluck-fe/model-driven-controls 7.0.0-props.43 → 7.0.0-props.44
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/formControls/Switch/designer.js +4 -4
- package/dist/esm/formControls/Switch/property.js +5 -3
- package/dist/esm/formControls/Switch/runtime.js +1 -1
- package/dist/esm/formControls/Switch/schema.json +12 -14
- package/dist/index.umd.js +1 -1
- package/dist/types/formControls/Switch/property.d.ts +4 -4
- package/package.json +2 -2
|
@@ -126,7 +126,7 @@ _define_property(SwitchControl, "controlEventKeys", [
|
|
|
126
126
|
'on_change',
|
|
127
127
|
'on_click'
|
|
128
128
|
]);
|
|
129
|
-
_define_property(SwitchControl, "controlFieldType", FieldTypes.
|
|
129
|
+
_define_property(SwitchControl, "controlFieldType", FieldTypes.DECIMAL);
|
|
130
130
|
_define_property(SwitchControl, "setting", [
|
|
131
131
|
{
|
|
132
132
|
key: 'data-bind',
|
|
@@ -159,14 +159,14 @@ _define_property(SwitchControl, "setting", [
|
|
|
159
159
|
visible: true,
|
|
160
160
|
name: 'defaultValue',
|
|
161
161
|
label: getLocaleText('CMD.defaultStatus', null, '默认状态'),
|
|
162
|
-
default:
|
|
162
|
+
default: 0,
|
|
163
163
|
options: [
|
|
164
164
|
{
|
|
165
|
-
value:
|
|
165
|
+
value: 1,
|
|
166
166
|
label: getLocaleText('CMD.on', null, '开启')
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
value:
|
|
169
|
+
value: 0,
|
|
170
170
|
label: getLocaleText('CMD.off', null, '关闭')
|
|
171
171
|
}
|
|
172
172
|
]
|
|
@@ -72,7 +72,7 @@ function _is_native_reflect_construct() {
|
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* name: rok_switch
|
|
75
|
-
* description:
|
|
75
|
+
* description: 开关组件,用于快速切换数值状态(0/1)。支持开关内外文字展示、默认状态、开启/关闭文案与颜色配置,适合状态控制与流程开关场景。
|
|
76
76
|
*/ import SwitchControl from './designer';
|
|
77
77
|
import { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules } from '@byteluck-fe/model-driven-core';
|
|
78
78
|
var SwitchPropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
@@ -96,7 +96,9 @@ var SwitchPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRunti
|
|
|
96
96
|
props
|
|
97
97
|
]);
|
|
98
98
|
if (_this[0] !== undefined) {
|
|
99
|
-
_this[0].type = '
|
|
99
|
+
_this[0].type = 'number';
|
|
100
|
+
_this[0].min = 0;
|
|
101
|
+
_this[0].max = 1;
|
|
100
102
|
}
|
|
101
103
|
return _this;
|
|
102
104
|
}
|
|
@@ -113,7 +115,7 @@ var SwitchProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
|
113
115
|
props
|
|
114
116
|
]), _define_property(_this, "defaultValue", void 0), _define_property(_this, "textDisplayStyle", void 0), _define_property(_this, "checkedText", void 0), _define_property(_this, "checkedTextColor", void 0), _define_property(_this, "checkedBackgroundColor", void 0), _define_property(_this, "uncheckedText", void 0), _define_property(_this, "uncheckedTextColor", void 0), _define_property(_this, "uncheckedBackgroundColor", void 0);
|
|
115
117
|
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : SwitchControl.controlName;
|
|
116
|
-
_this.defaultValue = (_ref1 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref1 !== void 0 ? _ref1 :
|
|
118
|
+
_this.defaultValue = (_ref1 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref1 !== void 0 ? _ref1 : 0;
|
|
117
119
|
_this.textDisplayStyle = (_ref2 = props === null || props === void 0 ? void 0 : props.textDisplayStyle) !== null && _ref2 !== void 0 ? _ref2 : 'inside';
|
|
118
120
|
_this.checkedText = (_ref3 = props === null || props === void 0 ? void 0 : props.checkedText) !== null && _ref3 !== void 0 ? _ref3 : '开启';
|
|
119
121
|
_this.checkedTextColor = (_ref4 = props === null || props === void 0 ? void 0 : props.checkedTextColor) !== null && _ref4 !== void 0 ? _ref4 : '';
|
|
@@ -109,6 +109,6 @@ var SwitchControl = /*#__PURE__*/ function(RuntimeFormControl) {
|
|
|
109
109
|
]);
|
|
110
110
|
return SwitchControl;
|
|
111
111
|
}(RuntimeFormControl);
|
|
112
|
-
_define_property(SwitchControl, "controlFieldType", FieldTypes.
|
|
112
|
+
_define_property(SwitchControl, "controlFieldType", FieldTypes.DECIMAL);
|
|
113
113
|
export default SwitchControl;
|
|
114
114
|
export { SwitchControl as RuntimeSwitchControl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rok_switch",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "开关组件,用于快速切换数值状态(0/1)。支持开关内外文字展示、默认状态、开启/关闭文案与颜色配置,适合状态控制与流程开关场景。",
|
|
4
4
|
"parameters": {
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
@@ -127,9 +127,17 @@
|
|
|
127
127
|
"description": "绑定数据项"
|
|
128
128
|
},
|
|
129
129
|
"defaultValue": {
|
|
130
|
-
"type": "
|
|
131
|
-
"
|
|
132
|
-
|
|
130
|
+
"type": "integer",
|
|
131
|
+
"enum": [
|
|
132
|
+
0,
|
|
133
|
+
1
|
|
134
|
+
],
|
|
135
|
+
"description": "默认值;",
|
|
136
|
+
"default": 0,
|
|
137
|
+
"enumDescription": [
|
|
138
|
+
"关闭",
|
|
139
|
+
"开启"
|
|
140
|
+
]
|
|
133
141
|
},
|
|
134
142
|
"placeholder": {
|
|
135
143
|
"type": "string",
|
|
@@ -174,11 +182,6 @@
|
|
|
174
182
|
"description": "开启背景颜色",
|
|
175
183
|
"default": ""
|
|
176
184
|
},
|
|
177
|
-
"checkedInternational": {
|
|
178
|
-
"type": "boolean",
|
|
179
|
-
"description": "开启国际化",
|
|
180
|
-
"default": false
|
|
181
|
-
},
|
|
182
185
|
"uncheckedText": {
|
|
183
186
|
"type": "string",
|
|
184
187
|
"description": "关闭文字",
|
|
@@ -193,11 +196,6 @@
|
|
|
193
196
|
"type": "string",
|
|
194
197
|
"description": "关闭背景颜色",
|
|
195
198
|
"default": ""
|
|
196
|
-
},
|
|
197
|
-
"uncheckedInternational": {
|
|
198
|
-
"type": "boolean",
|
|
199
|
-
"description": "关闭国际化",
|
|
200
|
-
"default": false
|
|
201
199
|
}
|
|
202
200
|
},
|
|
203
201
|
"required": []
|