mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 14:30:52 +01:00
implemented device name
This commit is contained in:
@ -20,13 +20,15 @@
|
||||
class="btn-error btn-outline w-full sm:w-auto"
|
||||
@click="onAbort"
|
||||
>
|
||||
<Icon name="mdi:close" /> {{ abortLabel ?? t('abort') }}
|
||||
<Icon :name="abortIcon || 'mdi:close'" />
|
||||
{{ abortLabel ?? t('abort') }}
|
||||
</UiButton>
|
||||
<UiButton
|
||||
class="btn-primary w-full sm:w-auto"
|
||||
@click="onConfirm"
|
||||
>
|
||||
<Icon name="mdi:check" /> {{ confirmLabel ?? t('confirm') }}
|
||||
<Icon :name="confirmIcon || 'mdi:check'" />
|
||||
{{ confirmLabel ?? t('confirm') }}
|
||||
</UiButton>
|
||||
</slot>
|
||||
</template>
|
||||
@ -34,7 +36,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{ confirmLabel?: string; abortLabel?: string; title?: string }>()
|
||||
defineProps<{
|
||||
confirmLabel?: string
|
||||
abortLabel?: string
|
||||
title?: string
|
||||
abortIcon?: string
|
||||
confirmIcon?: string
|
||||
}>()
|
||||
|
||||
const open = defineModel<boolean>('open', { default: false })
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
class="overlay-animation-target overlay-open:duration-300 overlay-open:opacity-100 transition-all ease-out modal-dialog"
|
||||
>
|
||||
<div class="modal-content justify-between">
|
||||
<div class="modal-header">
|
||||
<div class="modal-header py-0 sm:py-4">
|
||||
<div
|
||||
v-if="title || $slots.title"
|
||||
class="modal-title py-4 break-all"
|
||||
@ -49,7 +49,7 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body text-sm sm:text-base grow">
|
||||
<div class="modal-body text-sm sm:text-base grow mt-0 pt-0">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
|
||||
@ -73,13 +73,13 @@
|
||||
<script setup lang="ts">
|
||||
import type { ZodSchema } from 'zod'
|
||||
|
||||
const input = defineModel<string | number | undefined | null>({
|
||||
required: true,
|
||||
})
|
||||
|
||||
const inputRef = useTemplateRef('inputRef')
|
||||
defineExpose({ inputRef })
|
||||
|
||||
defineOptions({
|
||||
inheritAttrs: false,
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
placeholder: {
|
||||
type: String,
|
||||
@ -131,11 +131,6 @@ const props = defineProps({
|
||||
read_only: Boolean,
|
||||
})
|
||||
|
||||
const input = defineModel<string | number | undefined | null>({
|
||||
default: '',
|
||||
required: true,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
if (props.autofocus && inputRef.value) inputRef.value.focus()
|
||||
})
|
||||
|
||||
7
src/components/ui/test.vue
Normal file
7
src/components/ui/test.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<input v-model="value" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const value = defineModel()
|
||||
</script>
|
||||
Reference in New Issue
Block a user