@easyv/config
Advanced tools
Comparing version 1.1.14 to 1.1.15
@@ -375,3 +375,5 @@ "use strict"; | ||
angle: 0, | ||
wordBreak: 'keep-all' | ||
width: 40, | ||
textOverflow: "ellipsis", | ||
speed: 5 | ||
}, | ||
@@ -403,5 +405,8 @@ showLast: false, | ||
angle = _ref4$appearance$angl === void 0 ? defaultAxisLabel.appearance.angle : _ref4$appearance$angl, | ||
_ref4$appearance$word = _ref4$appearance.wordBreak, | ||
wordBreak = _ref4$appearance$word === void 0 ? defaultAxisLabel.appearance.wordBreak : _ref4$appearance$word, | ||
overflow = _ref4.overflow, | ||
_ref4$appearance$widt = _ref4$appearance.width, | ||
width = _ref4$appearance$widt === void 0 ? defaultAxisLabel.appearance.width : _ref4$appearance$widt, | ||
_ref4$appearance$text = _ref4$appearance.textOverflow, | ||
textOverflow = _ref4$appearance$text === void 0 ? defaultAxisLabel.appearance.textOverflow : _ref4$appearance$text, | ||
_ref4$appearance$spee = _ref4$appearance.speed, | ||
speed = _ref4$appearance$spee === void 0 ? defaultAxisLabel.appearance.speed : _ref4$appearance$spee, | ||
_ref4$showLast = _ref4.showLast, | ||
@@ -579,19 +584,40 @@ showLast = _ref4$showLast === void 0 ? defaultAxisLabel.showLast : _ref4$showLast, | ||
}, { | ||
name: 'wordBreak', | ||
displayName: '行字数限制', | ||
value: wordBreak, | ||
type: 'select', | ||
name: 'width', | ||
displayName: '宽度', | ||
value: width, | ||
type: 'number', | ||
config: { | ||
suffix: "px", | ||
span: 12 | ||
} | ||
}, { | ||
name: 'textOverflow', | ||
displayName: '文本溢出', | ||
value: textOverflow, | ||
type: "select", | ||
config: { | ||
options: [{ | ||
name: '不限制', | ||
value: 'keep-all' | ||
name: '换行', | ||
value: 'break-word' | ||
}, { | ||
name: '省略号', | ||
value: 'ellipsis' | ||
}, { | ||
name: '跑马灯', | ||
value: 'marquee' | ||
}], | ||
allowInput: true, | ||
span: 12 | ||
} | ||
}, { | ||
rule: [["textOverflow", "$eq", "marquee"]], | ||
name: "speed", | ||
displayName: "速度", | ||
value: speed, | ||
type: "number", | ||
config: { | ||
span: 12 | ||
} | ||
}], | ||
type: 'group' | ||
}, | ||
//...textOverflow(overflow), | ||
{ | ||
}, { | ||
name: 'showLast', | ||
@@ -598,0 +624,0 @@ displayName: '显示最新', |
{ | ||
"name": "@easyv/config", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
import { translate, font, extent, showRule, textOverflow } from '.'; | ||
import { translate, font, extent, showRule } from '.'; | ||
@@ -340,3 +340,3 @@ const defaultFont = font(); | ||
format: { type: 'date', showType: 'MM月' }, | ||
appearance: { count: 3, angle: 0, wordBreak: 'keep-all' }, | ||
appearance: { count: 3, angle: 0, width: 40, textOverflow:"ellipsis", speed:5 }, | ||
showLast: false, | ||
@@ -355,5 +355,6 @@ translate: { x: 0, y: 0 }, | ||
angle = defaultAxisLabel.appearance.angle, | ||
wordBreak = defaultAxisLabel.appearance.wordBreak, | ||
width = defaultAxisLabel.appearance.width, | ||
textOverflow = defaultAxisLabel.appearance.textOverflow, | ||
speed = defaultAxisLabel.appearance.speed | ||
} = defaultAxisLabel.appearance, | ||
overflow, | ||
showLast = defaultAxisLabel.showLast, | ||
@@ -573,16 +574,38 @@ translate: { | ||
{ | ||
name: 'wordBreak', | ||
displayName: '行字数限制', | ||
value: wordBreak, | ||
type: 'select', | ||
name: 'width', | ||
displayName: '宽度', | ||
value: width, | ||
type: 'number', | ||
config: { | ||
options: [{ name: '不限制', value: 'keep-all' }], | ||
allowInput: true, | ||
suffix:"px", | ||
span: 12, | ||
}, | ||
}, | ||
{ | ||
name: 'textOverflow', | ||
displayName: '文本溢出', | ||
value: textOverflow, | ||
type: "select", | ||
config: { | ||
options:[ | ||
{ name: '换行', value: 'break-word' }, | ||
{ name: '省略号', value: 'ellipsis' }, | ||
{ name: '跑马灯', value: 'marquee' }, | ||
], | ||
span: 12, | ||
} | ||
}, | ||
{ | ||
rule:[["textOverflow","$eq","marquee"]], | ||
name:"speed", | ||
displayName:"速度", | ||
value:speed, | ||
type:"number", | ||
config:{ | ||
span:12 | ||
} | ||
} | ||
], | ||
type: 'group', | ||
}, | ||
//...textOverflow(overflow), | ||
{ | ||
@@ -589,0 +612,0 @@ name: 'showLast', |
340919
11582