@easyv/config
Advanced tools
Comparing version 1.2.7 to 1.2.8
@@ -11,3 +11,4 @@ "use strict"; | ||
customDisplayName: "数值范围", | ||
customName: "extent" | ||
customName: "extent", | ||
customSuffix: "" | ||
}; | ||
@@ -23,3 +24,5 @@ var _default = function _default() { | ||
_ref$customName = _ref.customName, | ||
customName = _ref$customName === void 0 ? extent.customName : _ref$customName; | ||
customName = _ref$customName === void 0 ? extent.customName : _ref$customName, | ||
_ref$customSuffix = _ref.customSuffix, | ||
customSuffix = _ref$customSuffix === void 0 ? extent.customSuffix : _ref$customSuffix; | ||
return { | ||
@@ -34,3 +37,4 @@ name: customName, | ||
config: { | ||
span: 12 | ||
span: 12, | ||
suffix: customSuffix | ||
} | ||
@@ -43,3 +47,4 @@ }, { | ||
config: { | ||
span: 12 | ||
span: 12, | ||
suffix: customSuffix | ||
} | ||
@@ -46,0 +51,0 @@ }], |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -687,4 +687,9 @@ "use strict"; | ||
}, | ||
percentageExtent: { | ||
min: 80, | ||
max: 120 | ||
}, | ||
auto: false, | ||
mode: "count", | ||
numericalRangeModel: "percentage", | ||
count: 3, | ||
@@ -777,3 +782,3 @@ step: 100, | ||
type: "radio", | ||
tip: '手动模式需要指定断轴值,如果断轴值在数据范围内,就会执行断轴,自动模式设置断轴阈值,当数据离散程度超过阈值的时候执行断轴', | ||
tip: "手动模式需要指定断轴值,如果断轴值在数据范围内,就会执行断轴,自动模式设置断轴阈值,当数据离散程度超过阈值的时候执行断轴", | ||
config: { | ||
@@ -797,3 +802,3 @@ options: [{ | ||
displayName: "断轴差值", | ||
tip: '差值越高,代表需要更大的数据离散程度才能触发断轴,反之同理', | ||
tip: "差值越高,代表需要更大的数据离散程度才能触发断轴,反之同理", | ||
type: "number", | ||
@@ -886,2 +891,8 @@ value: 100, | ||
max = _ref6$extent$max === void 0 ? defaultValueAxisLabel.extent.max : _ref6$extent$max, | ||
_ref6$percentageExten = _ref6.percentageExtent; | ||
_ref6$percentageExten = _ref6$percentageExten === void 0 ? defaultValueAxisLabel.percentageExtent : _ref6$percentageExten; | ||
var _ref6$percentageExten2 = _ref6$percentageExten.min, | ||
percentMin = _ref6$percentageExten2 === void 0 ? defaultValueAxisLabel.percentageExtent.min : _ref6$percentageExten2, | ||
_ref6$percentageExten3 = _ref6$percentageExten.max, | ||
percentMax = _ref6$percentageExten3 === void 0 ? defaultValueAxisLabel.percentageExtent.max : _ref6$percentageExten3, | ||
_ref6$auto = _ref6.auto, | ||
@@ -891,2 +902,4 @@ auto = _ref6$auto === void 0 ? defaultValueAxisLabel.auto : _ref6$auto, | ||
mode = _ref6$mode === void 0 ? defaultValueAxisLabel.mode : _ref6$mode, | ||
_ref6$numericalRangeM = _ref6.numericalRangeModel, | ||
numericalRangeModel = _ref6$numericalRangeM === void 0 ? defaultValueAxisLabel.numericalRangeModel : _ref6$numericalRangeM, | ||
_ref6$count = _ref6.count, | ||
@@ -916,7 +929,30 @@ count = _ref6$count === void 0 ? defaultValueAxisLabel.count : _ref6$count, | ||
type: "boolean" | ||
}, { | ||
rule: [["show", "$eq", true]], | ||
name: "numericalRangeModel", | ||
displayName: "范围模式", | ||
value: numericalRangeModel, | ||
type: "radio", | ||
tip: "真实值模式会取填入的值来作为轴的最大最小值,而百分比模式会取数据中最小值乘上数值范围中的最小值百分比作为作为轴的最小值,最大值同理", | ||
config: { | ||
options: [{ | ||
name: "真实值", | ||
value: "value" | ||
}, { | ||
name: "百分比", | ||
value: "percentage" | ||
}] | ||
} | ||
}, _objectSpread({ | ||
rule: [["show", "$eq", true]] | ||
rule: [["show", "$eq", true], ["numericalRangeModel", "$eq", "value"]] | ||
}, (0, _.extent)({ | ||
min: min, | ||
max: max | ||
})), _objectSpread({ | ||
rule: [["show", "$eq", true], ["numericalRangeModel", "$eq", "percentage"]] | ||
}, (0, _.extent)({ | ||
min: percentMin, | ||
max: percentMax, | ||
customSuffix: '%', | ||
customName: 'percentageExtent' | ||
})), { | ||
@@ -923,0 +959,0 @@ rule: [["show", "$eq", true]], |
{ | ||
"name": "@easyv/config", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ const defaultControl={ |
@@ -6,2 +6,3 @@ const extent = { | ||
customName: "extent", | ||
customSuffix: "", | ||
}; | ||
@@ -13,26 +14,31 @@ export default ({ | ||
customName = extent.customName, | ||
} = extent) => ({ | ||
name: customName, | ||
displayName: customDisplayName, | ||
value: [ | ||
{ | ||
name: "min", | ||
displayName: "最小值", | ||
value: min, | ||
type: "input", | ||
config: { | ||
span: 12, | ||
customSuffix = extent.customSuffix, | ||
} = extent) => { | ||
return { | ||
name: customName, | ||
displayName: customDisplayName, | ||
value: [ | ||
{ | ||
name: "min", | ||
displayName: "最小值", | ||
value: min, | ||
type: "input", | ||
config: { | ||
span: 12, | ||
suffix: customSuffix, | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: "max", | ||
displayName: "最大值", | ||
value: max, | ||
type: "input", | ||
config: { | ||
span: 12, | ||
{ | ||
name: "max", | ||
displayName: "最大值", | ||
value: max, | ||
type: "input", | ||
config: { | ||
span: 12, | ||
suffix: customSuffix, | ||
}, | ||
}, | ||
}, | ||
], | ||
type: "group", | ||
}); | ||
], | ||
type: "group", | ||
}; | ||
}; |
@@ -0,0 +0,0 @@ import show, { showRule } from './show'; |
@@ -0,0 +0,0 @@ /** |
@@ -76,7 +76,14 @@ import { translate, font, extent, showRule, sc, textOverflow } from "."; | ||
}, | ||
sc("suffix","后缀","",[ | ||
sc("content","内容","input",""), | ||
sc("font","字体样式","textStyle",font()), | ||
translate() | ||
],{defaultOpen:true},showRule()) | ||
sc( | ||
"suffix", | ||
"后缀", | ||
"", | ||
[ | ||
sc("content", "内容", "input", ""), | ||
sc("font", "字体样式", "textStyle", font()), | ||
translate(), | ||
], | ||
{ defaultOpen: true }, | ||
showRule() | ||
), | ||
].filter((item) => !!item), | ||
@@ -654,15 +661,29 @@ }); | ||
}, | ||
sc("autoSort","自动排序","boolean",autoSort,{ | ||
other:{ | ||
tip:"数据按时间自动排序展示" | ||
} | ||
},showRule()), | ||
sc("textAlign","对齐","radio",textAlign,{ | ||
mode:"icon", | ||
options:[ | ||
{name:"左对齐",value:"left",icon:"align-left"}, | ||
{name:"居中对齐",value:"center",icon:"align-center"}, | ||
{name:"右对齐",value:"right",icon:"align-right"} | ||
] | ||
},showRule("show","$eq",true)), | ||
sc( | ||
"autoSort", | ||
"自动排序", | ||
"boolean", | ||
autoSort, | ||
{ | ||
other: { | ||
tip: "数据按时间自动排序展示", | ||
}, | ||
}, | ||
showRule() | ||
), | ||
sc( | ||
"textAlign", | ||
"对齐", | ||
"radio", | ||
textAlign, | ||
{ | ||
mode: "icon", | ||
options: [ | ||
{ name: "左对齐", value: "left", icon: "align-left" }, | ||
{ name: "居中对齐", value: "center", icon: "align-center" }, | ||
{ name: "右对齐", value: "right", icon: "align-right" }, | ||
], | ||
}, | ||
showRule("show", "$eq", true) | ||
), | ||
{ | ||
@@ -686,4 +707,6 @@ rule: [["show", "$eq", true]], | ||
extent: { min: "0", max: "" }, | ||
percentageExtent: { min: 80, max: 120 }, | ||
auto: false, | ||
mode: "count", | ||
numericalRangeModel: "percentage", | ||
count: 3, | ||
@@ -737,2 +760,3 @@ step: 100, | ||
}, | ||
{ | ||
@@ -759,3 +783,3 @@ rule: [["show", "$eq", true]], | ||
type: "radio", | ||
tip:'手动模式需要指定断轴值,如果断轴值在数据范围内,就会执行断轴,自动模式设置断轴阈值,当数据离散程度超过阈值的时候执行断轴', | ||
tip: "手动模式需要指定断轴值,如果断轴值在数据范围内,就会执行断轴,自动模式设置断轴阈值,当数据离散程度超过阈值的时候执行断轴", | ||
config: { | ||
@@ -766,3 +790,2 @@ options: [ | ||
], | ||
}, | ||
@@ -783,3 +806,3 @@ }, | ||
displayName: "断轴差值", | ||
tip:'差值越高,代表需要更大的数据离散程度才能触发断轴,反之同理', | ||
tip: "差值越高,代表需要更大的数据离散程度才能触发断轴,反之同理", | ||
type: "number", | ||
@@ -898,4 +921,9 @@ value: 100, | ||
} = defaultValueAxisLabel.extent, | ||
percentageExtent: { | ||
min: percentMin = defaultValueAxisLabel.percentageExtent.min, | ||
max: percentMax = defaultValueAxisLabel.percentageExtent.max, | ||
} = defaultValueAxisLabel.percentageExtent, | ||
auto = defaultValueAxisLabel.auto, | ||
mode = defaultValueAxisLabel.mode, | ||
numericalRangeModel = defaultValueAxisLabel.numericalRangeModel, | ||
count = defaultValueAxisLabel.count, | ||
@@ -922,5 +950,29 @@ step = defaultValueAxisLabel.step, | ||
rule: [["show", "$eq", true]], | ||
name: "numericalRangeModel", | ||
displayName: "范围模式", | ||
value: numericalRangeModel, | ||
type: "radio", | ||
tip: "真实值模式会取填入的值来作为轴的最大最小值,而百分比模式会取数据中最小值乘上数值范围中的最小值百分比作为作为轴的最小值,最大值同理", | ||
config: { | ||
options: [ | ||
{ name: "真实值", value: "value" }, | ||
{ name: "百分比", value: "percentage" }, | ||
], | ||
}, | ||
}, | ||
{ | ||
rule: [ | ||
["show", "$eq", true], | ||
["numericalRangeModel", "$eq", "value"], | ||
], | ||
...extent({ min, max }), | ||
}, | ||
{ | ||
rule: [ | ||
["show", "$eq", true], | ||
["numericalRangeModel", "$eq", "percentage"], | ||
], | ||
...extent({ min: percentMin, max: percentMax , customSuffix:'%',customName:'percentageExtent' }), | ||
}, | ||
{ | ||
rule: [["show", "$eq", true]], | ||
@@ -927,0 +979,0 @@ name: "auto", |
@@ -0,0 +0,0 @@ import { translate, margin } from "."; |
13376
397738
63