@byteluck-fe/model-driven-controls 7.0.0-props.47 → 7.0.0-props.49

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.
@@ -0,0 +1,114 @@
1
+ function _assert_this_initialized(self) {
2
+ if (self === void 0) {
3
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
+ }
5
+ return self;
6
+ }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
11
+ function _class_call_check(instance, Constructor) {
12
+ if (!(instance instanceof Constructor)) {
13
+ throw new TypeError("Cannot call a class as a function");
14
+ }
15
+ }
16
+ function _defineProperties(target, props) {
17
+ for(var i = 0; i < props.length; i++){
18
+ var descriptor = props[i];
19
+ descriptor.enumerable = descriptor.enumerable || false;
20
+ descriptor.configurable = true;
21
+ if ("value" in descriptor) descriptor.writable = true;
22
+ Object.defineProperty(target, descriptor.key, descriptor);
23
+ }
24
+ }
25
+ function _create_class(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
29
+ }
30
+ function _define_property(obj, key, value) {
31
+ if (key in obj) {
32
+ Object.defineProperty(obj, key, {
33
+ value: value,
34
+ enumerable: true,
35
+ configurable: true,
36
+ writable: true
37
+ });
38
+ } else {
39
+ obj[key] = value;
40
+ }
41
+ return obj;
42
+ }
43
+ function _get_prototype_of(o) {
44
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
45
+ return o.__proto__ || Object.getPrototypeOf(o);
46
+ };
47
+ return _get_prototype_of(o);
48
+ }
49
+ function _inherits(subClass, superClass) {
50
+ if (typeof superClass !== "function" && superClass !== null) {
51
+ throw new TypeError("Super expression must either be null or a function");
52
+ }
53
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
54
+ constructor: {
55
+ value: subClass,
56
+ writable: true,
57
+ configurable: true
58
+ }
59
+ });
60
+ if (superClass) _set_prototype_of(subClass, superClass);
61
+ }
62
+ function _possible_constructor_return(self, call) {
63
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
64
+ return call;
65
+ }
66
+ return _assert_this_initialized(self);
67
+ }
68
+ function _set_prototype_of(o, p) {
69
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
70
+ o.__proto__ = p;
71
+ return o;
72
+ };
73
+ return _set_prototype_of(o, p);
74
+ }
75
+ function _type_of(obj) {
76
+ "@swc/helpers - typeof";
77
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
78
+ }
79
+ function _is_native_reflect_construct() {
80
+ try {
81
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
82
+ } catch (_) {}
83
+ return (_is_native_reflect_construct = function() {
84
+ return !!result;
85
+ })();
86
+ }
87
+ import { RuntimeFormControl } from '@byteluck-fe/model-driven-core';
88
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
89
+ import QrCodeProperty from './property';
90
+ var QrCodeControl = /*#__PURE__*/ function(RuntimeFormControl) {
91
+ "use strict";
92
+ _inherits(QrCodeControl, RuntimeFormControl);
93
+ function QrCodeControl(props) {
94
+ _class_call_check(this, QrCodeControl);
95
+ var _this;
96
+ _this = _call_super(this, QrCodeControl, [
97
+ props
98
+ ]), _define_property(_this, "props", void 0);
99
+ _this.props = new QrCodeProperty(props === null || props === void 0 ? void 0 : props.props);
100
+ return _this;
101
+ }
102
+ _create_class(QrCodeControl, null, [
103
+ {
104
+ key: "controlType",
105
+ get: function get() {
106
+ return 'qr-code';
107
+ }
108
+ }
109
+ ]);
110
+ return QrCodeControl;
111
+ }(RuntimeFormControl);
112
+ _define_property(QrCodeControl, "controlFieldType", FieldTypes.VARCHAR);
113
+ export default QrCodeControl;
114
+ export { QrCodeControl as RuntimeQrCodeControl };
@@ -0,0 +1,256 @@
1
+ {
2
+ "name": "rok_qr_code",
3
+ "description": "二维码组件,用于展示或绑定二维码内容。支持尺寸、边距、前景/背景色与对齐方式配置,适合链接、单据追溯等场景。",
4
+ "parameters": {
5
+ "type": "object",
6
+ "properties": {
7
+ "isHide": {
8
+ "type": "boolean",
9
+ "description": "是否隐藏",
10
+ "default": false
11
+ },
12
+ "caption": {
13
+ "type": "string",
14
+ "description": "标题",
15
+ "default": ""
16
+ },
17
+ "defaultState": {
18
+ "type": "string",
19
+ "enum": [
20
+ "default",
21
+ "readonly"
22
+ ],
23
+ "description": "默认状态",
24
+ "default": "default",
25
+ "enumDescription": [
26
+ "default",
27
+ "readonly"
28
+ ]
29
+ },
30
+ "captionSize": {
31
+ "type": "string",
32
+ "description": "标题大小",
33
+ "default": ""
34
+ },
35
+ "captionColor": {
36
+ "type": "string",
37
+ "description": "标题颜色",
38
+ "default": ""
39
+ },
40
+ "isCaptionItalic": {
41
+ "type": "boolean",
42
+ "description": "标题斜体",
43
+ "default": false
44
+ },
45
+ "isHideCaption": {
46
+ "type": "boolean",
47
+ "description": "隐藏标题",
48
+ "default": false
49
+ },
50
+ "isShowCaptionTip": {
51
+ "type": "boolean",
52
+ "description": "显示气泡提示",
53
+ "default": false
54
+ },
55
+ "captionTip": {
56
+ "type": "string",
57
+ "description": "气泡提示语",
58
+ "default": ""
59
+ },
60
+ "labelPosition": {
61
+ "type": "string",
62
+ "enum": [
63
+ "top",
64
+ "left"
65
+ ],
66
+ "description": "标题布局",
67
+ "default": "",
68
+ "enumDescription": [
69
+ "top",
70
+ "left"
71
+ ]
72
+ },
73
+ "dataBind": {
74
+ "anyOf": [
75
+ {
76
+ "type": "object",
77
+ "properties": {
78
+ "dataCode": {
79
+ "type": "string",
80
+ "description": "数据模型编码",
81
+ "default": ""
82
+ },
83
+ "fieldCode": {
84
+ "type": "string",
85
+ "description": "字段编码",
86
+ "default": ""
87
+ },
88
+ "fieldType": {
89
+ "type": "string",
90
+ "description": "字段类型",
91
+ "default": ""
92
+ },
93
+ "aliasCode": {
94
+ "type": "string",
95
+ "description": "表别名"
96
+ }
97
+ }
98
+ },
99
+ {
100
+ "type": "object",
101
+ "additionalProperties": {
102
+ "type": "object",
103
+ "properties": {
104
+ "dataCode": {
105
+ "type": "string",
106
+ "description": "数据模型编码",
107
+ "default": ""
108
+ },
109
+ "fieldCode": {
110
+ "type": "string",
111
+ "description": "字段编码",
112
+ "default": ""
113
+ },
114
+ "fieldType": {
115
+ "type": "string",
116
+ "description": "字段类型",
117
+ "default": ""
118
+ },
119
+ "aliasCode": {
120
+ "type": "string",
121
+ "description": "表别名"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ ],
127
+ "description": "绑定数据项"
128
+ },
129
+ "defaultValue": {
130
+ "type": "string",
131
+ "description": "默认值",
132
+ "default": ""
133
+ },
134
+ "placeholder": {
135
+ "type": "string",
136
+ "description": "提示文字",
137
+ "default": ""
138
+ },
139
+ "required": {
140
+ "type": "boolean",
141
+ "description": "必填",
142
+ "default": false
143
+ },
144
+ "requiredMessage": {
145
+ "type": "string",
146
+ "description": "必填提示文案",
147
+ "default": ""
148
+ },
149
+ "qrVersion": {
150
+ "type": "string",
151
+ "enum": [
152
+ "auto",
153
+ "1",
154
+ "2",
155
+ "3",
156
+ "4",
157
+ "5",
158
+ "6",
159
+ "7",
160
+ "8",
161
+ "9",
162
+ "10"
163
+ ],
164
+ "description": "二维码版本;",
165
+ "default": "auto",
166
+ "enumDescription": [
167
+ "自动",
168
+ "1",
169
+ "2",
170
+ "3",
171
+ "4",
172
+ "5",
173
+ "6",
174
+ "7",
175
+ "8",
176
+ "9",
177
+ "10"
178
+ ]
179
+ },
180
+ "errorCorrectionLevel": {
181
+ "type": "string",
182
+ "enum": [
183
+ "L",
184
+ "M",
185
+ "Q",
186
+ "H"
187
+ ],
188
+ "description": "容错级别;",
189
+ "default": "M",
190
+ "enumDescription": [
191
+ "低",
192
+ "中",
193
+ "较高",
194
+ "高"
195
+ ]
196
+ },
197
+ "codeMode": {
198
+ "type": "string",
199
+ "enum": [
200
+ "byte",
201
+ "numeric",
202
+ "alphanumeric"
203
+ ],
204
+ "description": "码制;",
205
+ "default": "byte",
206
+ "enumDescription": [
207
+ "字节",
208
+ "数字",
209
+ "字母数字"
210
+ ]
211
+ },
212
+ "size": {
213
+ "type": [
214
+ "integer",
215
+ "string"
216
+ ],
217
+ "description": "尺寸;单位 px",
218
+ "default": 160
219
+ },
220
+ "codeMargin": {
221
+ "type": [
222
+ "integer",
223
+ "string"
224
+ ],
225
+ "description": "边距;单位 px",
226
+ "default": 0
227
+ },
228
+ "backgroundColor": {
229
+ "type": "string",
230
+ "description": "背景色",
231
+ "default": "#ffffff"
232
+ },
233
+ "barcodeColor": {
234
+ "type": "string",
235
+ "description": "码点颜色",
236
+ "default": "#000000"
237
+ },
238
+ "align": {
239
+ "type": "string",
240
+ "enum": [
241
+ "left",
242
+ "center",
243
+ "right"
244
+ ],
245
+ "description": "对齐;",
246
+ "default": "left",
247
+ "enumDescription": [
248
+ "左对齐",
249
+ "居中",
250
+ "右对齐"
251
+ ]
252
+ }
253
+ },
254
+ "required": []
255
+ }
256
+ }
@@ -144,6 +144,10 @@ _define_property(SwitchControl, "setting", [
144
144
  key: 'label-position',
145
145
  visible: true
146
146
  },
147
+ {
148
+ key: 'default-state',
149
+ visible: true
150
+ },
147
151
  {
148
152
  key: 'common-setting',
149
153
  visible: true,
@@ -158,7 +162,7 @@ _define_property(SwitchControl, "setting", [
158
162
  key: 'common-button-radio',
159
163
  visible: true,
160
164
  name: 'defaultValue',
161
- label: getLocaleText('CMD.defaultStatus', null, '默认状态'),
165
+ label: getLocaleText('CMD.defaultStatus', null, '开关状态'),
162
166
  default: 0,
163
167
  options: [
164
168
  {
@@ -7,6 +7,8 @@ export { default as Number } from './Number';
7
7
  export { default as Slider } from './Slider';
8
8
  export { default as Switch } from './Switch';
9
9
  export { default as Tag } from './Tag';
10
+ export { default as Barcode } from './Barcode';
11
+ export { default as QrCode } from './QrCode';
10
12
  export { default as DatePicker } from './DatePicker';
11
13
  export { default as DateRange } from './DateRange';
12
14
  export { default as TimePicker } from './TimePicker';