dev #84
|
@ -362,9 +362,14 @@ button {
|
||||||
&-input {
|
&-input {
|
||||||
@apply flex items-center justify-between;
|
@apply flex items-center justify-between;
|
||||||
|
|
||||||
span {
|
>div {
|
||||||
@apply select-none w-full h-full;
|
@apply h-10 overflow-hidden rounded border-gray-300 shadow inline-block leading-none grow;
|
||||||
|
|
||||||
|
span {
|
||||||
|
@apply flex select-none w-full h-full justify-center items-center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-button {
|
&-button {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ralClassicPallette } from '@/components/ral'
|
import { ralClassicPallette } from '@/components/ral'
|
||||||
|
|
||||||
const props = defineProps(['color', 'cb'])
|
const props = defineProps([ 'cb'])
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<template v-for="col in ralClassicPallette">
|
<template v-for="col in ralClassicPallette">
|
||||||
<div class="picker-item" :class="[{ 'outline outline-primary': props.color == col.hex }]"
|
<div class="picker-item"
|
||||||
:style="[{ backgroundColor: col.hex }]" @click="props.cb(col.code)">
|
:style="[{ backgroundColor: col.hex }]" @click="props.cb(col.code)">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getFilename, patterns } from '../pattern';
|
import { getFilename, patterns } from '../pattern';
|
||||||
|
|
||||||
const props = defineProps(['color', 'cb']);
|
const props = defineProps([ 'cb']);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<template v-for="item in patterns">
|
<template v-for="item in patterns">
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getColorHexFromRal } from '@/components/ral'
|
const props = defineProps(['cb', 'name', 'type', 'disabled', 'goto_cam', 'goto_target'])
|
||||||
|
|
||||||
const props = defineProps(['color', 'cb', 'name', 'type', 'disabled', 'goto_cam', 'goto_target'])
|
|
||||||
|
|
||||||
const goto_cam = use_goto_camera()
|
const goto_cam = use_goto_camera()
|
||||||
const goto_target = use_goto_target()
|
const goto_target = use_goto_target()
|
||||||
|
@ -39,20 +37,19 @@ watch(open_calc, () => {
|
||||||
'picker_disabled': props.disabled,
|
'picker_disabled': props.disabled,
|
||||||
}]" ref="picker">
|
}]" ref="picker">
|
||||||
<div class="picker-input">
|
<div class="picker-input">
|
||||||
<template>
|
<div @click="toggleOpen(!is_open)">
|
||||||
<slot class="picker-selected" @click="toggleOpen(!is_open)"
|
<slot></slot>
|
||||||
:style="[props.color && { backgroundColor: props.color ?? '' }]"></slot>
|
</div>
|
||||||
</template>
|
|
||||||
<Icon class="picker-button" :name="is_open ? 'mdi:chevron-down' : 'mdi:chevron-up'"
|
<Icon class="picker-button" :name="is_open ? 'mdi:chevron-down' : 'mdi:chevron-up'"
|
||||||
@click="toggleOpen(!is_open)" />
|
@click="toggleOpen(!is_open)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="picker-changer flex flex-wrap" v-if="is_open">
|
<div class="picker-changer flex flex-wrap" v-if="is_open">
|
||||||
<template v-if="props.type == 'color'">
|
<template v-if="props.type == 'color'">
|
||||||
<DropdownColor :color="props.color" :cb="onClick" />
|
<DropdownColor :cb="onClick" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="props.type == 'pattern'">
|
<template v-else-if="props.type == 'pattern'">
|
||||||
<DropdownList :color="props.color" :cb="onClick" />
|
<DropdownList :cb="onClick" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue