[修复] timeline 组件样式
This commit is contained in:
@@ -1,3 +1,38 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "LayTextarea",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineProps, defineEmits } from "vue";
|
||||
|
||||
export interface LayTextareaProps {
|
||||
name?: string;
|
||||
modelValue?: string;
|
||||
placeholder?: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
const props = defineProps<LayTextareaProps>();
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "input", "focus", "blur"]);
|
||||
|
||||
const onInput = function (event: InputEvent) {
|
||||
const inputElement = event.target as HTMLInputElement;
|
||||
emit("update:modelValue", inputElement.value);
|
||||
emit("input", inputElement.value);
|
||||
};
|
||||
|
||||
const onFocus = function (event: FocusEvent) {
|
||||
emit("focus", event);
|
||||
};
|
||||
|
||||
const onBlur = function () {
|
||||
emit("blur");
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<textarea
|
||||
:value="modelValue"
|
||||
@@ -10,31 +45,4 @@
|
||||
@focus="onFocus"
|
||||
@blur="onBlur"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup name="LayTextarea" lang="ts">
|
||||
import { defineProps, defineEmits } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
name?: string
|
||||
modelValue?: string
|
||||
placeholder?: string
|
||||
disabled?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'input', 'focus', 'blur'])
|
||||
|
||||
const onInput = function (event: InputEvent) {
|
||||
const inputElement = event.target as HTMLInputElement
|
||||
emit('update:modelValue', inputElement.value)
|
||||
emit('input', inputElement.value)
|
||||
}
|
||||
|
||||
const onFocus = function (event: FocusEvent) {
|
||||
emit('focus', event)
|
||||
}
|
||||
|
||||
const onBlur = function () {
|
||||
emit('blur')
|
||||
}
|
||||
</script>
|
||||
</template>
|
||||
Reference in New Issue
Block a user