@@ -13,6 +13,10 @@ const props = defineProps({
1313 },
1414 config: {
1515 type: Object ,
16+ },
17+ showDefault: {
18+ type: Boolean ,
19+ default: true
1620 }
1721})
1822
@@ -130,98 +134,100 @@ const highlightedConfig = computed(() => {
130134 </script >
131135
132136<template >
133- <h1 class =" gradient-text" style =" width :fit-content ; font-weight : 900 " ><slot name =" title" /></h1 >
134- <button class =" btn btn-reset" @click =" refresh" >
135- <BaseIcon :size =" 20" stroke =" #ff7f0e" name =" restart" />
136- <code style =" font-weight : bold ;" >
137- RELOAD PAGE
138- </code >
139- </button >
140-
141- <div class =" knobs" >
142- <details >
143- <summary >Config knobs</summary >
144- <slot name =" knobs" />
145- </details >
146- </div >
147-
148- <div v-if =" $slots.responsive" style =" margin-left :1rem " >
149- <div class =" title" >
150- <div class =" tag" ><BaseIcon name =" resize" :size =" 16" stroke =" #1A1A1A" />Responsive</div > {{ comp }} (Local)
151- </div >
152- <slot name =" responsive" />
153- </div >
154-
155- <div style =" width : 100% ; max-width : 600px ; padding : 12px " v-if =" comp" >
156- <div class =" title" >
157- <div class =" tag" ><BaseIcon name =" settings" :size =" 16" stroke =" #1A1A1A" />Default config</div > {{ comp }} (local VueDataUi universal component, knobs don't apply)
137+ <div id =" BOX" >
138+ <h1 class =" gradient-text" style =" width :fit-content ; font-weight : 900 " ><slot name =" title" /></h1 >
139+ <button class =" btn btn-reset" @click =" refresh" >
140+ <BaseIcon :size =" 20" stroke =" #ff7f0e" name =" restart" />
141+ <code style =" font-weight : bold ;" >
142+ RELOAD PAGE
143+ </code >
144+ </button >
145+
146+ <div class =" knobs" >
147+ <details >
148+ <summary >Config knobs</summary >
149+ <slot name =" knobs" />
150+ </details >
158151 </div >
159- <LocalVueDataUi :component =" comp" :dataset =" dataset" />
160- </div >
161152
162- <div class =" box" >
163- <div style =" width :100% ; max-width : 600px " v-if =" $slots.theme" >
153+ <div v-if =" $slots.responsive" style =" margin-left :1rem " >
164154 <div class =" title" >
165- <div class =" tag" ><BaseIcon name =" palette " :size =" 16" stroke =" #1A1A1A" />Theme only </div > {{ comp }} (local, knobs don't apply )
155+ <div class =" tag" ><BaseIcon name =" resize " :size =" 16" stroke =" #1A1A1A" />Responsive </div > {{ comp }} (Local )
166156 </div >
167- <slot name =" theme " />
157+ <slot name =" responsive " />
168158 </div >
169- <div style =" width :100% ; max-width : 600px " >
159+
160+ <div style =" width : 100% ; max-width : 600px ; padding : 12px " v-if =" comp && showDefault" >
170161 <div class =" title" >
171- <div class =" tag" ><BaseIcon name =" curlySpread " :size =" 16" stroke =" #1A1A1A" />Local </div > {{ comp }}
162+ <div class =" tag" ><BaseIcon name =" settings " :size =" 16" stroke =" #1A1A1A" />Default config </div > {{ comp }} (local VueDataUi universal component, knobs don't apply)
172163 </div >
173- <slot name = " local " />
164+ <LocalVueDataUi :component = " comp " :dataset = " dataset " />
174165 </div >
175- <div style =" width :100% ; max-width : 600px " >
176- <div class =" title" >
177- <div class =" tag" ><BaseIcon name =" curlySpread" :size =" 16" stroke =" #1A1A1A" />VueDataUi universal</div > (local)
166+
167+ <div class =" box" >
168+ <div style =" width :100% ; max-width : 600px " v-if =" $slots.theme" >
169+ <div class =" title" >
170+ <div class =" tag" ><BaseIcon name =" palette" :size =" 16" stroke =" #1A1A1A" />Theme only</div > {{ comp }} (local, knobs don't apply)
171+ </div >
172+ <slot name =" theme" />
178173 </div >
179- <slot name = " VDUI- local" / >
180- </ div >
181- <div style = " width : 100 % ; max-width : 600 px " >
182- < div class = " title " >
183- <div class = " tag " >< BaseIcon name =" boxes " :size = " 16 " stroke = " #1A1A1A " />Build legacy import</ div >{{ comp }}
174+ <div style = " width : 100 % ; max-width : 600 px " v-if = " $slots. local" >
175+ < div class = " title " >
176+ <div class = " tag " >< BaseIcon name = " curlySpread " :size = " 16 " stroke = " #1A1A1A " />Local</ div > {{ comp }}
177+ </ div >
178+ <slot name =" local " />
184179 </div >
185- <slot name = " build " / >
186- </ div >
187- <div style = " width : 100 % ; max-width : 600 px " >
188- < div class = " title " >
189- <div class = " tag " >< BaseIcon name =" boxes " :size = " 16 " stroke = " #1A1A1A " />Treeshaken build</ div >{{ comp }}
180+ <div style = " width : 100 % ; max-width : 600 px " v-if = " $slots['VDUI-local'] " >
181+ < div class = " title " >
182+ <div class = " tag " >< BaseIcon name = " curlySpread " :size = " 16 " stroke = " #1A1A1A " />VueDataUi universal</ div > (local)
183+ </ div >
184+ <slot name =" VDUI-local " />
190185 </div >
191- <slot name =" build-treesh" />
192- </div >
193- <div style =" width : 100% ; max-width : 600px " >
194- <div class =" title" >
195- <div class =" tag" ><BaseIcon name =" vueDataUi" :size =" 16" stroke =" #1A1A1A" />VueDataUi universal build</div >
186+ <div style =" width : 100% ; max-width : 600px " v-if =" $slots.build" >
187+ <div class =" title" >
188+ <div class =" tag" ><BaseIcon name =" boxes" :size =" 16" stroke =" #1A1A1A" />Build legacy import</div >{{ comp }}
189+ </div >
190+ <slot name =" build" />
191+ </div >
192+ <div style =" width : 100% ; max-width : 600px " v-if =" $slots['build-treesh']" >
193+ <div class =" title" >
194+ <div class =" tag" ><BaseIcon name =" boxes" :size =" 16" stroke =" #1A1A1A" />Treeshaken build</div >{{ comp }}
195+ </div >
196+ <slot name =" build-treesh" />
197+ </div >
198+ <div style =" width : 100% ; max-width : 600px " v-if =" $slots['VDUI-build']" >
199+ <div class =" title" >
200+ <div class =" tag" ><BaseIcon name =" vueDataUi" :size =" 16" stroke =" #1A1A1A" />VueDataUi universal build</div >
201+ </div >
202+ <slot name =" VDUI-build" />
196203 </div >
197- <slot name =" VDUI-build" />
198204 </div >
199- </ div >
200-
201- < button v-if = " !!config " class = " btn " @click = " copy(config, true) " >
202- <BaseIcon :size =" 20" stroke =" #42d392" v-if = " copying " name =" hourglass " is-spin />
203- < BaseIcon :size = " 20 " stroke = " #42d392 " v-else name = " copy " / >
204- < code style = " font-weight : bold ; " v-if = " !copying " >
205- COPY CONFIG LOG
206- </ code >
207- < code style =" font-weight : bold ; " v-else >
208- COPYING< span style = " color : #42d392 " >........</ span >
209- </code >
210- </ button >
211- < div style = " margin-top : 1 rem ; display : flex ; align-items : start ; gap : 0.5 rem ; background : #ffbb7820 ; padding : 0.5 rem 1 rem " >
212- < BaseIcon name = " triangle " stroke = " #ff7f0e " :size = " 20 " / >
213- < span style = " color : #ffbb78 " >
214- Callbacks are displayed inside quotes to be < i >readable</ i > .<br >
215- This config is derived from the model created in the <code style =" color :#66DDAA ;background :#66DDAA20 ;padding : 0 0.5rem " >Arena{{ props.comp }}.vue </code > file and is partial.< br >
216- The library component resolves the model's missing config attributes from the < code style = " color : #fdd663 ; background : #fdd66320 ; padding : 0 0.5 rem " >useConfig.js</ code > definition.
217- </span >
218- </ div >
219- < div class = " config " >
220- < code style = " white-space : pre-wrap ; display : block ; " ref = " configContent " >
221- < slot name = " config " >
222- <span v-html = " highlightedConfig " / >
223- </slot >
224- </code >
205+
206+ < button v-if = " !!config " class = " btn " @click = " copy(config, true) " >
207+ < BaseIcon :size = " 20 " stroke = " #42d392 " v-if = " copying " name = " hourglass " is-spin / >
208+ <BaseIcon :size =" 20" stroke =" #42d392" v-else name =" copy " />
209+ < code style = " font-weight : bold ; " v-if = " !copying " >
210+ COPY CONFIG LOG
211+ </ code >
212+ < code style = " font-weight : bold ; " v-else >
213+ COPYING< span style =" color : #42d392 " >........</ span >
214+ </ code >
215+ </button >
216+ < div style = " margin-top : 1 rem ; display : flex ; align-items : start ; gap : 0.5 rem ; background : #ffbb7820 ; padding : 0.5 rem 1 rem " >
217+ < BaseIcon name = " triangle " stroke = " #ff7f0e " :size = " 20 " / >
218+ < span style = " color : #ffbb78 " >
219+ Callbacks are displayed inside quotes to be < i >readable</ i >.< br >
220+ This config is derived from the model created in the < code style = " color : #66DDAA ; background : #66DDAA20 ; padding : 0 0.5 rem " >Arena{{ props.comp }}.vue</ code > file and is partial .<br >
221+ The library component resolves the model's missing config attributes from the <code style =" color :#fdd663 ;background :#fdd66320 ;padding :0 0.5rem " >useConfig.js </code > definition.
222+ </ span >
223+ </div >
224+ < div class = " config " >
225+ < code style = " white-space : pre-wrap ; display : block ; " ref = " configContent " >
226+ < slot name = " config " >
227+ < span v-html = " highlightedConfig " / >
228+ </ slot >
229+ </code >
230+ </div >
225231 </div >
226232</template >
227233
0 commit comments