mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-28 18:46:15 -04:00
refactor(lint): linter auto fix
This commit is contained in:
parent
8e29a97404
commit
086d31eab5
54 changed files with 1122 additions and 1503 deletions
|
@ -1,9 +1,6 @@
|
|||
<template>
|
||||
<n-card>
|
||||
<n-form
|
||||
label-width="100"
|
||||
label-placement="left"
|
||||
>
|
||||
<n-form label-width="100" label-placement="left">
|
||||
<n-form-item label="color picker:">
|
||||
<n-color-picker
|
||||
v-model:value="hex"
|
||||
|
@ -12,46 +9,25 @@
|
|||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="color name:">
|
||||
<input-copyable
|
||||
v-model:value="name"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'name')"
|
||||
/>
|
||||
<input-copyable v-model:value="name" :on-input="(v: string) => onInputUpdated(v, 'name')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="hex:">
|
||||
<input-copyable
|
||||
v-model:value="hex"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'hex')"
|
||||
/>
|
||||
<input-copyable v-model:value="hex" :on-input="(v: string) => onInputUpdated(v, 'hex')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="rgb:">
|
||||
<input-copyable
|
||||
v-model:value="rgb"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'rgb')"
|
||||
/>
|
||||
<input-copyable v-model:value="rgb" :on-input="(v: string) => onInputUpdated(v, 'rgb')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="hsl:">
|
||||
<input-copyable
|
||||
v-model:value="hsl"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'hsl')"
|
||||
/>
|
||||
<input-copyable v-model:value="hsl" :on-input="(v: string) => onInputUpdated(v, 'hsl')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="hwb:">
|
||||
<input-copyable
|
||||
v-model:value="hwb"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'hwb')"
|
||||
/>
|
||||
<input-copyable v-model:value="hwb" :on-input="(v: string) => onInputUpdated(v, 'hwb')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="lch:">
|
||||
<input-copyable
|
||||
v-model:value="lch"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'lch')"
|
||||
/>
|
||||
<input-copyable v-model:value="lch" :on-input="(v: string) => onInputUpdated(v, 'lch')" />
|
||||
</n-form-item>
|
||||
<n-form-item label="cmyk:">
|
||||
<input-copyable
|
||||
v-model:value="cmyk"
|
||||
:on-input="(v: string) => onInputUpdated(v, 'cmyk')"
|
||||
/>
|
||||
<input-copyable v-model:value="cmyk" :on-input="(v: string) => onInputUpdated(v, 'cmyk')" />
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
</n-card>
|
||||
|
@ -59,23 +35,23 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { colord, extend } from "colord";
|
||||
import InputCopyable from "../../components/InputCopyable.vue";
|
||||
import { colord, extend } from 'colord';
|
||||
import InputCopyable from '../../components/InputCopyable.vue';
|
||||
|
||||
import cmykPlugin from "colord/plugins/cmyk";
|
||||
import hwbPlugin from "colord/plugins/hwb";
|
||||
import namesPlugin from "colord/plugins/names";
|
||||
import lchPlugin from "colord/plugins/lch";
|
||||
import cmykPlugin from 'colord/plugins/cmyk';
|
||||
import hwbPlugin from 'colord/plugins/hwb';
|
||||
import namesPlugin from 'colord/plugins/names';
|
||||
import lchPlugin from 'colord/plugins/lch';
|
||||
|
||||
extend([cmykPlugin, hwbPlugin, namesPlugin, lchPlugin]);
|
||||
|
||||
const name = ref('')
|
||||
const hex = ref('#1ea54cff')
|
||||
const rgb = ref('')
|
||||
const hsl = ref('')
|
||||
const hwb = ref('')
|
||||
const cmyk = ref('')
|
||||
const lch = ref('')
|
||||
const name = ref('');
|
||||
const hex = ref('#1ea54cff');
|
||||
const rgb = ref('');
|
||||
const hsl = ref('');
|
||||
const hwb = ref('');
|
||||
const cmyk = ref('');
|
||||
const lch = ref('');
|
||||
|
||||
function onInputUpdated(value: string, omit: string) {
|
||||
const color = colord(value);
|
||||
|
@ -89,6 +65,5 @@ function onInputUpdated(value: string, omit: string) {
|
|||
if (omit !== 'lch') lch.value = color.toLchString();
|
||||
}
|
||||
|
||||
onInputUpdated(hex.value, 'hex')
|
||||
|
||||
onInputUpdated(hex.value, 'hex');
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue