This commit is contained in:
Zyronon
2025-11-13 02:19:42 +08:00
parent 9585031e64
commit 04136db975
9 changed files with 220 additions and 22897 deletions

View File

@@ -62,7 +62,7 @@ defineEmits(['click'])
color: white;
& + .base-button {
margin-left: var(--space);
margin-left: 1rem;
}
.loading {

View File

@@ -33,7 +33,7 @@ const props = defineProps({
},
});
const emit = defineEmits(['update:modelValue', 'input', 'change', 'focus', 'blur', 'validation']);
const emit = defineEmits(['update:modelValue', 'input', 'change', 'focus', 'blur', 'validation', 'enter']);
const attrs = useAttrs();
const inputValue = ref(props.modelValue);
@@ -78,6 +78,10 @@ const onBlur = (e: FocusEvent) => {
emit('blur', e);
};
const onEnter = (e: KeyboardEvent) => {
emit('enter', e);
};
const clearInput = () => {
inputValue.value = '';
emit('update:modelValue', '');
@@ -112,6 +116,7 @@ const vFocus = {
@change="onChange"
@focus="onFocus"
@blur="onBlur"
@keydown.enter="onEnter"
class="inner"
v-focus="autofocus"
:maxlength="maxLength"