Skip to content

Commit eb59b4b

Browse files
committed
chore: refine demo
1 parent 03a3a6a commit eb59b4b

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

src/demo/Demo.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,15 @@ select {
247247
}
248248
249249
figure {
250-
display: inline-block;
251-
position: relative;
250+
display: flex;
251+
justify-content: center;
252+
width: fit-content;
252253
margin: 2em auto;
253254
254255
.echarts {
256+
width: calc(60vw + 4em);
255257
height: 360px;
256-
min-width: calc(40vw + 4em);
258+
max-width: 720px;
257259
padding: 1.5em 2em;
258260
border: 1px solid rgba(0, 0, 0, 0.1);
259261
border-radius: 8px;
@@ -312,9 +314,6 @@ figure {
312314
313315
@media (max-width: 980px) {
314316
p {
315-
display: flex;
316-
justify-content: center;
317-
318317
select {
319318
text-indent: calc(50% - 1em);
320319
}
@@ -352,14 +351,19 @@ figure {
352351
}
353352
}
354353
354+
.actions {
355+
display: flex;
356+
justify-content: center;
357+
}
358+
355359
figure {
356360
width: 100vw;
357361
margin: 1em auto;
358362
359363
.echarts {
360364
width: 100%;
361365
min-width: 0;
362-
height: 75vw;
366+
height: 60vw;
363367
padding: 1em 0;
364368
border: none;
365369
border-radius: 0;

src/demo/examples/BarChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function refresh() {
6969
second{{ seconds > 1 ? "s" : "" }}...
7070
</small>
7171
</p>
72-
<p>
72+
<p class="actions">
7373
<button @click="refresh" :disabled="seconds > 0">Refresh</button>
7474
</p>
7575
</template>

src/demo/examples/ConnectChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ watch(
4545
<v-chart :option="c2" group="radiance" autoresize />
4646
</template>
4747
<template #extra>
48-
<p>
48+
<p class="actions">
4949
<label>
5050
<input type="checkbox" v-model="connected" />
5151
Connected

src/demo/examples/GeoChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function convert() {
5151
style="background-color: #404a59"
5252
/>
5353
<template #extra>
54-
<p>
54+
<p class="actions">
5555
<button @click="convert">Convert to image</button>
5656
</p>
5757
<aside class="modal" :class="{ open }" @click="open = false">

src/demo/examples/ManualChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function load() {
105105
You may use the <code>manual-update</code> prop for performance critical
106106
use cases.
107107
</p>
108-
<p>
108+
<p class="actions">
109109
<button :disabled="loaded" @click="load">Load</button>
110110
</p>
111111
</template>

src/demo/examples/PolarChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const theme = shallowRef("dark");
3333
:style="theme === 'dark' ? 'background-color: #100c2a' : ''"
3434
/>
3535
<template #extra>
36-
<p>
36+
<p class="actions">
3737
Theme
3838
<select v-model="theme">
3939
<option :value="null">Default</option>

src/demo/examples/RadarChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const metricIndex = shallowRef(0);
2222
<v-example id="radar" title="Radar chart" desc="(with Pinia integration)">
2323
<v-chart :option="getRadarData(metricIndex)" autoresize />
2424
<template #extra>
25-
<p>
25+
<p class="actions">
2626
<select v-model="metricIndex">
2727
<option
2828
v-for="(metric, index) in metrics"

0 commit comments

Comments
 (0)