Skip to content

305 - 大写 #2276

@mu-muw

Description

@mu-muw
// 你的答案
<script setup>
import { ref } from 'vue'
// 创建了一个名为value的响应式引用变量,并将其值设置为空字符串。
const value = ref('')
</script>

<template>
  <!-- v-model.capitalize="value" 的作用是:当用户在输入框中输入内容时,
    输入的值会自动转换为大写,同时,value 属性的值也会相应地更新为大写。 -->
 <input type="text" v-model.capitalize="value" />
</template>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions