Fri May 26 03:54:00 UTC 2023 inscode

上级 c280ca41
...@@ -12,3 +12,32 @@ ...@@ -12,3 +12,32 @@
</video> </video>
</body> </body>
</html> </html>
<template>
<div>
<input type="text" v-model="textInput" @input="updateInput">
<span>{{ textHint }}</span>
</div>
</template>
<script>
export default {
data() {
return {
textInput: '',
textHint: ''
}
},
methods: {
updateInput(event) {
// 更新文本框的值
this.textInput = event.target.value
// 根据文本框的值更新提示信息
this.updateHint()
},
updateHint() {
// 根据文本框的值计算提示信息
this.textHint = '您输入了 ' + this.textInput.length + ' 个字符'
}
}
}
</script>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册