@byteluck-fe/model-driven-controls 7.0.0-props.104 → 7.0.0-props.106
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.
|
@@ -115,7 +115,7 @@ var BarChartProperty = /*#__PURE__*/ function(Property) {
|
|
|
115
115
|
_this.captionFontWeight = (_ref5 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref5 !== void 0 ? _ref5 : FONT_WEIGHT.NORMAL;
|
|
116
116
|
_this.isHide = (_ref6 = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref6 !== void 0 ? _ref6 : false;
|
|
117
117
|
_this.template = (_ref7 = props === null || props === void 0 ? void 0 : props.template) !== null && _ref7 !== void 0 ? _ref7 : 'bar-basic';
|
|
118
|
-
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : '{}';
|
|
118
|
+
_this.optionJson = (_ref8 = props === null || props === void 0 ? void 0 : props.optionJson) !== null && _ref8 !== void 0 ? _ref8 : '{"grid":{"left":"3%","right":"4%","bottom":"3%","containLabel":true},"xAxis":{"type":"category","data":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},"yAxis":{"type":"value"},"series":[{"type":"bar","data":[{"value":120},{"value":200},{"value":150},{"value":80},{"value":70},{"value":110},{"value":130}]}]}';
|
|
119
119
|
_this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
|
|
120
120
|
_this.filterItemDatasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.filterItemDatasourceBind);
|
|
121
121
|
_this.multistageFilling = (_ref9 = props === null || props === void 0 ? void 0 : (_props_multistageFilling = props.multistageFilling) === null || _props_multistageFilling === void 0 ? void 0 : _props_multistageFilling.map(function(item) {
|
|
@@ -74,8 +74,23 @@ function _is_native_reflect_construct() {
|
|
|
74
74
|
* name: rok_pie_chart
|
|
75
75
|
* description: 饼图组件。用于展示静态或动态数据图表,支持模板选择和字段映射,适合统计分析与看板展示场景。
|
|
76
76
|
*/ import PieChartControl from './designer';
|
|
77
|
-
import { MultistageFillingItem, Property, DataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
77
|
+
import { MultistageFillingItem, Property, PropertyRules, DataSourceBind } from '@byteluck-fe/model-driven-core';
|
|
78
78
|
import { FONT_WEIGHT } from '../../framework';
|
|
79
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
80
|
+
import { createChartSeriesConfigRule } from '../utils';
|
|
81
|
+
var PieChartPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
82
|
+
"use strict";
|
|
83
|
+
_inherits(PieChartPropertyRules, PropertyRules);
|
|
84
|
+
function PieChartPropertyRules(props) {
|
|
85
|
+
_class_call_check(this, PieChartPropertyRules);
|
|
86
|
+
var _this;
|
|
87
|
+
_this = _call_super(this, PieChartPropertyRules, [
|
|
88
|
+
props
|
|
89
|
+
]), _define_property(_this, "seriesConfig", createChartSeriesConfigRule(getLocaleText('CMD.pleaseSelectSeriesValueField', null, '请绑定系列值字段')));
|
|
90
|
+
return _this;
|
|
91
|
+
}
|
|
92
|
+
return PieChartPropertyRules;
|
|
93
|
+
}(PropertyRules);
|
|
79
94
|
var PieChartProperty = /*#__PURE__*/ function(Property) {
|
|
80
95
|
"use strict";
|
|
81
96
|
_inherits(PieChartProperty, Property);
|
|
@@ -111,5 +126,6 @@ var PieChartProperty = /*#__PURE__*/ function(Property) {
|
|
|
111
126
|
}
|
|
112
127
|
return PieChartProperty;
|
|
113
128
|
}(Property);
|
|
129
|
+
_define_property(PieChartProperty, "Rules", PieChartPropertyRules);
|
|
114
130
|
export default PieChartProperty;
|
|
115
|
-
export { PieChartProperty };
|
|
131
|
+
export { PieChartProperty, PieChartPropertyRules };
|
|
@@ -50,7 +50,7 @@ export function createChartSeriesConfigRule(message) {
|
|
|
50
50
|
return {
|
|
51
51
|
type: 'array',
|
|
52
52
|
validator: function validator(rule, value, callback) {
|
|
53
|
-
if (Array.isArray(value)
|
|
53
|
+
if (!Array.isArray(value) || value.length === 0 || value.some(function(item) {
|
|
54
54
|
return isBlankChartField(item === null || item === void 0 ? void 0 : item.valueField);
|
|
55
55
|
})) {
|
|
56
56
|
callback(message);
|