]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
workflow: add inline option to template explorer
authorEvan You <yyx990803@gmail.com>
Wed, 18 Nov 2020 17:09:10 +0000 (12:09 -0500)
committerEvan You <yyx990803@gmail.com>
Thu, 19 Nov 2020 00:38:38 +0000 (19:38 -0500)
packages/template-explorer/src/options.ts

index 3428aacebb151344beca4e897aeeffeadcaa42d4..7cf0914d46c94a19e580d66cf36379c2008e720f 100644 (file)
@@ -11,6 +11,7 @@ export const compilerOptions: CompilerOptions = reactive({
   hoistStatic: false,
   cacheHandlers: false,
   scopeId: null,
+  inline: false,
   ssrCssVars: `{ color }`,
   bindingMetadata: {
     TestComponent: BindingTypes.SETUP,
@@ -151,6 +152,19 @@ const App = {
               h('label', { for: 'scope-id' }, 'scopeId')
             ]),
 
+            // inline mode
+            h('li', [
+              h('input', {
+                type: 'checkbox',
+                id: 'inline',
+                checked: compilerOptions.inline,
+                onChange(e: Event) {
+                  compilerOptions.inline = (e.target as HTMLInputElement).checked
+                }
+              }),
+              h('label', { for: 'inline' }, 'inline')
+            ]),
+
             // toggle optimizeImports
             h('li', [
               h('input', {