@easyv/config 1.2.10 → 1.2.11

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/lib/tooltip.js CHANGED
@@ -14,8 +14,9 @@ var defaultTooltip = {
14
14
  x: 0,
15
15
  y: 0
16
16
  },
17
+ bgType: 'image',
17
18
  bgColor: 'rgba(48, 55, 66, 0.85)',
18
- image: '',
19
+ image: 'components/static-image/vectorShapeV2/tipboxBg.png',
19
20
  size: {
20
21
  width: 120,
21
22
  height: 110
@@ -104,6 +105,8 @@ var _default = function _default() {
104
105
  tipTranslateX = _ref$tip$translate$x === void 0 ? defaultTooltip.tip.translate.x : _ref$tip$translate$x,
105
106
  _ref$tip$translate$y = _ref$tip$translate.y,
106
107
  tipTranslateY = _ref$tip$translate$y === void 0 ? defaultTooltip.tip.translate.y : _ref$tip$translate$y,
108
+ _ref$tip$bgType = _ref$tip.bgType,
109
+ bgType = _ref$tip$bgType === void 0 ? defaultTooltip.tip.bgType : _ref$tip$bgType,
107
110
  _ref$tip$bgColor = _ref$tip.bgColor,
108
111
  bgColor = _ref$tip$bgColor === void 0 ? defaultTooltip.tip.bgColor : _ref$tip$bgColor,
109
112
  _ref$tip$image = _ref$tip.image,
@@ -216,15 +219,30 @@ var _default = function _default() {
216
219
  name: 'tip',
217
220
  displayName: '提示框',
218
221
  value: [(0, _.translate)(tipTranslateX, tipTranslateY), {
222
+ name: "bgType",
223
+ displayName: "背景类型",
224
+ type: "radio",
225
+ value: bgType,
226
+ config: {
227
+ options: [{
228
+ name: "颜色",
229
+ value: "color"
230
+ }, {
231
+ name: "图片",
232
+ value: "image"
233
+ }]
234
+ }
235
+ }, {
236
+ rule: [["bgType", "$eq", "color"]],
219
237
  name: "bgColor",
220
- displayName: "背景色",
238
+ displayName: "颜色",
221
239
  type: "color",
222
- value: bgColor,
223
- tip: "如果没有背景图,则启用背景色作为背景"
240
+ value: bgColor
224
241
  }, {
242
+ rule: [["bgType", "$eq", "image"]],
225
243
  type: 'uploadImage',
226
244
  name: 'image',
227
- displayName: '背景',
245
+ displayName: '图片',
228
246
  value: image
229
247
  }, {
230
248
  name: 'size',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/tooltip.js CHANGED
@@ -5,8 +5,9 @@ const defaultTooltip = {
5
5
  interval: 4,
6
6
  tip: {
7
7
  translate: { x: 0, y: 0 },
8
+ bgType: 'image',
8
9
  bgColor: 'rgba(48, 55, 66, 0.85)',
9
- image: '',
10
+ image: 'components/static-image/vectorShapeV2/tipboxBg.png',
10
11
  size: { width: 120, height: 110 },
11
12
  margin: {
12
13
  marginTop: 13,
@@ -76,6 +77,7 @@ export default ({
76
77
  x: tipTranslateX = defaultTooltip.tip.translate.x,
77
78
  y: tipTranslateY = defaultTooltip.tip.translate.y,
78
79
  } = defaultTooltip.tip.translate,
80
+ bgType = defaultTooltip.tip.bgType,
79
81
  bgColor = defaultTooltip.tip.bgColor,
80
82
  image = defaultTooltip.tip.image,
81
83
  size: {
@@ -176,16 +178,29 @@ export default ({
176
178
  value: [
177
179
  translate(tipTranslateX, tipTranslateY),
178
180
  {
181
+ name:"bgType",
182
+ displayName:"背景类型",
183
+ type:"radio",
184
+ value:bgType,
185
+ config:{
186
+ options:[
187
+ {name:"颜色",value:"color"},
188
+ {name:"图片",value:"image"}
189
+ ]
190
+ }
191
+ },
192
+ {
193
+ rule:[["bgType","$eq","color"]],
179
194
  name:"bgColor",
180
- displayName:"背景色",
195
+ displayName:"颜色",
181
196
  type:"color",
182
- value:bgColor,
183
- tip:"如果没有背景图,则启用背景色作为背景"
197
+ value:bgColor
184
198
  },
185
199
  {
200
+ rule:[["bgType","$eq","image"]],
186
201
  type: 'uploadImage',
187
202
  name: 'image',
188
- displayName: '背景',
203
+ displayName: '图片',
189
204
  value: image,
190
205
  },
191
206
  {