Skip to content

Commit 1a2ada7

Browse files
committed
fix: call lint-fix and replace textarea with pre
1 parent 5d932bb commit 1a2ada7

File tree

1 file changed

+27
-27
lines changed
  • packages/vue-vanilla/dev/components

1 file changed

+27
-27
lines changed

packages/vue-vanilla/dev/components/App.vue

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ export default defineComponent({
7272
try {
7373
const input = JSON.parse(event.target.value);
7474
(this as any).i18n.translate = (
75-
key: string,
76-
defaultMessage: string | undefined
75+
key: string,
76+
defaultMessage: string | undefined
7777
) => {
7878
const translated = get(input, key) as string;
7979
return translated ?? defaultMessage;
@@ -97,23 +97,23 @@ export default defineComponent({
9797
<div class="data">
9898
<details>
9999
<summary>data</summary>
100-
<textarea readonly
101-
>{{ JSON.stringify(data, null, 2) }}
102-
</textarea>
100+
<pre
101+
>{{ JSON.stringify(data, null, 2) }}
102+
</pre>
103103
</details>
104104

105105
<details>
106106
<summary>schema</summary>
107-
<textarea readonly
108-
>{{ JSON.stringify(example.schema, null, 2) }}
109-
</textarea>
107+
<pre
108+
>{{ JSON.stringify(example.schema, null, 2) }}
109+
</pre>
110110
</details>
111111

112112
<details>
113113
<summary>uischema</summary>
114-
<textarea readonly
115-
>{{ JSON.stringify(example.uischema, null, 2) }}
116-
</textarea>
114+
<pre
115+
>{{ JSON.stringify(example.uischema, null, 2) }}
116+
</pre>
117117
</details>
118118

119119
<h5>i18n translator</h5>
@@ -125,10 +125,10 @@ export default defineComponent({
125125
<h4>Select Example:</h4>
126126
<select v-model="currentExampleName" @change="onExampleChange($event)">
127127
<option
128-
v-for="option in examples"
129-
:key="option.name"
130-
:value="option.name"
131-
:label="option.label"
128+
v-for="option in examples"
129+
:key="option.name"
130+
:value="option.name"
131+
:label="option.label"
132132
>
133133
{{ option.label }}
134134
</option>
@@ -138,15 +138,15 @@ export default defineComponent({
138138
<main class="form">
139139
<article>
140140
<json-forms
141-
:key="example.name"
142-
:data="example.data"
143-
:schema="example.schema"
144-
:uischema="example.uischema"
145-
:renderers="renderers"
146-
:config="config"
147-
:i18n="i18n"
148-
:additional-errors="additionalErrors"
149-
@change="onChange"
141+
:key="example.name"
142+
:data="example.data"
143+
:schema="example.schema"
144+
:uischema="example.uischema"
145+
:renderers="renderers"
146+
:config="config"
147+
:i18n="i18n"
148+
:additional-errors="additionalErrors"
149+
@change="onChange"
150150
>
151151
</json-forms>
152152
</article>
@@ -157,7 +157,7 @@ export default defineComponent({
157157
<style scoped>
158158
.container {
159159
display: grid;
160-
grid-template-columns: 0 3fr 8fr 0;
160+
grid-template-columns: 0 30% auto 0;
161161
grid-column-gap: 2rem;
162162
grid-row-gap: 1rem;
163163
grid-template-areas:
@@ -201,12 +201,12 @@ aside h5 {
201201
aside summary {
202202
cursor: default;
203203
}
204-
aside details textarea {
204+
aside details pre {
205205
background: #eee;
206-
width: 100%;
207206
border: 0;
208207
min-height: 300px;
209208
max-height: 500px;
209+
overflow: scroll;
210210
}
211211
212212
main article {

0 commit comments

Comments
 (0)