mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-21 23:36:15 -04:00
fix(sql-prettifier): better responsiveness
This commit is contained in:
parent
328fda65b3
commit
560fcf3f78
1 changed files with 44 additions and 51 deletions
|
@ -1,9 +1,7 @@
|
|||
<template>
|
||||
<div style="flex: 0 0 100%">
|
||||
<div style="margin: 0 auto; width: 600px">
|
||||
<n-space n-space item-style="flex: 1 1 0">
|
||||
<div>
|
||||
<n-form-item label="Dialect">
|
||||
<n-space item-style="flex:1 1 0" style="margin: 0 auto; max-width: 600px" :vertical="styleStore.isSmallScreen">
|
||||
<n-form-item label="Dialect" label-width="500">
|
||||
<n-select
|
||||
v-model:value="config.language"
|
||||
:options="[
|
||||
|
@ -23,8 +21,6 @@
|
|||
]"
|
||||
/>
|
||||
</n-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<n-form-item label="Keyword case">
|
||||
<n-select
|
||||
v-model:value="config.keywordCase"
|
||||
|
@ -35,8 +31,6 @@
|
|||
]"
|
||||
/>
|
||||
</n-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<n-form-item label="Indent style">
|
||||
<n-select
|
||||
v-model:value="config.indentStyle"
|
||||
|
@ -47,10 +41,8 @@
|
|||
]"
|
||||
/>
|
||||
</n-form-item>
|
||||
</div>
|
||||
</n-space>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<n-form-item label="Your SQL query">
|
||||
<n-input
|
||||
|
@ -77,6 +69,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { useStyleStore } from '@/stores/style.store';
|
||||
import { useElementSize } from '@vueuse/core';
|
||||
import hljs from 'highlight.js/lib/core';
|
||||
import sqlHljs from 'highlight.js/lib/languages/sql';
|
||||
|
@ -86,7 +79,7 @@ hljs.registerLanguage('sql', sqlHljs);
|
|||
|
||||
const inputElement = ref<HTMLElement>();
|
||||
const { height: inputElementHeight } = useElementSize(inputElement);
|
||||
|
||||
const styleStore = useStyleStore();
|
||||
const config = reactive<Partial<FormatFnOptions>>({
|
||||
keywordCase: 'upper',
|
||||
useTabs: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue