@byteluck-fe/model-driven-controls 7.0.0-props.38 → 7.0.0-props.39
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.
|
@@ -74,7 +74,8 @@ function _is_native_reflect_construct() {
|
|
|
74
74
|
* name: rok_tag
|
|
75
75
|
* description: 标签组件,参考 ant-design-vue 标签能力。支持标签/文本两种展示形式、样式主题、尺寸、字体风格和对齐方式配置,适合状态展示与轻量信息标记场景。
|
|
76
76
|
*/ import TagControl from './designer';
|
|
77
|
-
import { BaseControlProperty, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, DataSourceBind, MultistageFillingItem } from '@byteluck-fe/model-driven-core';
|
|
77
|
+
import { BaseControlProperty, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, DataSourceBind, MultistageFillingItem, initOptions } from '@byteluck-fe/model-driven-core';
|
|
78
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
78
79
|
var TagPropertyRules = /*#__PURE__*/ function(OptionAndDataSourcePropertyRules) {
|
|
79
80
|
"use strict";
|
|
80
81
|
_inherits(TagPropertyRules, OptionAndDataSourcePropertyRules);
|
|
@@ -108,19 +109,33 @@ var TagProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
|
108
109
|
function TagProperty(props) {
|
|
109
110
|
_class_call_check(this, TagProperty);
|
|
110
111
|
var _this;
|
|
111
|
-
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
112
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
|
|
112
113
|
_this = _call_super(this, TagProperty, [
|
|
113
114
|
props
|
|
114
|
-
]), _define_property(_this, "defaultValue", void 0), _define_property(_this, "displayType", void 0), _define_property(_this, "tagStyle", void 0), _define_property(_this, "size", void 0), _define_property(_this, "align", void 0), _define_property(_this, "optionConfig", void 0), _define_property(_this, "datasourceBind", void 0), _define_property(_this, "multistageFilling", void 0), _define_property(_this, "openMultistageFilling", void 0);
|
|
115
|
-
_this.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
]), _define_property(_this, "defaultValue", void 0), _define_property(_this, "displayType", void 0), _define_property(_this, "tagStyle", void 0), _define_property(_this, "size", void 0), _define_property(_this, "align", void 0), _define_property(_this, "options", void 0), _define_property(_this, "optionConfig", void 0), _define_property(_this, "datasourceBind", void 0), _define_property(_this, "multistageFilling", void 0), _define_property(_this, "openMultistageFilling", void 0);
|
|
116
|
+
_this.options = initOptions((_ref = props === null || props === void 0 ? void 0 : props.options) !== null && _ref !== void 0 ? _ref : [
|
|
117
|
+
{
|
|
118
|
+
label: getLocaleText('CMD.optionOne', null, '选项一'),
|
|
119
|
+
value: getLocaleText('CMD.optionOne', null, '选项一')
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
label: getLocaleText('CMD.optionTwo', null, '选项二'),
|
|
123
|
+
value: getLocaleText('CMD.optionTwo', null, '选项二')
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: getLocaleText('CMD.optionThird', null, '选项三'),
|
|
127
|
+
value: getLocaleText('CMD.optionThird', null, '选项三')
|
|
128
|
+
}
|
|
129
|
+
]);
|
|
130
|
+
_this.caption = (_ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref1 !== void 0 ? _ref1 : TagControl.controlName;
|
|
131
|
+
_this.defaultValue = (_ref2 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : [];
|
|
132
|
+
_this.displayType = (_ref3 = props === null || props === void 0 ? void 0 : props.displayType) !== null && _ref3 !== void 0 ? _ref3 : 'tag';
|
|
133
|
+
_this.tagStyle = (_ref4 = props === null || props === void 0 ? void 0 : props.tagStyle) !== null && _ref4 !== void 0 ? _ref4 : 'default';
|
|
134
|
+
_this.size = (_ref5 = props === null || props === void 0 ? void 0 : props.size) !== null && _ref5 !== void 0 ? _ref5 : 'middle';
|
|
135
|
+
_this.align = (_ref6 = props === null || props === void 0 ? void 0 : props.align) !== null && _ref6 !== void 0 ? _ref6 : 'left';
|
|
136
|
+
_this.optionConfig = (_ref7 = props === null || props === void 0 ? void 0 : props.optionConfig) !== null && _ref7 !== void 0 ? _ref7 : 'custom';
|
|
122
137
|
_this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
|
|
123
|
-
_this.openMultistageFilling = (
|
|
138
|
+
_this.openMultistageFilling = (_ref8 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref8 !== void 0 ? _ref8 : false;
|
|
124
139
|
_this.multistageFilling = [];
|
|
125
140
|
if (Array.isArray(props === null || props === void 0 ? void 0 : props.multistageFilling)) {
|
|
126
141
|
props === null || props === void 0 ? void 0 : props.multistageFilling.forEach(function(item) {
|
|
@@ -211,6 +211,30 @@
|
|
|
211
211
|
"居右"
|
|
212
212
|
]
|
|
213
213
|
},
|
|
214
|
+
"options": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"items": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"label": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "显示值",
|
|
222
|
+
"default": ""
|
|
223
|
+
},
|
|
224
|
+
"value": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"description": "选项ID",
|
|
227
|
+
"default": "this.label"
|
|
228
|
+
},
|
|
229
|
+
"color": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "颜色"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"description": "选项设置",
|
|
236
|
+
"default": "[{ label: '选项一', value: '选项一' }, ...]"
|
|
237
|
+
},
|
|
214
238
|
"optionConfig": {
|
|
215
239
|
"type": "string",
|
|
216
240
|
"enum": [
|