v-model命令とその修飾子

5555 ワード

DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Titletitle>
head>
<body>
<div id="app">
    <div>
        <input type="text" v-model="name">
        <pre><h2>{
     {name}}h2>pre>
    div>
    <div>
        <input type="text" v-model.lazy="name">
        <pre><h2>{
     {name}}h2>pre>
    div>
    <div>
        <input type="text" v-model.trim="name">
        <pre><h2>{
     {name}}h2>pre>
    div>
div>

<script src="../lib/vue.js">script>
<script src="js/main.js">script>
body>
html>
var app = new Vue(
    {
        el:"#app",
        data:{
            name:""
        },
        methods:{

        }
    }
)
 
転載先:https://www.cnblogs.com/52-qq/p/8386264.html