@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.
- package/dist/esm/api-doc-index.js +2 -0
- package/dist/esm/formControls/Barcode/designer.js +252 -0
- package/dist/esm/formControls/Barcode/index.js +11 -0
- package/dist/esm/formControls/Barcode/property.js +133 -0
- package/dist/esm/formControls/Barcode/runtime.js +114 -0
- package/dist/esm/formControls/Barcode/schema.json +206 -0
- package/dist/esm/formControls/QrCode/designer.js +337 -0
- package/dist/esm/formControls/QrCode/index.js +11 -0
- package/dist/esm/formControls/QrCode/property.js +134 -0
- package/dist/esm/formControls/QrCode/runtime.js +114 -0
- package/dist/esm/formControls/QrCode/schema.json +256 -0
- package/dist/esm/formControls/Switch/designer.js +5 -1
- package/dist/esm/formControls/index.js +2 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +2 -0
- package/dist/types/formControls/Barcode/designer.d.ts +15 -0
- package/dist/types/formControls/Barcode/index.d.ts +12 -0
- package/dist/types/formControls/Barcode/property.d.ts +72 -0
- package/dist/types/formControls/Barcode/runtime.d.ts +12 -0
- package/dist/types/formControls/QrCode/designer.d.ts +15 -0
- package/dist/types/formControls/QrCode/index.d.ts +12 -0
- package/dist/types/formControls/QrCode/property.d.ts +79 -0
- package/dist/types/formControls/QrCode/runtime.d.ts +12 -0
- package/dist/types/formControls/index.d.ts +4 -0
- package/dist/types/type.d.ts +3 -1
- package/package.json +5 -5
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rok_barcode",
|
|
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
|
+
"codeContent": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "条码内容(编码文本)",
|
|
152
|
+
"default": ""
|
|
153
|
+
},
|
|
154
|
+
"codeHeight": {
|
|
155
|
+
"type": [
|
|
156
|
+
"integer",
|
|
157
|
+
"string"
|
|
158
|
+
],
|
|
159
|
+
"description": "条码高度;单位 px",
|
|
160
|
+
"default": 40
|
|
161
|
+
},
|
|
162
|
+
"codeWidth": {
|
|
163
|
+
"type": [
|
|
164
|
+
"integer",
|
|
165
|
+
"string"
|
|
166
|
+
],
|
|
167
|
+
"description": "条码宽度;单位 px",
|
|
168
|
+
"default": 200
|
|
169
|
+
},
|
|
170
|
+
"codeMargin": {
|
|
171
|
+
"type": [
|
|
172
|
+
"integer",
|
|
173
|
+
"string"
|
|
174
|
+
],
|
|
175
|
+
"description": "边距;单位 px",
|
|
176
|
+
"default": 0
|
|
177
|
+
},
|
|
178
|
+
"backgroundColor": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "背景色",
|
|
181
|
+
"default": "#ffffff"
|
|
182
|
+
},
|
|
183
|
+
"barcodeColor": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"description": "条码颜色",
|
|
186
|
+
"default": "#000000"
|
|
187
|
+
},
|
|
188
|
+
"align": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"enum": [
|
|
191
|
+
"left",
|
|
192
|
+
"center",
|
|
193
|
+
"right"
|
|
194
|
+
],
|
|
195
|
+
"description": "对齐;",
|
|
196
|
+
"default": "left",
|
|
197
|
+
"enumDescription": [
|
|
198
|
+
"左对齐",
|
|
199
|
+
"居中",
|
|
200
|
+
"右对齐"
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": []
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
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 { DesignerFormControl, COMMON_SETTING_TYPE } from '@byteluck-fe/model-driven-core';
|
|
88
|
+
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
89
|
+
import QrCodeProperty from './property';
|
|
90
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
91
|
+
var QrCodeControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
92
|
+
"use strict";
|
|
93
|
+
_inherits(QrCodeControl, DesignerFormControl);
|
|
94
|
+
function QrCodeControl(props) {
|
|
95
|
+
_class_call_check(this, QrCodeControl);
|
|
96
|
+
var _this;
|
|
97
|
+
_this = _call_super(this, QrCodeControl, [
|
|
98
|
+
props
|
|
99
|
+
]), _define_property(_this, "props", void 0);
|
|
100
|
+
_this.props = new QrCodeProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
101
|
+
return _this;
|
|
102
|
+
}
|
|
103
|
+
_create_class(QrCodeControl, null, [
|
|
104
|
+
{
|
|
105
|
+
key: "controlName",
|
|
106
|
+
get: function get() {
|
|
107
|
+
return getLocaleText('CMD.qrCode', null, '二维码');
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "controlIcon",
|
|
112
|
+
get: function get() {
|
|
113
|
+
return 'iconerweima';
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: "controlType",
|
|
118
|
+
get: function get() {
|
|
119
|
+
return 'qr-code';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]);
|
|
123
|
+
return QrCodeControl;
|
|
124
|
+
}(DesignerFormControl);
|
|
125
|
+
_define_property(QrCodeControl, "controlEventKeys", [
|
|
126
|
+
'on_change',
|
|
127
|
+
'on_click'
|
|
128
|
+
]);
|
|
129
|
+
_define_property(QrCodeControl, "controlFieldType", FieldTypes.VARCHAR);
|
|
130
|
+
_define_property(QrCodeControl, "setting", [
|
|
131
|
+
{
|
|
132
|
+
key: 'data-bind',
|
|
133
|
+
visible: true
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
key: 'field-type',
|
|
137
|
+
visible: true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: 'caption',
|
|
141
|
+
showItems: [
|
|
142
|
+
COMMON_SETTING_TYPE.CAPTION,
|
|
143
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION
|
|
144
|
+
],
|
|
145
|
+
visible: true
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
key: 'label-position',
|
|
149
|
+
visible: true
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: 'default-state',
|
|
153
|
+
visible: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: 'common-setting',
|
|
157
|
+
visible: true,
|
|
158
|
+
showItems: [
|
|
159
|
+
COMMON_SETTING_TYPE.REQUIRED,
|
|
160
|
+
COMMON_SETTING_TYPE.IS_HIDE,
|
|
161
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
162
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
key: 'default-value',
|
|
167
|
+
visible: true
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
key: 'common-group',
|
|
171
|
+
visible: true,
|
|
172
|
+
label: getLocaleText('CMD.propsSetting', null, '属性设置'),
|
|
173
|
+
children: [
|
|
174
|
+
{
|
|
175
|
+
key: 'common-select',
|
|
176
|
+
visible: true,
|
|
177
|
+
name: 'qrVersion',
|
|
178
|
+
label: getLocaleText('CMD.qrVersion', null, '二维码版本'),
|
|
179
|
+
default: 'auto',
|
|
180
|
+
options: [
|
|
181
|
+
{
|
|
182
|
+
value: 'auto',
|
|
183
|
+
label: getLocaleText('CMD.auto', null, '自动')
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
value: '1',
|
|
187
|
+
label: 'V1'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
value: '2',
|
|
191
|
+
label: 'V2'
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
value: '3',
|
|
195
|
+
label: 'V3'
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
value: '4',
|
|
199
|
+
label: 'V4'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
value: '5',
|
|
203
|
+
label: 'V5'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
value: '6',
|
|
207
|
+
label: 'V6'
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
value: '7',
|
|
211
|
+
label: 'V7'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
value: '8',
|
|
215
|
+
label: 'V8'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
value: '9',
|
|
219
|
+
label: 'V9'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
value: '10',
|
|
223
|
+
label: 'V10'
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
key: 'common-select',
|
|
229
|
+
visible: true,
|
|
230
|
+
name: 'errorCorrectionLevel',
|
|
231
|
+
label: getLocaleText('CMD.errorCorrectionLevel', null, '容错级别'),
|
|
232
|
+
default: 'M',
|
|
233
|
+
options: [
|
|
234
|
+
{
|
|
235
|
+
value: 'L',
|
|
236
|
+
label: 'L'
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
value: 'M',
|
|
240
|
+
label: 'M'
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
value: 'Q',
|
|
244
|
+
label: 'Q'
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
value: 'H',
|
|
248
|
+
label: 'H'
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
key: 'common-button-radio',
|
|
254
|
+
visible: true,
|
|
255
|
+
name: 'codeMode',
|
|
256
|
+
label: getLocaleText('CMD.codeMode', null, '码制'),
|
|
257
|
+
default: 'byte',
|
|
258
|
+
options: [
|
|
259
|
+
{
|
|
260
|
+
value: 'byte',
|
|
261
|
+
label: getLocaleText('CMD.byte', null, '字节')
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
value: 'numeric',
|
|
265
|
+
label: getLocaleText('CMD.numeric', null, '数字')
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
value: 'alphanumeric',
|
|
269
|
+
label: getLocaleText('CMD.alphanumeric', null, '字母数字')
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
key: 'common-input-number',
|
|
275
|
+
visible: true,
|
|
276
|
+
name: 'size',
|
|
277
|
+
layout: 'horizontal',
|
|
278
|
+
label: getLocaleText('CMD.sizePx', null, '尺寸(px)')
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
key: 'common-input-number',
|
|
282
|
+
visible: true,
|
|
283
|
+
name: 'codeMargin',
|
|
284
|
+
layout: 'horizontal',
|
|
285
|
+
label: getLocaleText('CMD.qrCodeMarginPx', null, '边距(px)')
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
key: 'common-group',
|
|
291
|
+
visible: true,
|
|
292
|
+
label: getLocaleText('CMD.styleSetting', null, '样式设置'),
|
|
293
|
+
children: [
|
|
294
|
+
{
|
|
295
|
+
key: 'color',
|
|
296
|
+
visible: true,
|
|
297
|
+
name: 'backgroundColor',
|
|
298
|
+
layout: 'horizontal',
|
|
299
|
+
label: getLocaleText('CMD.backgroundColor', null, '背景色')
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
key: 'color',
|
|
303
|
+
visible: true,
|
|
304
|
+
name: 'barcodeColor',
|
|
305
|
+
layout: 'horizontal',
|
|
306
|
+
label: getLocaleText('CMD.qrCodeColor', null, '条码颜色')
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
key: 'common-button-radio',
|
|
310
|
+
visible: true,
|
|
311
|
+
name: 'align',
|
|
312
|
+
label: getLocaleText('CMD.align', null, '对齐'),
|
|
313
|
+
default: 'left',
|
|
314
|
+
options: [
|
|
315
|
+
{
|
|
316
|
+
value: 'left',
|
|
317
|
+
label: getLocaleText('CMD.left', null, '左对齐')
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
value: 'center',
|
|
321
|
+
label: getLocaleText('CMD.center', null, '居中')
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
value: 'right',
|
|
325
|
+
label: getLocaleText('CMD.right', null, '右对齐')
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
key: 'super-setting',
|
|
333
|
+
visible: true
|
|
334
|
+
}
|
|
335
|
+
]);
|
|
336
|
+
export default QrCodeControl;
|
|
337
|
+
export { QrCodeControl as DesignerQrCodeControl };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
|
+
export default {
|
|
5
|
+
Designer: Designer,
|
|
6
|
+
Runtime: Runtime,
|
|
7
|
+
Property: Property
|
|
8
|
+
};
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|
|
@@ -0,0 +1,134 @@
|
|
|
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 _define_property(obj, key, value) {
|
|
17
|
+
if (key in obj) {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
value: value,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
obj[key] = value;
|
|
26
|
+
}
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
function _get_prototype_of(o) {
|
|
30
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
31
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
32
|
+
};
|
|
33
|
+
return _get_prototype_of(o);
|
|
34
|
+
}
|
|
35
|
+
function _inherits(subClass, superClass) {
|
|
36
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
37
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
38
|
+
}
|
|
39
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
40
|
+
constructor: {
|
|
41
|
+
value: subClass,
|
|
42
|
+
writable: true,
|
|
43
|
+
configurable: true
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
47
|
+
}
|
|
48
|
+
function _possible_constructor_return(self, call) {
|
|
49
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
50
|
+
return call;
|
|
51
|
+
}
|
|
52
|
+
return _assert_this_initialized(self);
|
|
53
|
+
}
|
|
54
|
+
function _set_prototype_of(o, p) {
|
|
55
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
56
|
+
o.__proto__ = p;
|
|
57
|
+
return o;
|
|
58
|
+
};
|
|
59
|
+
return _set_prototype_of(o, p);
|
|
60
|
+
}
|
|
61
|
+
function _type_of(obj) {
|
|
62
|
+
"@swc/helpers - typeof";
|
|
63
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
|
+
}
|
|
65
|
+
function _is_native_reflect_construct() {
|
|
66
|
+
try {
|
|
67
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
68
|
+
} catch (_) {}
|
|
69
|
+
return (_is_native_reflect_construct = function() {
|
|
70
|
+
return !!result;
|
|
71
|
+
})();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* name: rok_qr_code
|
|
75
|
+
* description: 二维码组件,用于展示或绑定二维码内容。支持尺寸、边距、前景/背景色与对齐方式配置,适合链接、单据追溯等场景。
|
|
76
|
+
*/ import QrCodeControl from './designer';
|
|
77
|
+
import { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules } from '@byteluck-fe/model-driven-core';
|
|
78
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
79
|
+
var QrCodePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
80
|
+
"use strict";
|
|
81
|
+
_inherits(QrCodePropertyRules, BaseControlPropertyRules);
|
|
82
|
+
function QrCodePropertyRules(props) {
|
|
83
|
+
_class_call_check(this, QrCodePropertyRules);
|
|
84
|
+
return _call_super(this, QrCodePropertyRules, [
|
|
85
|
+
props
|
|
86
|
+
]);
|
|
87
|
+
}
|
|
88
|
+
return QrCodePropertyRules;
|
|
89
|
+
}(BaseControlPropertyRules);
|
|
90
|
+
var QrCodePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntimeRules) {
|
|
91
|
+
"use strict";
|
|
92
|
+
_inherits(QrCodePropertyRuntimeRules, BaseControlPropertyRuntimeRules);
|
|
93
|
+
function QrCodePropertyRuntimeRules(props) {
|
|
94
|
+
_class_call_check(this, QrCodePropertyRuntimeRules);
|
|
95
|
+
var _this;
|
|
96
|
+
_this = _call_super(this, QrCodePropertyRuntimeRules, [
|
|
97
|
+
props
|
|
98
|
+
]);
|
|
99
|
+
if (_this[0] !== undefined) {
|
|
100
|
+
_this[0].type = 'string';
|
|
101
|
+
}
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
return QrCodePropertyRuntimeRules;
|
|
105
|
+
}(BaseControlPropertyRuntimeRules);
|
|
106
|
+
var QrCodeProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
107
|
+
"use strict";
|
|
108
|
+
_inherits(QrCodeProperty, BaseControlProperty);
|
|
109
|
+
function QrCodeProperty(props) {
|
|
110
|
+
_class_call_check(this, QrCodeProperty);
|
|
111
|
+
var _this;
|
|
112
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10;
|
|
113
|
+
_this = _call_super(this, QrCodeProperty, [
|
|
114
|
+
props
|
|
115
|
+
]), _define_property(_this, "defaultValue", void 0), _define_property(_this, "qrVersion", void 0), _define_property(_this, "errorCorrectionLevel", void 0), _define_property(_this, "codeMode", void 0), _define_property(_this, "size", void 0), _define_property(_this, "codeMargin", void 0), _define_property(_this, "backgroundColor", void 0), _define_property(_this, "barcodeColor", void 0), _define_property(_this, "align", void 0);
|
|
116
|
+
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : QrCodeControl.controlName;
|
|
117
|
+
_this.placeholder = (_ref1 = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _ref1 !== void 0 ? _ref1 : getLocaleText('CMD.pleaseEnter', null, '请输入');
|
|
118
|
+
_this.defaultValue = (_ref2 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : '';
|
|
119
|
+
_this.qrVersion = (_ref3 = props === null || props === void 0 ? void 0 : props.qrVersion) !== null && _ref3 !== void 0 ? _ref3 : 'auto';
|
|
120
|
+
_this.errorCorrectionLevel = (_ref4 = props === null || props === void 0 ? void 0 : props.errorCorrectionLevel) !== null && _ref4 !== void 0 ? _ref4 : 'M';
|
|
121
|
+
_this.codeMode = (_ref5 = props === null || props === void 0 ? void 0 : props.codeMode) !== null && _ref5 !== void 0 ? _ref5 : 'byte';
|
|
122
|
+
_this.size = (_ref6 = props === null || props === void 0 ? void 0 : props.size) !== null && _ref6 !== void 0 ? _ref6 : 160;
|
|
123
|
+
_this.codeMargin = (_ref7 = props === null || props === void 0 ? void 0 : props.codeMargin) !== null && _ref7 !== void 0 ? _ref7 : 0;
|
|
124
|
+
_this.backgroundColor = (_ref8 = props === null || props === void 0 ? void 0 : props.backgroundColor) !== null && _ref8 !== void 0 ? _ref8 : '#ffffff';
|
|
125
|
+
_this.barcodeColor = (_ref9 = props === null || props === void 0 ? void 0 : props.barcodeColor) !== null && _ref9 !== void 0 ? _ref9 : '#000000';
|
|
126
|
+
_this.align = (_ref10 = props === null || props === void 0 ? void 0 : props.align) !== null && _ref10 !== void 0 ? _ref10 : 'left';
|
|
127
|
+
return _this;
|
|
128
|
+
}
|
|
129
|
+
return QrCodeProperty;
|
|
130
|
+
}(BaseControlProperty);
|
|
131
|
+
_define_property(QrCodeProperty, "Rules", QrCodePropertyRules);
|
|
132
|
+
_define_property(QrCodeProperty, "RuntimeRules", QrCodePropertyRuntimeRules);
|
|
133
|
+
export default QrCodeProperty;
|
|
134
|
+
export { QrCodeProperty, QrCodePropertyRules, QrCodePropertyRuntimeRules, };
|