English 中文(简体)
vue/no-v-model-argument v-model Directive need no debate.eslint-plugin-vue
原标题:vue/no-v-model-argument v-model directives require no argument.eslint-plugin-vue

我想通过介绍来显示第一个名字和最后名称。 在信息领域,即宣布推进剂。 一、导 言 vue by v-model:propsname = “form.introduction.propsname” 。 i 正在“内部和带”出现错误;

Introduction.vue

<template>
  <form>
    <InformationField
      v-model:firstname="form.introduction.firstname"
      v-model:lastname="form.introduction.lastname"
    />
  </form>
</template>

<script>
import InformationField from  ./InformationField.vue ;
export default {
  components: {
    InformationField,
  },
  setup(){
    const form = ref({
      introduction:{
        firstname:   ,
        lastname:   ,
      }
    })
  }
};
</script>

Information Field.vue

<template>
  <div>
      <label>
        Firstname
        <input
          type="text"
          @input="$emit( update:firstname , $event.target.value)"
          :value="firstname"
          ref="firstnameRef"
          placeholder="firstname"
        />
      </label>
      <label>
        Lastname
        <input
          type="text"
          @input="$emit( update:lastname , $event.target.value)"
          :value="lastname"
          placeholder="lastname"
        />
      </label>
  </div>
</template>

<script>
export default {
  props: {
    firstname: {
      type: String,
      default: "",
    },
    lastname: {
      type: String,
      default: "",
    }
  },
};
</script>
最佳回答
问题回答

暂无回答




相关问题
Nuxt 3 useRoute import cannot find

I am using latest nuxt version and when I tried to use the useRoute method is triggers a "Cannot Find name useRoute" but it works so I would like to know what could I be missing My package ...

Vue array dependent select not display data

I have dependent selection like this. Selection image when i console log, they have data but not render data in selection data This is what i ve tried. for Product selection has default selected value ...

How to inject Bearer Token in Axios boot file

Quasar has a different setup using boot files and my current axios.ts looks liek this: import { boot } from quasar/wrappers ; import axios, { AxiosInstance } from axios ; declare module @vue/...

Vue router and Vite Base url conflict

I use Vue Router to develop my single page application and use Vite to package my project. I want to deploy all static files (such as index.js and index.css) under another CDN domain name (cdn.example....

Vue.js change class on mounted

I have a button element with a .hover property and I need the hover animation to also happen as soon as the page is mounted. How can I attribute a class to a button on the mounted function and then ...

Laravel +Vuejs CORS issue

I am facing a dilemma wit the CORS issue. I have application that is configured as follow: API: https://abc.mydomain.com (laravel) front end: https://subdomain.mydomain.com(VueJS) Both applications ...

热门标签