6 changed files with 81 additions and 33 deletions
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 1.7 MiB |
@ -0,0 +1,51 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
defineProps<{ |
||||
|
modelValue: string |
||||
|
placeholder?: string |
||||
|
type?: string |
||||
|
autocomplete?: string |
||||
|
}>() |
||||
|
|
||||
|
defineEmits<{ |
||||
|
'update:modelValue': [value: string] |
||||
|
}>() |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<div class="ink-input-wrapper"> |
||||
|
<input class="ink-input" :type="type || 'text'" :placeholder="placeholder" :value="modelValue" |
||||
|
:autocomplete="autocomplete" @input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<style scoped> |
||||
|
.ink-input-wrapper { |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.ink-input { |
||||
|
width: 100%; |
||||
|
height: 60px; |
||||
|
padding: 14px 24px 14px 36px; |
||||
|
background: url(@/assets/brush.png) no-repeat left center; |
||||
|
background-size: 100% 100%; |
||||
|
border: none; |
||||
|
border-radius: 12px; |
||||
|
font-family: "STKaiti", "KaiTi", "华文楷体", "Microsoft YaHei", cursive; |
||||
|
font-size: 16px; |
||||
|
color: #ffffff; |
||||
|
letter-spacing: 3px; |
||||
|
outline: none; |
||||
|
transition: all 0.3s ease; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
|
||||
|
.ink-input::placeholder { |
||||
|
color: rgba(255, 255, 255, 0.6); |
||||
|
letter-spacing: 3px; |
||||
|
} |
||||
|
|
||||
|
.ink-input:focus { |
||||
|
outline: none; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue