w-plot-vue 1.0.2 → 1.0.4
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/README.md +1 -1
- package/dist/w-plot-vue.umd.js +1 -1
- package/docs/examples/app.html +1 -1
- package/docs/examples/app.umd.js +2 -2
- package/docs/examples/app.umd.js.map +1 -1
- package/docs/examples/w-bar_horizontal_multi-set(color).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set(color, gradient).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set(series color).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set(series color, gradient).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set.html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackNormal).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set__barDisplay(stackPercent).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set__hide legned.html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set__show labels.html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor(gradient).html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set_barKpColor.html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set_barUseInnerLabelsForHorizontal_barGroupWidthRatio.html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio.html +1 -1
- package/docs/examples/w-bar_horizontal_multi-set_barWidthRatio_barGroupWidthRatio.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set(color).html +1 -1
- package/docs/examples/w-bar_horizontal_one-set(color, gradient).html +1 -1
- package/docs/examples/w-bar_horizontal_one-set.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barColor(gradient).html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barColor.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barKpColor(gradient).html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barKpColor.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barUseInnerLabelsForHorizontal.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_barWidthRatio_barGroupWidthRatio.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_hide labels.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_marginLeft_marginRight.html +1 -1
- package/docs/examples/w-bar_horizontal_one-set_show legned.html +1 -1
- package/docs/examples/w-bar_multi-set(color).html +1 -1
- package/docs/examples/w-bar_multi-set(color, gradient).html +1 -1
- package/docs/examples/w-bar_multi-set(series color).html +1 -1
- package/docs/examples/w-bar_multi-set(series color, gradient).html +1 -1
- package/docs/examples/w-bar_multi-set.html +1 -1
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal).html +1 -1
- package/docs/examples/w-bar_multi-set__barDisplay(stackNormal)_.html +1 -1
- package/docs/examples/w-bar_multi-set__barDisplay(stackPercent).html +1 -1
- package/docs/examples/w-bar_multi-set__hide legned.html +1 -1
- package/docs/examples/w-bar_multi-set__show labels.html +1 -1
- package/docs/examples/w-bar_multi-set_barKpColor(gradient).html +1 -1
- package/docs/examples/w-bar_multi-set_barKpColor.html +1 -1
- package/docs/examples/w-bar_multi-set_barWidthRatio.html +1 -1
- package/docs/examples/w-bar_multi-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +1 -1
- package/docs/examples/w-bar_one-set(color).html +1 -1
- package/docs/examples/w-bar_one-set(color, gradient).html +1 -1
- package/docs/examples/w-bar_one-set.html +1 -1
- package/docs/examples/w-bar_one-set_barColor(gradient).html +1 -1
- package/docs/examples/w-bar_one-set_barColor.html +1 -1
- package/docs/examples/w-bar_one-set_barKpColor(gradient).html +1 -1
- package/docs/examples/w-bar_one-set_barKpColor.html +1 -1
- package/docs/examples/w-bar_one-set_barWidthRatio.html +1 -1
- package/docs/examples/w-bar_one-set_barWidthRatio_barGroupWidthRatio_barBorderRadius.html +1 -1
- package/docs/examples/w-bar_one-set_hide labels.html +1 -1
- package/docs/examples/w-bar_one-set_marginLeft_marginRight_marginTop.html +1 -1
- package/docs/examples/w-bar_one-set_show legned.html +1 -1
- package/docs/examples/w-pie_one-set(color).html +1 -1
- package/docs/examples/w-pie_one-set(color, gradient).html +1 -1
- package/docs/examples/w-pie_one-set.html +1 -1
- package/docs/examples/w-pie_one-set_hide labels.html +1 -1
- package/docs/examples/w-pie_one-set_hide legned.html +1 -1
- package/docs/examples/w-pie_one-set_marginLeft_marginRight_marginTop.html +1 -1
- package/docs/examples/w-pie_one-set_pieBorderRadius.html +1 -1
- package/docs/examples/w-pie_one-set_pieBorderWidth_pieBorderRadius.html +1 -1
- package/docs/examples/w-pie_one-set_pieKpColor(gradient).html +1 -1
- package/docs/examples/w-pie_one-set_pieKpColor.html +1 -1
- package/docs/examples/w-pie_one-set_pieThicknessRatio.html +1 -1
- package/docs/examples/w-plot_default.html +1 -1
- package/docs/examples/w-rose_multi-set(color).html +1 -1
- package/docs/examples/w-rose_multi-set(color, gradient).html +1 -1
- package/docs/examples/w-rose_multi-set(series color).html +1 -1
- package/docs/examples/w-rose_multi-set(series color, gradient).html +1 -1
- package/docs/examples/w-rose_multi-set.html +1 -1
- package/docs/examples/w-rose_multi-set__hide legned.html +1 -1
- package/docs/examples/w-rose_multi-set__show labels.html +1 -1
- package/docs/examples/w-rose_multi-set_roseBorderWidth.html +1 -1
- package/docs/examples/w-rose_multi-set_roseKpColor(gradient).html +1 -1
- package/docs/examples/w-rose_multi-set_roseKpColor.html +1 -1
- package/docs/examples/w-rose_multi-set_roseWidthRatio.html +1 -1
- package/docs/examples/w-rose_one-set(color).html +1 -1
- package/docs/examples/w-rose_one-set(color, gradient).html +1 -1
- package/docs/examples/w-rose_one-set.html +1 -1
- package/docs/examples/w-rose_one-set_marginLeft_marginRight_marginTop.html +1 -1
- package/docs/examples/w-rose_one-set_roseBorderWidth.html +1 -1
- package/docs/examples/w-rose_one-set_roseKpColor(gradient).html +1 -1
- package/docs/examples/w-rose_one-set_roseKpColor.html +1 -1
- package/docs/examples/w-rose_one-set_roseShowLabels.html +1 -1
- package/docs/examples/w-rose_one-set_roseWidthRatio.html +1 -1
- package/docs/examples/w-rose_one-set_showLegend.html +1 -1
- package/docs/examples/w-rose_one-set_showLegend_legendPosition.html +1 -1
- package/docs/examples/w-set-multi_default.html +1 -1
- package/docs/examples/w-set-multi_hide labels.html +1 -1
- package/docs/examples/w-set-multi_hide legned.html +1 -1
- package/docs/examples/w-set-multi_keySelect.html +1 -1
- package/docs/examples/w-set-multi_slot head.html +1 -1
- package/docs/examples/w-set-multi_textPlotType_kpSelectText_widthSelect.html +1 -1
- package/docs/examples/w-set-one_default.html +1 -1
- package/docs/examples/w-set-one_hide labels.html +1 -1
- package/docs/examples/w-set-one_keySelect.html +1 -1
- package/docs/examples/w-set-one_show legned.html +1 -1
- package/docs/examples/w-set-one_slot head.html +1 -1
- package/docs/examples/w-set-one_textPlotType_kpSelectText_widthSelect.html +1 -1
- package/docs/getDefAxis.mjs.html +1 -1
- package/docs/getDefChart.mjs.html +1 -1
- package/docs/getDefLegend.mjs.html +1 -1
- package/docs/getDefOpt.mjs.html +1 -1
- package/docs/global.html +1 -1
- package/docs/index.html +1 -1
- package/docs/module-WBar.html +1 -1
- package/docs/module-WPie.html +1 -1
- package/docs/module-WPlot.html +1 -1
- package/docs/module-WRose.html +1 -1
- package/docs/module-WSetMulti.html +1 -1
- package/docs/module-WSetOne.html +1 -1
- package/docs/setLegendLoc.mjs.html +1 -1
- package/package.json +1 -1
- package/src/App.vue +26 -17
package/src/App.vue
CHANGED
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
|
|
15
15
|
<div style="background:#f5f5f5;">
|
|
16
16
|
|
|
17
|
-
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL1">
|
|
17
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL1 && cmpsL1.length>0">
|
|
18
18
|
<WListHorizontal
|
|
19
19
|
:items="cmpsL1"
|
|
20
20
|
:itemActive.sync="cmpP1"
|
|
21
21
|
:itemBackgroundColor="'transparent'"
|
|
22
|
-
:itemBackgroundColorHover="'
|
|
23
|
-
:itemBackgroundColorActive="'
|
|
22
|
+
:itemBackgroundColorHover="'#eee'"
|
|
23
|
+
:itemBackgroundColorActive="'#eee'"
|
|
24
24
|
:keyText="'name'"
|
|
25
|
-
|
|
25
|
+
:paddingStyle="{v:12,h:20}"
|
|
26
|
+
@update:itemActive="(v)=>{indP3=0;indP2=0;indP1=getInd(v,cmpsL1)}"
|
|
26
27
|
>
|
|
27
28
|
<template v-slot:item="props">
|
|
28
29
|
<div style="">
|
|
@@ -30,17 +31,21 @@
|
|
|
30
31
|
</div>
|
|
31
32
|
</template>
|
|
32
33
|
</WListHorizontal>
|
|
34
|
+
<div style="height:1px; background:#ddd;"></div>
|
|
33
35
|
</div>
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
|
|
38
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL2 && cmpsL2.length>0">
|
|
39
|
+
<div style="height:3px; background:#fff;"></div>
|
|
36
40
|
<WListHorizontal
|
|
37
41
|
:items="cmpsL2"
|
|
38
42
|
:itemActive.sync="cmpP2"
|
|
39
43
|
:itemBackgroundColor="'transparent'"
|
|
40
|
-
:itemBackgroundColorHover="'
|
|
41
|
-
:itemBackgroundColorActive="'
|
|
44
|
+
:itemBackgroundColorHover="'#eee'"
|
|
45
|
+
:itemBackgroundColorActive="'#eee'"
|
|
42
46
|
:keyText="'name'"
|
|
43
|
-
|
|
47
|
+
:paddingStyle="{v:12,h:20}"
|
|
48
|
+
@update:itemActive="(v)=>{indP3=0;indP2=getInd(v,cmpsL2)}"
|
|
44
49
|
>
|
|
45
50
|
<template v-slot:item="props">
|
|
46
51
|
<div style="">
|
|
@@ -48,16 +53,19 @@
|
|
|
48
53
|
</div>
|
|
49
54
|
</template>
|
|
50
55
|
</WListHorizontal>
|
|
56
|
+
<div style="height:1px; background:#ddd;"></div>
|
|
51
57
|
</div>
|
|
52
58
|
|
|
53
|
-
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL3">
|
|
59
|
+
<div style="width:calc( 100vw - 20px ); overflow-x:auto;" v-if="cmpsL3 && cmpsL3.length>0">
|
|
60
|
+
<div style="height:3px; background:#fff;"></div>
|
|
54
61
|
<WListHorizontal
|
|
55
62
|
:items="cmpsL3"
|
|
56
63
|
:itemActive.sync="cmpP3"
|
|
57
64
|
:itemBackgroundColor="'transparent'"
|
|
58
|
-
:itemBackgroundColorHover="'
|
|
59
|
-
:itemBackgroundColorActive="'
|
|
65
|
+
:itemBackgroundColorHover="'#eee'"
|
|
66
|
+
:itemBackgroundColorActive="'#eee'"
|
|
60
67
|
:keyText="'name'"
|
|
68
|
+
:paddingStyle="{v:12,h:20}"
|
|
61
69
|
@update:itemActive="(v)=>{indP3=getInd(v,cmpsL3)}"
|
|
62
70
|
>
|
|
63
71
|
<template v-slot:item="props">
|
|
@@ -66,6 +74,7 @@
|
|
|
66
74
|
</div>
|
|
67
75
|
</template>
|
|
68
76
|
</WListHorizontal>
|
|
77
|
+
<div style="height:1px; background:#ddd;"></div>
|
|
69
78
|
</div>
|
|
70
79
|
|
|
71
80
|
</div>
|
|
@@ -172,7 +181,7 @@ export default {
|
|
|
172
181
|
vo.indP2 = 0
|
|
173
182
|
vo.indP3 = 0
|
|
174
183
|
|
|
175
|
-
//urlParse, http://localhost:8080/?cmp=w-
|
|
184
|
+
//urlParse, http://localhost:8080/?cmp=w-set-multi
|
|
176
185
|
let p = urlParse(location.href)
|
|
177
186
|
// console.log('p', p)
|
|
178
187
|
|
|
@@ -270,16 +279,15 @@ export default {
|
|
|
270
279
|
let ls = []
|
|
271
280
|
let l = 0
|
|
272
281
|
let pv = (ts) => {
|
|
282
|
+
ls.push(l)
|
|
273
283
|
each(ts, (v, k) => {
|
|
274
284
|
let name = get(v, `name`, '')
|
|
275
285
|
let _name = kebabCase(name)
|
|
276
286
|
let cmps = get(v, `cmps`, [])
|
|
277
287
|
if (cmps.length > 0) {
|
|
278
|
-
ls.push(l)
|
|
279
288
|
l++
|
|
280
289
|
pv(cmps)
|
|
281
290
|
l--
|
|
282
|
-
ls.pop()
|
|
283
291
|
}
|
|
284
292
|
let lst = [...ls, k]
|
|
285
293
|
rs.push({
|
|
@@ -290,13 +298,14 @@ export default {
|
|
|
290
298
|
r = lst
|
|
291
299
|
}
|
|
292
300
|
})
|
|
301
|
+
ls.pop()
|
|
293
302
|
}
|
|
294
303
|
pv(vo.cmpsL1)
|
|
295
304
|
// console.log('rs', rs)
|
|
296
305
|
// console.log('r', r)
|
|
297
|
-
vo.indP1 = get(r,
|
|
298
|
-
vo.indP2 = get(r,
|
|
299
|
-
vo.indP3 = get(r,
|
|
306
|
+
vo.indP1 = get(r, 1, 0)
|
|
307
|
+
vo.indP2 = get(r, 2, 0)
|
|
308
|
+
vo.indP3 = get(r, 3, 0)
|
|
300
309
|
},
|
|
301
310
|
|
|
302
311
|
},
|