mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Added defineModel support for PreviewText and added missing Customize component in GlitchTextDemo.
This commit is contained in:
@@ -3,24 +3,18 @@
|
||||
<span class="text-label">{{ title }}</span>
|
||||
|
||||
<input
|
||||
:value="modelValue"
|
||||
@input="handleChange"
|
||||
v-model="model"
|
||||
class="w-[300px] px-3 py-2 bg-[#0b0b0b] border border-[#333] rounded-md text-white focus:outline-none focus:border-[#666]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
defineProps<{
|
||||
title: string;
|
||||
modelValue: string;
|
||||
}>();
|
||||
|
||||
const handleChange = (event: Event) => {
|
||||
const target = event.target as HTMLInputElement;
|
||||
emit('update:modelValue', target.value);
|
||||
};
|
||||
const model = defineModel<string>();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user