Skip to content

Commit 5b9fe1e

Browse files
committed
update example
1 parent 719b485 commit 5b9fe1e

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

example/App.vue

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
2-
<div id="app">
3-
<div class="example example-1">
4-
<h2>EXAMPLE 1</h2>
2+
<div class="example">
3+
<div class="example-box">
4+
<h2 class="title">EXAMPLE 1</h2>
55
<div class="block">
66
<h3>JSON Input:</h3>
77
<textarea v-model="val"></textarea>
@@ -15,8 +15,8 @@
1515
</div>
1616
</div>
1717

18-
<div class="example example-2">
19-
<h2>EXAMPLE 2</h2>
18+
<div class="example-box">
19+
<h2 class="title">EXAMPLE 2</h2>
2020
<div class="block">
2121
<h3>JSON Input:</h3>
2222
<textarea v-model="val"></textarea>
@@ -37,6 +37,7 @@
3737
</vue-json-pretty>
3838
</div>
3939
</div>
40+
<a style="position: fixed; right: 0; top: 0;" href="https://github.com/leezng/el-form-renderer" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
4041
</div>
4142
</template>
4243

@@ -103,29 +104,38 @@ export default {
103104
html, body {
104105
margin: 0;
105106
}
106-
h2, h3 {
107-
margin: 0 0 10px;
108-
}
109107
.example {
110-
padding: 10px;
108+
position: relative;
109+
padding: 0 15px;
110+
margin: 0 auto;
111+
width: 1200px;
112+
}
113+
.example-box {
114+
margin: 0 -15px;
111115
overflow: hidden;
116+
.title {
117+
text-align: center;
118+
}
112119
.block {
113120
float: left;
114-
padding: 0 20px;
121+
padding: 0 15px;
115122
width: 50%;
116123
box-sizing: border-box;
117124
}
118125
textarea {
119126
padding: 5px;
120127
width: 100%;
121-
height: 100px;
128+
height: 150px;
122129
box-sizing: border-box;
130+
border-radius: 5px;
123131
resize: vertical;
124132
font-family: inherit;
125133
}
126134
pre{
127135
margin: 0;
128136
font-family: Consolas;
137+
overflow: auto;
138+
text-overflow: ellipsis;
129139
}
130140
}
131141
</style>

0 commit comments

Comments
 (0)